Alibaba Cloud

Pulumi Official
Package maintained by Pulumi
v3.19.0 published on Friday, Mar 18, 2022 by Pulumi

getIpv6EgressRules

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

NOTE: Available in v1.142.0+.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var ids = Output.Create(AliCloud.Vpc.GetIpv6EgressRules.InvokeAsync(new AliCloud.Vpc.GetIpv6EgressRulesArgs
        {
            Ipv6GatewayId = "example_value",
            Ids = 
            {
                "example_value-1",
                "example_value-2",
            },
        }));
        this.VpcIpv6EgressRuleId1 = ids.Apply(ids => ids.Rules?[0]?.Id);
        var nameRegex = Output.Create(AliCloud.Vpc.GetIpv6EgressRules.InvokeAsync(new AliCloud.Vpc.GetIpv6EgressRulesArgs
        {
            Ipv6GatewayId = "example_value",
            NameRegex = "^my-Ipv6EgressRule",
        }));
        this.VpcIpv6EgressRuleId2 = nameRegex.Apply(nameRegex => nameRegex.Rules?[0]?.Id);
        var status = Output.Create(AliCloud.Vpc.GetIpv6EgressRules.InvokeAsync(new AliCloud.Vpc.GetIpv6EgressRulesArgs
        {
            Ipv6GatewayId = "example_value",
            Status = "Available",
        }));
        this.VpcIpv6EgressRuleId3 = status.Apply(status => status.Rules?[0]?.Id);
        var ipv6EgressRuleName = Output.Create(AliCloud.Vpc.GetIpv6EgressRules.InvokeAsync(new AliCloud.Vpc.GetIpv6EgressRulesArgs
        {
            Ipv6GatewayId = "example_value",
            Ipv6EgressRuleName = "example_value",
        }));
        this.VpcIpv6EgressRuleId4 = ipv6EgressRuleName.Apply(ipv6EgressRuleName => ipv6EgressRuleName.Rules?[0]?.Id);
    }

    [Output("vpcIpv6EgressRuleId1")]
    public Output<string> VpcIpv6EgressRuleId1 { get; set; }
    [Output("vpcIpv6EgressRuleId2")]
    public Output<string> VpcIpv6EgressRuleId2 { get; set; }
    [Output("vpcIpv6EgressRuleId3")]
    public Output<string> VpcIpv6EgressRuleId3 { get; set; }
    [Output("vpcIpv6EgressRuleId4")]
    public Output<string> VpcIpv6EgressRuleId4 { get; set; }
}
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
	})
}

Coming soon!

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)
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);

Coming soon!

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)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: alicloud:vpc/getIpv6EgressRules:getIpv6EgressRules
  Arguments:
    # Arguments dictionary

The 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 to which the egress-only rule is applied.

Ipv6EgressRuleName string

The name of the resource.

NameRegex string

A regex string to filter results by Ipv6 Egress Rule name.

OutputFile string
Status string

The status of the resource. Valid values: Available, Pending and Deleting.

Ipv6GatewayId string

The ID of the IPv6 gateway.

Ids []string

A list of Ipv6 Egress Rule IDs.

InstanceId string

The ID of the instance to which the egress-only rule is applied.

Ipv6EgressRuleName string

The name of the resource.

NameRegex string

A regex string to filter results by Ipv6 Egress Rule name.

OutputFile string
Status string

The status of the resource. Valid values: Available, Pending and Deleting.

ipv6GatewayId String

The ID of the IPv6 gateway.

ids List

A list of Ipv6 Egress Rule IDs.

instanceId String

The ID of the instance to which the egress-only rule is applied.

ipv6EgressRuleName String

The name of the resource.

nameRegex String

A regex string to filter results by Ipv6 Egress Rule name.

outputFile String
status String

The status of the resource. Valid values: Available, Pending and Deleting.

ipv6GatewayId string

The ID of the IPv6 gateway.

ids string[]

A list of Ipv6 Egress Rule IDs.

instanceId string

The ID of the instance to which the egress-only rule is applied.

ipv6EgressRuleName string

The name of the resource.

nameRegex string

A regex string to filter results by Ipv6 Egress Rule name.

outputFile string
status string

The status of the resource. Valid values: Available, Pending and Deleting.

ipv6_gateway_id str

The ID of the IPv6 gateway.

ids Sequence[str]

A list of Ipv6 Egress Rule IDs.

instance_id str

The ID of the instance to which the egress-only rule is applied.

ipv6_egress_rule_name str

The name of the resource.

name_regex str

A regex string to filter results by Ipv6 Egress Rule name.

output_file str
status str

The status of the resource. Valid values: Available, Pending and Deleting.

ipv6GatewayId String

The ID of the IPv6 gateway.

ids List

A list of Ipv6 Egress Rule IDs.

instanceId String

The ID of the instance to which the egress-only rule is applied.

ipv6EgressRuleName String

The name of the resource.

nameRegex String

A regex string to filter results by Ipv6 Egress Rule name.

outputFile String
status String

The status of the resource. Valid values: Available, Pending and Deleting.

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
ipv6GatewayId String
names List
rules ListIpv6EgressRulesRule>
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
ipv6GatewayId String
names List
rules List
instanceId String
ipv6EgressRuleName String
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.

Ipv6EgressRuleId string

The first ID of the resource.

Ipv6EgressRuleName string

The name of the resource.

Ipv6GatewayId string

The ID of the IPv6 gateway.

Status string

The status of the resource. Valid values: Available, Pending and Deleting.

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.

Ipv6EgressRuleId string

The first ID of the resource.

Ipv6EgressRuleName string

The name of the resource.

Ipv6GatewayId string

The ID of the IPv6 gateway.

Status string

The status of the resource. Valid values: Available, Pending and Deleting.

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.

ipv6EgressRuleId String

The first ID of the resource.

ipv6EgressRuleName String

The name of the resource.

ipv6GatewayId String

The ID of the IPv6 gateway.

status String

The status of the resource. Valid values: Available, Pending and Deleting.

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.

ipv6EgressRuleId string

The first ID of the resource.

ipv6EgressRuleName string

The name of the resource.

ipv6GatewayId string

The ID of the IPv6 gateway.

status string

The status of the resource. Valid values: Available, Pending and Deleting.

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_rule_id str

The first ID of the resource.

ipv6_egress_rule_name str

The name of the resource.

ipv6_gateway_id str

The ID of the IPv6 gateway.

status str

The status of the resource. Valid values: Available, Pending and Deleting.

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.

ipv6EgressRuleId String

The first ID of the resource.

ipv6EgressRuleName String

The name of the resource.

ipv6GatewayId String

The ID of the IPv6 gateway.

status String

The status of the resource. Valid values: Available, Pending and Deleting.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.