Class: AWSCDK::APIGatewayv2::CfnRouteProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::APIGatewayv2::CfnRouteProps
- Defined in:
- api_gatewayv2/cfn_route_props.rb
Overview
Properties for defining a CfnRoute.
Instance Attribute Summary collapse
-
#api_id ⇒ String, AWSCDK::Interfaces::AWSApigatewayv2::IAPIRef
readonly
The API identifier.
-
#api_key_required ⇒ Boolean, ...
readonly
Specifies whether an API key is required for the route.
-
#authorization_scopes ⇒ Array<String>?
readonly
The authorization scopes supported by this route.
-
#authorization_type ⇒ String?
readonly
The authorization type for the route.
-
#authorizer_id ⇒ String, ...
readonly
The identifier of the
Authorizerresource to be associated with this route. -
#model_selection_expression ⇒ String?
readonly
The model selection expression for the route.
-
#operation_name ⇒ String?
readonly
The operation name for the route.
-
#request_models ⇒ Object?
readonly
The request models for the route.
-
#request_parameters ⇒ Object?
readonly
The request parameters for the route.
-
#route_key ⇒ String
readonly
The route key for the route.
-
#route_response_selection_expression ⇒ String?
readonly
The route response selection expression for the route.
-
#target ⇒ String, ...
readonly
The target for the route.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(api_id:, route_key:, api_key_required: nil, authorization_scopes: nil, authorization_type: nil, authorizer_id: nil, model_selection_expression: nil, operation_name: nil, request_models: nil, request_parameters: nil, route_response_selection_expression: nil, target: nil) ⇒ CfnRouteProps
constructor
A new instance of CfnRouteProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(api_id:, route_key:, api_key_required: nil, authorization_scopes: nil, authorization_type: nil, authorizer_id: nil, model_selection_expression: nil, operation_name: nil, request_models: nil, request_parameters: nil, route_response_selection_expression: nil, target: nil) ⇒ CfnRouteProps
Returns a new instance of CfnRouteProps.
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'api_gatewayv2/cfn_route_props.rb', line 21 def initialize(api_id:, route_key:, api_key_required: nil, authorization_scopes: nil, authorization_type: nil, authorizer_id: nil, model_selection_expression: nil, operation_name: nil, request_models: nil, request_parameters: nil, route_response_selection_expression: nil, target: nil) @api_id = api_id Jsii::Type.check_type(@api_id, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19hcGlnYXRld2F5djIuSUFwaVJlZiJ9XX19")), "apiId") @route_key = route_key Jsii::Type.check_type(@route_key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "routeKey") @api_key_required = api_key_required Jsii::Type.check_type(@api_key_required, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "apiKeyRequired") unless @api_key_required.nil? @authorization_scopes = Jsii::Type.check_type(@authorization_scopes, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "authorizationScopes") unless @authorization_scopes.nil? @authorization_type = Jsii::Type.check_type(@authorization_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "authorizationType") unless @authorization_type.nil? @authorizer_id = Jsii::Type.check_type(@authorizer_id, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19hcGlnYXRld2F5djIuSUF1dGhvcml6ZXJSZWYifV19fQ==")), "authorizerId") unless @authorizer_id.nil? @model_selection_expression = model_selection_expression Jsii::Type.check_type(@model_selection_expression, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "modelSelectionExpression") unless @model_selection_expression.nil? @operation_name = operation_name Jsii::Type.check_type(@operation_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "operationName") unless @operation_name.nil? @request_models = request_models Jsii::Type.check_type(@request_models, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "requestModels") unless @request_models.nil? @request_parameters = request_parameters Jsii::Type.check_type(@request_parameters, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "requestParameters") unless @request_parameters.nil? @route_response_selection_expression = route_response_selection_expression Jsii::Type.check_type(@route_response_selection_expression, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "routeResponseSelectionExpression") unless @route_response_selection_expression.nil? @target = target Jsii::Type.check_type(@target, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19hcGlnYXRld2F5djIuSUludGVncmF0aW9uUmVmIn1dfX0=")), "target") unless @target.nil? end |
Instance Attribute Details
#api_id ⇒ String, AWSCDK::Interfaces::AWSApigatewayv2::IAPIRef (readonly)
The API identifier.
52 53 54 |
# File 'api_gatewayv2/cfn_route_props.rb', line 52 def api_id @api_id end |
#api_key_required ⇒ Boolean, ... (readonly)
Specifies whether an API key is required for the route.
Supported only for WebSocket APIs.
66 67 68 |
# File 'api_gatewayv2/cfn_route_props.rb', line 66 def api_key_required @api_key_required end |
#authorization_scopes ⇒ Array<String>? (readonly)
The authorization scopes supported by this route.
71 72 73 |
# File 'api_gatewayv2/cfn_route_props.rb', line 71 def @authorization_scopes end |
#authorization_type ⇒ String? (readonly)
The authorization type for the route.
For WebSocket APIs, valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer. 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.
78 79 80 |
# File 'api_gatewayv2/cfn_route_props.rb', line 78 def @authorization_type end |
#authorizer_id ⇒ String, ... (readonly)
The identifier of the Authorizer resource to be associated with this route.
The authorizer identifier is generated by API Gateway when you created the authorizer.
85 86 87 |
# File 'api_gatewayv2/cfn_route_props.rb', line 85 def @authorizer_id end |
#model_selection_expression ⇒ String? (readonly)
The model selection expression for the route.
Supported only for WebSocket APIs.
92 93 94 |
# File 'api_gatewayv2/cfn_route_props.rb', line 92 def model_selection_expression @model_selection_expression end |
#operation_name ⇒ String? (readonly)
The operation name for the route.
97 98 99 |
# File 'api_gatewayv2/cfn_route_props.rb', line 97 def operation_name @operation_name end |
#request_models ⇒ Object? (readonly)
The request models for the route.
Supported only for WebSocket APIs.
104 105 106 |
# File 'api_gatewayv2/cfn_route_props.rb', line 104 def request_models @request_models end |
#request_parameters ⇒ Object? (readonly)
The request parameters for the route.
Supported only for WebSocket APIs.
111 112 113 |
# File 'api_gatewayv2/cfn_route_props.rb', line 111 def request_parameters @request_parameters end |
#route_key ⇒ String (readonly)
The 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 .
59 60 61 |
# File 'api_gatewayv2/cfn_route_props.rb', line 59 def route_key @route_key end |
#route_response_selection_expression ⇒ String? (readonly)
The route response selection expression for the route.
Supported only for WebSocket APIs.
118 119 120 |
# File 'api_gatewayv2/cfn_route_props.rb', line 118 def route_response_selection_expression @route_response_selection_expression end |
#target ⇒ String, ... (readonly)
The target for the route.
123 124 125 |
# File 'api_gatewayv2/cfn_route_props.rb', line 123 def target @target end |
Class Method Details
.jsii_properties ⇒ Object
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
# File 'api_gatewayv2/cfn_route_props.rb', line 125 def self.jsii_properties { :api_id => "apiId", :route_key => "routeKey", :api_key_required => "apiKeyRequired", :authorization_scopes => "authorizationScopes", :authorization_type => "authorizationType", :authorizer_id => "authorizerId", :model_selection_expression => "modelSelectionExpression", :operation_name => "operationName", :request_models => "requestModels", :request_parameters => "requestParameters", :route_response_selection_expression => "routeResponseSelectionExpression", :target => "target", } end |
Instance Method Details
#to_jsii ⇒ Object
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
# File 'api_gatewayv2/cfn_route_props.rb', line 142 def to_jsii result = {} result.merge!({ "apiId" => @api_id, "routeKey" => @route_key, "apiKeyRequired" => @api_key_required, "authorizationScopes" => @authorization_scopes, "authorizationType" => @authorization_type, "authorizerId" => @authorizer_id, "modelSelectionExpression" => @model_selection_expression, "operationName" => @operation_name, "requestModels" => @request_models, "requestParameters" => @request_parameters, "routeResponseSelectionExpression" => @route_response_selection_expression, "target" => @target, }) result.compact end |