1. Packages
  2. Ucloud Provider
  3. API Docs
  4. getAntiDdosIps
ucloud 1.39.1 published on Monday, Apr 14, 2025 by ucloud

ucloud.getAntiDdosIps

Explore with Pulumi AI

ucloud logo
ucloud 1.39.1 published on Monday, Apr 14, 2025 by ucloud

    Provides a list of IP from an Anti-DDoS instance.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ucloud from "@pulumi/ucloud";
    
    const ips = ucloud.getAntiDdosIps({
        instanceId: "usecure_ghp-xxx",
        outputFile: "ips.json",
    });
    
    import pulumi
    import pulumi_ucloud as ucloud
    
    ips = ucloud.get_anti_ddos_ips(instance_id="usecure_ghp-xxx",
        output_file="ips.json")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ucloud/ucloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ucloud.GetAntiDdosIps(ctx, &ucloud.GetAntiDdosIpsArgs{
    			InstanceId: "usecure_ghp-xxx",
    			OutputFile: pulumi.StringRef("ips.json"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ucloud = Pulumi.Ucloud;
    
    return await Deployment.RunAsync(() => 
    {
        var ips = Ucloud.GetAntiDdosIps.Invoke(new()
        {
            InstanceId = "usecure_ghp-xxx",
            OutputFile = "ips.json",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ucloud.UcloudFunctions;
    import com.pulumi.ucloud.inputs.GetAntiDdosIpsArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var ips = UcloudFunctions.getAntiDdosIps(GetAntiDdosIpsArgs.builder()
                .instanceId("usecure_ghp-xxx")
                .outputFile("ips.json")
                .build());
    
        }
    }
    
    variables:
      ips:
        fn::invoke:
          function: ucloud:getAntiDdosIps
          arguments:
            instanceId: usecure_ghp-xxx
            outputFile: ips.json
    

    Using getAntiDdosIps

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getAntiDdosIps(args: GetAntiDdosIpsArgs, opts?: InvokeOptions): Promise<GetAntiDdosIpsResult>
    function getAntiDdosIpsOutput(args: GetAntiDdosIpsOutputArgs, opts?: InvokeOptions): Output<GetAntiDdosIpsResult>
    def get_anti_ddos_ips(id: Optional[str] = None,
                          instance_id: Optional[str] = None,
                          output_file: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetAntiDdosIpsResult
    def get_anti_ddos_ips_output(id: Optional[pulumi.Input[str]] = None,
                          instance_id: Optional[pulumi.Input[str]] = None,
                          output_file: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetAntiDdosIpsResult]
    func GetAntiDdosIps(ctx *Context, args *GetAntiDdosIpsArgs, opts ...InvokeOption) (*GetAntiDdosIpsResult, error)
    func GetAntiDdosIpsOutput(ctx *Context, args *GetAntiDdosIpsOutputArgs, opts ...InvokeOption) GetAntiDdosIpsResultOutput

    > Note: This function is named GetAntiDdosIps in the Go SDK.

    public static class GetAntiDdosIps 
    {
        public static Task<GetAntiDdosIpsResult> InvokeAsync(GetAntiDdosIpsArgs args, InvokeOptions? opts = null)
        public static Output<GetAntiDdosIpsResult> Invoke(GetAntiDdosIpsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAntiDdosIpsResult> getAntiDdosIps(GetAntiDdosIpsArgs args, InvokeOptions options)
    public static Output<GetAntiDdosIpsResult> getAntiDdosIps(GetAntiDdosIpsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ucloud:index/getAntiDdosIps:getAntiDdosIps
      arguments:
        # arguments dictionary

    The following arguments are supported:

    InstanceId string
    ID of an Anti-DDoS instance.
    Id string
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    InstanceId string
    ID of an Anti-DDoS instance.
    Id string
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    instanceId String
    ID of an Anti-DDoS instance.
    id String
    outputFile String
    File name where to save data source results (after running pulumi preview).
    instanceId string
    ID of an Anti-DDoS instance.
    id string
    outputFile string
    File name where to save data source results (after running pulumi preview).
    instance_id str
    ID of an Anti-DDoS instance.
    id str
    output_file str
    File name where to save data source results (after running pulumi preview).
    instanceId String
    ID of an Anti-DDoS instance.
    id String
    outputFile String
    File name where to save data source results (after running pulumi preview).

    getAntiDdosIps Result

    The following output properties are available:

    Id string
    InstanceId string
    ID of an Anti-DDoS instance.
    Ips List<GetAntiDdosIpsIp>
    A list of IPs. Each element contains the following attributes
    TotalCount double
    Total number of Anti-DDoS instances that satisfy the condition.
    OutputFile string
    Id string
    InstanceId string
    ID of an Anti-DDoS instance.
    Ips []GetAntiDdosIpsIp
    A list of IPs. Each element contains the following attributes
    TotalCount float64
    Total number of Anti-DDoS instances that satisfy the condition.
    OutputFile string
    id String
    instanceId String
    ID of an Anti-DDoS instance.
    ips List<GetAntiDdosIpsIp>
    A list of IPs. Each element contains the following attributes
    totalCount Double
    Total number of Anti-DDoS instances that satisfy the condition.
    outputFile String
    id string
    instanceId string
    ID of an Anti-DDoS instance.
    ips GetAntiDdosIpsIp[]
    A list of IPs. Each element contains the following attributes
    totalCount number
    Total number of Anti-DDoS instances that satisfy the condition.
    outputFile string
    id str
    instance_id str
    ID of an Anti-DDoS instance.
    ips Sequence[GetAntiDdosIpsIp]
    A list of IPs. Each element contains the following attributes
    total_count float
    Total number of Anti-DDoS instances that satisfy the condition.
    output_file str
    id String
    instanceId String
    ID of an Anti-DDoS instance.
    ips List<Property Map>
    A list of IPs. Each element contains the following attributes
    totalCount Number
    Total number of Anti-DDoS instances that satisfy the condition.
    outputFile String

    Supporting Types

    GetAntiDdosIpsIp

    Comment string
    Comment of the IP.
    Domain string
    Corresponding domain of the IP.
    InstanceId string
    ID of an Anti-DDoS instance.
    Ip string
    IP address
    ProxyIps List<string>
    List of proxy IPs, which should be allowed in firewall or security group policy. Each element is a string.
    Status string
    Status of the IP. Possible values are Pending and Success
    Comment string
    Comment of the IP.
    Domain string
    Corresponding domain of the IP.
    InstanceId string
    ID of an Anti-DDoS instance.
    Ip string
    IP address
    ProxyIps []string
    List of proxy IPs, which should be allowed in firewall or security group policy. Each element is a string.
    Status string
    Status of the IP. Possible values are Pending and Success
    comment String
    Comment of the IP.
    domain String
    Corresponding domain of the IP.
    instanceId String
    ID of an Anti-DDoS instance.
    ip String
    IP address
    proxyIps List<String>
    List of proxy IPs, which should be allowed in firewall or security group policy. Each element is a string.
    status String
    Status of the IP. Possible values are Pending and Success
    comment string
    Comment of the IP.
    domain string
    Corresponding domain of the IP.
    instanceId string
    ID of an Anti-DDoS instance.
    ip string
    IP address
    proxyIps string[]
    List of proxy IPs, which should be allowed in firewall or security group policy. Each element is a string.
    status string
    Status of the IP. Possible values are Pending and Success
    comment str
    Comment of the IP.
    domain str
    Corresponding domain of the IP.
    instance_id str
    ID of an Anti-DDoS instance.
    ip str
    IP address
    proxy_ips Sequence[str]
    List of proxy IPs, which should be allowed in firewall or security group policy. Each element is a string.
    status str
    Status of the IP. Possible values are Pending and Success
    comment String
    Comment of the IP.
    domain String
    Corresponding domain of the IP.
    instanceId String
    ID of an Anti-DDoS instance.
    ip String
    IP address
    proxyIps List<String>
    List of proxy IPs, which should be allowed in firewall or security group policy. Each element is a string.
    status String
    Status of the IP. Possible values are Pending and Success

    Package Details

    Repository
    ucloud ucloud/terraform-provider-ucloud
    License
    Notes
    This Pulumi package is based on the ucloud Terraform Provider.
    ucloud logo
    ucloud 1.39.1 published on Monday, Apr 14, 2025 by ucloud