Alibaba Cloud v3.75.0 published on Friday, Mar 7, 2025 by Pulumi
alicloud.vpc.getIpv6EgressRules
Explore with Pulumi AI
This data source provides the Vpc Ipv6 Egress Rules 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 ids = alicloud.vpc.getIpv6EgressRules({
    ipv6GatewayId: "example_value",
    ids: [
        "example_value-1",
        "example_value-2",
    ],
});
export const vpcIpv6EgressRuleId1 = ids.then(ids => ids.rules?.[0]?.id);
const nameRegex = alicloud.vpc.getIpv6EgressRules({
    ipv6GatewayId: "example_value",
    nameRegex: "^my-Ipv6EgressRule",
});
export const vpcIpv6EgressRuleId2 = nameRegex.then(nameRegex => nameRegex.rules?.[0]?.id);
const status = alicloud.vpc.getIpv6EgressRules({
    ipv6GatewayId: "example_value",
    status: "Available",
});
export const vpcIpv6EgressRuleId3 = status.then(status => status.rules?.[0]?.id);
const ipv6EgressRuleName = alicloud.vpc.getIpv6EgressRules({
    ipv6GatewayId: "example_value",
    ipv6EgressRuleName: "example_value",
});
export const vpcIpv6EgressRuleId4 = ipv6EgressRuleName.then(ipv6EgressRuleName => ipv6EgressRuleName.rules?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.vpc.get_ipv6_egress_rules(ipv6_gateway_id="example_value",
    ids=[
        "example_value-1",
        "example_value-2",
    ])
pulumi.export("vpcIpv6EgressRuleId1", ids.rules[0].id)
name_regex = alicloud.vpc.get_ipv6_egress_rules(ipv6_gateway_id="example_value",
    name_regex="^my-Ipv6EgressRule")
pulumi.export("vpcIpv6EgressRuleId2", name_regex.rules[0].id)
status = alicloud.vpc.get_ipv6_egress_rules(ipv6_gateway_id="example_value",
    status="Available")
pulumi.export("vpcIpv6EgressRuleId3", status.rules[0].id)
ipv6_egress_rule_name = alicloud.vpc.get_ipv6_egress_rules(ipv6_gateway_id="example_value",
    ipv6_egress_rule_name="example_value")
pulumi.export("vpcIpv6EgressRuleId4", ipv6_egress_rule_name.rules[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 {
		ids, err := vpc.GetIpv6EgressRules(ctx, &vpc.GetIpv6EgressRulesArgs{
			Ipv6GatewayId: "example_value",
			Ids: []string{
				"example_value-1",
				"example_value-2",
			},
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("vpcIpv6EgressRuleId1", ids.Rules[0].Id)
		nameRegex, err := vpc.GetIpv6EgressRules(ctx, &vpc.GetIpv6EgressRulesArgs{
			Ipv6GatewayId: "example_value",
			NameRegex:     pulumi.StringRef("^my-Ipv6EgressRule"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("vpcIpv6EgressRuleId2", nameRegex.Rules[0].Id)
		status, err := vpc.GetIpv6EgressRules(ctx, &vpc.GetIpv6EgressRulesArgs{
			Ipv6GatewayId: "example_value",
			Status:        pulumi.StringRef("Available"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("vpcIpv6EgressRuleId3", status.Rules[0].Id)
		ipv6EgressRuleName, err := vpc.GetIpv6EgressRules(ctx, &vpc.GetIpv6EgressRulesArgs{
			Ipv6GatewayId:      "example_value",
			Ipv6EgressRuleName: pulumi.StringRef("example_value"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("vpcIpv6EgressRuleId4", ipv6EgressRuleName.Rules[0].Id)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() => 
{
    var ids = AliCloud.Vpc.GetIpv6EgressRules.Invoke(new()
    {
        Ipv6GatewayId = "example_value",
        Ids = new[]
        {
            "example_value-1",
            "example_value-2",
        },
    });
    var nameRegex = AliCloud.Vpc.GetIpv6EgressRules.Invoke(new()
    {
        Ipv6GatewayId = "example_value",
        NameRegex = "^my-Ipv6EgressRule",
    });
    var status = AliCloud.Vpc.GetIpv6EgressRules.Invoke(new()
    {
        Ipv6GatewayId = "example_value",
        Status = "Available",
    });
    var ipv6EgressRuleName = AliCloud.Vpc.GetIpv6EgressRules.Invoke(new()
    {
        Ipv6GatewayId = "example_value",
        Ipv6EgressRuleName = "example_value",
    });
    return new Dictionary<string, object?>
    {
        ["vpcIpv6EgressRuleId1"] = ids.Apply(getIpv6EgressRulesResult => getIpv6EgressRulesResult.Rules[0]?.Id),
        ["vpcIpv6EgressRuleId2"] = nameRegex.Apply(getIpv6EgressRulesResult => getIpv6EgressRulesResult.Rules[0]?.Id),
        ["vpcIpv6EgressRuleId3"] = status.Apply(getIpv6EgressRulesResult => getIpv6EgressRulesResult.Rules[0]?.Id),
        ["vpcIpv6EgressRuleId4"] = ipv6EgressRuleName.Apply(getIpv6EgressRulesResult => getIpv6EgressRulesResult.Rules[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.GetIpv6EgressRulesArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        final var ids = VpcFunctions.getIpv6EgressRules(GetIpv6EgressRulesArgs.builder()
            .ipv6GatewayId("example_value")
            .ids(            
                "example_value-1",
                "example_value-2")
            .build());
        ctx.export("vpcIpv6EgressRuleId1", ids.applyValue(getIpv6EgressRulesResult -> getIpv6EgressRulesResult.rules()[0].id()));
        final var nameRegex = VpcFunctions.getIpv6EgressRules(GetIpv6EgressRulesArgs.builder()
            .ipv6GatewayId("example_value")
            .nameRegex("^my-Ipv6EgressRule")
            .build());
        ctx.export("vpcIpv6EgressRuleId2", nameRegex.applyValue(getIpv6EgressRulesResult -> getIpv6EgressRulesResult.rules()[0].id()));
        final var status = VpcFunctions.getIpv6EgressRules(GetIpv6EgressRulesArgs.builder()
            .ipv6GatewayId("example_value")
            .status("Available")
            .build());
        ctx.export("vpcIpv6EgressRuleId3", status.applyValue(getIpv6EgressRulesResult -> getIpv6EgressRulesResult.rules()[0].id()));
        final var ipv6EgressRuleName = VpcFunctions.getIpv6EgressRules(GetIpv6EgressRulesArgs.builder()
            .ipv6GatewayId("example_value")
            .ipv6EgressRuleName("example_value")
            .build());
        ctx.export("vpcIpv6EgressRuleId4", ipv6EgressRuleName.applyValue(getIpv6EgressRulesResult -> getIpv6EgressRulesResult.rules()[0].id()));
    }
}
variables:
  ids:
    fn::invoke:
      function: alicloud:vpc:getIpv6EgressRules
      arguments:
        ipv6GatewayId: example_value
        ids:
          - example_value-1
          - example_value-2
  nameRegex:
    fn::invoke:
      function: alicloud:vpc:getIpv6EgressRules
      arguments:
        ipv6GatewayId: example_value
        nameRegex: ^my-Ipv6EgressRule
  status:
    fn::invoke:
      function: alicloud:vpc:getIpv6EgressRules
      arguments:
        ipv6GatewayId: example_value
        status: Available
  ipv6EgressRuleName:
    fn::invoke:
      function: alicloud:vpc:getIpv6EgressRules
      arguments:
        ipv6GatewayId: example_value
        ipv6EgressRuleName: example_value
outputs:
  vpcIpv6EgressRuleId1: ${ids.rules[0].id}
  vpcIpv6EgressRuleId2: ${nameRegex.rules[0].id}
  vpcIpv6EgressRuleId3: ${status.rules[0].id}
  vpcIpv6EgressRuleId4: ${ipv6EgressRuleName.rules[0].id}
Using getIpv6EgressRules
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 getIpv6EgressRules(args: GetIpv6EgressRulesArgs, opts?: InvokeOptions): Promise<GetIpv6EgressRulesResult>
function getIpv6EgressRulesOutput(args: GetIpv6EgressRulesOutputArgs, opts?: InvokeOptions): Output<GetIpv6EgressRulesResult>def get_ipv6_egress_rules(ids: Optional[Sequence[str]] = None,
                          instance_id: Optional[str] = None,
                          ipv6_egress_rule_name: Optional[str] = None,
                          ipv6_gateway_id: Optional[str] = None,
                          name_regex: Optional[str] = None,
                          output_file: Optional[str] = None,
                          status: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetIpv6EgressRulesResult
def get_ipv6_egress_rules_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                          instance_id: Optional[pulumi.Input[str]] = None,
                          ipv6_egress_rule_name: Optional[pulumi.Input[str]] = None,
                          ipv6_gateway_id: Optional[pulumi.Input[str]] = None,
                          name_regex: Optional[pulumi.Input[str]] = None,
                          output_file: Optional[pulumi.Input[str]] = None,
                          status: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetIpv6EgressRulesResult]func GetIpv6EgressRules(ctx *Context, args *GetIpv6EgressRulesArgs, opts ...InvokeOption) (*GetIpv6EgressRulesResult, error)
func GetIpv6EgressRulesOutput(ctx *Context, args *GetIpv6EgressRulesOutputArgs, opts ...InvokeOption) GetIpv6EgressRulesResultOutput> Note: This function is named GetIpv6EgressRules in the Go SDK.
public static class GetIpv6EgressRules 
{
    public static Task<GetIpv6EgressRulesResult> InvokeAsync(GetIpv6EgressRulesArgs args, InvokeOptions? opts = null)
    public static Output<GetIpv6EgressRulesResult> Invoke(GetIpv6EgressRulesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetIpv6EgressRulesResult> getIpv6EgressRules(GetIpv6EgressRulesArgs args, InvokeOptions options)
public static Output<GetIpv6EgressRulesResult> getIpv6EgressRules(GetIpv6EgressRulesArgs args, InvokeOptions options)
fn::invoke:
  function: alicloud:vpc/getIpv6EgressRules:getIpv6EgressRules
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Ipv6GatewayId string
- The ID of the IPv6 gateway.
- Ids List<string>
- A list of Ipv6 Egress Rule IDs.
- InstanceId string
- The ID of the instance that is associated with the IPv6 address to which the egress-only rule is applied.
- Ipv6EgressRule stringName 
- The name of the resource.
- NameRegex string
- A regex string to filter results by Ipv6 Egress Rule name.
- OutputFile string
- File name where to save data source results (after running pulumi preview).
- Status string
- The status of the resource. Valid values: Available,Deleting,Pending.
- Ipv6GatewayId string
- The ID of the IPv6 gateway.
- Ids []string
- A list of Ipv6 Egress Rule IDs.
- InstanceId string
- The ID of the instance that is associated with the IPv6 address to which the egress-only rule is applied.
- Ipv6EgressRule stringName 
- The name of the resource.
- NameRegex string
- A regex string to filter results by Ipv6 Egress Rule name.
- OutputFile string
- File name where to save data source results (after running pulumi preview).
- Status string
- The status of the resource. Valid values: Available,Deleting,Pending.
- ipv6GatewayId String
- The ID of the IPv6 gateway.
- ids List<String>
- A list of Ipv6 Egress Rule IDs.
- instanceId String
- The ID of the instance that is associated with the IPv6 address to which the egress-only rule is applied.
- ipv6EgressRule StringName 
- The name of the resource.
- nameRegex String
- A regex string to filter results by Ipv6 Egress Rule name.
- outputFile String
- File name where to save data source results (after running pulumi preview).
- status String
- The status of the resource. Valid values: Available,Deleting,Pending.
- ipv6GatewayId string
- The ID of the IPv6 gateway.
- ids string[]
- A list of Ipv6 Egress Rule IDs.
- instanceId string
- The ID of the instance that is associated with the IPv6 address to which the egress-only rule is applied.
- ipv6EgressRule stringName 
- The name of the resource.
- nameRegex string
- A regex string to filter results by Ipv6 Egress Rule name.
- outputFile string
- File name where to save data source results (after running pulumi preview).
- status string
- The status of the resource. Valid values: Available,Deleting,Pending.
- ipv6_gateway_ strid 
- The ID of the IPv6 gateway.
- ids Sequence[str]
- A list of Ipv6 Egress Rule IDs.
- instance_id str
- The ID of the instance that is associated with the IPv6 address to which the egress-only rule is applied.
- ipv6_egress_ strrule_ name 
- The name of the resource.
- name_regex str
- A regex string to filter results by Ipv6 Egress Rule name.
- output_file str
- File name where to save data source results (after running pulumi preview).
- status str
- The status of the resource. Valid values: Available,Deleting,Pending.
- ipv6GatewayId String
- The ID of the IPv6 gateway.
- ids List<String>
- A list of Ipv6 Egress Rule IDs.
- instanceId String
- The ID of the instance that is associated with the IPv6 address to which the egress-only rule is applied.
- ipv6EgressRule StringName 
- The name of the resource.
- nameRegex String
- A regex string to filter results by Ipv6 Egress Rule name.
- outputFile String
- File name where to save data source results (after running pulumi preview).
- status String
- The status of the resource. Valid values: Available,Deleting,Pending.
getIpv6EgressRules Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Ipv6GatewayId string
- Names List<string>
- Rules
List<Pulumi.Ali Cloud. Vpc. Outputs. Get Ipv6Egress Rules Rule> 
- InstanceId string
- Ipv6EgressRule stringName 
- NameRegex string
- OutputFile string
- Status string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Ipv6GatewayId string
- Names []string
- Rules
[]GetIpv6Egress Rules Rule 
- InstanceId string
- Ipv6EgressRule stringName 
- NameRegex string
- OutputFile string
- Status string
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- ipv6GatewayId String
- names List<String>
- rules
List<GetIpv6Egress Rules Rule> 
- instanceId String
- ipv6EgressRule StringName 
- nameRegex String
- outputFile String
- status String
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- ipv6GatewayId string
- names string[]
- rules
GetIpv6Egress Rules Rule[] 
- instanceId string
- ipv6EgressRule stringName 
- nameRegex string
- outputFile string
- status string
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- ipv6_gateway_ strid 
- names Sequence[str]
- rules
Sequence[GetIpv6Egress Rules Rule] 
- instance_id str
- ipv6_egress_ strrule_ name 
- name_regex str
- output_file str
- status str
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- ipv6GatewayId String
- names List<String>
- rules List<Property Map>
- instanceId String
- ipv6EgressRule StringName 
- nameRegex String
- outputFile String
- status String
Supporting Types
GetIpv6EgressRulesRule   
- Description string
- The description of the egress-only rule.
- Id string
- The ID of the Ipv6 Egress Rule. The value formats as <ipv6_gateway_id>:<ipv6_egress_rule_id>.
- InstanceId string
- The ID of the instance to which the egress-only rule is applied.
- InstanceType string
- The type of the instance to which the egress-only rule is applied.
- Ipv6EgressRule stringId 
- The first ID of the resource.
- Ipv6EgressRule stringName 
- The name of the resource.
- Ipv6GatewayId string
- The ID of the IPv6 gateway.
- Status string
- The status of the resource. Valid values: Available,PendingandDeleting.
- Description string
- The description of the egress-only rule.
- Id string
- The ID of the Ipv6 Egress Rule. The value formats as <ipv6_gateway_id>:<ipv6_egress_rule_id>.
- InstanceId string
- The ID of the instance to which the egress-only rule is applied.
- InstanceType string
- The type of the instance to which the egress-only rule is applied.
- Ipv6EgressRule stringId 
- The first ID of the resource.
- Ipv6EgressRule stringName 
- The name of the resource.
- Ipv6GatewayId string
- The ID of the IPv6 gateway.
- Status string
- The status of the resource. Valid values: Available,PendingandDeleting.
- description String
- The description of the egress-only rule.
- id String
- The ID of the Ipv6 Egress Rule. The value formats as <ipv6_gateway_id>:<ipv6_egress_rule_id>.
- instanceId String
- The ID of the instance to which the egress-only rule is applied.
- instanceType String
- The type of the instance to which the egress-only rule is applied.
- ipv6EgressRule StringId 
- The first ID of the resource.
- ipv6EgressRule StringName 
- The name of the resource.
- ipv6GatewayId String
- The ID of the IPv6 gateway.
- status String
- The status of the resource. Valid values: Available,PendingandDeleting.
- description string
- The description of the egress-only rule.
- id string
- The ID of the Ipv6 Egress Rule. The value formats as <ipv6_gateway_id>:<ipv6_egress_rule_id>.
- instanceId string
- The ID of the instance to which the egress-only rule is applied.
- instanceType string
- The type of the instance to which the egress-only rule is applied.
- ipv6EgressRule stringId 
- The first ID of the resource.
- ipv6EgressRule stringName 
- The name of the resource.
- ipv6GatewayId string
- The ID of the IPv6 gateway.
- status string
- The status of the resource. Valid values: Available,PendingandDeleting.
- description str
- The description of the egress-only rule.
- id str
- The ID of the Ipv6 Egress Rule. The value formats as <ipv6_gateway_id>:<ipv6_egress_rule_id>.
- instance_id str
- The ID of the instance to which the egress-only rule is applied.
- instance_type str
- The type of the instance to which the egress-only rule is applied.
- ipv6_egress_ strrule_ id 
- The first ID of the resource.
- ipv6_egress_ strrule_ name 
- The name of the resource.
- ipv6_gateway_ strid 
- The ID of the IPv6 gateway.
- status str
- The status of the resource. Valid values: Available,PendingandDeleting.
- description String
- The description of the egress-only rule.
- id String
- The ID of the Ipv6 Egress Rule. The value formats as <ipv6_gateway_id>:<ipv6_egress_rule_id>.
- instanceId String
- The ID of the instance to which the egress-only rule is applied.
- instanceType String
- The type of the instance to which the egress-only rule is applied.
- ipv6EgressRule StringId 
- The first ID of the resource.
- ipv6EgressRule StringName 
- The name of the resource.
- ipv6GatewayId String
- The ID of the IPv6 gateway.
- status String
- The status of the resource. Valid values: Available,PendingandDeleting.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the alicloudTerraform Provider.