github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/ec2/getLocalGatewayRouteTable.go (about)

     1  // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
     2  // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
     3  
     4  package ec2
     5  
     6  import (
     7  	"context"
     8  	"reflect"
     9  
    10  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    11  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    12  )
    13  
    14  // Provides details about an EC2 Local Gateway Route Table.
    15  //
    16  // This data source can prove useful when a module accepts a local gateway route table id as
    17  // an input variable and needs to, for example, find the associated Outpost or Local Gateway.
    18  //
    19  // ## Example Usage
    20  //
    21  // # The following example returns a specific local gateway route table ID
    22  //
    23  // <!--Start PulumiCodeChooser -->
    24  // ```go
    25  // package main
    26  //
    27  // import (
    28  //
    29  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
    30  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    31  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    32  //
    33  // )
    34  //
    35  //	func main() {
    36  //		pulumi.Run(func(ctx *pulumi.Context) error {
    37  //			cfg := config.New(ctx, "")
    38  //			awsEc2LocalGatewayRouteTable := cfg.RequireObject("awsEc2LocalGatewayRouteTable")
    39  //			_, err := ec2.GetLocalGatewayRouteTable(ctx, &ec2.GetLocalGatewayRouteTableArgs{
    40  //				LocalGatewayRouteTableId: pulumi.StringRef(awsEc2LocalGatewayRouteTable),
    41  //			}, nil)
    42  //			if err != nil {
    43  //				return err
    44  //			}
    45  //			return nil
    46  //		})
    47  //	}
    48  //
    49  // ```
    50  // <!--End PulumiCodeChooser -->
    51  func GetLocalGatewayRouteTable(ctx *pulumi.Context, args *GetLocalGatewayRouteTableArgs, opts ...pulumi.InvokeOption) (*GetLocalGatewayRouteTableResult, error) {
    52  	opts = internal.PkgInvokeDefaultOpts(opts)
    53  	var rv GetLocalGatewayRouteTableResult
    54  	err := ctx.Invoke("aws:ec2/getLocalGatewayRouteTable:getLocalGatewayRouteTable", args, &rv, opts...)
    55  	if err != nil {
    56  		return nil, err
    57  	}
    58  	return &rv, nil
    59  }
    60  
    61  // A collection of arguments for invoking getLocalGatewayRouteTable.
    62  type GetLocalGatewayRouteTableArgs struct {
    63  	Filters []GetLocalGatewayRouteTableFilter `pulumi:"filters"`
    64  	// ID of the specific local gateway route table to retrieve.
    65  	LocalGatewayId *string `pulumi:"localGatewayId"`
    66  	// Local Gateway Route Table Id assigned to desired local gateway route table
    67  	LocalGatewayRouteTableId *string `pulumi:"localGatewayRouteTableId"`
    68  	// ARN of the Outpost the local gateway route table is associated with.
    69  	OutpostArn *string `pulumi:"outpostArn"`
    70  	// State of the local gateway route table.
    71  	State *string `pulumi:"state"`
    72  	// Mapping of tags, each pair of which must exactly match
    73  	// a pair on the desired local gateway route table.
    74  	//
    75  	// More complex filters can be expressed using one or more `filter` sub-blocks,
    76  	// which take the following arguments:
    77  	Tags map[string]string `pulumi:"tags"`
    78  }
    79  
    80  // A collection of values returned by getLocalGatewayRouteTable.
    81  type GetLocalGatewayRouteTableResult struct {
    82  	Filters []GetLocalGatewayRouteTableFilter `pulumi:"filters"`
    83  	// The provider-assigned unique ID for this managed resource.
    84  	Id                       string            `pulumi:"id"`
    85  	LocalGatewayId           string            `pulumi:"localGatewayId"`
    86  	LocalGatewayRouteTableId string            `pulumi:"localGatewayRouteTableId"`
    87  	OutpostArn               string            `pulumi:"outpostArn"`
    88  	State                    string            `pulumi:"state"`
    89  	Tags                     map[string]string `pulumi:"tags"`
    90  }
    91  
    92  func GetLocalGatewayRouteTableOutput(ctx *pulumi.Context, args GetLocalGatewayRouteTableOutputArgs, opts ...pulumi.InvokeOption) GetLocalGatewayRouteTableResultOutput {
    93  	return pulumi.ToOutputWithContext(context.Background(), args).
    94  		ApplyT(func(v interface{}) (GetLocalGatewayRouteTableResult, error) {
    95  			args := v.(GetLocalGatewayRouteTableArgs)
    96  			r, err := GetLocalGatewayRouteTable(ctx, &args, opts...)
    97  			var s GetLocalGatewayRouteTableResult
    98  			if r != nil {
    99  				s = *r
   100  			}
   101  			return s, err
   102  		}).(GetLocalGatewayRouteTableResultOutput)
   103  }
   104  
   105  // A collection of arguments for invoking getLocalGatewayRouteTable.
   106  type GetLocalGatewayRouteTableOutputArgs struct {
   107  	Filters GetLocalGatewayRouteTableFilterArrayInput `pulumi:"filters"`
   108  	// ID of the specific local gateway route table to retrieve.
   109  	LocalGatewayId pulumi.StringPtrInput `pulumi:"localGatewayId"`
   110  	// Local Gateway Route Table Id assigned to desired local gateway route table
   111  	LocalGatewayRouteTableId pulumi.StringPtrInput `pulumi:"localGatewayRouteTableId"`
   112  	// ARN of the Outpost the local gateway route table is associated with.
   113  	OutpostArn pulumi.StringPtrInput `pulumi:"outpostArn"`
   114  	// State of the local gateway route table.
   115  	State pulumi.StringPtrInput `pulumi:"state"`
   116  	// Mapping of tags, each pair of which must exactly match
   117  	// a pair on the desired local gateway route table.
   118  	//
   119  	// More complex filters can be expressed using one or more `filter` sub-blocks,
   120  	// which take the following arguments:
   121  	Tags pulumi.StringMapInput `pulumi:"tags"`
   122  }
   123  
   124  func (GetLocalGatewayRouteTableOutputArgs) ElementType() reflect.Type {
   125  	return reflect.TypeOf((*GetLocalGatewayRouteTableArgs)(nil)).Elem()
   126  }
   127  
   128  // A collection of values returned by getLocalGatewayRouteTable.
   129  type GetLocalGatewayRouteTableResultOutput struct{ *pulumi.OutputState }
   130  
   131  func (GetLocalGatewayRouteTableResultOutput) ElementType() reflect.Type {
   132  	return reflect.TypeOf((*GetLocalGatewayRouteTableResult)(nil)).Elem()
   133  }
   134  
   135  func (o GetLocalGatewayRouteTableResultOutput) ToGetLocalGatewayRouteTableResultOutput() GetLocalGatewayRouteTableResultOutput {
   136  	return o
   137  }
   138  
   139  func (o GetLocalGatewayRouteTableResultOutput) ToGetLocalGatewayRouteTableResultOutputWithContext(ctx context.Context) GetLocalGatewayRouteTableResultOutput {
   140  	return o
   141  }
   142  
   143  func (o GetLocalGatewayRouteTableResultOutput) Filters() GetLocalGatewayRouteTableFilterArrayOutput {
   144  	return o.ApplyT(func(v GetLocalGatewayRouteTableResult) []GetLocalGatewayRouteTableFilter { return v.Filters }).(GetLocalGatewayRouteTableFilterArrayOutput)
   145  }
   146  
   147  // The provider-assigned unique ID for this managed resource.
   148  func (o GetLocalGatewayRouteTableResultOutput) Id() pulumi.StringOutput {
   149  	return o.ApplyT(func(v GetLocalGatewayRouteTableResult) string { return v.Id }).(pulumi.StringOutput)
   150  }
   151  
   152  func (o GetLocalGatewayRouteTableResultOutput) LocalGatewayId() pulumi.StringOutput {
   153  	return o.ApplyT(func(v GetLocalGatewayRouteTableResult) string { return v.LocalGatewayId }).(pulumi.StringOutput)
   154  }
   155  
   156  func (o GetLocalGatewayRouteTableResultOutput) LocalGatewayRouteTableId() pulumi.StringOutput {
   157  	return o.ApplyT(func(v GetLocalGatewayRouteTableResult) string { return v.LocalGatewayRouteTableId }).(pulumi.StringOutput)
   158  }
   159  
   160  func (o GetLocalGatewayRouteTableResultOutput) OutpostArn() pulumi.StringOutput {
   161  	return o.ApplyT(func(v GetLocalGatewayRouteTableResult) string { return v.OutpostArn }).(pulumi.StringOutput)
   162  }
   163  
   164  func (o GetLocalGatewayRouteTableResultOutput) State() pulumi.StringOutput {
   165  	return o.ApplyT(func(v GetLocalGatewayRouteTableResult) string { return v.State }).(pulumi.StringOutput)
   166  }
   167  
   168  func (o GetLocalGatewayRouteTableResultOutput) Tags() pulumi.StringMapOutput {
   169  	return o.ApplyT(func(v GetLocalGatewayRouteTableResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
   170  }
   171  
   172  func init() {
   173  	pulumi.RegisterOutputType(GetLocalGatewayRouteTableResultOutput{})
   174  }