github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/apigatewayv2/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 apigatewayv2 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 // Manages an Amazon API Gateway Version 2 route. 16 // More information can be found in the [Amazon API Gateway Developer Guide](https://docs.aws.amazon.com/apigateway/latest/developerguide/welcome.html) for [WebSocket](https://docs.aws.amazon.com/apigateway/latest/developerguide/websocket-api-develop-routes.html) and [HTTP](https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-routes.html) APIs. 17 // 18 // ## Example Usage 19 // 20 // ### Basic 21 // 22 // <!--Start PulumiCodeChooser --> 23 // ```go 24 // package main 25 // 26 // import ( 27 // 28 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/apigatewayv2" 29 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 30 // 31 // ) 32 // 33 // func main() { 34 // pulumi.Run(func(ctx *pulumi.Context) error { 35 // example, err := apigatewayv2.NewApi(ctx, "example", &apigatewayv2.ApiArgs{ 36 // Name: pulumi.String("example-websocket-api"), 37 // ProtocolType: pulumi.String("WEBSOCKET"), 38 // RouteSelectionExpression: pulumi.String("$request.body.action"), 39 // }) 40 // if err != nil { 41 // return err 42 // } 43 // _, err = apigatewayv2.NewRoute(ctx, "example", &apigatewayv2.RouteArgs{ 44 // ApiId: example.ID(), 45 // RouteKey: pulumi.String("$default"), 46 // }) 47 // if err != nil { 48 // return err 49 // } 50 // return nil 51 // }) 52 // } 53 // 54 // ``` 55 // <!--End PulumiCodeChooser --> 56 // 57 // ### HTTP Proxy Integration 58 // 59 // <!--Start PulumiCodeChooser --> 60 // ```go 61 // package main 62 // 63 // import ( 64 // 65 // "fmt" 66 // 67 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/apigatewayv2" 68 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 69 // 70 // ) 71 // 72 // func main() { 73 // pulumi.Run(func(ctx *pulumi.Context) error { 74 // example, err := apigatewayv2.NewApi(ctx, "example", &apigatewayv2.ApiArgs{ 75 // Name: pulumi.String("example-http-api"), 76 // ProtocolType: pulumi.String("HTTP"), 77 // }) 78 // if err != nil { 79 // return err 80 // } 81 // exampleIntegration, err := apigatewayv2.NewIntegration(ctx, "example", &apigatewayv2.IntegrationArgs{ 82 // ApiId: example.ID(), 83 // IntegrationType: pulumi.String("HTTP_PROXY"), 84 // IntegrationMethod: pulumi.String("ANY"), 85 // IntegrationUri: pulumi.String("https://example.com/{proxy}"), 86 // }) 87 // if err != nil { 88 // return err 89 // } 90 // _, err = apigatewayv2.NewRoute(ctx, "example", &apigatewayv2.RouteArgs{ 91 // ApiId: example.ID(), 92 // RouteKey: pulumi.String("ANY /example/{proxy+}"), 93 // Target: exampleIntegration.ID().ApplyT(func(id string) (string, error) { 94 // return fmt.Sprintf("integrations/%v", id), nil 95 // }).(pulumi.StringOutput), 96 // }) 97 // if err != nil { 98 // return err 99 // } 100 // return nil 101 // }) 102 // } 103 // 104 // ``` 105 // <!--End PulumiCodeChooser --> 106 // 107 // ## Import 108 // 109 // Using `pulumi import`, import `aws_apigatewayv2_route` using the API identifier and route identifier. For example: 110 // 111 // ```sh 112 // $ pulumi import aws:apigatewayv2/route:Route example aabbccddee/1122334 113 // ``` 114 // -> __Note:__ The API Gateway managed route created as part of [_quick_create_](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-basic-concept.html#apigateway-definition-quick-create) cannot be imported. 115 type Route struct { 116 pulumi.CustomResourceState 117 118 // API identifier. 119 ApiId pulumi.StringOutput `pulumi:"apiId"` 120 // Boolean whether an API key is required for the route. Defaults to `false`. Supported only for WebSocket APIs. 121 ApiKeyRequired pulumi.BoolPtrOutput `pulumi:"apiKeyRequired"` 122 // Authorization scopes supported by this route. The scopes are used with a JWT authorizer to authorize the method invocation. 123 AuthorizationScopes pulumi.StringArrayOutput `pulumi:"authorizationScopes"` 124 // Authorization type for the route. 125 // For WebSocket APIs, valid values are `NONE` for open access, `AWS_IAM` for using AWS IAM permissions, and `CUSTOM` for using a Lambda authorizer. 126 // For HTTP APIs, valid values are `NONE` for open access, `JWT` for using JSON Web Tokens, `AWS_IAM` for using AWS IAM permissions, and `CUSTOM` for using a Lambda authorizer. 127 // Defaults to `NONE`. 128 AuthorizationType pulumi.StringPtrOutput `pulumi:"authorizationType"` 129 // Identifier of the `apigatewayv2.Authorizer` resource to be associated with this route. 130 AuthorizerId pulumi.StringPtrOutput `pulumi:"authorizerId"` 131 // The [model selection expression](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html#apigateway-websocket-api-model-selection-expressions) for the route. Supported only for WebSocket APIs. 132 ModelSelectionExpression pulumi.StringPtrOutput `pulumi:"modelSelectionExpression"` 133 // Operation name for the route. Must be between 1 and 64 characters in length. 134 OperationName pulumi.StringPtrOutput `pulumi:"operationName"` 135 // Request models for the route. Supported only for WebSocket APIs. 136 RequestModels pulumi.StringMapOutput `pulumi:"requestModels"` 137 // Request parameters for the route. Supported only for WebSocket APIs. 138 RequestParameters RouteRequestParameterArrayOutput `pulumi:"requestParameters"` 139 // Route key for the route. For HTTP APIs, the route key can be either `$default`, or a combination of an HTTP method and resource path, for example, `GET /pets`. 140 RouteKey pulumi.StringOutput `pulumi:"routeKey"` 141 // The [route response selection expression](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html#apigateway-websocket-api-route-response-selection-expressions) for the route. Supported only for WebSocket APIs. 142 RouteResponseSelectionExpression pulumi.StringPtrOutput `pulumi:"routeResponseSelectionExpression"` 143 // Target for the route, of the form `integrations/`*`IntegrationID`*, where *`IntegrationID`* is the identifier of an `apigatewayv2.Integration` resource. 144 Target pulumi.StringPtrOutput `pulumi:"target"` 145 } 146 147 // NewRoute registers a new resource with the given unique name, arguments, and options. 148 func NewRoute(ctx *pulumi.Context, 149 name string, args *RouteArgs, opts ...pulumi.ResourceOption) (*Route, error) { 150 if args == nil { 151 return nil, errors.New("missing one or more required arguments") 152 } 153 154 if args.ApiId == nil { 155 return nil, errors.New("invalid value for required argument 'ApiId'") 156 } 157 if args.RouteKey == nil { 158 return nil, errors.New("invalid value for required argument 'RouteKey'") 159 } 160 opts = internal.PkgResourceDefaultOpts(opts) 161 var resource Route 162 err := ctx.RegisterResource("aws:apigatewayv2/route:Route", name, args, &resource, opts...) 163 if err != nil { 164 return nil, err 165 } 166 return &resource, nil 167 } 168 169 // GetRoute gets an existing Route resource's state with the given name, ID, and optional 170 // state properties that are used to uniquely qualify the lookup (nil if not required). 171 func GetRoute(ctx *pulumi.Context, 172 name string, id pulumi.IDInput, state *RouteState, opts ...pulumi.ResourceOption) (*Route, error) { 173 var resource Route 174 err := ctx.ReadResource("aws:apigatewayv2/route:Route", name, id, state, &resource, opts...) 175 if err != nil { 176 return nil, err 177 } 178 return &resource, nil 179 } 180 181 // Input properties used for looking up and filtering Route resources. 182 type routeState struct { 183 // API identifier. 184 ApiId *string `pulumi:"apiId"` 185 // Boolean whether an API key is required for the route. Defaults to `false`. Supported only for WebSocket APIs. 186 ApiKeyRequired *bool `pulumi:"apiKeyRequired"` 187 // Authorization scopes supported by this route. The scopes are used with a JWT authorizer to authorize the method invocation. 188 AuthorizationScopes []string `pulumi:"authorizationScopes"` 189 // Authorization type for the route. 190 // For WebSocket APIs, valid values are `NONE` for open access, `AWS_IAM` for using AWS IAM permissions, and `CUSTOM` for using a Lambda authorizer. 191 // For HTTP APIs, valid values are `NONE` for open access, `JWT` for using JSON Web Tokens, `AWS_IAM` for using AWS IAM permissions, and `CUSTOM` for using a Lambda authorizer. 192 // Defaults to `NONE`. 193 AuthorizationType *string `pulumi:"authorizationType"` 194 // Identifier of the `apigatewayv2.Authorizer` resource to be associated with this route. 195 AuthorizerId *string `pulumi:"authorizerId"` 196 // The [model selection expression](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html#apigateway-websocket-api-model-selection-expressions) for the route. Supported only for WebSocket APIs. 197 ModelSelectionExpression *string `pulumi:"modelSelectionExpression"` 198 // Operation name for the route. Must be between 1 and 64 characters in length. 199 OperationName *string `pulumi:"operationName"` 200 // Request models for the route. Supported only for WebSocket APIs. 201 RequestModels map[string]string `pulumi:"requestModels"` 202 // Request parameters for the route. Supported only for WebSocket APIs. 203 RequestParameters []RouteRequestParameter `pulumi:"requestParameters"` 204 // Route key for the route. For HTTP APIs, the route key can be either `$default`, or a combination of an HTTP method and resource path, for example, `GET /pets`. 205 RouteKey *string `pulumi:"routeKey"` 206 // The [route response selection expression](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html#apigateway-websocket-api-route-response-selection-expressions) for the route. Supported only for WebSocket APIs. 207 RouteResponseSelectionExpression *string `pulumi:"routeResponseSelectionExpression"` 208 // Target for the route, of the form `integrations/`*`IntegrationID`*, where *`IntegrationID`* is the identifier of an `apigatewayv2.Integration` resource. 209 Target *string `pulumi:"target"` 210 } 211 212 type RouteState struct { 213 // API identifier. 214 ApiId pulumi.StringPtrInput 215 // Boolean whether an API key is required for the route. Defaults to `false`. Supported only for WebSocket APIs. 216 ApiKeyRequired pulumi.BoolPtrInput 217 // Authorization scopes supported by this route. The scopes are used with a JWT authorizer to authorize the method invocation. 218 AuthorizationScopes pulumi.StringArrayInput 219 // Authorization type for the route. 220 // For WebSocket APIs, valid values are `NONE` for open access, `AWS_IAM` for using AWS IAM permissions, and `CUSTOM` for using a Lambda authorizer. 221 // For HTTP APIs, valid values are `NONE` for open access, `JWT` for using JSON Web Tokens, `AWS_IAM` for using AWS IAM permissions, and `CUSTOM` for using a Lambda authorizer. 222 // Defaults to `NONE`. 223 AuthorizationType pulumi.StringPtrInput 224 // Identifier of the `apigatewayv2.Authorizer` resource to be associated with this route. 225 AuthorizerId pulumi.StringPtrInput 226 // The [model selection expression](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html#apigateway-websocket-api-model-selection-expressions) for the route. Supported only for WebSocket APIs. 227 ModelSelectionExpression pulumi.StringPtrInput 228 // Operation name for the route. Must be between 1 and 64 characters in length. 229 OperationName pulumi.StringPtrInput 230 // Request models for the route. Supported only for WebSocket APIs. 231 RequestModels pulumi.StringMapInput 232 // Request parameters for the route. Supported only for WebSocket APIs. 233 RequestParameters RouteRequestParameterArrayInput 234 // Route key for the route. For HTTP APIs, the route key can be either `$default`, or a combination of an HTTP method and resource path, for example, `GET /pets`. 235 RouteKey pulumi.StringPtrInput 236 // The [route response selection expression](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html#apigateway-websocket-api-route-response-selection-expressions) for the route. Supported only for WebSocket APIs. 237 RouteResponseSelectionExpression pulumi.StringPtrInput 238 // Target for the route, of the form `integrations/`*`IntegrationID`*, where *`IntegrationID`* is the identifier of an `apigatewayv2.Integration` resource. 239 Target pulumi.StringPtrInput 240 } 241 242 func (RouteState) ElementType() reflect.Type { 243 return reflect.TypeOf((*routeState)(nil)).Elem() 244 } 245 246 type routeArgs struct { 247 // API identifier. 248 ApiId string `pulumi:"apiId"` 249 // Boolean whether an API key is required for the route. Defaults to `false`. Supported only for WebSocket APIs. 250 ApiKeyRequired *bool `pulumi:"apiKeyRequired"` 251 // Authorization scopes supported by this route. The scopes are used with a JWT authorizer to authorize the method invocation. 252 AuthorizationScopes []string `pulumi:"authorizationScopes"` 253 // Authorization type for the route. 254 // For WebSocket APIs, valid values are `NONE` for open access, `AWS_IAM` for using AWS IAM permissions, and `CUSTOM` for using a Lambda authorizer. 255 // For HTTP APIs, valid values are `NONE` for open access, `JWT` for using JSON Web Tokens, `AWS_IAM` for using AWS IAM permissions, and `CUSTOM` for using a Lambda authorizer. 256 // Defaults to `NONE`. 257 AuthorizationType *string `pulumi:"authorizationType"` 258 // Identifier of the `apigatewayv2.Authorizer` resource to be associated with this route. 259 AuthorizerId *string `pulumi:"authorizerId"` 260 // The [model selection expression](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html#apigateway-websocket-api-model-selection-expressions) for the route. Supported only for WebSocket APIs. 261 ModelSelectionExpression *string `pulumi:"modelSelectionExpression"` 262 // Operation name for the route. Must be between 1 and 64 characters in length. 263 OperationName *string `pulumi:"operationName"` 264 // Request models for the route. Supported only for WebSocket APIs. 265 RequestModels map[string]string `pulumi:"requestModels"` 266 // Request parameters for the route. Supported only for WebSocket APIs. 267 RequestParameters []RouteRequestParameter `pulumi:"requestParameters"` 268 // Route key for the route. For HTTP APIs, the route key can be either `$default`, or a combination of an HTTP method and resource path, for example, `GET /pets`. 269 RouteKey string `pulumi:"routeKey"` 270 // The [route response selection expression](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html#apigateway-websocket-api-route-response-selection-expressions) for the route. Supported only for WebSocket APIs. 271 RouteResponseSelectionExpression *string `pulumi:"routeResponseSelectionExpression"` 272 // Target for the route, of the form `integrations/`*`IntegrationID`*, where *`IntegrationID`* is the identifier of an `apigatewayv2.Integration` resource. 273 Target *string `pulumi:"target"` 274 } 275 276 // The set of arguments for constructing a Route resource. 277 type RouteArgs struct { 278 // API identifier. 279 ApiId pulumi.StringInput 280 // Boolean whether an API key is required for the route. Defaults to `false`. Supported only for WebSocket APIs. 281 ApiKeyRequired pulumi.BoolPtrInput 282 // Authorization scopes supported by this route. The scopes are used with a JWT authorizer to authorize the method invocation. 283 AuthorizationScopes pulumi.StringArrayInput 284 // Authorization type for the route. 285 // For WebSocket APIs, valid values are `NONE` for open access, `AWS_IAM` for using AWS IAM permissions, and `CUSTOM` for using a Lambda authorizer. 286 // For HTTP APIs, valid values are `NONE` for open access, `JWT` for using JSON Web Tokens, `AWS_IAM` for using AWS IAM permissions, and `CUSTOM` for using a Lambda authorizer. 287 // Defaults to `NONE`. 288 AuthorizationType pulumi.StringPtrInput 289 // Identifier of the `apigatewayv2.Authorizer` resource to be associated with this route. 290 AuthorizerId pulumi.StringPtrInput 291 // The [model selection expression](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html#apigateway-websocket-api-model-selection-expressions) for the route. Supported only for WebSocket APIs. 292 ModelSelectionExpression pulumi.StringPtrInput 293 // Operation name for the route. Must be between 1 and 64 characters in length. 294 OperationName pulumi.StringPtrInput 295 // Request models for the route. Supported only for WebSocket APIs. 296 RequestModels pulumi.StringMapInput 297 // Request parameters for the route. Supported only for WebSocket APIs. 298 RequestParameters RouteRequestParameterArrayInput 299 // Route key for the route. For HTTP APIs, the route key can be either `$default`, or a combination of an HTTP method and resource path, for example, `GET /pets`. 300 RouteKey pulumi.StringInput 301 // The [route response selection expression](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html#apigateway-websocket-api-route-response-selection-expressions) for the route. Supported only for WebSocket APIs. 302 RouteResponseSelectionExpression pulumi.StringPtrInput 303 // Target for the route, of the form `integrations/`*`IntegrationID`*, where *`IntegrationID`* is the identifier of an `apigatewayv2.Integration` resource. 304 Target pulumi.StringPtrInput 305 } 306 307 func (RouteArgs) ElementType() reflect.Type { 308 return reflect.TypeOf((*routeArgs)(nil)).Elem() 309 } 310 311 type RouteInput interface { 312 pulumi.Input 313 314 ToRouteOutput() RouteOutput 315 ToRouteOutputWithContext(ctx context.Context) RouteOutput 316 } 317 318 func (*Route) ElementType() reflect.Type { 319 return reflect.TypeOf((**Route)(nil)).Elem() 320 } 321 322 func (i *Route) ToRouteOutput() RouteOutput { 323 return i.ToRouteOutputWithContext(context.Background()) 324 } 325 326 func (i *Route) ToRouteOutputWithContext(ctx context.Context) RouteOutput { 327 return pulumi.ToOutputWithContext(ctx, i).(RouteOutput) 328 } 329 330 // RouteArrayInput is an input type that accepts RouteArray and RouteArrayOutput values. 331 // You can construct a concrete instance of `RouteArrayInput` via: 332 // 333 // RouteArray{ RouteArgs{...} } 334 type RouteArrayInput interface { 335 pulumi.Input 336 337 ToRouteArrayOutput() RouteArrayOutput 338 ToRouteArrayOutputWithContext(context.Context) RouteArrayOutput 339 } 340 341 type RouteArray []RouteInput 342 343 func (RouteArray) ElementType() reflect.Type { 344 return reflect.TypeOf((*[]*Route)(nil)).Elem() 345 } 346 347 func (i RouteArray) ToRouteArrayOutput() RouteArrayOutput { 348 return i.ToRouteArrayOutputWithContext(context.Background()) 349 } 350 351 func (i RouteArray) ToRouteArrayOutputWithContext(ctx context.Context) RouteArrayOutput { 352 return pulumi.ToOutputWithContext(ctx, i).(RouteArrayOutput) 353 } 354 355 // RouteMapInput is an input type that accepts RouteMap and RouteMapOutput values. 356 // You can construct a concrete instance of `RouteMapInput` via: 357 // 358 // RouteMap{ "key": RouteArgs{...} } 359 type RouteMapInput interface { 360 pulumi.Input 361 362 ToRouteMapOutput() RouteMapOutput 363 ToRouteMapOutputWithContext(context.Context) RouteMapOutput 364 } 365 366 type RouteMap map[string]RouteInput 367 368 func (RouteMap) ElementType() reflect.Type { 369 return reflect.TypeOf((*map[string]*Route)(nil)).Elem() 370 } 371 372 func (i RouteMap) ToRouteMapOutput() RouteMapOutput { 373 return i.ToRouteMapOutputWithContext(context.Background()) 374 } 375 376 func (i RouteMap) ToRouteMapOutputWithContext(ctx context.Context) RouteMapOutput { 377 return pulumi.ToOutputWithContext(ctx, i).(RouteMapOutput) 378 } 379 380 type RouteOutput struct{ *pulumi.OutputState } 381 382 func (RouteOutput) ElementType() reflect.Type { 383 return reflect.TypeOf((**Route)(nil)).Elem() 384 } 385 386 func (o RouteOutput) ToRouteOutput() RouteOutput { 387 return o 388 } 389 390 func (o RouteOutput) ToRouteOutputWithContext(ctx context.Context) RouteOutput { 391 return o 392 } 393 394 // API identifier. 395 func (o RouteOutput) ApiId() pulumi.StringOutput { 396 return o.ApplyT(func(v *Route) pulumi.StringOutput { return v.ApiId }).(pulumi.StringOutput) 397 } 398 399 // Boolean whether an API key is required for the route. Defaults to `false`. Supported only for WebSocket APIs. 400 func (o RouteOutput) ApiKeyRequired() pulumi.BoolPtrOutput { 401 return o.ApplyT(func(v *Route) pulumi.BoolPtrOutput { return v.ApiKeyRequired }).(pulumi.BoolPtrOutput) 402 } 403 404 // Authorization scopes supported by this route. The scopes are used with a JWT authorizer to authorize the method invocation. 405 func (o RouteOutput) AuthorizationScopes() pulumi.StringArrayOutput { 406 return o.ApplyT(func(v *Route) pulumi.StringArrayOutput { return v.AuthorizationScopes }).(pulumi.StringArrayOutput) 407 } 408 409 // Authorization type for the route. 410 // For WebSocket APIs, valid values are `NONE` for open access, `AWS_IAM` for using AWS IAM permissions, and `CUSTOM` for using a Lambda authorizer. 411 // For HTTP APIs, valid values are `NONE` for open access, `JWT` for using JSON Web Tokens, `AWS_IAM` for using AWS IAM permissions, and `CUSTOM` for using a Lambda authorizer. 412 // Defaults to `NONE`. 413 func (o RouteOutput) AuthorizationType() pulumi.StringPtrOutput { 414 return o.ApplyT(func(v *Route) pulumi.StringPtrOutput { return v.AuthorizationType }).(pulumi.StringPtrOutput) 415 } 416 417 // Identifier of the `apigatewayv2.Authorizer` resource to be associated with this route. 418 func (o RouteOutput) AuthorizerId() pulumi.StringPtrOutput { 419 return o.ApplyT(func(v *Route) pulumi.StringPtrOutput { return v.AuthorizerId }).(pulumi.StringPtrOutput) 420 } 421 422 // The [model selection expression](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html#apigateway-websocket-api-model-selection-expressions) for the route. Supported only for WebSocket APIs. 423 func (o RouteOutput) ModelSelectionExpression() pulumi.StringPtrOutput { 424 return o.ApplyT(func(v *Route) pulumi.StringPtrOutput { return v.ModelSelectionExpression }).(pulumi.StringPtrOutput) 425 } 426 427 // Operation name for the route. Must be between 1 and 64 characters in length. 428 func (o RouteOutput) OperationName() pulumi.StringPtrOutput { 429 return o.ApplyT(func(v *Route) pulumi.StringPtrOutput { return v.OperationName }).(pulumi.StringPtrOutput) 430 } 431 432 // Request models for the route. Supported only for WebSocket APIs. 433 func (o RouteOutput) RequestModels() pulumi.StringMapOutput { 434 return o.ApplyT(func(v *Route) pulumi.StringMapOutput { return v.RequestModels }).(pulumi.StringMapOutput) 435 } 436 437 // Request parameters for the route. Supported only for WebSocket APIs. 438 func (o RouteOutput) RequestParameters() RouteRequestParameterArrayOutput { 439 return o.ApplyT(func(v *Route) RouteRequestParameterArrayOutput { return v.RequestParameters }).(RouteRequestParameterArrayOutput) 440 } 441 442 // Route key for the route. For HTTP APIs, the route key can be either `$default`, or a combination of an HTTP method and resource path, for example, `GET /pets`. 443 func (o RouteOutput) RouteKey() pulumi.StringOutput { 444 return o.ApplyT(func(v *Route) pulumi.StringOutput { return v.RouteKey }).(pulumi.StringOutput) 445 } 446 447 // The [route response selection expression](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html#apigateway-websocket-api-route-response-selection-expressions) for the route. Supported only for WebSocket APIs. 448 func (o RouteOutput) RouteResponseSelectionExpression() pulumi.StringPtrOutput { 449 return o.ApplyT(func(v *Route) pulumi.StringPtrOutput { return v.RouteResponseSelectionExpression }).(pulumi.StringPtrOutput) 450 } 451 452 // Target for the route, of the form `integrations/`*`IntegrationID`*, where *`IntegrationID`* is the identifier of an `apigatewayv2.Integration` resource. 453 func (o RouteOutput) Target() pulumi.StringPtrOutput { 454 return o.ApplyT(func(v *Route) pulumi.StringPtrOutput { return v.Target }).(pulumi.StringPtrOutput) 455 } 456 457 type RouteArrayOutput struct{ *pulumi.OutputState } 458 459 func (RouteArrayOutput) ElementType() reflect.Type { 460 return reflect.TypeOf((*[]*Route)(nil)).Elem() 461 } 462 463 func (o RouteArrayOutput) ToRouteArrayOutput() RouteArrayOutput { 464 return o 465 } 466 467 func (o RouteArrayOutput) ToRouteArrayOutputWithContext(ctx context.Context) RouteArrayOutput { 468 return o 469 } 470 471 func (o RouteArrayOutput) Index(i pulumi.IntInput) RouteOutput { 472 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Route { 473 return vs[0].([]*Route)[vs[1].(int)] 474 }).(RouteOutput) 475 } 476 477 type RouteMapOutput struct{ *pulumi.OutputState } 478 479 func (RouteMapOutput) ElementType() reflect.Type { 480 return reflect.TypeOf((*map[string]*Route)(nil)).Elem() 481 } 482 483 func (o RouteMapOutput) ToRouteMapOutput() RouteMapOutput { 484 return o 485 } 486 487 func (o RouteMapOutput) ToRouteMapOutputWithContext(ctx context.Context) RouteMapOutput { 488 return o 489 } 490 491 func (o RouteMapOutput) MapIndex(k pulumi.StringInput) RouteOutput { 492 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Route { 493 return vs[0].(map[string]*Route)[vs[1].(string)] 494 }).(RouteOutput) 495 } 496 497 func init() { 498 pulumi.RegisterInputType(reflect.TypeOf((*RouteInput)(nil)).Elem(), &Route{}) 499 pulumi.RegisterInputType(reflect.TypeOf((*RouteArrayInput)(nil)).Elem(), RouteArray{}) 500 pulumi.RegisterInputType(reflect.TypeOf((*RouteMapInput)(nil)).Elem(), RouteMap{}) 501 pulumi.RegisterOutputType(RouteOutput{}) 502 pulumi.RegisterOutputType(RouteArrayOutput{}) 503 pulumi.RegisterOutputType(RouteMapOutput{}) 504 }