github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/appmesh/route.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  	"errors"
    11  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    12  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    13  )
    14  
    15  // Provides an AWS App Mesh route resource.
    16  //
    17  // ## Example Usage
    18  //
    19  // ### HTTP Routing
    20  //
    21  // <!--Start PulumiCodeChooser -->
    22  // ```go
    23  // package main
    24  //
    25  // import (
    26  //
    27  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appmesh"
    28  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    29  //
    30  // )
    31  //
    32  //	func main() {
    33  //		pulumi.Run(func(ctx *pulumi.Context) error {
    34  //			_, err := appmesh.NewRoute(ctx, "serviceb", &appmesh.RouteArgs{
    35  //				Name:              pulumi.String("serviceB-route"),
    36  //				MeshName:          pulumi.Any(simple.Id),
    37  //				VirtualRouterName: pulumi.Any(servicebAwsAppmeshVirtualRouter.Name),
    38  //				Spec: &appmesh.RouteSpecArgs{
    39  //					HttpRoute: &appmesh.RouteSpecHttpRouteArgs{
    40  //						Match: &appmesh.RouteSpecHttpRouteMatchArgs{
    41  //							Prefix: pulumi.String("/"),
    42  //						},
    43  //						Action: &appmesh.RouteSpecHttpRouteActionArgs{
    44  //							WeightedTargets: appmesh.RouteSpecHttpRouteActionWeightedTargetArray{
    45  //								&appmesh.RouteSpecHttpRouteActionWeightedTargetArgs{
    46  //									VirtualNode: pulumi.Any(serviceb1.Name),
    47  //									Weight:      pulumi.Int(90),
    48  //								},
    49  //								&appmesh.RouteSpecHttpRouteActionWeightedTargetArgs{
    50  //									VirtualNode: pulumi.Any(serviceb2.Name),
    51  //									Weight:      pulumi.Int(10),
    52  //								},
    53  //							},
    54  //						},
    55  //					},
    56  //				},
    57  //			})
    58  //			if err != nil {
    59  //				return err
    60  //			}
    61  //			return nil
    62  //		})
    63  //	}
    64  //
    65  // ```
    66  // <!--End PulumiCodeChooser -->
    67  //
    68  // ### HTTP Header Routing
    69  //
    70  // <!--Start PulumiCodeChooser -->
    71  // ```go
    72  // package main
    73  //
    74  // import (
    75  //
    76  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appmesh"
    77  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    78  //
    79  // )
    80  //
    81  //	func main() {
    82  //		pulumi.Run(func(ctx *pulumi.Context) error {
    83  //			_, err := appmesh.NewRoute(ctx, "serviceb", &appmesh.RouteArgs{
    84  //				Name:              pulumi.String("serviceB-route"),
    85  //				MeshName:          pulumi.Any(simple.Id),
    86  //				VirtualRouterName: pulumi.Any(servicebAwsAppmeshVirtualRouter.Name),
    87  //				Spec: &appmesh.RouteSpecArgs{
    88  //					HttpRoute: &appmesh.RouteSpecHttpRouteArgs{
    89  //						Match: &appmesh.RouteSpecHttpRouteMatchArgs{
    90  //							Method: pulumi.String("POST"),
    91  //							Prefix: pulumi.String("/"),
    92  //							Scheme: pulumi.String("https"),
    93  //							Headers: appmesh.RouteSpecHttpRouteMatchHeaderArray{
    94  //								&appmesh.RouteSpecHttpRouteMatchHeaderArgs{
    95  //									Name: pulumi.String("clientRequestId"),
    96  //									Match: &appmesh.RouteSpecHttpRouteMatchHeaderMatchArgs{
    97  //										Prefix: pulumi.String("123"),
    98  //									},
    99  //								},
   100  //							},
   101  //						},
   102  //						Action: &appmesh.RouteSpecHttpRouteActionArgs{
   103  //							WeightedTargets: appmesh.RouteSpecHttpRouteActionWeightedTargetArray{
   104  //								&appmesh.RouteSpecHttpRouteActionWeightedTargetArgs{
   105  //									VirtualNode: pulumi.Any(servicebAwsAppmeshVirtualNode.Name),
   106  //									Weight:      pulumi.Int(100),
   107  //								},
   108  //							},
   109  //						},
   110  //					},
   111  //				},
   112  //			})
   113  //			if err != nil {
   114  //				return err
   115  //			}
   116  //			return nil
   117  //		})
   118  //	}
   119  //
   120  // ```
   121  // <!--End PulumiCodeChooser -->
   122  //
   123  // ### Retry Policy
   124  //
   125  // <!--Start PulumiCodeChooser -->
   126  // ```go
   127  // package main
   128  //
   129  // import (
   130  //
   131  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appmesh"
   132  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   133  //
   134  // )
   135  //
   136  //	func main() {
   137  //		pulumi.Run(func(ctx *pulumi.Context) error {
   138  //			_, err := appmesh.NewRoute(ctx, "serviceb", &appmesh.RouteArgs{
   139  //				Name:              pulumi.String("serviceB-route"),
   140  //				MeshName:          pulumi.Any(simple.Id),
   141  //				VirtualRouterName: pulumi.Any(servicebAwsAppmeshVirtualRouter.Name),
   142  //				Spec: &appmesh.RouteSpecArgs{
   143  //					HttpRoute: &appmesh.RouteSpecHttpRouteArgs{
   144  //						Match: &appmesh.RouteSpecHttpRouteMatchArgs{
   145  //							Prefix: pulumi.String("/"),
   146  //						},
   147  //						RetryPolicy: &appmesh.RouteSpecHttpRouteRetryPolicyArgs{
   148  //							HttpRetryEvents: pulumi.StringArray{
   149  //								pulumi.String("server-error"),
   150  //							},
   151  //							MaxRetries: pulumi.Int(1),
   152  //							PerRetryTimeout: &appmesh.RouteSpecHttpRouteRetryPolicyPerRetryTimeoutArgs{
   153  //								Unit:  pulumi.String("s"),
   154  //								Value: pulumi.Int(15),
   155  //							},
   156  //						},
   157  //						Action: &appmesh.RouteSpecHttpRouteActionArgs{
   158  //							WeightedTargets: appmesh.RouteSpecHttpRouteActionWeightedTargetArray{
   159  //								&appmesh.RouteSpecHttpRouteActionWeightedTargetArgs{
   160  //									VirtualNode: pulumi.Any(servicebAwsAppmeshVirtualNode.Name),
   161  //									Weight:      pulumi.Int(100),
   162  //								},
   163  //							},
   164  //						},
   165  //					},
   166  //				},
   167  //			})
   168  //			if err != nil {
   169  //				return err
   170  //			}
   171  //			return nil
   172  //		})
   173  //	}
   174  //
   175  // ```
   176  // <!--End PulumiCodeChooser -->
   177  //
   178  // ### TCP Routing
   179  //
   180  // <!--Start PulumiCodeChooser -->
   181  // ```go
   182  // package main
   183  //
   184  // import (
   185  //
   186  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appmesh"
   187  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   188  //
   189  // )
   190  //
   191  //	func main() {
   192  //		pulumi.Run(func(ctx *pulumi.Context) error {
   193  //			_, err := appmesh.NewRoute(ctx, "serviceb", &appmesh.RouteArgs{
   194  //				Name:              pulumi.String("serviceB-route"),
   195  //				MeshName:          pulumi.Any(simple.Id),
   196  //				VirtualRouterName: pulumi.Any(servicebAwsAppmeshVirtualRouter.Name),
   197  //				Spec: &appmesh.RouteSpecArgs{
   198  //					TcpRoute: &appmesh.RouteSpecTcpRouteArgs{
   199  //						Action: &appmesh.RouteSpecTcpRouteActionArgs{
   200  //							WeightedTargets: appmesh.RouteSpecTcpRouteActionWeightedTargetArray{
   201  //								&appmesh.RouteSpecTcpRouteActionWeightedTargetArgs{
   202  //									VirtualNode: pulumi.Any(serviceb1.Name),
   203  //									Weight:      pulumi.Int(100),
   204  //								},
   205  //							},
   206  //						},
   207  //					},
   208  //				},
   209  //			})
   210  //			if err != nil {
   211  //				return err
   212  //			}
   213  //			return nil
   214  //		})
   215  //	}
   216  //
   217  // ```
   218  // <!--End PulumiCodeChooser -->
   219  //
   220  // ## Import
   221  //
   222  // Using `pulumi import`, import App Mesh virtual routes using `mesh_name` and `virtual_router_name` together with the route's `name`. For example:
   223  //
   224  // ```sh
   225  // $ pulumi import aws:appmesh/route:Route serviceb simpleapp/serviceB/serviceB-route
   226  // ```
   227  type Route struct {
   228  	pulumi.CustomResourceState
   229  
   230  	// ARN of the route.
   231  	Arn pulumi.StringOutput `pulumi:"arn"`
   232  	// Creation date of the route.
   233  	CreatedDate pulumi.StringOutput `pulumi:"createdDate"`
   234  	// Last update date of the route.
   235  	LastUpdatedDate pulumi.StringOutput `pulumi:"lastUpdatedDate"`
   236  	// Name of the service mesh in which to create the route. Must be between 1 and 255 characters in length.
   237  	MeshName pulumi.StringOutput `pulumi:"meshName"`
   238  	// AWS account ID of the service mesh's owner. Defaults to the account ID the AWS provider is currently connected to.
   239  	MeshOwner pulumi.StringOutput `pulumi:"meshOwner"`
   240  	// Name to use for the route. Must be between 1 and 255 characters in length.
   241  	Name pulumi.StringOutput `pulumi:"name"`
   242  	// Resource owner's AWS account ID.
   243  	ResourceOwner pulumi.StringOutput `pulumi:"resourceOwner"`
   244  	// Route specification to apply.
   245  	Spec RouteSpecOutput `pulumi:"spec"`
   246  	// Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   247  	Tags pulumi.StringMapOutput `pulumi:"tags"`
   248  	// Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   249  	//
   250  	// Deprecated: Please use `tags` instead.
   251  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
   252  	// Name of the virtual router in which to create the route. Must be between 1 and 255 characters in length.
   253  	VirtualRouterName pulumi.StringOutput `pulumi:"virtualRouterName"`
   254  }
   255  
   256  // NewRoute registers a new resource with the given unique name, arguments, and options.
   257  func NewRoute(ctx *pulumi.Context,
   258  	name string, args *RouteArgs, opts ...pulumi.ResourceOption) (*Route, error) {
   259  	if args == nil {
   260  		return nil, errors.New("missing one or more required arguments")
   261  	}
   262  
   263  	if args.MeshName == nil {
   264  		return nil, errors.New("invalid value for required argument 'MeshName'")
   265  	}
   266  	if args.Spec == nil {
   267  		return nil, errors.New("invalid value for required argument 'Spec'")
   268  	}
   269  	if args.VirtualRouterName == nil {
   270  		return nil, errors.New("invalid value for required argument 'VirtualRouterName'")
   271  	}
   272  	opts = internal.PkgResourceDefaultOpts(opts)
   273  	var resource Route
   274  	err := ctx.RegisterResource("aws:appmesh/route:Route", name, args, &resource, opts...)
   275  	if err != nil {
   276  		return nil, err
   277  	}
   278  	return &resource, nil
   279  }
   280  
   281  // GetRoute gets an existing Route resource's state with the given name, ID, and optional
   282  // state properties that are used to uniquely qualify the lookup (nil if not required).
   283  func GetRoute(ctx *pulumi.Context,
   284  	name string, id pulumi.IDInput, state *RouteState, opts ...pulumi.ResourceOption) (*Route, error) {
   285  	var resource Route
   286  	err := ctx.ReadResource("aws:appmesh/route:Route", name, id, state, &resource, opts...)
   287  	if err != nil {
   288  		return nil, err
   289  	}
   290  	return &resource, nil
   291  }
   292  
   293  // Input properties used for looking up and filtering Route resources.
   294  type routeState struct {
   295  	// ARN of the route.
   296  	Arn *string `pulumi:"arn"`
   297  	// Creation date of the route.
   298  	CreatedDate *string `pulumi:"createdDate"`
   299  	// Last update date of the route.
   300  	LastUpdatedDate *string `pulumi:"lastUpdatedDate"`
   301  	// Name of the service mesh in which to create the route. Must be between 1 and 255 characters in length.
   302  	MeshName *string `pulumi:"meshName"`
   303  	// AWS account ID of the service mesh's owner. Defaults to the account ID the AWS provider is currently connected to.
   304  	MeshOwner *string `pulumi:"meshOwner"`
   305  	// Name to use for the route. Must be between 1 and 255 characters in length.
   306  	Name *string `pulumi:"name"`
   307  	// Resource owner's AWS account ID.
   308  	ResourceOwner *string `pulumi:"resourceOwner"`
   309  	// Route specification to apply.
   310  	Spec *RouteSpec `pulumi:"spec"`
   311  	// Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   312  	Tags map[string]string `pulumi:"tags"`
   313  	// Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   314  	//
   315  	// Deprecated: Please use `tags` instead.
   316  	TagsAll map[string]string `pulumi:"tagsAll"`
   317  	// Name of the virtual router in which to create the route. Must be between 1 and 255 characters in length.
   318  	VirtualRouterName *string `pulumi:"virtualRouterName"`
   319  }
   320  
   321  type RouteState struct {
   322  	// ARN of the route.
   323  	Arn pulumi.StringPtrInput
   324  	// Creation date of the route.
   325  	CreatedDate pulumi.StringPtrInput
   326  	// Last update date of the route.
   327  	LastUpdatedDate pulumi.StringPtrInput
   328  	// Name of the service mesh in which to create the route. Must be between 1 and 255 characters in length.
   329  	MeshName pulumi.StringPtrInput
   330  	// AWS account ID of the service mesh's owner. Defaults to the account ID the AWS provider is currently connected to.
   331  	MeshOwner pulumi.StringPtrInput
   332  	// Name to use for the route. Must be between 1 and 255 characters in length.
   333  	Name pulumi.StringPtrInput
   334  	// Resource owner's AWS account ID.
   335  	ResourceOwner pulumi.StringPtrInput
   336  	// Route specification to apply.
   337  	Spec RouteSpecPtrInput
   338  	// Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   339  	Tags pulumi.StringMapInput
   340  	// Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   341  	//
   342  	// Deprecated: Please use `tags` instead.
   343  	TagsAll pulumi.StringMapInput
   344  	// Name of the virtual router in which to create the route. Must be between 1 and 255 characters in length.
   345  	VirtualRouterName pulumi.StringPtrInput
   346  }
   347  
   348  func (RouteState) ElementType() reflect.Type {
   349  	return reflect.TypeOf((*routeState)(nil)).Elem()
   350  }
   351  
   352  type routeArgs struct {
   353  	// Name of the service mesh in which to create the route. Must be between 1 and 255 characters in length.
   354  	MeshName string `pulumi:"meshName"`
   355  	// AWS account ID of the service mesh's owner. Defaults to the account ID the AWS provider is currently connected to.
   356  	MeshOwner *string `pulumi:"meshOwner"`
   357  	// Name to use for the route. Must be between 1 and 255 characters in length.
   358  	Name *string `pulumi:"name"`
   359  	// Route specification to apply.
   360  	Spec RouteSpec `pulumi:"spec"`
   361  	// Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   362  	Tags map[string]string `pulumi:"tags"`
   363  	// Name of the virtual router in which to create the route. Must be between 1 and 255 characters in length.
   364  	VirtualRouterName string `pulumi:"virtualRouterName"`
   365  }
   366  
   367  // The set of arguments for constructing a Route resource.
   368  type RouteArgs struct {
   369  	// Name of the service mesh in which to create the route. Must be between 1 and 255 characters in length.
   370  	MeshName pulumi.StringInput
   371  	// AWS account ID of the service mesh's owner. Defaults to the account ID the AWS provider is currently connected to.
   372  	MeshOwner pulumi.StringPtrInput
   373  	// Name to use for the route. Must be between 1 and 255 characters in length.
   374  	Name pulumi.StringPtrInput
   375  	// Route specification to apply.
   376  	Spec RouteSpecInput
   377  	// Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   378  	Tags pulumi.StringMapInput
   379  	// Name of the virtual router in which to create the route. Must be between 1 and 255 characters in length.
   380  	VirtualRouterName pulumi.StringInput
   381  }
   382  
   383  func (RouteArgs) ElementType() reflect.Type {
   384  	return reflect.TypeOf((*routeArgs)(nil)).Elem()
   385  }
   386  
   387  type RouteInput interface {
   388  	pulumi.Input
   389  
   390  	ToRouteOutput() RouteOutput
   391  	ToRouteOutputWithContext(ctx context.Context) RouteOutput
   392  }
   393  
   394  func (*Route) ElementType() reflect.Type {
   395  	return reflect.TypeOf((**Route)(nil)).Elem()
   396  }
   397  
   398  func (i *Route) ToRouteOutput() RouteOutput {
   399  	return i.ToRouteOutputWithContext(context.Background())
   400  }
   401  
   402  func (i *Route) ToRouteOutputWithContext(ctx context.Context) RouteOutput {
   403  	return pulumi.ToOutputWithContext(ctx, i).(RouteOutput)
   404  }
   405  
   406  // RouteArrayInput is an input type that accepts RouteArray and RouteArrayOutput values.
   407  // You can construct a concrete instance of `RouteArrayInput` via:
   408  //
   409  //	RouteArray{ RouteArgs{...} }
   410  type RouteArrayInput interface {
   411  	pulumi.Input
   412  
   413  	ToRouteArrayOutput() RouteArrayOutput
   414  	ToRouteArrayOutputWithContext(context.Context) RouteArrayOutput
   415  }
   416  
   417  type RouteArray []RouteInput
   418  
   419  func (RouteArray) ElementType() reflect.Type {
   420  	return reflect.TypeOf((*[]*Route)(nil)).Elem()
   421  }
   422  
   423  func (i RouteArray) ToRouteArrayOutput() RouteArrayOutput {
   424  	return i.ToRouteArrayOutputWithContext(context.Background())
   425  }
   426  
   427  func (i RouteArray) ToRouteArrayOutputWithContext(ctx context.Context) RouteArrayOutput {
   428  	return pulumi.ToOutputWithContext(ctx, i).(RouteArrayOutput)
   429  }
   430  
   431  // RouteMapInput is an input type that accepts RouteMap and RouteMapOutput values.
   432  // You can construct a concrete instance of `RouteMapInput` via:
   433  //
   434  //	RouteMap{ "key": RouteArgs{...} }
   435  type RouteMapInput interface {
   436  	pulumi.Input
   437  
   438  	ToRouteMapOutput() RouteMapOutput
   439  	ToRouteMapOutputWithContext(context.Context) RouteMapOutput
   440  }
   441  
   442  type RouteMap map[string]RouteInput
   443  
   444  func (RouteMap) ElementType() reflect.Type {
   445  	return reflect.TypeOf((*map[string]*Route)(nil)).Elem()
   446  }
   447  
   448  func (i RouteMap) ToRouteMapOutput() RouteMapOutput {
   449  	return i.ToRouteMapOutputWithContext(context.Background())
   450  }
   451  
   452  func (i RouteMap) ToRouteMapOutputWithContext(ctx context.Context) RouteMapOutput {
   453  	return pulumi.ToOutputWithContext(ctx, i).(RouteMapOutput)
   454  }
   455  
   456  type RouteOutput struct{ *pulumi.OutputState }
   457  
   458  func (RouteOutput) ElementType() reflect.Type {
   459  	return reflect.TypeOf((**Route)(nil)).Elem()
   460  }
   461  
   462  func (o RouteOutput) ToRouteOutput() RouteOutput {
   463  	return o
   464  }
   465  
   466  func (o RouteOutput) ToRouteOutputWithContext(ctx context.Context) RouteOutput {
   467  	return o
   468  }
   469  
   470  // ARN of the route.
   471  func (o RouteOutput) Arn() pulumi.StringOutput {
   472  	return o.ApplyT(func(v *Route) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   473  }
   474  
   475  // Creation date of the route.
   476  func (o RouteOutput) CreatedDate() pulumi.StringOutput {
   477  	return o.ApplyT(func(v *Route) pulumi.StringOutput { return v.CreatedDate }).(pulumi.StringOutput)
   478  }
   479  
   480  // Last update date of the route.
   481  func (o RouteOutput) LastUpdatedDate() pulumi.StringOutput {
   482  	return o.ApplyT(func(v *Route) pulumi.StringOutput { return v.LastUpdatedDate }).(pulumi.StringOutput)
   483  }
   484  
   485  // Name of the service mesh in which to create the route. Must be between 1 and 255 characters in length.
   486  func (o RouteOutput) MeshName() pulumi.StringOutput {
   487  	return o.ApplyT(func(v *Route) pulumi.StringOutput { return v.MeshName }).(pulumi.StringOutput)
   488  }
   489  
   490  // AWS account ID of the service mesh's owner. Defaults to the account ID the AWS provider is currently connected to.
   491  func (o RouteOutput) MeshOwner() pulumi.StringOutput {
   492  	return o.ApplyT(func(v *Route) pulumi.StringOutput { return v.MeshOwner }).(pulumi.StringOutput)
   493  }
   494  
   495  // Name to use for the route. Must be between 1 and 255 characters in length.
   496  func (o RouteOutput) Name() pulumi.StringOutput {
   497  	return o.ApplyT(func(v *Route) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
   498  }
   499  
   500  // Resource owner's AWS account ID.
   501  func (o RouteOutput) ResourceOwner() pulumi.StringOutput {
   502  	return o.ApplyT(func(v *Route) pulumi.StringOutput { return v.ResourceOwner }).(pulumi.StringOutput)
   503  }
   504  
   505  // Route specification to apply.
   506  func (o RouteOutput) Spec() RouteSpecOutput {
   507  	return o.ApplyT(func(v *Route) RouteSpecOutput { return v.Spec }).(RouteSpecOutput)
   508  }
   509  
   510  // Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   511  func (o RouteOutput) Tags() pulumi.StringMapOutput {
   512  	return o.ApplyT(func(v *Route) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   513  }
   514  
   515  // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   516  //
   517  // Deprecated: Please use `tags` instead.
   518  func (o RouteOutput) TagsAll() pulumi.StringMapOutput {
   519  	return o.ApplyT(func(v *Route) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   520  }
   521  
   522  // Name of the virtual router in which to create the route. Must be between 1 and 255 characters in length.
   523  func (o RouteOutput) VirtualRouterName() pulumi.StringOutput {
   524  	return o.ApplyT(func(v *Route) pulumi.StringOutput { return v.VirtualRouterName }).(pulumi.StringOutput)
   525  }
   526  
   527  type RouteArrayOutput struct{ *pulumi.OutputState }
   528  
   529  func (RouteArrayOutput) ElementType() reflect.Type {
   530  	return reflect.TypeOf((*[]*Route)(nil)).Elem()
   531  }
   532  
   533  func (o RouteArrayOutput) ToRouteArrayOutput() RouteArrayOutput {
   534  	return o
   535  }
   536  
   537  func (o RouteArrayOutput) ToRouteArrayOutputWithContext(ctx context.Context) RouteArrayOutput {
   538  	return o
   539  }
   540  
   541  func (o RouteArrayOutput) Index(i pulumi.IntInput) RouteOutput {
   542  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Route {
   543  		return vs[0].([]*Route)[vs[1].(int)]
   544  	}).(RouteOutput)
   545  }
   546  
   547  type RouteMapOutput struct{ *pulumi.OutputState }
   548  
   549  func (RouteMapOutput) ElementType() reflect.Type {
   550  	return reflect.TypeOf((*map[string]*Route)(nil)).Elem()
   551  }
   552  
   553  func (o RouteMapOutput) ToRouteMapOutput() RouteMapOutput {
   554  	return o
   555  }
   556  
   557  func (o RouteMapOutput) ToRouteMapOutputWithContext(ctx context.Context) RouteMapOutput {
   558  	return o
   559  }
   560  
   561  func (o RouteMapOutput) MapIndex(k pulumi.StringInput) RouteOutput {
   562  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Route {
   563  		return vs[0].(map[string]*Route)[vs[1].(string)]
   564  	}).(RouteOutput)
   565  }
   566  
   567  func init() {
   568  	pulumi.RegisterInputType(reflect.TypeOf((*RouteInput)(nil)).Elem(), &Route{})
   569  	pulumi.RegisterInputType(reflect.TypeOf((*RouteArrayInput)(nil)).Elem(), RouteArray{})
   570  	pulumi.RegisterInputType(reflect.TypeOf((*RouteMapInput)(nil)).Elem(), RouteMap{})
   571  	pulumi.RegisterOutputType(RouteOutput{})
   572  	pulumi.RegisterOutputType(RouteArrayOutput{})
   573  	pulumi.RegisterOutputType(RouteMapOutput{})
   574  }