github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/appmesh/getRoute.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 appmesh
     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  // The App Mesh Route data source allows details of an App Mesh Route to be retrieved by its name, mesh_name, virtual_router_name, and optionally the mesh_owner.
    15  func LookupRoute(ctx *pulumi.Context, args *LookupRouteArgs, opts ...pulumi.InvokeOption) (*LookupRouteResult, error) {
    16  	opts = internal.PkgInvokeDefaultOpts(opts)
    17  	var rv LookupRouteResult
    18  	err := ctx.Invoke("aws:appmesh/getRoute:getRoute", args, &rv, opts...)
    19  	if err != nil {
    20  		return nil, err
    21  	}
    22  	return &rv, nil
    23  }
    24  
    25  // A collection of arguments for invoking getRoute.
    26  type LookupRouteArgs struct {
    27  	// Name of the service mesh in which the virtual router exists.
    28  	MeshName string `pulumi:"meshName"`
    29  	// AWS account ID of the service mesh's owner.
    30  	MeshOwner *string `pulumi:"meshOwner"`
    31  	// Name of the route.
    32  	Name string `pulumi:"name"`
    33  	// Map of tags.
    34  	Tags map[string]string `pulumi:"tags"`
    35  	// Name of the virtual router in which the route exists.
    36  	VirtualRouterName string `pulumi:"virtualRouterName"`
    37  }
    38  
    39  // A collection of values returned by getRoute.
    40  type LookupRouteResult struct {
    41  	// ARN of the route.
    42  	Arn string `pulumi:"arn"`
    43  	// Creation date of the route.
    44  	CreatedDate string `pulumi:"createdDate"`
    45  	// The provider-assigned unique ID for this managed resource.
    46  	Id string `pulumi:"id"`
    47  	// Last update date of the route.
    48  	LastUpdatedDate string `pulumi:"lastUpdatedDate"`
    49  	MeshName        string `pulumi:"meshName"`
    50  	MeshOwner       string `pulumi:"meshOwner"`
    51  	Name            string `pulumi:"name"`
    52  	// Resource owner's AWS account ID.
    53  	ResourceOwner string `pulumi:"resourceOwner"`
    54  	// Route specification. See the `appmesh.Route` resource for details.
    55  	Specs []GetRouteSpec `pulumi:"specs"`
    56  	// Map of tags.
    57  	Tags              map[string]string `pulumi:"tags"`
    58  	VirtualRouterName string            `pulumi:"virtualRouterName"`
    59  }
    60  
    61  func LookupRouteOutput(ctx *pulumi.Context, args LookupRouteOutputArgs, opts ...pulumi.InvokeOption) LookupRouteResultOutput {
    62  	return pulumi.ToOutputWithContext(context.Background(), args).
    63  		ApplyT(func(v interface{}) (LookupRouteResult, error) {
    64  			args := v.(LookupRouteArgs)
    65  			r, err := LookupRoute(ctx, &args, opts...)
    66  			var s LookupRouteResult
    67  			if r != nil {
    68  				s = *r
    69  			}
    70  			return s, err
    71  		}).(LookupRouteResultOutput)
    72  }
    73  
    74  // A collection of arguments for invoking getRoute.
    75  type LookupRouteOutputArgs struct {
    76  	// Name of the service mesh in which the virtual router exists.
    77  	MeshName pulumi.StringInput `pulumi:"meshName"`
    78  	// AWS account ID of the service mesh's owner.
    79  	MeshOwner pulumi.StringPtrInput `pulumi:"meshOwner"`
    80  	// Name of the route.
    81  	Name pulumi.StringInput `pulumi:"name"`
    82  	// Map of tags.
    83  	Tags pulumi.StringMapInput `pulumi:"tags"`
    84  	// Name of the virtual router in which the route exists.
    85  	VirtualRouterName pulumi.StringInput `pulumi:"virtualRouterName"`
    86  }
    87  
    88  func (LookupRouteOutputArgs) ElementType() reflect.Type {
    89  	return reflect.TypeOf((*LookupRouteArgs)(nil)).Elem()
    90  }
    91  
    92  // A collection of values returned by getRoute.
    93  type LookupRouteResultOutput struct{ *pulumi.OutputState }
    94  
    95  func (LookupRouteResultOutput) ElementType() reflect.Type {
    96  	return reflect.TypeOf((*LookupRouteResult)(nil)).Elem()
    97  }
    98  
    99  func (o LookupRouteResultOutput) ToLookupRouteResultOutput() LookupRouteResultOutput {
   100  	return o
   101  }
   102  
   103  func (o LookupRouteResultOutput) ToLookupRouteResultOutputWithContext(ctx context.Context) LookupRouteResultOutput {
   104  	return o
   105  }
   106  
   107  // ARN of the route.
   108  func (o LookupRouteResultOutput) Arn() pulumi.StringOutput {
   109  	return o.ApplyT(func(v LookupRouteResult) string { return v.Arn }).(pulumi.StringOutput)
   110  }
   111  
   112  // Creation date of the route.
   113  func (o LookupRouteResultOutput) CreatedDate() pulumi.StringOutput {
   114  	return o.ApplyT(func(v LookupRouteResult) string { return v.CreatedDate }).(pulumi.StringOutput)
   115  }
   116  
   117  // The provider-assigned unique ID for this managed resource.
   118  func (o LookupRouteResultOutput) Id() pulumi.StringOutput {
   119  	return o.ApplyT(func(v LookupRouteResult) string { return v.Id }).(pulumi.StringOutput)
   120  }
   121  
   122  // Last update date of the route.
   123  func (o LookupRouteResultOutput) LastUpdatedDate() pulumi.StringOutput {
   124  	return o.ApplyT(func(v LookupRouteResult) string { return v.LastUpdatedDate }).(pulumi.StringOutput)
   125  }
   126  
   127  func (o LookupRouteResultOutput) MeshName() pulumi.StringOutput {
   128  	return o.ApplyT(func(v LookupRouteResult) string { return v.MeshName }).(pulumi.StringOutput)
   129  }
   130  
   131  func (o LookupRouteResultOutput) MeshOwner() pulumi.StringOutput {
   132  	return o.ApplyT(func(v LookupRouteResult) string { return v.MeshOwner }).(pulumi.StringOutput)
   133  }
   134  
   135  func (o LookupRouteResultOutput) Name() pulumi.StringOutput {
   136  	return o.ApplyT(func(v LookupRouteResult) string { return v.Name }).(pulumi.StringOutput)
   137  }
   138  
   139  // Resource owner's AWS account ID.
   140  func (o LookupRouteResultOutput) ResourceOwner() pulumi.StringOutput {
   141  	return o.ApplyT(func(v LookupRouteResult) string { return v.ResourceOwner }).(pulumi.StringOutput)
   142  }
   143  
   144  // Route specification. See the `appmesh.Route` resource for details.
   145  func (o LookupRouteResultOutput) Specs() GetRouteSpecArrayOutput {
   146  	return o.ApplyT(func(v LookupRouteResult) []GetRouteSpec { return v.Specs }).(GetRouteSpecArrayOutput)
   147  }
   148  
   149  // Map of tags.
   150  func (o LookupRouteResultOutput) Tags() pulumi.StringMapOutput {
   151  	return o.ApplyT(func(v LookupRouteResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
   152  }
   153  
   154  func (o LookupRouteResultOutput) VirtualRouterName() pulumi.StringOutput {
   155  	return o.ApplyT(func(v LookupRouteResult) string { return v.VirtualRouterName }).(pulumi.StringOutput)
   156  }
   157  
   158  func init() {
   159  	pulumi.RegisterOutputType(LookupRouteResultOutput{})
   160  }