github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/ec2transitgateway/getRouteTablePropagations.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 ec2transitgateway
     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 information for multiple EC2 Transit Gateway Route Table Propagations, such as their identifiers.
    15  //
    16  // ## Example Usage
    17  //
    18  // ### By Transit Gateway Identifier
    19  //
    20  // <!--Start PulumiCodeChooser -->
    21  // ```go
    22  // package main
    23  //
    24  // import (
    25  //
    26  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2transitgateway"
    27  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    28  //
    29  // )
    30  //
    31  //	func main() {
    32  //		pulumi.Run(func(ctx *pulumi.Context) error {
    33  //			_, err := ec2transitgateway.GetRouteTablePropagations(ctx, &ec2transitgateway.GetRouteTablePropagationsArgs{
    34  //				TransitGatewayRouteTableId: exampleAwsEc2TransitGatewayRouteTable.Id,
    35  //			}, nil)
    36  //			if err != nil {
    37  //				return err
    38  //			}
    39  //			return nil
    40  //		})
    41  //	}
    42  //
    43  // ```
    44  // <!--End PulumiCodeChooser -->
    45  func GetRouteTablePropagations(ctx *pulumi.Context, args *GetRouteTablePropagationsArgs, opts ...pulumi.InvokeOption) (*GetRouteTablePropagationsResult, error) {
    46  	opts = internal.PkgInvokeDefaultOpts(opts)
    47  	var rv GetRouteTablePropagationsResult
    48  	err := ctx.Invoke("aws:ec2transitgateway/getRouteTablePropagations:getRouteTablePropagations", args, &rv, opts...)
    49  	if err != nil {
    50  		return nil, err
    51  	}
    52  	return &rv, nil
    53  }
    54  
    55  // A collection of arguments for invoking getRouteTablePropagations.
    56  type GetRouteTablePropagationsArgs struct {
    57  	// Custom filter block as described below.
    58  	//
    59  	// More complex filters can be expressed using one or more `filter` sub-blocks,
    60  	// which take the following arguments:
    61  	Filters []GetRouteTablePropagationsFilter `pulumi:"filters"`
    62  	// Identifier of EC2 Transit Gateway Route Table.
    63  	//
    64  	// The following arguments are optional:
    65  	TransitGatewayRouteTableId string `pulumi:"transitGatewayRouteTableId"`
    66  }
    67  
    68  // A collection of values returned by getRouteTablePropagations.
    69  type GetRouteTablePropagationsResult struct {
    70  	Filters []GetRouteTablePropagationsFilter `pulumi:"filters"`
    71  	// The provider-assigned unique ID for this managed resource.
    72  	Id string `pulumi:"id"`
    73  	// Set of Transit Gateway Route Table Association identifiers.
    74  	Ids                        []string `pulumi:"ids"`
    75  	TransitGatewayRouteTableId string   `pulumi:"transitGatewayRouteTableId"`
    76  }
    77  
    78  func GetRouteTablePropagationsOutput(ctx *pulumi.Context, args GetRouteTablePropagationsOutputArgs, opts ...pulumi.InvokeOption) GetRouteTablePropagationsResultOutput {
    79  	return pulumi.ToOutputWithContext(context.Background(), args).
    80  		ApplyT(func(v interface{}) (GetRouteTablePropagationsResult, error) {
    81  			args := v.(GetRouteTablePropagationsArgs)
    82  			r, err := GetRouteTablePropagations(ctx, &args, opts...)
    83  			var s GetRouteTablePropagationsResult
    84  			if r != nil {
    85  				s = *r
    86  			}
    87  			return s, err
    88  		}).(GetRouteTablePropagationsResultOutput)
    89  }
    90  
    91  // A collection of arguments for invoking getRouteTablePropagations.
    92  type GetRouteTablePropagationsOutputArgs struct {
    93  	// Custom filter block as described below.
    94  	//
    95  	// More complex filters can be expressed using one or more `filter` sub-blocks,
    96  	// which take the following arguments:
    97  	Filters GetRouteTablePropagationsFilterArrayInput `pulumi:"filters"`
    98  	// Identifier of EC2 Transit Gateway Route Table.
    99  	//
   100  	// The following arguments are optional:
   101  	TransitGatewayRouteTableId pulumi.StringInput `pulumi:"transitGatewayRouteTableId"`
   102  }
   103  
   104  func (GetRouteTablePropagationsOutputArgs) ElementType() reflect.Type {
   105  	return reflect.TypeOf((*GetRouteTablePropagationsArgs)(nil)).Elem()
   106  }
   107  
   108  // A collection of values returned by getRouteTablePropagations.
   109  type GetRouteTablePropagationsResultOutput struct{ *pulumi.OutputState }
   110  
   111  func (GetRouteTablePropagationsResultOutput) ElementType() reflect.Type {
   112  	return reflect.TypeOf((*GetRouteTablePropagationsResult)(nil)).Elem()
   113  }
   114  
   115  func (o GetRouteTablePropagationsResultOutput) ToGetRouteTablePropagationsResultOutput() GetRouteTablePropagationsResultOutput {
   116  	return o
   117  }
   118  
   119  func (o GetRouteTablePropagationsResultOutput) ToGetRouteTablePropagationsResultOutputWithContext(ctx context.Context) GetRouteTablePropagationsResultOutput {
   120  	return o
   121  }
   122  
   123  func (o GetRouteTablePropagationsResultOutput) Filters() GetRouteTablePropagationsFilterArrayOutput {
   124  	return o.ApplyT(func(v GetRouteTablePropagationsResult) []GetRouteTablePropagationsFilter { return v.Filters }).(GetRouteTablePropagationsFilterArrayOutput)
   125  }
   126  
   127  // The provider-assigned unique ID for this managed resource.
   128  func (o GetRouteTablePropagationsResultOutput) Id() pulumi.StringOutput {
   129  	return o.ApplyT(func(v GetRouteTablePropagationsResult) string { return v.Id }).(pulumi.StringOutput)
   130  }
   131  
   132  // Set of Transit Gateway Route Table Association identifiers.
   133  func (o GetRouteTablePropagationsResultOutput) Ids() pulumi.StringArrayOutput {
   134  	return o.ApplyT(func(v GetRouteTablePropagationsResult) []string { return v.Ids }).(pulumi.StringArrayOutput)
   135  }
   136  
   137  func (o GetRouteTablePropagationsResultOutput) TransitGatewayRouteTableId() pulumi.StringOutput {
   138  	return o.ApplyT(func(v GetRouteTablePropagationsResult) string { return v.TransitGatewayRouteTableId }).(pulumi.StringOutput)
   139  }
   140  
   141  func init() {
   142  	pulumi.RegisterOutputType(GetRouteTablePropagationsResultOutput{})
   143  }