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

alicloud.vpc.getIpv6EgressRules

Explore with Pulumi AI

Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

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);
Copy
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)
Copy
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
	})
}
Copy
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),
    };
});
Copy
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()));
    }
}
Copy
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}
Copy

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>
Copy
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]
Copy
func GetIpv6EgressRules(ctx *Context, args *GetIpv6EgressRulesArgs, opts ...InvokeOption) (*GetIpv6EgressRulesResult, error)
func GetIpv6EgressRulesOutput(ctx *Context, args *GetIpv6EgressRulesOutputArgs, opts ...InvokeOption) GetIpv6EgressRulesResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetIpv6EgressRulesResult> getIpv6EgressRules(GetIpv6EgressRulesArgs args, InvokeOptions options)
public static Output<GetIpv6EgressRulesResult> getIpv6EgressRules(GetIpv6EgressRulesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:vpc/getIpv6EgressRules:getIpv6EgressRules
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Ipv6GatewayId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the IPv6 gateway.
Ids Changes to this property will trigger replacement. List<string>
A list of Ipv6 Egress Rule IDs.
InstanceId Changes to this property will trigger replacement. string
The ID of the instance that is associated with the IPv6 address to which the egress-only rule is applied.
Ipv6EgressRuleName Changes to this property will trigger replacement. string
The name of the resource.
NameRegex Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
The status of the resource. Valid values: Available, Deleting, Pending.
Ipv6GatewayId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the IPv6 gateway.
Ids Changes to this property will trigger replacement. []string
A list of Ipv6 Egress Rule IDs.
InstanceId Changes to this property will trigger replacement. string
The ID of the instance that is associated with the IPv6 address to which the egress-only rule is applied.
Ipv6EgressRuleName Changes to this property will trigger replacement. string
The name of the resource.
NameRegex Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
The status of the resource. Valid values: Available, Deleting, Pending.
ipv6GatewayId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the IPv6 gateway.
ids Changes to this property will trigger replacement. List<String>
A list of Ipv6 Egress Rule IDs.
instanceId Changes to this property will trigger replacement. String
The ID of the instance that is associated with the IPv6 address to which the egress-only rule is applied.
ipv6EgressRuleName Changes to this property will trigger replacement. String
The name of the resource.
nameRegex Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. String
The status of the resource. Valid values: Available, Deleting, Pending.
ipv6GatewayId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the IPv6 gateway.
ids Changes to this property will trigger replacement. string[]
A list of Ipv6 Egress Rule IDs.
instanceId Changes to this property will trigger replacement. string
The ID of the instance that is associated with the IPv6 address to which the egress-only rule is applied.
ipv6EgressRuleName Changes to this property will trigger replacement. string
The name of the resource.
nameRegex Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
The status of the resource. Valid values: Available, Deleting, Pending.
ipv6_gateway_id
This property is required.
Changes to this property will trigger replacement.
str
The ID of the IPv6 gateway.
ids Changes to this property will trigger replacement. Sequence[str]
A list of Ipv6 Egress Rule IDs.
instance_id Changes to this property will trigger replacement. str
The ID of the instance that is associated with the IPv6 address to which the egress-only rule is applied.
ipv6_egress_rule_name Changes to this property will trigger replacement. str
The name of the resource.
name_regex Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. str
The status of the resource. Valid values: Available, Deleting, Pending.
ipv6GatewayId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the IPv6 gateway.
ids Changes to this property will trigger replacement. List<String>
A list of Ipv6 Egress Rule IDs.
instanceId Changes to this property will trigger replacement. String
The ID of the instance that is associated with the IPv6 address to which the egress-only rule is applied.
ipv6EgressRuleName Changes to this property will trigger replacement. String
The name of the resource.
nameRegex Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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.AliCloud.Vpc.Outputs.GetIpv6EgressRulesRule>
InstanceId string
Ipv6EgressRuleName string
NameRegex string
OutputFile string
Status string
Id string
The provider-assigned unique ID for this managed resource.
Ids []string
Ipv6GatewayId string
Names []string
Rules []GetIpv6EgressRulesRule
InstanceId string
Ipv6EgressRuleName string
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<GetIpv6EgressRulesRule>
instanceId String
ipv6EgressRuleName String
nameRegex String
outputFile String
status String
id string
The provider-assigned unique ID for this managed resource.
ids string[]
ipv6GatewayId string
names string[]
rules GetIpv6EgressRulesRule[]
instanceId string
ipv6EgressRuleName string
nameRegex string
outputFile string
status string
id str
The provider-assigned unique ID for this managed resource.
ids Sequence[str]
ipv6_gateway_id str
names Sequence[str]
rules Sequence[GetIpv6EgressRulesRule]
instance_id str
ipv6_egress_rule_name str
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
ipv6EgressRuleName String
nameRegex String
outputFile String
status String

Supporting Types

GetIpv6EgressRulesRule

Description This property is required. string
The description of the egress-only rule.
Id This property is required. string
The ID of the Ipv6 Egress Rule. The value formats as <ipv6_gateway_id>:<ipv6_egress_rule_id>.
InstanceId This property is required. string
The ID of the instance to which the egress-only rule is applied.
InstanceType This property is required. string
The type of the instance to which the egress-only rule is applied.
Ipv6EgressRuleId This property is required. string
The first ID of the resource.
Ipv6EgressRuleName This property is required. string
The name of the resource.
Ipv6GatewayId This property is required. string
The ID of the IPv6 gateway.
Status This property is required. string
The status of the resource. Valid values: Available, Pending and Deleting.
Description This property is required. string
The description of the egress-only rule.
Id This property is required. string
The ID of the Ipv6 Egress Rule. The value formats as <ipv6_gateway_id>:<ipv6_egress_rule_id>.
InstanceId This property is required. string
The ID of the instance to which the egress-only rule is applied.
InstanceType This property is required. string
The type of the instance to which the egress-only rule is applied.
Ipv6EgressRuleId This property is required. string
The first ID of the resource.
Ipv6EgressRuleName This property is required. string
The name of the resource.
Ipv6GatewayId This property is required. string
The ID of the IPv6 gateway.
Status This property is required. string
The status of the resource. Valid values: Available, Pending and Deleting.
description This property is required. String
The description of the egress-only rule.
id This property is required. String
The ID of the Ipv6 Egress Rule. The value formats as <ipv6_gateway_id>:<ipv6_egress_rule_id>.
instanceId This property is required. String
The ID of the instance to which the egress-only rule is applied.
instanceType This property is required. String
The type of the instance to which the egress-only rule is applied.
ipv6EgressRuleId This property is required. String
The first ID of the resource.
ipv6EgressRuleName This property is required. String
The name of the resource.
ipv6GatewayId This property is required. String
The ID of the IPv6 gateway.
status This property is required. String
The status of the resource. Valid values: Available, Pending and Deleting.
description This property is required. string
The description of the egress-only rule.
id This property is required. string
The ID of the Ipv6 Egress Rule. The value formats as <ipv6_gateway_id>:<ipv6_egress_rule_id>.
instanceId This property is required. string
The ID of the instance to which the egress-only rule is applied.
instanceType This property is required. string
The type of the instance to which the egress-only rule is applied.
ipv6EgressRuleId This property is required. string
The first ID of the resource.
ipv6EgressRuleName This property is required. string
The name of the resource.
ipv6GatewayId This property is required. string
The ID of the IPv6 gateway.
status This property is required. string
The status of the resource. Valid values: Available, Pending and Deleting.
description This property is required. str
The description of the egress-only rule.
id This property is required. str
The ID of the Ipv6 Egress Rule. The value formats as <ipv6_gateway_id>:<ipv6_egress_rule_id>.
instance_id This property is required. str
The ID of the instance to which the egress-only rule is applied.
instance_type This property is required. str
The type of the instance to which the egress-only rule is applied.
ipv6_egress_rule_id This property is required. str
The first ID of the resource.
ipv6_egress_rule_name This property is required. str
The name of the resource.
ipv6_gateway_id This property is required. str
The ID of the IPv6 gateway.
status This property is required. str
The status of the resource. Valid values: Available, Pending and Deleting.
description This property is required. String
The description of the egress-only rule.
id This property is required. String
The ID of the Ipv6 Egress Rule. The value formats as <ipv6_gateway_id>:<ipv6_egress_rule_id>.
instanceId This property is required. String
The ID of the instance to which the egress-only rule is applied.
instanceType This property is required. String
The type of the instance to which the egress-only rule is applied.
ipv6EgressRuleId This property is required. String
The first ID of the resource.
ipv6EgressRuleName This property is required. String
The name of the resource.
ipv6GatewayId This property is required. String
The ID of the IPv6 gateway.
status This property is required. String
The status of the resource. Valid values: Available, Pending and Deleting.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi