1. Packages
  2. Alicloud Provider
  3. API Docs
  4. vpc
  5. getIpv6Addresses
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

alicloud.vpc.getIpv6Addresses

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

    This data source provides the Vpc Ipv6 Addresses of the current Alibaba Cloud user.

    NOTE: Available in v1.142.0+.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const associatedInstanceId = alicloud.vpc.getIpv6Addresses({
        associatedInstanceId: "example_value",
    });
    export const vpcIpv6AddressId1 = associatedInstanceId.then(associatedInstanceId => associatedInstanceId.addresses?.[0]?.id);
    const vswitchId = alicloud.vpc.getIpv6Addresses({
        vswitchId: "example_value",
    });
    export const vpcIpv6AddressId2 = vswitchId.then(vswitchId => vswitchId.addresses?.[0]?.id);
    const vpcId = alicloud.vpc.getIpv6Addresses({
        vpcId: "example_value",
    });
    export const vpcIpv6AddressId3 = vpcId.then(vpcId => vpcId.addresses?.[0]?.id);
    const status = alicloud.vpc.getIpv6Addresses({
        status: "Available",
    });
    export const vpcIpv6AddressId4 = status.then(status => status.addresses?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    associated_instance_id = alicloud.vpc.get_ipv6_addresses(associated_instance_id="example_value")
    pulumi.export("vpcIpv6AddressId1", associated_instance_id.addresses[0].id)
    vswitch_id = alicloud.vpc.get_ipv6_addresses(vswitch_id="example_value")
    pulumi.export("vpcIpv6AddressId2", vswitch_id.addresses[0].id)
    vpc_id = alicloud.vpc.get_ipv6_addresses(vpc_id="example_value")
    pulumi.export("vpcIpv6AddressId3", vpc_id.addresses[0].id)
    status = alicloud.vpc.get_ipv6_addresses(status="Available")
    pulumi.export("vpcIpv6AddressId4", status.addresses[0].id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		associatedInstanceId, err := vpc.GetIpv6Addresses(ctx, &vpc.GetIpv6AddressesArgs{
    			AssociatedInstanceId: pulumi.StringRef("example_value"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("vpcIpv6AddressId1", associatedInstanceId.Addresses[0].Id)
    		vswitchId, err := vpc.GetIpv6Addresses(ctx, &vpc.GetIpv6AddressesArgs{
    			VswitchId: pulumi.StringRef("example_value"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("vpcIpv6AddressId2", vswitchId.Addresses[0].Id)
    		vpcId, err := vpc.GetIpv6Addresses(ctx, &vpc.GetIpv6AddressesArgs{
    			VpcId: pulumi.StringRef("example_value"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("vpcIpv6AddressId3", vpcId.Addresses[0].Id)
    		status, err := vpc.GetIpv6Addresses(ctx, &vpc.GetIpv6AddressesArgs{
    			Status: pulumi.StringRef("Available"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("vpcIpv6AddressId4", status.Addresses[0].Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var associatedInstanceId = AliCloud.Vpc.GetIpv6Addresses.Invoke(new()
        {
            AssociatedInstanceId = "example_value",
        });
    
        var vswitchId = AliCloud.Vpc.GetIpv6Addresses.Invoke(new()
        {
            VswitchId = "example_value",
        });
    
        var vpcId = AliCloud.Vpc.GetIpv6Addresses.Invoke(new()
        {
            VpcId = "example_value",
        });
    
        var status = AliCloud.Vpc.GetIpv6Addresses.Invoke(new()
        {
            Status = "Available",
        });
    
        return new Dictionary<string, object?>
        {
            ["vpcIpv6AddressId1"] = associatedInstanceId.Apply(getIpv6AddressesResult => getIpv6AddressesResult.Addresses[0]?.Id),
            ["vpcIpv6AddressId2"] = vswitchId.Apply(getIpv6AddressesResult => getIpv6AddressesResult.Addresses[0]?.Id),
            ["vpcIpv6AddressId3"] = vpcId.Apply(getIpv6AddressesResult => getIpv6AddressesResult.Addresses[0]?.Id),
            ["vpcIpv6AddressId4"] = status.Apply(getIpv6AddressesResult => getIpv6AddressesResult.Addresses[0]?.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.vpc.VpcFunctions;
    import com.pulumi.alicloud.vpc.inputs.GetIpv6AddressesArgs;
    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 associatedInstanceId = VpcFunctions.getIpv6Addresses(GetIpv6AddressesArgs.builder()
                .associatedInstanceId("example_value")
                .build());
    
            ctx.export("vpcIpv6AddressId1", associatedInstanceId.applyValue(getIpv6AddressesResult -> getIpv6AddressesResult.addresses()[0].id()));
            final var vswitchId = VpcFunctions.getIpv6Addresses(GetIpv6AddressesArgs.builder()
                .vswitchId("example_value")
                .build());
    
            ctx.export("vpcIpv6AddressId2", vswitchId.applyValue(getIpv6AddressesResult -> getIpv6AddressesResult.addresses()[0].id()));
            final var vpcId = VpcFunctions.getIpv6Addresses(GetIpv6AddressesArgs.builder()
                .vpcId("example_value")
                .build());
    
            ctx.export("vpcIpv6AddressId3", vpcId.applyValue(getIpv6AddressesResult -> getIpv6AddressesResult.addresses()[0].id()));
            final var status = VpcFunctions.getIpv6Addresses(GetIpv6AddressesArgs.builder()
                .status("Available")
                .build());
    
            ctx.export("vpcIpv6AddressId4", status.applyValue(getIpv6AddressesResult -> getIpv6AddressesResult.addresses()[0].id()));
        }
    }
    
    variables:
      associatedInstanceId:
        fn::invoke:
          Function: alicloud:vpc:getIpv6Addresses
          Arguments:
            associatedInstanceId: example_value
      vswitchId:
        fn::invoke:
          Function: alicloud:vpc:getIpv6Addresses
          Arguments:
            vswitchId: example_value
      vpcId:
        fn::invoke:
          Function: alicloud:vpc:getIpv6Addresses
          Arguments:
            vpcId: example_value
      status:
        fn::invoke:
          Function: alicloud:vpc:getIpv6Addresses
          Arguments:
            status: Available
    outputs:
      vpcIpv6AddressId1: ${associatedInstanceId.addresses[0].id}
      vpcIpv6AddressId2: ${vswitchId.addresses[0].id}
      vpcIpv6AddressId3: ${vpcId.addresses[0].id}
      vpcIpv6AddressId4: ${status.addresses[0].id}
    

    Using getIpv6Addresses

    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 getIpv6Addresses(args: GetIpv6AddressesArgs, opts?: InvokeOptions): Promise<GetIpv6AddressesResult>
    function getIpv6AddressesOutput(args: GetIpv6AddressesOutputArgs, opts?: InvokeOptions): Output<GetIpv6AddressesResult>
    def get_ipv6_addresses(associated_instance_id: Optional[str] = None,
                           ids: Optional[Sequence[str]] = None,
                           output_file: Optional[str] = None,
                           status: Optional[str] = None,
                           vpc_id: Optional[str] = None,
                           vswitch_id: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetIpv6AddressesResult
    def get_ipv6_addresses_output(associated_instance_id: Optional[pulumi.Input[str]] = None,
                           ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                           output_file: Optional[pulumi.Input[str]] = None,
                           status: Optional[pulumi.Input[str]] = None,
                           vpc_id: Optional[pulumi.Input[str]] = None,
                           vswitch_id: Optional[pulumi.Input[str]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetIpv6AddressesResult]
    func GetIpv6Addresses(ctx *Context, args *GetIpv6AddressesArgs, opts ...InvokeOption) (*GetIpv6AddressesResult, error)
    func GetIpv6AddressesOutput(ctx *Context, args *GetIpv6AddressesOutputArgs, opts ...InvokeOption) GetIpv6AddressesResultOutput

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

    public static class GetIpv6Addresses 
    {
        public static Task<GetIpv6AddressesResult> InvokeAsync(GetIpv6AddressesArgs args, InvokeOptions? opts = null)
        public static Output<GetIpv6AddressesResult> Invoke(GetIpv6AddressesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetIpv6AddressesResult> getIpv6Addresses(GetIpv6AddressesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:vpc/getIpv6Addresses:getIpv6Addresses
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AssociatedInstanceId string
    The ID of the instance that is assigned the IPv6 address.
    Ids List<string>
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Status string
    The status of the IPv6 address. Valid values:Pending or Available.

    • Pending: The IPv6 address is being configured.
    • Available: The IPv6 address is available.
    VpcId string
    The ID of the VPC to which the IPv6 address belongs.
    VswitchId string
    The ID of the vSwitch to which the IPv6 address belongs.
    AssociatedInstanceId string
    The ID of the instance that is assigned the IPv6 address.
    Ids []string
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Status string
    The status of the IPv6 address. Valid values:Pending or Available.

    • Pending: The IPv6 address is being configured.
    • Available: The IPv6 address is available.
    VpcId string
    The ID of the VPC to which the IPv6 address belongs.
    VswitchId string
    The ID of the vSwitch to which the IPv6 address belongs.
    associatedInstanceId String
    The ID of the instance that is assigned the IPv6 address.
    ids List<String>
    outputFile String
    File name where to save data source results (after running pulumi preview).
    status String
    The status of the IPv6 address. Valid values:Pending or Available.

    • Pending: The IPv6 address is being configured.
    • Available: The IPv6 address is available.
    vpcId String
    The ID of the VPC to which the IPv6 address belongs.
    vswitchId String
    The ID of the vSwitch to which the IPv6 address belongs.
    associatedInstanceId string
    The ID of the instance that is assigned the IPv6 address.
    ids string[]
    outputFile string
    File name where to save data source results (after running pulumi preview).
    status string
    The status of the IPv6 address. Valid values:Pending or Available.

    • Pending: The IPv6 address is being configured.
    • Available: The IPv6 address is available.
    vpcId string
    The ID of the VPC to which the IPv6 address belongs.
    vswitchId string
    The ID of the vSwitch to which the IPv6 address belongs.
    associated_instance_id str
    The ID of the instance that is assigned the IPv6 address.
    ids Sequence[str]
    output_file str
    File name where to save data source results (after running pulumi preview).
    status str
    The status of the IPv6 address. Valid values:Pending or Available.

    • Pending: The IPv6 address is being configured.
    • Available: The IPv6 address is available.
    vpc_id str
    The ID of the VPC to which the IPv6 address belongs.
    vswitch_id str
    The ID of the vSwitch to which the IPv6 address belongs.
    associatedInstanceId String
    The ID of the instance that is assigned the IPv6 address.
    ids List<String>
    outputFile String
    File name where to save data source results (after running pulumi preview).
    status String
    The status of the IPv6 address. Valid values:Pending or Available.

    • Pending: The IPv6 address is being configured.
    • Available: The IPv6 address is available.
    vpcId String
    The ID of the VPC to which the IPv6 address belongs.
    vswitchId String
    The ID of the vSwitch to which the IPv6 address belongs.

    getIpv6Addresses Result

    The following output properties are available:

    Addresses List<Pulumi.AliCloud.Vpc.Outputs.GetIpv6AddressesAddress>
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    Names List<string>
    AssociatedInstanceId string
    OutputFile string
    Status string
    VpcId string
    VswitchId string
    Addresses []GetIpv6AddressesAddress
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    Names []string
    AssociatedInstanceId string
    OutputFile string
    Status string
    VpcId string
    VswitchId string
    addresses List<GetIpv6AddressesAddress>
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    associatedInstanceId String
    outputFile String
    status String
    vpcId String
    vswitchId String
    addresses GetIpv6AddressesAddress[]
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    names string[]
    associatedInstanceId string
    outputFile string
    status string
    vpcId string
    vswitchId string
    addresses Sequence[GetIpv6AddressesAddress]
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    names Sequence[str]
    associated_instance_id str
    output_file str
    status str
    vpc_id str
    vswitch_id str
    addresses List<Property Map>
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    associatedInstanceId String
    outputFile String
    status String
    vpcId String
    vswitchId String

    Supporting Types

    GetIpv6AddressesAddress

    AssociatedInstanceId string
    The ID of the instance that is assigned the IPv6 address.
    AssociatedInstanceType string
    The type of the instance that is assigned the IPv6 address.
    CreateTime string
    The time when the IPv6 address was created.
    Id string
    The ID of the Ipv6 Address.
    Ipv6Address string
    The address of the Ipv6 Address.
    Ipv6AddressId string
    The ID of the IPv6 address.
    Ipv6AddressName string
    The name of the IPv6 address.
    Ipv6GatewayId string
    The ID of the IPv6 gateway to which the IPv6 address belongs.
    NetworkType string
    The type of communication supported by the IPv6 address. Valid values:Private or Public. Private: communication within the private network. Public: communication over the public network
    Status string
    The status of the IPv6 address. Valid values:Pending or Available.
    VpcId string
    The ID of the VPC to which the IPv6 address belongs.
    VswitchId string
    The ID of the vSwitch to which the IPv6 address belongs.
    AssociatedInstanceId string
    The ID of the instance that is assigned the IPv6 address.
    AssociatedInstanceType string
    The type of the instance that is assigned the IPv6 address.
    CreateTime string
    The time when the IPv6 address was created.
    Id string
    The ID of the Ipv6 Address.
    Ipv6Address string
    The address of the Ipv6 Address.
    Ipv6AddressId string
    The ID of the IPv6 address.
    Ipv6AddressName string
    The name of the IPv6 address.
    Ipv6GatewayId string
    The ID of the IPv6 gateway to which the IPv6 address belongs.
    NetworkType string
    The type of communication supported by the IPv6 address. Valid values:Private or Public. Private: communication within the private network. Public: communication over the public network
    Status string
    The status of the IPv6 address. Valid values:Pending or Available.
    VpcId string
    The ID of the VPC to which the IPv6 address belongs.
    VswitchId string
    The ID of the vSwitch to which the IPv6 address belongs.
    associatedInstanceId String
    The ID of the instance that is assigned the IPv6 address.
    associatedInstanceType String
    The type of the instance that is assigned the IPv6 address.
    createTime String
    The time when the IPv6 address was created.
    id String
    The ID of the Ipv6 Address.
    ipv6Address String
    The address of the Ipv6 Address.
    ipv6AddressId String
    The ID of the IPv6 address.
    ipv6AddressName String
    The name of the IPv6 address.
    ipv6GatewayId String
    The ID of the IPv6 gateway to which the IPv6 address belongs.
    networkType String
    The type of communication supported by the IPv6 address. Valid values:Private or Public. Private: communication within the private network. Public: communication over the public network
    status String
    The status of the IPv6 address. Valid values:Pending or Available.
    vpcId String
    The ID of the VPC to which the IPv6 address belongs.
    vswitchId String
    The ID of the vSwitch to which the IPv6 address belongs.
    associatedInstanceId string
    The ID of the instance that is assigned the IPv6 address.
    associatedInstanceType string
    The type of the instance that is assigned the IPv6 address.
    createTime string
    The time when the IPv6 address was created.
    id string
    The ID of the Ipv6 Address.
    ipv6Address string
    The address of the Ipv6 Address.
    ipv6AddressId string
    The ID of the IPv6 address.
    ipv6AddressName string
    The name of the IPv6 address.
    ipv6GatewayId string
    The ID of the IPv6 gateway to which the IPv6 address belongs.
    networkType string
    The type of communication supported by the IPv6 address. Valid values:Private or Public. Private: communication within the private network. Public: communication over the public network
    status string
    The status of the IPv6 address. Valid values:Pending or Available.
    vpcId string
    The ID of the VPC to which the IPv6 address belongs.
    vswitchId string
    The ID of the vSwitch to which the IPv6 address belongs.
    associated_instance_id str
    The ID of the instance that is assigned the IPv6 address.
    associated_instance_type str
    The type of the instance that is assigned the IPv6 address.
    create_time str
    The time when the IPv6 address was created.
    id str
    The ID of the Ipv6 Address.
    ipv6_address str
    The address of the Ipv6 Address.
    ipv6_address_id str
    The ID of the IPv6 address.
    ipv6_address_name str
    The name of the IPv6 address.
    ipv6_gateway_id str
    The ID of the IPv6 gateway to which the IPv6 address belongs.
    network_type str
    The type of communication supported by the IPv6 address. Valid values:Private or Public. Private: communication within the private network. Public: communication over the public network
    status str
    The status of the IPv6 address. Valid values:Pending or Available.
    vpc_id str
    The ID of the VPC to which the IPv6 address belongs.
    vswitch_id str
    The ID of the vSwitch to which the IPv6 address belongs.
    associatedInstanceId String
    The ID of the instance that is assigned the IPv6 address.
    associatedInstanceType String
    The type of the instance that is assigned the IPv6 address.
    createTime String
    The time when the IPv6 address was created.
    id String
    The ID of the Ipv6 Address.
    ipv6Address String
    The address of the Ipv6 Address.
    ipv6AddressId String
    The ID of the IPv6 address.
    ipv6AddressName String
    The name of the IPv6 address.
    ipv6GatewayId String
    The ID of the IPv6 gateway to which the IPv6 address belongs.
    networkType String
    The type of communication supported by the IPv6 address. Valid values:Private or Public. Private: communication within the private network. Public: communication over the public network
    status String
    The status of the IPv6 address. Valid values:Pending or Available.
    vpcId String
    The ID of the VPC to which the IPv6 address belongs.
    vswitchId String
    The ID of the vSwitch to which the IPv6 address belongs.

    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.62.1 published on Monday, Sep 16, 2024 by Pulumi