getAttachment

Get information on an EC2 Transit Gateway's attachment to a resource.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2transitgateway.Ec2transitgatewayFunctions;
import com.pulumi.aws.ec2transitgateway.inputs.GetAttachmentArgs;
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 example = Ec2transitgatewayFunctions.getAttachment(GetAttachmentArgs.builder()
.filters(
GetAttachmentFilterArgs.builder()
.name("transit-gateway-id")
.values(aws_ec2_transit_gateway.example().id())
.build(),
GetAttachmentFilterArgs.builder()
.name("resource-type")
.values("peering")
.build())
.build());
}
}

Return

A collection of values returned by getAttachment.

Parameters

argument

A collection of arguments for invoking getAttachment.


suspend fun getAttachment(filters: List<GetAttachmentFilter>? = null, tags: Map<String, String>? = null, transitGatewayAttachmentId: String? = null): GetAttachmentResult

Return

A collection of values returned by getAttachment.

Parameters

filters

One or more configuration blocks containing name-values filters. Detailed below.

tags

Key-value tags for the attachment.

transitGatewayAttachmentId

ID of the attachment.

See also


Return

A collection of values returned by getAttachment.

Parameters

argument

Builder for com.pulumi.aws.ec2transitgateway.kotlin.inputs.GetAttachmentPlainArgs.

See also