name
Parameters
value
Name of the field to filter by, as defined by the underlying AWS API. For example, if matching against tag Name
, use:
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const selected = aws.ec2.getSubnetIds({
filters: [{
name: "tag:Name",
values: [""],
}],
});
Content copied to clipboard
import pulumi
import pulumi_aws as aws
selected = aws.ec2.get_subnet_ids(filters=[aws.ec2.GetSubnetIdsFilterArgs(
name="tag:Name",
values=[""],
)])
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var selected = Aws.Ec2.GetSubnetIds.Invoke(new()
{
Filters = new[]
{
new Aws.Ec2.Inputs.GetSubnetIdsFilterInputArgs
{
Name = "tag:Name",
Values = new[]
{
"",
},
},
},
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/ec2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ec2.GetSubnetIds(ctx, &ec2.GetSubnetIdsArgs{
Filters: []ec2.GetSubnetIdsFilter{
{
Name: "tag:Name",
Values: []string{
"",
},
},
},
}, nil)
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.Ec2Functions;
import com.pulumi.aws.ec2.inputs.GetSubnetIdsArgs;
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 selected = Ec2Functions.getSubnetIds(GetSubnetIdsArgs.builder()
.filters(GetSubnetIdsFilterArgs.builder()
.name("tag:Name")
.values("")
.build())
.build());
}
}
Content copied to clipboard
variables:
selected:
fn::invoke:
Function: aws:ec2:getSubnetIds
Arguments:
filters:
- name: tag:Name
values:
-
Content copied to clipboard