1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. vpc
  5. Ipv6EgressRule
Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi

alicloud.vpc.Ipv6EgressRule

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi

    Provides a VPC Ipv6 Egress Rule resource. IPv6 address addition only active exit rule.

    For information about VPC Ipv6 Egress Rule and how to use it, see What is Ipv6 Egress Rule.

    NOTE: Available since v1.142.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "terraform-example";
    const defaultZones = alicloud.getZones({
        availableResourceCreation: "VSwitch",
    });
    const defaultInstanceTypes = defaultZones.then(defaultZones => alicloud.ecs.getInstanceTypes({
        availabilityZone: defaultZones.zones?.[0]?.id,
        systemDiskCategory: "cloud_efficiency",
        cpuCoreCount: 4,
        minimumEniIpv6AddressQuantity: 1,
    }));
    const defaultImages = alicloud.ecs.getImages({
        nameRegex: "^ubuntu_18.*64",
        mostRecent: true,
        owners: "system",
    });
    const defaultNetwork = new alicloud.vpc.Network("defaultNetwork", {
        vpcName: name,
        enableIpv6: true,
        cidrBlock: "172.16.0.0/12",
    });
    const defaultSwitch = new alicloud.vpc.Switch("defaultSwitch", {
        vpcId: defaultNetwork.id,
        cidrBlock: "172.16.0.0/21",
        zoneId: defaultZones.then(defaultZones => defaultZones.zones?.[0]?.id),
        vswitchName: name,
        ipv6CidrBlockMask: 64,
    });
    const defaultSecurityGroup = new alicloud.ecs.SecurityGroup("defaultSecurityGroup", {
        description: name,
        vpcId: defaultNetwork.id,
    });
    const defaultInstance = new alicloud.ecs.Instance("defaultInstance", {
        availabilityZone: defaultZones.then(defaultZones => defaultZones.zones?.[0]?.id),
        ipv6AddressCount: 1,
        instanceType: defaultInstanceTypes.then(defaultInstanceTypes => defaultInstanceTypes.instanceTypes?.[0]?.id),
        systemDiskCategory: "cloud_efficiency",
        imageId: defaultImages.then(defaultImages => defaultImages.images?.[0]?.id),
        instanceName: name,
        vswitchId: defaultSwitch.id,
        internetMaxBandwidthOut: 10,
        securityGroups: [defaultSecurityGroup.id],
    });
    const defaultIpv6Gateway = new alicloud.vpc.Ipv6Gateway("defaultIpv6Gateway", {
        ipv6GatewayName: name,
        vpcId: defaultNetwork.id,
    });
    const defaultIpv6Addresses = alicloud.vpc.getIpv6AddressesOutput({
        associatedInstanceId: defaultInstance.id,
        status: "Available",
    });
    const defaultIpv6InternetBandwidth = new alicloud.vpc.Ipv6InternetBandwidth("defaultIpv6InternetBandwidth", {
        ipv6AddressId: defaultIpv6Addresses.apply(defaultIpv6Addresses => defaultIpv6Addresses.addresses?.[0]?.id),
        ipv6GatewayId: defaultIpv6Gateway.ipv6GatewayId,
        internetChargeType: "PayByBandwidth",
        bandwidth: 20,
    });
    const defaultIpv6EgressRule = new alicloud.vpc.Ipv6EgressRule("defaultIpv6EgressRule", {
        instanceId: defaultIpv6InternetBandwidth.ipv6AddressId,
        ipv6EgressRuleName: name,
        description: name,
        ipv6GatewayId: defaultIpv6InternetBandwidth.ipv6GatewayId,
        instanceType: "Ipv6Address",
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "terraform-example"
    default_zones = alicloud.get_zones(available_resource_creation="VSwitch")
    default_instance_types = alicloud.ecs.get_instance_types(availability_zone=default_zones.zones[0].id,
        system_disk_category="cloud_efficiency",
        cpu_core_count=4,
        minimum_eni_ipv6_address_quantity=1)
    default_images = alicloud.ecs.get_images(name_regex="^ubuntu_18.*64",
        most_recent=True,
        owners="system")
    default_network = alicloud.vpc.Network("defaultNetwork",
        vpc_name=name,
        enable_ipv6=True,
        cidr_block="172.16.0.0/12")
    default_switch = alicloud.vpc.Switch("defaultSwitch",
        vpc_id=default_network.id,
        cidr_block="172.16.0.0/21",
        zone_id=default_zones.zones[0].id,
        vswitch_name=name,
        ipv6_cidr_block_mask=64)
    default_security_group = alicloud.ecs.SecurityGroup("defaultSecurityGroup",
        description=name,
        vpc_id=default_network.id)
    default_instance = alicloud.ecs.Instance("defaultInstance",
        availability_zone=default_zones.zones[0].id,
        ipv6_address_count=1,
        instance_type=default_instance_types.instance_types[0].id,
        system_disk_category="cloud_efficiency",
        image_id=default_images.images[0].id,
        instance_name=name,
        vswitch_id=default_switch.id,
        internet_max_bandwidth_out=10,
        security_groups=[default_security_group.id])
    default_ipv6_gateway = alicloud.vpc.Ipv6Gateway("defaultIpv6Gateway",
        ipv6_gateway_name=name,
        vpc_id=default_network.id)
    default_ipv6_addresses = alicloud.vpc.get_ipv6_addresses_output(associated_instance_id=default_instance.id,
        status="Available")
    default_ipv6_internet_bandwidth = alicloud.vpc.Ipv6InternetBandwidth("defaultIpv6InternetBandwidth",
        ipv6_address_id=default_ipv6_addresses.addresses[0].id,
        ipv6_gateway_id=default_ipv6_gateway.ipv6_gateway_id,
        internet_charge_type="PayByBandwidth",
        bandwidth=20)
    default_ipv6_egress_rule = alicloud.vpc.Ipv6EgressRule("defaultIpv6EgressRule",
        instance_id=default_ipv6_internet_bandwidth.ipv6_address_id,
        ipv6_egress_rule_name=name,
        description=name,
        ipv6_gateway_id=default_ipv6_internet_bandwidth.ipv6_gateway_id,
        instance_type="Ipv6Address")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		name := "terraform-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		defaultZones, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
    			AvailableResourceCreation: pulumi.StringRef("VSwitch"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultInstanceTypes, err := ecs.GetInstanceTypes(ctx, &ecs.GetInstanceTypesArgs{
    			AvailabilityZone:              pulumi.StringRef(defaultZones.Zones[0].Id),
    			SystemDiskCategory:            pulumi.StringRef("cloud_efficiency"),
    			CpuCoreCount:                  pulumi.IntRef(4),
    			MinimumEniIpv6AddressQuantity: pulumi.IntRef(1),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultImages, err := ecs.GetImages(ctx, &ecs.GetImagesArgs{
    			NameRegex:  pulumi.StringRef("^ubuntu_18.*64"),
    			MostRecent: pulumi.BoolRef(true),
    			Owners:     pulumi.StringRef("system"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultNetwork, err := vpc.NewNetwork(ctx, "defaultNetwork", &vpc.NetworkArgs{
    			VpcName:    pulumi.String(name),
    			EnableIpv6: pulumi.Bool(true),
    			CidrBlock:  pulumi.String("172.16.0.0/12"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultSwitch, err := vpc.NewSwitch(ctx, "defaultSwitch", &vpc.SwitchArgs{
    			VpcId:             defaultNetwork.ID(),
    			CidrBlock:         pulumi.String("172.16.0.0/21"),
    			ZoneId:            pulumi.String(defaultZones.Zones[0].Id),
    			VswitchName:       pulumi.String(name),
    			Ipv6CidrBlockMask: pulumi.Int(64),
    		})
    		if err != nil {
    			return err
    		}
    		defaultSecurityGroup, err := ecs.NewSecurityGroup(ctx, "defaultSecurityGroup", &ecs.SecurityGroupArgs{
    			Description: pulumi.String(name),
    			VpcId:       defaultNetwork.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		defaultInstance, err := ecs.NewInstance(ctx, "defaultInstance", &ecs.InstanceArgs{
    			AvailabilityZone:        pulumi.String(defaultZones.Zones[0].Id),
    			Ipv6AddressCount:        pulumi.Int(1),
    			InstanceType:            pulumi.String(defaultInstanceTypes.InstanceTypes[0].Id),
    			SystemDiskCategory:      pulumi.String("cloud_efficiency"),
    			ImageId:                 pulumi.String(defaultImages.Images[0].Id),
    			InstanceName:            pulumi.String(name),
    			VswitchId:               defaultSwitch.ID(),
    			InternetMaxBandwidthOut: pulumi.Int(10),
    			SecurityGroups: pulumi.StringArray{
    				defaultSecurityGroup.ID(),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		defaultIpv6Gateway, err := vpc.NewIpv6Gateway(ctx, "defaultIpv6Gateway", &vpc.Ipv6GatewayArgs{
    			Ipv6GatewayName: pulumi.String(name),
    			VpcId:           defaultNetwork.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		defaultIpv6Addresses := vpc.GetIpv6AddressesOutput(ctx, vpc.GetIpv6AddressesOutputArgs{
    			AssociatedInstanceId: defaultInstance.ID(),
    			Status:               pulumi.String("Available"),
    		}, nil)
    		defaultIpv6InternetBandwidth, err := vpc.NewIpv6InternetBandwidth(ctx, "defaultIpv6InternetBandwidth", &vpc.Ipv6InternetBandwidthArgs{
    			Ipv6AddressId: defaultIpv6Addresses.ApplyT(func(defaultIpv6Addresses vpc.GetIpv6AddressesResult) (*string, error) {
    				return &defaultIpv6Addresses.Addresses[0].Id, nil
    			}).(pulumi.StringPtrOutput),
    			Ipv6GatewayId:      defaultIpv6Gateway.Ipv6GatewayId,
    			InternetChargeType: pulumi.String("PayByBandwidth"),
    			Bandwidth:          pulumi.Int(20),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = vpc.NewIpv6EgressRule(ctx, "defaultIpv6EgressRule", &vpc.Ipv6EgressRuleArgs{
    			InstanceId:         defaultIpv6InternetBandwidth.Ipv6AddressId,
    			Ipv6EgressRuleName: pulumi.String(name),
    			Description:        pulumi.String(name),
    			Ipv6GatewayId:      defaultIpv6InternetBandwidth.Ipv6GatewayId,
    			InstanceType:       pulumi.String("Ipv6Address"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "terraform-example";
        var defaultZones = AliCloud.GetZones.Invoke(new()
        {
            AvailableResourceCreation = "VSwitch",
        });
    
        var defaultInstanceTypes = AliCloud.Ecs.GetInstanceTypes.Invoke(new()
        {
            AvailabilityZone = defaultZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
            SystemDiskCategory = "cloud_efficiency",
            CpuCoreCount = 4,
            MinimumEniIpv6AddressQuantity = 1,
        });
    
        var defaultImages = AliCloud.Ecs.GetImages.Invoke(new()
        {
            NameRegex = "^ubuntu_18.*64",
            MostRecent = true,
            Owners = "system",
        });
    
        var defaultNetwork = new AliCloud.Vpc.Network("defaultNetwork", new()
        {
            VpcName = name,
            EnableIpv6 = true,
            CidrBlock = "172.16.0.0/12",
        });
    
        var defaultSwitch = new AliCloud.Vpc.Switch("defaultSwitch", new()
        {
            VpcId = defaultNetwork.Id,
            CidrBlock = "172.16.0.0/21",
            ZoneId = defaultZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
            VswitchName = name,
            Ipv6CidrBlockMask = 64,
        });
    
        var defaultSecurityGroup = new AliCloud.Ecs.SecurityGroup("defaultSecurityGroup", new()
        {
            Description = name,
            VpcId = defaultNetwork.Id,
        });
    
        var defaultInstance = new AliCloud.Ecs.Instance("defaultInstance", new()
        {
            AvailabilityZone = defaultZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
            Ipv6AddressCount = 1,
            InstanceType = defaultInstanceTypes.Apply(getInstanceTypesResult => getInstanceTypesResult.InstanceTypes[0]?.Id),
            SystemDiskCategory = "cloud_efficiency",
            ImageId = defaultImages.Apply(getImagesResult => getImagesResult.Images[0]?.Id),
            InstanceName = name,
            VswitchId = defaultSwitch.Id,
            InternetMaxBandwidthOut = 10,
            SecurityGroups = new[]
            {
                defaultSecurityGroup.Id,
            },
        });
    
        var defaultIpv6Gateway = new AliCloud.Vpc.Ipv6Gateway("defaultIpv6Gateway", new()
        {
            Ipv6GatewayName = name,
            VpcId = defaultNetwork.Id,
        });
    
        var defaultIpv6Addresses = AliCloud.Vpc.GetIpv6Addresses.Invoke(new()
        {
            AssociatedInstanceId = defaultInstance.Id,
            Status = "Available",
        });
    
        var defaultIpv6InternetBandwidth = new AliCloud.Vpc.Ipv6InternetBandwidth("defaultIpv6InternetBandwidth", new()
        {
            Ipv6AddressId = defaultIpv6Addresses.Apply(getIpv6AddressesResult => getIpv6AddressesResult.Addresses[0]?.Id),
            Ipv6GatewayId = defaultIpv6Gateway.Ipv6GatewayId,
            InternetChargeType = "PayByBandwidth",
            Bandwidth = 20,
        });
    
        var defaultIpv6EgressRule = new AliCloud.Vpc.Ipv6EgressRule("defaultIpv6EgressRule", new()
        {
            InstanceId = defaultIpv6InternetBandwidth.Ipv6AddressId,
            Ipv6EgressRuleName = name,
            Description = name,
            Ipv6GatewayId = defaultIpv6InternetBandwidth.Ipv6GatewayId,
            InstanceType = "Ipv6Address",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.AlicloudFunctions;
    import com.pulumi.alicloud.inputs.GetZonesArgs;
    import com.pulumi.alicloud.ecs.EcsFunctions;
    import com.pulumi.alicloud.ecs.inputs.GetInstanceTypesArgs;
    import com.pulumi.alicloud.ecs.inputs.GetImagesArgs;
    import com.pulumi.alicloud.vpc.Network;
    import com.pulumi.alicloud.vpc.NetworkArgs;
    import com.pulumi.alicloud.vpc.Switch;
    import com.pulumi.alicloud.vpc.SwitchArgs;
    import com.pulumi.alicloud.ecs.SecurityGroup;
    import com.pulumi.alicloud.ecs.SecurityGroupArgs;
    import com.pulumi.alicloud.ecs.Instance;
    import com.pulumi.alicloud.ecs.InstanceArgs;
    import com.pulumi.alicloud.vpc.Ipv6Gateway;
    import com.pulumi.alicloud.vpc.Ipv6GatewayArgs;
    import com.pulumi.alicloud.vpc.VpcFunctions;
    import com.pulumi.alicloud.vpc.inputs.GetIpv6AddressesArgs;
    import com.pulumi.alicloud.vpc.Ipv6InternetBandwidth;
    import com.pulumi.alicloud.vpc.Ipv6InternetBandwidthArgs;
    import com.pulumi.alicloud.vpc.Ipv6EgressRule;
    import com.pulumi.alicloud.vpc.Ipv6EgressRuleArgs;
    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 config = ctx.config();
            final var name = config.get("name").orElse("terraform-example");
            final var defaultZones = AlicloudFunctions.getZones(GetZonesArgs.builder()
                .availableResourceCreation("VSwitch")
                .build());
    
            final var defaultInstanceTypes = EcsFunctions.getInstanceTypes(GetInstanceTypesArgs.builder()
                .availabilityZone(defaultZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
                .systemDiskCategory("cloud_efficiency")
                .cpuCoreCount(4)
                .minimumEniIpv6AddressQuantity(1)
                .build());
    
            final var defaultImages = EcsFunctions.getImages(GetImagesArgs.builder()
                .nameRegex("^ubuntu_18.*64")
                .mostRecent(true)
                .owners("system")
                .build());
    
            var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()        
                .vpcName(name)
                .enableIpv6("true")
                .cidrBlock("172.16.0.0/12")
                .build());
    
            var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()        
                .vpcId(defaultNetwork.id())
                .cidrBlock("172.16.0.0/21")
                .zoneId(defaultZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
                .vswitchName(name)
                .ipv6CidrBlockMask("64")
                .build());
    
            var defaultSecurityGroup = new SecurityGroup("defaultSecurityGroup", SecurityGroupArgs.builder()        
                .description(name)
                .vpcId(defaultNetwork.id())
                .build());
    
            var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()        
                .availabilityZone(defaultZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
                .ipv6AddressCount(1)
                .instanceType(defaultInstanceTypes.applyValue(getInstanceTypesResult -> getInstanceTypesResult.instanceTypes()[0].id()))
                .systemDiskCategory("cloud_efficiency")
                .imageId(defaultImages.applyValue(getImagesResult -> getImagesResult.images()[0].id()))
                .instanceName(name)
                .vswitchId(defaultSwitch.id())
                .internetMaxBandwidthOut(10)
                .securityGroups(defaultSecurityGroup.id())
                .build());
    
            var defaultIpv6Gateway = new Ipv6Gateway("defaultIpv6Gateway", Ipv6GatewayArgs.builder()        
                .ipv6GatewayName(name)
                .vpcId(defaultNetwork.id())
                .build());
    
            final var defaultIpv6Addresses = VpcFunctions.getIpv6Addresses(GetIpv6AddressesArgs.builder()
                .associatedInstanceId(defaultInstance.id())
                .status("Available")
                .build());
    
            var defaultIpv6InternetBandwidth = new Ipv6InternetBandwidth("defaultIpv6InternetBandwidth", Ipv6InternetBandwidthArgs.builder()        
                .ipv6AddressId(defaultIpv6Addresses.applyValue(getIpv6AddressesResult -> getIpv6AddressesResult).applyValue(defaultIpv6Addresses -> defaultIpv6Addresses.applyValue(getIpv6AddressesResult -> getIpv6AddressesResult.addresses()[0].id())))
                .ipv6GatewayId(defaultIpv6Gateway.ipv6GatewayId())
                .internetChargeType("PayByBandwidth")
                .bandwidth("20")
                .build());
    
            var defaultIpv6EgressRule = new Ipv6EgressRule("defaultIpv6EgressRule", Ipv6EgressRuleArgs.builder()        
                .instanceId(defaultIpv6InternetBandwidth.ipv6AddressId())
                .ipv6EgressRuleName(name)
                .description(name)
                .ipv6GatewayId(defaultIpv6InternetBandwidth.ipv6GatewayId())
                .instanceType("Ipv6Address")
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: terraform-example
    resources:
      defaultNetwork:
        type: alicloud:vpc:Network
        properties:
          vpcName: ${name}
          enableIpv6: 'true'
          cidrBlock: 172.16.0.0/12
      defaultSwitch:
        type: alicloud:vpc:Switch
        properties:
          vpcId: ${defaultNetwork.id}
          cidrBlock: 172.16.0.0/21
          zoneId: ${defaultZones.zones[0].id}
          vswitchName: ${name}
          ipv6CidrBlockMask: '64'
      defaultSecurityGroup:
        type: alicloud:ecs:SecurityGroup
        properties:
          description: ${name}
          vpcId: ${defaultNetwork.id}
      defaultInstance:
        type: alicloud:ecs:Instance
        properties:
          availabilityZone: ${defaultZones.zones[0].id}
          ipv6AddressCount: 1
          instanceType: ${defaultInstanceTypes.instanceTypes[0].id}
          systemDiskCategory: cloud_efficiency
          imageId: ${defaultImages.images[0].id}
          instanceName: ${name}
          vswitchId: ${defaultSwitch.id}
          internetMaxBandwidthOut: 10
          securityGroups:
            - ${defaultSecurityGroup.id}
      defaultIpv6Gateway:
        type: alicloud:vpc:Ipv6Gateway
        properties:
          ipv6GatewayName: ${name}
          vpcId: ${defaultNetwork.id}
      defaultIpv6InternetBandwidth:
        type: alicloud:vpc:Ipv6InternetBandwidth
        properties:
          ipv6AddressId: ${defaultIpv6Addresses.addresses[0].id}
          ipv6GatewayId: ${defaultIpv6Gateway.ipv6GatewayId}
          internetChargeType: PayByBandwidth
          bandwidth: '20'
      defaultIpv6EgressRule:
        type: alicloud:vpc:Ipv6EgressRule
        properties:
          instanceId: ${defaultIpv6InternetBandwidth.ipv6AddressId}
          ipv6EgressRuleName: ${name}
          description: ${name}
          ipv6GatewayId: ${defaultIpv6InternetBandwidth.ipv6GatewayId}
          instanceType: Ipv6Address
    variables:
      defaultZones:
        fn::invoke:
          Function: alicloud:getZones
          Arguments:
            availableResourceCreation: VSwitch
      defaultInstanceTypes:
        fn::invoke:
          Function: alicloud:ecs:getInstanceTypes
          Arguments:
            availabilityZone: ${defaultZones.zones[0].id}
            systemDiskCategory: cloud_efficiency
            cpuCoreCount: 4
            minimumEniIpv6AddressQuantity: 1
      defaultImages:
        fn::invoke:
          Function: alicloud:ecs:getImages
          Arguments:
            nameRegex: ^ubuntu_18.*64
            mostRecent: true
            owners: system
      defaultIpv6Addresses:
        fn::invoke:
          Function: alicloud:vpc:getIpv6Addresses
          Arguments:
            associatedInstanceId: ${defaultInstance.id}
            status: Available
    

    Create Ipv6EgressRule Resource

    new Ipv6EgressRule(name: string, args: Ipv6EgressRuleArgs, opts?: CustomResourceOptions);
    @overload
    def Ipv6EgressRule(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       description: Optional[str] = None,
                       instance_id: Optional[str] = None,
                       instance_type: Optional[str] = None,
                       ipv6_egress_rule_name: Optional[str] = None,
                       ipv6_gateway_id: Optional[str] = None)
    @overload
    def Ipv6EgressRule(resource_name: str,
                       args: Ipv6EgressRuleArgs,
                       opts: Optional[ResourceOptions] = None)
    func NewIpv6EgressRule(ctx *Context, name string, args Ipv6EgressRuleArgs, opts ...ResourceOption) (*Ipv6EgressRule, error)
    public Ipv6EgressRule(string name, Ipv6EgressRuleArgs args, CustomResourceOptions? opts = null)
    public Ipv6EgressRule(String name, Ipv6EgressRuleArgs args)
    public Ipv6EgressRule(String name, Ipv6EgressRuleArgs args, CustomResourceOptions options)
    
    type: alicloud:vpc:Ipv6EgressRule
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args Ipv6EgressRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args Ipv6EgressRuleArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args Ipv6EgressRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args Ipv6EgressRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args Ipv6EgressRuleArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Ipv6EgressRule Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Ipv6EgressRule resource accepts the following input properties:

    InstanceId string
    The ID of the IPv6 address to which you want to apply the egress-only rule.
    Ipv6GatewayId string
    The ID of the IPv6 gateway.
    Description string
    The description of the egress-only rule. The description must be 2 to 256 characters in length. It cannot start with http:// or https://.
    InstanceType string
    The type of instance to which you want to apply the egress-only rule. Valid values: Ipv6Address. Ipv6Address (default): an IPv6 address.
    Ipv6EgressRuleName string
    The name of the egress-only rule. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.
    InstanceId string
    The ID of the IPv6 address to which you want to apply the egress-only rule.
    Ipv6GatewayId string
    The ID of the IPv6 gateway.
    Description string
    The description of the egress-only rule. The description must be 2 to 256 characters in length. It cannot start with http:// or https://.
    InstanceType string
    The type of instance to which you want to apply the egress-only rule. Valid values: Ipv6Address. Ipv6Address (default): an IPv6 address.
    Ipv6EgressRuleName string
    The name of the egress-only rule. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.
    instanceId String
    The ID of the IPv6 address to which you want to apply the egress-only rule.
    ipv6GatewayId String
    The ID of the IPv6 gateway.
    description String
    The description of the egress-only rule. The description must be 2 to 256 characters in length. It cannot start with http:// or https://.
    instanceType String
    The type of instance to which you want to apply the egress-only rule. Valid values: Ipv6Address. Ipv6Address (default): an IPv6 address.
    ipv6EgressRuleName String
    The name of the egress-only rule. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.
    instanceId string
    The ID of the IPv6 address to which you want to apply the egress-only rule.
    ipv6GatewayId string
    The ID of the IPv6 gateway.
    description string
    The description of the egress-only rule. The description must be 2 to 256 characters in length. It cannot start with http:// or https://.
    instanceType string
    The type of instance to which you want to apply the egress-only rule. Valid values: Ipv6Address. Ipv6Address (default): an IPv6 address.
    ipv6EgressRuleName string
    The name of the egress-only rule. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.
    instance_id str
    The ID of the IPv6 address to which you want to apply the egress-only rule.
    ipv6_gateway_id str
    The ID of the IPv6 gateway.
    description str
    The description of the egress-only rule. The description must be 2 to 256 characters in length. It cannot start with http:// or https://.
    instance_type str
    The type of instance to which you want to apply the egress-only rule. Valid values: Ipv6Address. Ipv6Address (default): an IPv6 address.
    ipv6_egress_rule_name str
    The name of the egress-only rule. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.
    instanceId String
    The ID of the IPv6 address to which you want to apply the egress-only rule.
    ipv6GatewayId String
    The ID of the IPv6 gateway.
    description String
    The description of the egress-only rule. The description must be 2 to 256 characters in length. It cannot start with http:// or https://.
    instanceType String
    The type of instance to which you want to apply the egress-only rule. Valid values: Ipv6Address. Ipv6Address (default): an IPv6 address.
    ipv6EgressRuleName String
    The name of the egress-only rule. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Ipv6EgressRule resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of the resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of the resource.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    The status of the resource.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    The status of the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of the resource.

    Look up Existing Ipv6EgressRule Resource

    Get an existing Ipv6EgressRule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: Ipv6EgressRuleState, opts?: CustomResourceOptions): Ipv6EgressRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            instance_id: Optional[str] = None,
            instance_type: Optional[str] = None,
            ipv6_egress_rule_name: Optional[str] = None,
            ipv6_gateway_id: Optional[str] = None,
            status: Optional[str] = None) -> Ipv6EgressRule
    func GetIpv6EgressRule(ctx *Context, name string, id IDInput, state *Ipv6EgressRuleState, opts ...ResourceOption) (*Ipv6EgressRule, error)
    public static Ipv6EgressRule Get(string name, Input<string> id, Ipv6EgressRuleState? state, CustomResourceOptions? opts = null)
    public static Ipv6EgressRule get(String name, Output<String> id, Ipv6EgressRuleState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Description string
    The description of the egress-only rule. The description must be 2 to 256 characters in length. It cannot start with http:// or https://.
    InstanceId string
    The ID of the IPv6 address to which you want to apply the egress-only rule.
    InstanceType string
    The type of instance to which you want to apply the egress-only rule. Valid values: Ipv6Address. Ipv6Address (default): an IPv6 address.
    Ipv6EgressRuleName string
    The name of the egress-only rule. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.
    Ipv6GatewayId string
    The ID of the IPv6 gateway.
    Status string
    The status of the resource.
    Description string
    The description of the egress-only rule. The description must be 2 to 256 characters in length. It cannot start with http:// or https://.
    InstanceId string
    The ID of the IPv6 address to which you want to apply the egress-only rule.
    InstanceType string
    The type of instance to which you want to apply the egress-only rule. Valid values: Ipv6Address. Ipv6Address (default): an IPv6 address.
    Ipv6EgressRuleName string
    The name of the egress-only rule. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.
    Ipv6GatewayId string
    The ID of the IPv6 gateway.
    Status string
    The status of the resource.
    description String
    The description of the egress-only rule. The description must be 2 to 256 characters in length. It cannot start with http:// or https://.
    instanceId String
    The ID of the IPv6 address to which you want to apply the egress-only rule.
    instanceType String
    The type of instance to which you want to apply the egress-only rule. Valid values: Ipv6Address. Ipv6Address (default): an IPv6 address.
    ipv6EgressRuleName String
    The name of the egress-only rule. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.
    ipv6GatewayId String
    The ID of the IPv6 gateway.
    status String
    The status of the resource.
    description string
    The description of the egress-only rule. The description must be 2 to 256 characters in length. It cannot start with http:// or https://.
    instanceId string
    The ID of the IPv6 address to which you want to apply the egress-only rule.
    instanceType string
    The type of instance to which you want to apply the egress-only rule. Valid values: Ipv6Address. Ipv6Address (default): an IPv6 address.
    ipv6EgressRuleName string
    The name of the egress-only rule. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.
    ipv6GatewayId string
    The ID of the IPv6 gateway.
    status string
    The status of the resource.
    description str
    The description of the egress-only rule. The description must be 2 to 256 characters in length. It cannot start with http:// or https://.
    instance_id str
    The ID of the IPv6 address to which you want to apply the egress-only rule.
    instance_type str
    The type of instance to which you want to apply the egress-only rule. Valid values: Ipv6Address. Ipv6Address (default): an IPv6 address.
    ipv6_egress_rule_name str
    The name of the egress-only rule. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.
    ipv6_gateway_id str
    The ID of the IPv6 gateway.
    status str
    The status of the resource.
    description String
    The description of the egress-only rule. The description must be 2 to 256 characters in length. It cannot start with http:// or https://.
    instanceId String
    The ID of the IPv6 address to which you want to apply the egress-only rule.
    instanceType String
    The type of instance to which you want to apply the egress-only rule. Valid values: Ipv6Address. Ipv6Address (default): an IPv6 address.
    ipv6EgressRuleName String
    The name of the egress-only rule. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.
    ipv6GatewayId String
    The ID of the IPv6 gateway.
    status String
    The status of the resource.

    Import

    VPC Ipv6 Egress Rule can be imported using the id, e.g.

    $ pulumi import alicloud:vpc/ipv6EgressRule:Ipv6EgressRule example <ipv6_gateway_id>:<ipv6_egress_rule_id>
    

    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.51.0 published on Saturday, Mar 23, 2024 by Pulumi