1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. ddos
  5. getDdosBgpIps
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

alicloud.ddos.getDdosBgpIps

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

    This data source provides the Ddos Bgp Ips of the current Alibaba Cloud user.

    NOTE: Available in v1.180.0+.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const ids = alicloud.ddos.getDdosBgpIps({
        instanceId: "example_value",
        ids: [
            "example_value-1",
            "example_value-2",
        ],
    });
    export const ddosbgpIpId1 = ids.then(ids => ids.ips?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    ids = alicloud.ddos.get_ddos_bgp_ips(instance_id="example_value",
        ids=[
            "example_value-1",
            "example_value-2",
        ])
    pulumi.export("ddosbgpIpId1", ids.ips[0].id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ddos"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		ids, err := ddos.GetDdosBgpIps(ctx, &ddos.GetDdosBgpIpsArgs{
    			InstanceId: "example_value",
    			Ids: []string{
    				"example_value-1",
    				"example_value-2",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("ddosbgpIpId1", ids.Ips[0].Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var ids = AliCloud.Ddos.GetDdosBgpIps.Invoke(new()
        {
            InstanceId = "example_value",
            Ids = new[]
            {
                "example_value-1",
                "example_value-2",
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["ddosbgpIpId1"] = ids.Apply(getDdosBgpIpsResult => getDdosBgpIpsResult.Ips[0]?.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.ddos.DdosFunctions;
    import com.pulumi.alicloud.ddos.inputs.GetDdosBgpIpsArgs;
    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 ids = DdosFunctions.getDdosBgpIps(GetDdosBgpIpsArgs.builder()
                .instanceId("example_value")
                .ids(            
                    "example_value-1",
                    "example_value-2")
                .build());
    
            ctx.export("ddosbgpIpId1", ids.applyValue(getDdosBgpIpsResult -> getDdosBgpIpsResult.ips()[0].id()));
        }
    }
    
    variables:
      ids:
        fn::invoke:
          Function: alicloud:ddos:getDdosBgpIps
          Arguments:
            instanceId: example_value
            ids:
              - example_value-1
              - example_value-2
    outputs:
      ddosbgpIpId1: ${ids.ips[0].id}
    

    Using getDdosBgpIps

    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 getDdosBgpIps(args: GetDdosBgpIpsArgs, opts?: InvokeOptions): Promise<GetDdosBgpIpsResult>
    function getDdosBgpIpsOutput(args: GetDdosBgpIpsOutputArgs, opts?: InvokeOptions): Output<GetDdosBgpIpsResult>
    def get_ddos_bgp_ips(ids: Optional[Sequence[str]] = None,
                         instance_id: Optional[str] = None,
                         output_file: Optional[str] = None,
                         page_number: Optional[int] = None,
                         page_size: Optional[int] = None,
                         product_name: Optional[str] = None,
                         status: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetDdosBgpIpsResult
    def get_ddos_bgp_ips_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                         instance_id: Optional[pulumi.Input[str]] = None,
                         output_file: Optional[pulumi.Input[str]] = None,
                         page_number: Optional[pulumi.Input[int]] = None,
                         page_size: Optional[pulumi.Input[int]] = None,
                         product_name: Optional[pulumi.Input[str]] = None,
                         status: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetDdosBgpIpsResult]
    func GetDdosBgpIps(ctx *Context, args *GetDdosBgpIpsArgs, opts ...InvokeOption) (*GetDdosBgpIpsResult, error)
    func GetDdosBgpIpsOutput(ctx *Context, args *GetDdosBgpIpsOutputArgs, opts ...InvokeOption) GetDdosBgpIpsResultOutput

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

    public static class GetDdosBgpIps 
    {
        public static Task<GetDdosBgpIpsResult> InvokeAsync(GetDdosBgpIpsArgs args, InvokeOptions? opts = null)
        public static Output<GetDdosBgpIpsResult> Invoke(GetDdosBgpIpsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDdosBgpIpsResult> getDdosBgpIps(GetDdosBgpIpsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:ddos/getDdosBgpIps:getDdosBgpIps
      arguments:
        # arguments dictionary

    The following arguments are supported:

    InstanceId string
    The ID of the native protection enterprise instance to be operated.
    Ids List<string>
    A list of Ip IDs.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    PageNumber int
    PageSize int
    ProductName string
    The product name. Valid Value:ECS, SLB, EIP, WAF.
    Status string
    The current state of the IP address. Valid Value:

    • normal: indicates normal (not attacked).
    • hole_begin: indicates that you are in a black hole state.
    InstanceId string
    The ID of the native protection enterprise instance to be operated.
    Ids []string
    A list of Ip IDs.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    PageNumber int
    PageSize int
    ProductName string
    The product name. Valid Value:ECS, SLB, EIP, WAF.
    Status string
    The current state of the IP address. Valid Value:

    • normal: indicates normal (not attacked).
    • hole_begin: indicates that you are in a black hole state.
    instanceId String
    The ID of the native protection enterprise instance to be operated.
    ids List<String>
    A list of Ip IDs.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    pageNumber Integer
    pageSize Integer
    productName String
    The product name. Valid Value:ECS, SLB, EIP, WAF.
    status String
    The current state of the IP address. Valid Value:

    • normal: indicates normal (not attacked).
    • hole_begin: indicates that you are in a black hole state.
    instanceId string
    The ID of the native protection enterprise instance to be operated.
    ids string[]
    A list of Ip IDs.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    pageNumber number
    pageSize number
    productName string
    The product name. Valid Value:ECS, SLB, EIP, WAF.
    status string
    The current state of the IP address. Valid Value:

    • normal: indicates normal (not attacked).
    • hole_begin: indicates that you are in a black hole state.
    instance_id str
    The ID of the native protection enterprise instance to be operated.
    ids Sequence[str]
    A list of Ip IDs.
    output_file str
    File name where to save data source results (after running pulumi preview).
    page_number int
    page_size int
    product_name str
    The product name. Valid Value:ECS, SLB, EIP, WAF.
    status str
    The current state of the IP address. Valid Value:

    • normal: indicates normal (not attacked).
    • hole_begin: indicates that you are in a black hole state.
    instanceId String
    The ID of the native protection enterprise instance to be operated.
    ids List<String>
    A list of Ip IDs.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    pageNumber Number
    pageSize Number
    productName String
    The product name. Valid Value:ECS, SLB, EIP, WAF.
    status String
    The current state of the IP address. Valid Value:

    • normal: indicates normal (not attacked).
    • hole_begin: indicates that you are in a black hole state.

    getDdosBgpIps Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    InstanceId string
    Ips List<Pulumi.AliCloud.Ddos.Outputs.GetDdosBgpIpsIp>
    OutputFile string
    PageNumber int
    PageSize int
    ProductName string
    Status string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    InstanceId string
    Ips []GetDdosBgpIpsIp
    OutputFile string
    PageNumber int
    PageSize int
    ProductName string
    Status string
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    instanceId String
    ips List<GetDdosBgpIpsIp>
    outputFile String
    pageNumber Integer
    pageSize Integer
    productName String
    status String
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    instanceId string
    ips GetDdosBgpIpsIp[]
    outputFile string
    pageNumber number
    pageSize number
    productName string
    status string
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    instance_id str
    ips Sequence[GetDdosBgpIpsIp]
    output_file str
    page_number int
    page_size int
    product_name str
    status str
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    instanceId String
    ips List<Property Map>
    outputFile String
    pageNumber Number
    pageSize Number
    productName String
    status String

    Supporting Types

    GetDdosBgpIpsIp

    Id string
    The ID of the Ip. The value formats as <instance_id>:<ip>.
    InstanceId string
    The ID of the native protection enterprise instance to be operated.
    Ip string
    The IP address.
    Product string
    The type of cloud asset to which the IP address belongs.
    Status string
    The current state of the IP address.
    Id string
    The ID of the Ip. The value formats as <instance_id>:<ip>.
    InstanceId string
    The ID of the native protection enterprise instance to be operated.
    Ip string
    The IP address.
    Product string
    The type of cloud asset to which the IP address belongs.
    Status string
    The current state of the IP address.
    id String
    The ID of the Ip. The value formats as <instance_id>:<ip>.
    instanceId String
    The ID of the native protection enterprise instance to be operated.
    ip String
    The IP address.
    product String
    The type of cloud asset to which the IP address belongs.
    status String
    The current state of the IP address.
    id string
    The ID of the Ip. The value formats as <instance_id>:<ip>.
    instanceId string
    The ID of the native protection enterprise instance to be operated.
    ip string
    The IP address.
    product string
    The type of cloud asset to which the IP address belongs.
    status string
    The current state of the IP address.
    id str
    The ID of the Ip. The value formats as <instance_id>:<ip>.
    instance_id str
    The ID of the native protection enterprise instance to be operated.
    ip str
    The IP address.
    product str
    The type of cloud asset to which the IP address belongs.
    status str
    The current state of the IP address.
    id String
    The ID of the Ip. The value formats as <instance_id>:<ip>.
    instanceId String
    The ID of the native protection enterprise instance to be operated.
    ip String
    The IP address.
    product String
    The type of cloud asset to which the IP address belongs.
    status String
    The current state of the IP address.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi