1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. vpc
  5. Ipv6EgressRule
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.vpc.Ipv6EgressRule

Explore with Pulumi AI

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 _default = alicloud.getZones({
    availableResourceCreation: "VSwitch",
});
const defaultGetInstanceTypes = _default.then(_default => alicloud.ecs.getInstanceTypes({
    availabilityZone: _default.zones?.[0]?.id,
    systemDiskCategory: "cloud_efficiency",
    cpuCoreCount: 4,
    minimumEniIpv6AddressQuantity: 1,
}));
const defaultGetImages = alicloud.ecs.getImages({
    nameRegex: "^ubuntu_18.*64",
    mostRecent: true,
    owners: "system",
});
const defaultNetwork = new alicloud.vpc.Network("default", {
    vpcName: name,
    enableIpv6: true,
    cidrBlock: "172.16.0.0/12",
});
const defaultSwitch = new alicloud.vpc.Switch("default", {
    vpcId: defaultNetwork.id,
    cidrBlock: "172.16.0.0/21",
    zoneId: _default.then(_default => _default.zones?.[0]?.id),
    vswitchName: name,
    ipv6CidrBlockMask: 64,
});
const defaultSecurityGroup = new alicloud.ecs.SecurityGroup("default", {
    name: name,
    description: name,
    vpcId: defaultNetwork.id,
});
const defaultInstance = new alicloud.ecs.Instance("default", {
    availabilityZone: _default.then(_default => _default.zones?.[0]?.id),
    ipv6AddressCount: 1,
    instanceType: defaultGetInstanceTypes.then(defaultGetInstanceTypes => defaultGetInstanceTypes.instanceTypes?.[0]?.id),
    systemDiskCategory: "cloud_efficiency",
    imageId: defaultGetImages.then(defaultGetImages => defaultGetImages.images?.[0]?.id),
    instanceName: name,
    vswitchId: defaultSwitch.id,
    internetMaxBandwidthOut: 10,
    securityGroups: [defaultSecurityGroup.id],
});
const defaultIpv6Gateway = new alicloud.vpc.Ipv6Gateway("default", {
    ipv6GatewayName: name,
    vpcId: defaultNetwork.id,
});
const defaultGetIpv6Addresses = alicloud.vpc.getIpv6AddressesOutput({
    associatedInstanceId: defaultInstance.id,
    status: "Available",
});
const defaultIpv6InternetBandwidth = new alicloud.vpc.Ipv6InternetBandwidth("default", {
    ipv6AddressId: defaultGetIpv6Addresses.apply(defaultGetIpv6Addresses => defaultGetIpv6Addresses.addresses?.[0]?.id),
    ipv6GatewayId: defaultIpv6Gateway.ipv6GatewayId,
    internetChargeType: "PayByBandwidth",
    bandwidth: 20,
});
const defaultIpv6EgressRule = new alicloud.vpc.Ipv6EgressRule("default", {
    instanceId: defaultIpv6InternetBandwidth.ipv6AddressId,
    ipv6EgressRuleName: name,
    description: name,
    ipv6GatewayId: defaultIpv6InternetBandwidth.ipv6GatewayId,
    instanceType: "Ipv6Address",
});
Copy
import pulumi
import pulumi_alicloud as alicloud

config = pulumi.Config()
name = config.get("name")
if name is None:
    name = "terraform-example"
default = alicloud.get_zones(available_resource_creation="VSwitch")
default_get_instance_types = alicloud.ecs.get_instance_types(availability_zone=default.zones[0].id,
    system_disk_category="cloud_efficiency",
    cpu_core_count=4,
    minimum_eni_ipv6_address_quantity=1)
default_get_images = alicloud.ecs.get_images(name_regex="^ubuntu_18.*64",
    most_recent=True,
    owners="system")
default_network = alicloud.vpc.Network("default",
    vpc_name=name,
    enable_ipv6=True,
    cidr_block="172.16.0.0/12")
default_switch = alicloud.vpc.Switch("default",
    vpc_id=default_network.id,
    cidr_block="172.16.0.0/21",
    zone_id=default.zones[0].id,
    vswitch_name=name,
    ipv6_cidr_block_mask=64)
default_security_group = alicloud.ecs.SecurityGroup("default",
    name=name,
    description=name,
    vpc_id=default_network.id)
default_instance = alicloud.ecs.Instance("default",
    availability_zone=default.zones[0].id,
    ipv6_address_count=1,
    instance_type=default_get_instance_types.instance_types[0].id,
    system_disk_category="cloud_efficiency",
    image_id=default_get_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("default",
    ipv6_gateway_name=name,
    vpc_id=default_network.id)
default_get_ipv6_addresses = alicloud.vpc.get_ipv6_addresses_output(associated_instance_id=default_instance.id,
    status="Available")
default_ipv6_internet_bandwidth = alicloud.vpc.Ipv6InternetBandwidth("default",
    ipv6_address_id=default_get_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("default",
    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")
Copy
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
		}
		_default, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
			AvailableResourceCreation: pulumi.StringRef("VSwitch"),
		}, nil)
		if err != nil {
			return err
		}
		defaultGetInstanceTypes, err := ecs.GetInstanceTypes(ctx, &ecs.GetInstanceTypesArgs{
			AvailabilityZone:              pulumi.StringRef(_default.Zones[0].Id),
			SystemDiskCategory:            pulumi.StringRef("cloud_efficiency"),
			CpuCoreCount:                  pulumi.IntRef(4),
			MinimumEniIpv6AddressQuantity: pulumi.IntRef(1),
		}, nil)
		if err != nil {
			return err
		}
		defaultGetImages, 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, "default", &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, "default", &vpc.SwitchArgs{
			VpcId:             defaultNetwork.ID(),
			CidrBlock:         pulumi.String("172.16.0.0/21"),
			ZoneId:            pulumi.String(_default.Zones[0].Id),
			VswitchName:       pulumi.String(name),
			Ipv6CidrBlockMask: pulumi.Int(64),
		})
		if err != nil {
			return err
		}
		defaultSecurityGroup, err := ecs.NewSecurityGroup(ctx, "default", &ecs.SecurityGroupArgs{
			Name:        pulumi.String(name),
			Description: pulumi.String(name),
			VpcId:       defaultNetwork.ID(),
		})
		if err != nil {
			return err
		}
		defaultInstance, err := ecs.NewInstance(ctx, "default", &ecs.InstanceArgs{
			AvailabilityZone:        pulumi.String(_default.Zones[0].Id),
			Ipv6AddressCount:        pulumi.Int(1),
			InstanceType:            pulumi.String(defaultGetInstanceTypes.InstanceTypes[0].Id),
			SystemDiskCategory:      pulumi.String("cloud_efficiency"),
			ImageId:                 pulumi.String(defaultGetImages.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, "default", &vpc.Ipv6GatewayArgs{
			Ipv6GatewayName: pulumi.String(name),
			VpcId:           defaultNetwork.ID(),
		})
		if err != nil {
			return err
		}
		defaultGetIpv6Addresses := vpc.GetIpv6AddressesOutput(ctx, vpc.GetIpv6AddressesOutputArgs{
			AssociatedInstanceId: defaultInstance.ID(),
			Status:               pulumi.String("Available"),
		}, nil)
		defaultIpv6InternetBandwidth, err := vpc.NewIpv6InternetBandwidth(ctx, "default", &vpc.Ipv6InternetBandwidthArgs{
			Ipv6AddressId: pulumi.String(defaultGetIpv6Addresses.ApplyT(func(defaultGetIpv6Addresses vpc.GetIpv6AddressesResult) (*string, error) {
				return &defaultGetIpv6Addresses.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, "default", &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
	})
}
Copy
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 @default = AliCloud.GetZones.Invoke(new()
    {
        AvailableResourceCreation = "VSwitch",
    });

    var defaultGetInstanceTypes = AliCloud.Ecs.GetInstanceTypes.Invoke(new()
    {
        AvailabilityZone = @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
        SystemDiskCategory = "cloud_efficiency",
        CpuCoreCount = 4,
        MinimumEniIpv6AddressQuantity = 1,
    });

    var defaultGetImages = AliCloud.Ecs.GetImages.Invoke(new()
    {
        NameRegex = "^ubuntu_18.*64",
        MostRecent = true,
        Owners = "system",
    });

    var defaultNetwork = new AliCloud.Vpc.Network("default", new()
    {
        VpcName = name,
        EnableIpv6 = true,
        CidrBlock = "172.16.0.0/12",
    });

    var defaultSwitch = new AliCloud.Vpc.Switch("default", new()
    {
        VpcId = defaultNetwork.Id,
        CidrBlock = "172.16.0.0/21",
        ZoneId = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id)),
        VswitchName = name,
        Ipv6CidrBlockMask = 64,
    });

    var defaultSecurityGroup = new AliCloud.Ecs.SecurityGroup("default", new()
    {
        Name = name,
        Description = name,
        VpcId = defaultNetwork.Id,
    });

    var defaultInstance = new AliCloud.Ecs.Instance("default", new()
    {
        AvailabilityZone = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id)),
        Ipv6AddressCount = 1,
        InstanceType = defaultGetInstanceTypes.Apply(getInstanceTypesResult => getInstanceTypesResult.InstanceTypes[0]?.Id),
        SystemDiskCategory = "cloud_efficiency",
        ImageId = defaultGetImages.Apply(getImagesResult => getImagesResult.Images[0]?.Id),
        InstanceName = name,
        VswitchId = defaultSwitch.Id,
        InternetMaxBandwidthOut = 10,
        SecurityGroups = new[]
        {
            defaultSecurityGroup.Id,
        },
    });

    var defaultIpv6Gateway = new AliCloud.Vpc.Ipv6Gateway("default", new()
    {
        Ipv6GatewayName = name,
        VpcId = defaultNetwork.Id,
    });

    var defaultGetIpv6Addresses = AliCloud.Vpc.GetIpv6Addresses.Invoke(new()
    {
        AssociatedInstanceId = defaultInstance.Id,
        Status = "Available",
    });

    var defaultIpv6InternetBandwidth = new AliCloud.Vpc.Ipv6InternetBandwidth("default", new()
    {
        Ipv6AddressId = defaultGetIpv6Addresses.Apply(getIpv6AddressesResult => getIpv6AddressesResult.Addresses[0]?.Id),
        Ipv6GatewayId = defaultIpv6Gateway.Ipv6GatewayId,
        InternetChargeType = "PayByBandwidth",
        Bandwidth = 20,
    });

    var defaultIpv6EgressRule = new AliCloud.Vpc.Ipv6EgressRule("default", new()
    {
        InstanceId = defaultIpv6InternetBandwidth.Ipv6AddressId,
        Ipv6EgressRuleName = name,
        Description = name,
        Ipv6GatewayId = defaultIpv6InternetBandwidth.Ipv6GatewayId,
        InstanceType = "Ipv6Address",
    });

});
Copy
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 default = AlicloudFunctions.getZones(GetZonesArgs.builder()
            .availableResourceCreation("VSwitch")
            .build());

        final var defaultGetInstanceTypes = EcsFunctions.getInstanceTypes(GetInstanceTypesArgs.builder()
            .availabilityZone(default_.zones()[0].id())
            .systemDiskCategory("cloud_efficiency")
            .cpuCoreCount(4)
            .minimumEniIpv6AddressQuantity(1)
            .build());

        final var defaultGetImages = 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(default_.zones()[0].id())
            .vswitchName(name)
            .ipv6CidrBlockMask("64")
            .build());

        var defaultSecurityGroup = new SecurityGroup("defaultSecurityGroup", SecurityGroupArgs.builder()
            .name(name)
            .description(name)
            .vpcId(defaultNetwork.id())
            .build());

        var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()
            .availabilityZone(default_.zones()[0].id())
            .ipv6AddressCount(1)
            .instanceType(defaultGetInstanceTypes.applyValue(getInstanceTypesResult -> getInstanceTypesResult.instanceTypes()[0].id()))
            .systemDiskCategory("cloud_efficiency")
            .imageId(defaultGetImages.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 defaultGetIpv6Addresses = VpcFunctions.getIpv6Addresses(GetIpv6AddressesArgs.builder()
            .associatedInstanceId(defaultInstance.id())
            .status("Available")
            .build());

        var defaultIpv6InternetBandwidth = new Ipv6InternetBandwidth("defaultIpv6InternetBandwidth", Ipv6InternetBandwidthArgs.builder()
            .ipv6AddressId(defaultGetIpv6Addresses.applyValue(getIpv6AddressesResult -> getIpv6AddressesResult).applyValue(defaultGetIpv6Addresses -> defaultGetIpv6Addresses.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());

    }
}
Copy
configuration:
  name:
    type: string
    default: terraform-example
resources:
  defaultNetwork:
    type: alicloud:vpc:Network
    name: default
    properties:
      vpcName: ${name}
      enableIpv6: 'true'
      cidrBlock: 172.16.0.0/12
  defaultSwitch:
    type: alicloud:vpc:Switch
    name: default
    properties:
      vpcId: ${defaultNetwork.id}
      cidrBlock: 172.16.0.0/21
      zoneId: ${default.zones[0].id}
      vswitchName: ${name}
      ipv6CidrBlockMask: '64'
  defaultSecurityGroup:
    type: alicloud:ecs:SecurityGroup
    name: default
    properties:
      name: ${name}
      description: ${name}
      vpcId: ${defaultNetwork.id}
  defaultInstance:
    type: alicloud:ecs:Instance
    name: default
    properties:
      availabilityZone: ${default.zones[0].id}
      ipv6AddressCount: 1
      instanceType: ${defaultGetInstanceTypes.instanceTypes[0].id}
      systemDiskCategory: cloud_efficiency
      imageId: ${defaultGetImages.images[0].id}
      instanceName: ${name}
      vswitchId: ${defaultSwitch.id}
      internetMaxBandwidthOut: 10
      securityGroups:
        - ${defaultSecurityGroup.id}
  defaultIpv6Gateway:
    type: alicloud:vpc:Ipv6Gateway
    name: default
    properties:
      ipv6GatewayName: ${name}
      vpcId: ${defaultNetwork.id}
  defaultIpv6InternetBandwidth:
    type: alicloud:vpc:Ipv6InternetBandwidth
    name: default
    properties:
      ipv6AddressId: ${defaultGetIpv6Addresses.addresses[0].id}
      ipv6GatewayId: ${defaultIpv6Gateway.ipv6GatewayId}
      internetChargeType: PayByBandwidth
      bandwidth: '20'
  defaultIpv6EgressRule:
    type: alicloud:vpc:Ipv6EgressRule
    name: default
    properties:
      instanceId: ${defaultIpv6InternetBandwidth.ipv6AddressId}
      ipv6EgressRuleName: ${name}
      description: ${name}
      ipv6GatewayId: ${defaultIpv6InternetBandwidth.ipv6GatewayId}
      instanceType: Ipv6Address
variables:
  default:
    fn::invoke:
      function: alicloud:getZones
      arguments:
        availableResourceCreation: VSwitch
  defaultGetInstanceTypes:
    fn::invoke:
      function: alicloud:ecs:getInstanceTypes
      arguments:
        availabilityZone: ${default.zones[0].id}
        systemDiskCategory: cloud_efficiency
        cpuCoreCount: 4
        minimumEniIpv6AddressQuantity: 1
  defaultGetImages:
    fn::invoke:
      function: alicloud:ecs:getImages
      arguments:
        nameRegex: ^ubuntu_18.*64
        mostRecent: true
        owners: system
  defaultGetIpv6Addresses:
    fn::invoke:
      function: alicloud:vpc:getIpv6Addresses
      arguments:
        associatedInstanceId: ${defaultInstance.id}
        status: Available
Copy

Create Ipv6EgressRule Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Ipv6EgressRule(name: string, args: Ipv6EgressRuleArgs, opts?: CustomResourceOptions);
@overload
def Ipv6EgressRule(resource_name: str,
                   args: Ipv6EgressRuleArgs,
                   opts: Optional[ResourceOptions] = None)

@overload
def Ipv6EgressRule(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   instance_id: Optional[str] = None,
                   ipv6_gateway_id: Optional[str] = None,
                   description: Optional[str] = None,
                   instance_type: Optional[str] = None,
                   ipv6_egress_rule_name: Optional[str] = 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.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. Ipv6EgressRuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. Ipv6EgressRuleArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. Ipv6EgressRuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. Ipv6EgressRuleArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var ipv6EgressRuleResource = new AliCloud.Vpc.Ipv6EgressRule("ipv6EgressRuleResource", new()
{
    InstanceId = "string",
    Ipv6GatewayId = "string",
    Description = "string",
    InstanceType = "string",
    Ipv6EgressRuleName = "string",
});
Copy
example, err := vpc.NewIpv6EgressRule(ctx, "ipv6EgressRuleResource", &vpc.Ipv6EgressRuleArgs{
	InstanceId:         pulumi.String("string"),
	Ipv6GatewayId:      pulumi.String("string"),
	Description:        pulumi.String("string"),
	InstanceType:       pulumi.String("string"),
	Ipv6EgressRuleName: pulumi.String("string"),
})
Copy
var ipv6EgressRuleResource = new Ipv6EgressRule("ipv6EgressRuleResource", Ipv6EgressRuleArgs.builder()
    .instanceId("string")
    .ipv6GatewayId("string")
    .description("string")
    .instanceType("string")
    .ipv6EgressRuleName("string")
    .build());
Copy
ipv6_egress_rule_resource = alicloud.vpc.Ipv6EgressRule("ipv6EgressRuleResource",
    instance_id="string",
    ipv6_gateway_id="string",
    description="string",
    instance_type="string",
    ipv6_egress_rule_name="string")
Copy
const ipv6EgressRuleResource = new alicloud.vpc.Ipv6EgressRule("ipv6EgressRuleResource", {
    instanceId: "string",
    ipv6GatewayId: "string",
    description: "string",
    instanceType: "string",
    ipv6EgressRuleName: "string",
});
Copy
type: alicloud:vpc:Ipv6EgressRule
properties:
    description: string
    instanceId: string
    instanceType: string
    ipv6EgressRuleName: string
    ipv6GatewayId: string
Copy

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

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Ipv6EgressRule resource accepts the following input properties:

InstanceId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the IPv6 address to which you want to apply the egress-only rule.
Ipv6GatewayId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the IPv6 gateway.
Description Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
The type of instance to which you want to apply the egress-only rule. Valid values: Ipv6Address. Ipv6Address (default): an IPv6 address.
Ipv6EgressRuleName Changes to this property will trigger replacement. 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
This property is required.
Changes to this property will trigger replacement.
string
The ID of the IPv6 address to which you want to apply the egress-only rule.
Ipv6GatewayId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the IPv6 gateway.
Description Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
The type of instance to which you want to apply the egress-only rule. Valid values: Ipv6Address. Ipv6Address (default): an IPv6 address.
Ipv6EgressRuleName Changes to this property will trigger replacement. 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
This property is required.
Changes to this property will trigger replacement.
String
The ID of the IPv6 address to which you want to apply the egress-only rule.
ipv6GatewayId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the IPv6 gateway.
description Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. String
The type of instance to which you want to apply the egress-only rule. Valid values: Ipv6Address. Ipv6Address (default): an IPv6 address.
ipv6EgressRuleName Changes to this property will trigger replacement. 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
This property is required.
Changes to this property will trigger replacement.
string
The ID of the IPv6 address to which you want to apply the egress-only rule.
ipv6GatewayId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the IPv6 gateway.
description Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
The type of instance to which you want to apply the egress-only rule. Valid values: Ipv6Address. Ipv6Address (default): an IPv6 address.
ipv6EgressRuleName Changes to this property will trigger replacement. 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
This property is required.
Changes to this property will trigger replacement.
str
The ID of the IPv6 address to which you want to apply the egress-only rule.
ipv6_gateway_id
This property is required.
Changes to this property will trigger replacement.
str
The ID of the IPv6 gateway.
description Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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
This property is required.
Changes to this property will trigger replacement.
String
The ID of the IPv6 address to which you want to apply the egress-only rule.
ipv6GatewayId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the IPv6 gateway.
description Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. String
The type of instance to which you want to apply the egress-only rule. Valid values: Ipv6Address. Ipv6Address (default): an IPv6 address.
ipv6EgressRuleName Changes to this property will trigger replacement. 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.
Ipv6EgressRuleId string
The ID of the IPv6 EgressRule.
Status string
The status of the resource.
Id string
The provider-assigned unique ID for this managed resource.
Ipv6EgressRuleId string
The ID of the IPv6 EgressRule.
Status string
The status of the resource.
id String
The provider-assigned unique ID for this managed resource.
ipv6EgressRuleId String
The ID of the IPv6 EgressRule.
status String
The status of the resource.
id string
The provider-assigned unique ID for this managed resource.
ipv6EgressRuleId string
The ID of the IPv6 EgressRule.
status string
The status of the resource.
id str
The provider-assigned unique ID for this managed resource.
ipv6_egress_rule_id str
The ID of the IPv6 EgressRule.
status str
The status of the resource.
id String
The provider-assigned unique ID for this managed resource.
ipv6EgressRuleId String
The ID of the IPv6 EgressRule.
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_id: 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)
resources:  _:    type: alicloud:vpc:Ipv6EgressRule    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
The ID of the IPv6 address to which you want to apply the egress-only rule.
InstanceType Changes to this property will trigger replacement. string
The type of instance to which you want to apply the egress-only rule. Valid values: Ipv6Address. Ipv6Address (default): an IPv6 address.
Ipv6EgressRuleId string
The ID of the IPv6 EgressRule.
Ipv6EgressRuleName Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
The ID of the IPv6 gateway.
Status string
The status of the resource.
Description Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
The ID of the IPv6 address to which you want to apply the egress-only rule.
InstanceType Changes to this property will trigger replacement. string
The type of instance to which you want to apply the egress-only rule. Valid values: Ipv6Address. Ipv6Address (default): an IPv6 address.
Ipv6EgressRuleId string
The ID of the IPv6 EgressRule.
Ipv6EgressRuleName Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
The ID of the IPv6 gateway.
Status string
The status of the resource.
description Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. String
The ID of the IPv6 address to which you want to apply the egress-only rule.
instanceType Changes to this property will trigger replacement. String
The type of instance to which you want to apply the egress-only rule. Valid values: Ipv6Address. Ipv6Address (default): an IPv6 address.
ipv6EgressRuleId String
The ID of the IPv6 EgressRule.
ipv6EgressRuleName Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. String
The ID of the IPv6 gateway.
status String
The status of the resource.
description Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
The ID of the IPv6 address to which you want to apply the egress-only rule.
instanceType Changes to this property will trigger replacement. string
The type of instance to which you want to apply the egress-only rule. Valid values: Ipv6Address. Ipv6Address (default): an IPv6 address.
ipv6EgressRuleId string
The ID of the IPv6 EgressRule.
ipv6EgressRuleName Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
The ID of the IPv6 gateway.
status string
The status of the resource.
description Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. str
The ID of the IPv6 address to which you want to apply the egress-only rule.
instance_type Changes to this property will trigger replacement. 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_id str
The ID of the IPv6 EgressRule.
ipv6_egress_rule_name Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. str
The ID of the IPv6 gateway.
status str
The status of the resource.
description Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. String
The ID of the IPv6 address to which you want to apply the egress-only rule.
instanceType Changes to this property will trigger replacement. String
The type of instance to which you want to apply the egress-only rule. Valid values: Ipv6Address. Ipv6Address (default): an IPv6 address.
ipv6EgressRuleId String
The ID of the IPv6 EgressRule.
ipv6EgressRuleName Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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>
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.