Class: AWSCDK::APIGatewayv2::CfnIntegrationProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::APIGatewayv2::CfnIntegrationProps
- Defined in:
- api_gatewayv2/cfn_integration_props.rb
Overview
Properties for defining a CfnIntegration.
Instance Attribute Summary collapse
-
#api_id ⇒ String, AWSCDK::Interfaces::AWSApigatewayv2::IAPIRef
readonly
The API identifier.
-
#connection_id ⇒ String?
readonly
The ID of the VPC link for a private integration.
-
#connection_type ⇒ String?
readonly
The type of the network connection to the integration endpoint.
-
#content_handling_strategy ⇒ String?
readonly
Supported only for WebSocket APIs.
-
#credentials_arn ⇒ String?
readonly
Specifies the credentials required for the integration, if any.
-
#description ⇒ String?
readonly
The description of the integration.
-
#integration_method ⇒ String?
readonly
Specifies the integration's HTTP method type.
-
#integration_subtype ⇒ String?
readonly
Supported only for HTTP API
AWS_PROXYintegrations. -
#integration_type ⇒ String
readonly
The integration type of an integration.
-
#integration_uri ⇒ String, ...
readonly
For a Lambda integration, specify the URI of a Lambda function.
-
#passthrough_behavior ⇒ String?
readonly
Specifies the pass-through behavior for incoming requests based on the
Content-Typeheader in the request, and the available mapping templates specified as therequestTemplatesproperty on theIntegrationresource. -
#payload_format_version ⇒ String?
readonly
Specifies the format of the payload sent to an integration.
-
#request_parameters ⇒ Object?
readonly
For WebSocket APIs, a key-value map specifying request parameters that are passed from the method request to the backend.
-
#request_templates ⇒ Object?
readonly
Represents a map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client.
-
#response_parameters ⇒ Object?
readonly
Supported only for HTTP APIs.
-
#template_selection_expression ⇒ String?
readonly
The template selection expression for the integration.
-
#timeout_in_millis ⇒ Numeric?
readonly
Custom timeout between 50 and 29,000 milliseconds for WebSocket APIs and between 50 and 30,000 milliseconds for HTTP APIs.
-
#tls_config ⇒ AWSCDK::IResolvable, ...
readonly
The TLS configuration for a private integration.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(api_id:, integration_type:, connection_id: nil, connection_type: nil, content_handling_strategy: nil, credentials_arn: nil, description: nil, integration_method: nil, integration_subtype: nil, integration_uri: nil, passthrough_behavior: nil, payload_format_version: nil, request_parameters: nil, request_templates: nil, response_parameters: nil, template_selection_expression: nil, timeout_in_millis: nil, tls_config: nil) ⇒ CfnIntegrationProps
constructor
A new instance of CfnIntegrationProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(api_id:, integration_type:, connection_id: nil, connection_type: nil, content_handling_strategy: nil, credentials_arn: nil, description: nil, integration_method: nil, integration_subtype: nil, integration_uri: nil, passthrough_behavior: nil, payload_format_version: nil, request_parameters: nil, request_templates: nil, response_parameters: nil, template_selection_expression: nil, timeout_in_millis: nil, tls_config: nil) ⇒ CfnIntegrationProps
Returns a new instance of CfnIntegrationProps.
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'api_gatewayv2/cfn_integration_props.rb', line 27 def initialize(api_id:, integration_type:, connection_id: nil, connection_type: nil, content_handling_strategy: nil, credentials_arn: nil, description: nil, integration_method: nil, integration_subtype: nil, integration_uri: nil, passthrough_behavior: nil, payload_format_version: nil, request_parameters: nil, request_templates: nil, response_parameters: nil, template_selection_expression: nil, timeout_in_millis: nil, tls_config: nil) @api_id = api_id Jsii::Type.check_type(@api_id, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19hcGlnYXRld2F5djIuSUFwaVJlZiJ9XX19")), "apiId") @integration_type = integration_type Jsii::Type.check_type(@integration_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "integrationType") @connection_id = connection_id Jsii::Type.check_type(@connection_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "connectionId") unless @connection_id.nil? @connection_type = connection_type Jsii::Type.check_type(@connection_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "connectionType") unless @connection_type.nil? @content_handling_strategy = content_handling_strategy Jsii::Type.check_type(@content_handling_strategy, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "contentHandlingStrategy") unless @content_handling_strategy.nil? @credentials_arn = credentials_arn Jsii::Type.check_type(@credentials_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "credentialsArn") unless @credentials_arn.nil? @description = description Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil? @integration_method = integration_method Jsii::Type.check_type(@integration_method, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "integrationMethod") unless @integration_method.nil? @integration_subtype = integration_subtype Jsii::Type.check_type(@integration_subtype, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "integrationSubtype") unless @integration_subtype.nil? @integration_uri = integration_uri Jsii::Type.check_type(@integration_uri, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19sYW1iZGEuSUZ1bmN0aW9uUmVmIn1dfX0=")), "integrationUri") unless @integration_uri.nil? @passthrough_behavior = passthrough_behavior Jsii::Type.check_type(@passthrough_behavior, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "passthroughBehavior") unless @passthrough_behavior.nil? @payload_format_version = payload_format_version Jsii::Type.check_type(@payload_format_version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "payloadFormatVersion") unless @payload_format_version.nil? @request_parameters = request_parameters Jsii::Type.check_type(@request_parameters, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "requestParameters") unless @request_parameters.nil? @request_templates = request_templates Jsii::Type.check_type(@request_templates, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "requestTemplates") unless @request_templates.nil? @response_parameters = response_parameters Jsii::Type.check_type(@response_parameters, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "responseParameters") unless @response_parameters.nil? @template_selection_expression = template_selection_expression Jsii::Type.check_type(@template_selection_expression, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "templateSelectionExpression") unless @template_selection_expression.nil? @timeout_in_millis = timeout_in_millis Jsii::Type.check_type(@timeout_in_millis, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "timeoutInMillis") unless @timeout_in_millis.nil? @tls_config = tls_config.is_a?(Hash) ? ::AWSCDK::APIGatewayv2::CfnIntegration::TLSConfigProperty.new(**tls_config.transform_keys(&:to_sym)) : tls_config Jsii::Type.check_type(@tls_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcGlnYXRld2F5djIuQ2ZuSW50ZWdyYXRpb24uVGxzQ29uZmlnUHJvcGVydHkifV19fQ==")), "tlsConfig") unless @tls_config.nil? end |
Instance Attribute Details
#api_id ⇒ String, AWSCDK::Interfaces::AWSApigatewayv2::IAPIRef (readonly)
The API identifier.
70 71 72 |
# File 'api_gatewayv2/cfn_integration_props.rb', line 70 def api_id @api_id end |
#connection_id ⇒ String? (readonly)
The ID of the VPC link for a private integration.
Supported only for HTTP APIs.
92 93 94 |
# File 'api_gatewayv2/cfn_integration_props.rb', line 92 def connection_id @connection_id end |
#connection_type ⇒ String? (readonly)
The type of the network connection to the integration endpoint.
Specify INTERNET for connections through the public routable internet or VPC_LINK for private connections between API Gateway and resources in a VPC. The default value is INTERNET .
99 100 101 |
# File 'api_gatewayv2/cfn_integration_props.rb', line 99 def connection_type @connection_type end |
#content_handling_strategy ⇒ String? (readonly)
Supported only for WebSocket APIs.
Specifies how to handle response payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT , with the following behaviors:
CONVERT_TO_BINARY : Converts a response payload from a Base64-encoded string to the corresponding binary blob.
CONVERT_TO_TEXT : Converts a response payload from a binary blob to a Base64-encoded string.
If this property is not defined, the response payload will be passed through from the integration response to the route response or method response without modification.
112 113 114 |
# File 'api_gatewayv2/cfn_integration_props.rb', line 112 def content_handling_strategy @content_handling_strategy end |
#credentials_arn ⇒ String? (readonly)
Specifies the credentials required for the integration, if any.
For AWS integrations, three options are available. To specify an IAM Role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To require that the caller's identity be passed through from the request, specify the string arn:aws:iam::*:user/* . To use resource-based permissions on supported AWS services, don't specify this parameter.
119 120 121 |
# File 'api_gatewayv2/cfn_integration_props.rb', line 119 def credentials_arn @credentials_arn end |
#description ⇒ String? (readonly)
The description of the integration.
124 125 126 |
# File 'api_gatewayv2/cfn_integration_props.rb', line 124 def description @description end |
#integration_method ⇒ String? (readonly)
Specifies the integration's HTTP method type.
For WebSocket APIs, if you use a Lambda integration, you must set the integration method to POST .
131 132 133 |
# File 'api_gatewayv2/cfn_integration_props.rb', line 131 def integration_method @integration_method end |
#integration_subtype ⇒ String? (readonly)
Supported only for HTTP API AWS_PROXY integrations.
Specifies the AWS service action to invoke. To learn more, see Integration subtype reference .
138 139 140 |
# File 'api_gatewayv2/cfn_integration_props.rb', line 138 def integration_subtype @integration_subtype end |
#integration_type ⇒ String (readonly)
The integration type of an integration. One of the following:.
AWS : for integrating the route or method request with an AWS service action, including the Lambda function-invoking action. With the Lambda function-invoking action, this is referred to as the Lambda custom integration. With any other AWS service action, this is known as AWS integration. Supported only for WebSocket APIs.
AWS_PROXY : for integrating the route or method request with a Lambda function or other AWS service action. This integration is also referred to as a Lambda proxy integration.
HTTP : for integrating the route or method request with an HTTP endpoint. This integration is also referred to as the HTTP custom integration. Supported only for WebSocket APIs.
HTTP_PROXY : for integrating the route or method request with an HTTP endpoint, with the client request passed through as-is. This is also referred to as HTTP proxy integration. For HTTP API private integrations, use an HTTP_PROXY integration.
MOCK : for integrating the route or method request with API Gateway as a "loopback" endpoint without invoking any backend. Supported only for WebSocket APIs.
85 86 87 |
# File 'api_gatewayv2/cfn_integration_props.rb', line 85 def integration_type @integration_type end |
#integration_uri ⇒ String, ... (readonly)
For a Lambda integration, specify the URI of a Lambda function.
For an HTTP integration, specify a fully-qualified URL.
For an HTTP API private integration, specify the ARN of an Application Load Balancer listener, Network Load Balancer listener, or AWS Cloud Map service. If you specify the ARN of an AWS Cloud Map service, API Gateway uses DiscoverInstances to identify resources. You can use query parameters to target specific resources. To learn more, see DiscoverInstances . For private integrations, all resources must be owned by the same AWS account .
147 148 149 |
# File 'api_gatewayv2/cfn_integration_props.rb', line 147 def integration_uri @integration_uri end |
#passthrough_behavior ⇒ String? (readonly)
Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available mapping templates specified as the requestTemplates property on the Integration resource.
There are three valid values: WHEN_NO_MATCH , WHEN_NO_TEMPLATES , and NEVER . Supported only for WebSocket APIs.
WHEN_NO_MATCH passes the request body for unmapped content types through to the integration backend without transformation.
NEVER rejects unmapped content types with an HTTP 415 Unsupported Media Type response.
WHEN_NO_TEMPLATES allows pass-through when the integration has no content types mapped to templates. However, if there is at least one content type defined, unmapped content types will be rejected with the same HTTP 415 Unsupported Media Type response.
160 161 162 |
# File 'api_gatewayv2/cfn_integration_props.rb', line 160 def passthrough_behavior @passthrough_behavior end |
#payload_format_version ⇒ String? (readonly)
Specifies the format of the payload sent to an integration.
Required for HTTP APIs. For HTTP APIs, supported values for Lambda proxy integrations are 1.0 and 2.0 . For all other integrations, 1.0 is the only supported value. To learn more, see Working with AWS Lambda proxy integrations for HTTP APIs .
167 168 169 |
# File 'api_gatewayv2/cfn_integration_props.rb', line 167 def payload_format_version @payload_format_version end |
#request_parameters ⇒ Object? (readonly)
For WebSocket APIs, a key-value map specifying request parameters that are passed from the method request to the backend.
The key is an integration request parameter name and the associated value is a method request parameter value or static value that must be enclosed within single quotes and pre-encoded as required by the backend. The method request parameter value must match the pattern of method.request. {location} . {name} , where {location} is querystring , path , or header ; and {name} must be a valid and unique method request parameter name.
For HTTP API integrations with a specified integration_subtype , request parameters are a key-value map specifying parameters that are passed to AWS_PROXY integrations. You can provide static values, or map request data, stage variables, or context variables that are evaluated at runtime. To learn more, see Working with AWS service integrations for HTTP APIs .
For HTTP API integrations without a specified integration_subtype request parameters are a key-value map specifying how to transform HTTP requests before sending them to the backend. The key should follow the pattern append , overwrite or remove . For values, you can provide static values, or map request data, stage variables, or context variables that are evaluated at runtime. To learn more, see Transforming API requests and responses .
178 179 180 |
# File 'api_gatewayv2/cfn_integration_props.rb', line 178 def request_parameters @request_parameters end |
#request_templates ⇒ Object? (readonly)
Represents a map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client.
The content type value is the key in this map, and the template (as a String) is the value. Supported only for WebSocket APIs.
185 186 187 |
# File 'api_gatewayv2/cfn_integration_props.rb', line 185 def request_templates @request_templates end |
#response_parameters ⇒ Object? (readonly)
Supported only for HTTP APIs.
You use response parameters to transform the HTTP response from a backend integration before returning the response to clients. Specify a key-value map from a selection key to response parameters. The selection key must be a valid HTTP status code within the range of 200-599. The value is of type ResponseParameterList . To learn more, see Transforming API requests and responses .
192 193 194 |
# File 'api_gatewayv2/cfn_integration_props.rb', line 192 def response_parameters @response_parameters end |
#template_selection_expression ⇒ String? (readonly)
The template selection expression for the integration.
Supported only for WebSocket APIs.
199 200 201 |
# File 'api_gatewayv2/cfn_integration_props.rb', line 199 def template_selection_expression @template_selection_expression end |
#timeout_in_millis ⇒ Numeric? (readonly)
Custom timeout between 50 and 29,000 milliseconds for WebSocket APIs and between 50 and 30,000 milliseconds for HTTP APIs.
The default timeout is 29 seconds for WebSocket APIs and 30 seconds for HTTP APIs.
206 207 208 |
# File 'api_gatewayv2/cfn_integration_props.rb', line 206 def timeout_in_millis @timeout_in_millis end |
#tls_config ⇒ AWSCDK::IResolvable, ... (readonly)
The TLS configuration for a private integration.
If you specify a TLS configuration, private integration traffic uses the HTTPS protocol. Supported only for HTTP APIs.
213 214 215 |
# File 'api_gatewayv2/cfn_integration_props.rb', line 213 def tls_config @tls_config end |
Class Method Details
.jsii_properties ⇒ Object
215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 |
# File 'api_gatewayv2/cfn_integration_props.rb', line 215 def self.jsii_properties { :api_id => "apiId", :integration_type => "integrationType", :connection_id => "connectionId", :connection_type => "connectionType", :content_handling_strategy => "contentHandlingStrategy", :credentials_arn => "credentialsArn", :description => "description", :integration_method => "integrationMethod", :integration_subtype => "integrationSubtype", :integration_uri => "integrationUri", :passthrough_behavior => "passthroughBehavior", :payload_format_version => "payloadFormatVersion", :request_parameters => "requestParameters", :request_templates => "requestTemplates", :response_parameters => "responseParameters", :template_selection_expression => "templateSelectionExpression", :timeout_in_millis => "timeoutInMillis", :tls_config => "tlsConfig", } end |
Instance Method Details
#to_jsii ⇒ Object
238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 |
# File 'api_gatewayv2/cfn_integration_props.rb', line 238 def to_jsii result = {} result.merge!({ "apiId" => @api_id, "integrationType" => @integration_type, "connectionId" => @connection_id, "connectionType" => @connection_type, "contentHandlingStrategy" => @content_handling_strategy, "credentialsArn" => @credentials_arn, "description" => @description, "integrationMethod" => @integration_method, "integrationSubtype" => @integration_subtype, "integrationUri" => @integration_uri, "passthroughBehavior" => @passthrough_behavior, "payloadFormatVersion" => @payload_format_version, "requestParameters" => @request_parameters, "requestTemplates" => @request_templates, "responseParameters" => @response_parameters, "templateSelectionExpression" => @template_selection_expression, "timeoutInMillis" => @timeout_in_millis, "tlsConfig" => @tls_config, }) result.compact end |