getLocalGatewayVirtualInterface function
Future<GetLocalGatewayVirtualInterfaceResult>
getLocalGatewayVirtualInterface(
- GetLocalGatewayVirtualInterfaceArgs args, {
- InvokeOptions? options,
Provides details about an EC2 Local Gateway Virtual Interface. More information can be found in the Outposts User Guide.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = .reduce((__obj, [__key, __value]) => ({ ...__obj, [String(__key)]: aws.ec2.getLocalGatewayVirtualInterface({
id: __value,
}) }), {});
import pulumi
import pulumi_aws as aws
example = {str(__key): aws.ec2.get_local_gateway_virtual_interface(id=__value) for __key, __value in enumerate(example_aws_ec2_local_gateway_virtual_interface_group["localGatewayVirtualInterfaceIds"])}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = .ToDictionary(item => {
var __key = item.Key;
return __key;
}, item => {
var __value = item.Value;
return Aws.Ec2.GetLocalGatewayVirtualInterface.Invoke(new()
{
Id = __value,
});
});
});
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
data "aws_ec2_getlocalgatewayvirtualinterface" "invoke_0" {
for_each = exampleAwsEc2LocalGatewayVirtualInterfaceGroup.localGatewayVirtualInterfaceIds
id = each.value
}
locals {
example = {for __key, __value in exampleAwsEc2LocalGatewayVirtualInterfaceGroup.localGatewayVirtualInterfaceIds : __key => data.aws_ec2_getlocalgatewayvirtualinterface.invoke_0[__key]}
}
args Arguments passed to this invoke. Arguments for getLocalGatewayVirtualInterface.
options Invoke options controlling this call.
Implementation
Future<GetLocalGatewayVirtualInterfaceResult> getLocalGatewayVirtualInterface(
GetLocalGatewayVirtualInterfaceArgs args, {
pulumi.InvokeOptions? options,
}) async {
final deployment = pulumi.Deployment.instance;
final result = await deployment.invoke<Map<String, dynamic>>(
'aws:ec2/getLocalGatewayVirtualInterface:getLocalGatewayVirtualInterface',
args.toMap(),
options: pulumi.toDeploymentInvokeOptions(options),
);
return GetLocalGatewayVirtualInterfaceResult.fromMap(result);
}