get Local Gateway
Provides details about an EC2 Local Gateway.
Example Usage
The following example shows how one might accept a local gateway id as a variable.
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.GetLocalGatewayArgs;
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 config = ctx.config();
final var localGatewayId = config.get("localGatewayId");
final var selected = Ec2Functions.getLocalGateway(GetLocalGatewayArgs.builder()
.id(localGatewayId)
.build());
}
}
Content copied to clipboard
Return
A collection of values returned by getLocalGateway.
Parameters
argument
A collection of arguments for invoking getLocalGateway.
suspend fun getLocalGateway(filters: List<GetLocalGatewayFilter>? = null, id: String? = null, state: String? = null, tags: Map<String, String>? = null): GetLocalGatewayResult
Return
A collection of values returned by getLocalGateway.
See also
Parameters
filters
Custom filter block as described below.
id
Id of the specific Local Gateway to retrieve.
state
Current state of the desired Local Gateway. Can be either "pending"
or "available"
.
tags
Mapping of tags, each pair of which must exactly match a pair on the desired Local Gateway.
suspend fun getLocalGateway(argument: suspend GetLocalGatewayPlainArgsBuilder.() -> Unit): GetLocalGatewayResult
Return
A collection of values returned by getLocalGateway.
See also
Parameters
argument
Builder for com.pulumi.aws.ec2.kotlin.inputs.GetLocalGatewayPlainArgs.