Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:vpc/getIpv6EgressRules:getIpv6EgressRules
arguments:
# arguments dictionary
The following arguments are supported:
- Ipv6Gateway
Id string - The ID of the IPv6 gateway.
- Ids List<string>
- A list of Ipv6 Egress Rule IDs.
- Instance
Id string - The ID of the instance that is associated with the IPv6 address to which the egress-only rule is applied.
- Ipv6Egress
Rule stringName - The name of the resource.
- Name
Regex string - A regex string to filter results by Ipv6 Egress Rule name.
- Output
File 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
.
- Ipv6Gateway
Id string - The ID of the IPv6 gateway.
- Ids []string
- A list of Ipv6 Egress Rule IDs.
- Instance
Id string - The ID of the instance that is associated with the IPv6 address to which the egress-only rule is applied.
- Ipv6Egress
Rule stringName - The name of the resource.
- Name
Regex string - A regex string to filter results by Ipv6 Egress Rule name.
- Output
File 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
.
- ipv6Gateway
Id String - The ID of the IPv6 gateway.
- ids List<String>
- A list of Ipv6 Egress Rule IDs.
- instance
Id String - The ID of the instance that is associated with the IPv6 address to which the egress-only rule is applied.
- ipv6Egress
Rule StringName - The name of the resource.
- name
Regex String - A regex string to filter results by Ipv6 Egress Rule name.
- output
File 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
.
- ipv6Gateway
Id string - The ID of the IPv6 gateway.
- ids string[]
- A list of Ipv6 Egress Rule IDs.
- instance
Id string - The ID of the instance that is associated with the IPv6 address to which the egress-only rule is applied.
- ipv6Egress
Rule stringName - The name of the resource.
- name
Regex string - A regex string to filter results by Ipv6 Egress Rule name.
- output
File 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
.
- ipv6Gateway
Id String - The ID of the IPv6 gateway.
- ids List<String>
- A list of Ipv6 Egress Rule IDs.
- instance
Id String - The ID of the instance that is associated with the IPv6 address to which the egress-only rule is applied.
- ipv6Egress
Rule StringName - The name of the resource.
- name
Regex String - A regex string to filter results by Ipv6 Egress Rule name.
- output
File 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>
- Ipv6Gateway
Id string - Names List<string>
- Rules
List<Pulumi.
Ali Cloud. Vpc. Outputs. Get Ipv6Egress Rules Rule> - Instance
Id string - Ipv6Egress
Rule stringName - Name
Regex string - Output
File string - Status string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Ipv6Gateway
Id string - Names []string
- Rules
[]Get
Ipv6Egress Rules Rule - Instance
Id string - Ipv6Egress
Rule stringName - Name
Regex string - Output
File string - Status string
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- ipv6Gateway
Id String - names List<String>
- rules
List<Get
Ipv6Egress Rules Rule> - instance
Id String - ipv6Egress
Rule StringName - name
Regex String - output
File String - status String
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- ipv6Gateway
Id string - names string[]
- rules
Get
Ipv6Egress Rules Rule[] - instance
Id string - ipv6Egress
Rule stringName - name
Regex string - output
File 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[Get
Ipv6Egress 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>
- ipv6Gateway
Id String - names List<String>
- rules List<Property Map>
- instance
Id String - ipv6Egress
Rule StringName - name
Regex String - output
File 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>
. - Instance
Id string - The ID of the instance to which the egress-only rule is applied.
- Instance
Type string - The type of the instance to which the egress-only rule is applied.
- Ipv6Egress
Rule stringId - The first ID of the resource.
- Ipv6Egress
Rule stringName - The name of the resource.
- Ipv6Gateway
Id string - The ID of the IPv6 gateway.
- Status string
- The status of the resource. Valid values:
Available
,Pending
andDeleting
.
- 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>
. - Instance
Id string - The ID of the instance to which the egress-only rule is applied.
- Instance
Type string - The type of the instance to which the egress-only rule is applied.
- Ipv6Egress
Rule stringId - The first ID of the resource.
- Ipv6Egress
Rule stringName - The name of the resource.
- Ipv6Gateway
Id string - The ID of the IPv6 gateway.
- Status string
- The status of the resource. Valid values:
Available
,Pending
andDeleting
.
- 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>
. - instance
Id String - The ID of the instance to which the egress-only rule is applied.
- instance
Type String - The type of the instance to which the egress-only rule is applied.
- ipv6Egress
Rule StringId - The first ID of the resource.
- ipv6Egress
Rule StringName - The name of the resource.
- ipv6Gateway
Id String - The ID of the IPv6 gateway.
- status String
- The status of the resource. Valid values:
Available
,Pending
andDeleting
.
- 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>
. - instance
Id string - The ID of the instance to which the egress-only rule is applied.
- instance
Type string - The type of the instance to which the egress-only rule is applied.
- ipv6Egress
Rule stringId - The first ID of the resource.
- ipv6Egress
Rule stringName - The name of the resource.
- ipv6Gateway
Id string - The ID of the IPv6 gateway.
- status string
- The status of the resource. Valid values:
Available
,Pending
andDeleting
.
- 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
,Pending
andDeleting
.
- 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>
. - instance
Id String - The ID of the instance to which the egress-only rule is applied.
- instance
Type String - The type of the instance to which the egress-only rule is applied.
- ipv6Egress
Rule StringId - The first ID of the resource.
- ipv6Egress
Rule StringName - The name of the resource.
- ipv6Gateway
Id String - The ID of the IPv6 gateway.
- status String
- The status of the resource. Valid values:
Available
,Pending
andDeleting
.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.