Class: AWSCDK::APIGateway::SagemakerIntegrationOptions
- Inherits:
-
IntegrationOptions
- Object
- IntegrationOptions
- AWSCDK::APIGateway::SagemakerIntegrationOptions
- Defined in:
- api_gateway/sagemaker_integration_options.rb
Overview
Options for SageMakerIntegration.
Instance Attribute Summary collapse
-
#cache_key_parameters ⇒ Array<String>?
readonly
A list of request parameters whose values are to be cached.
-
#cache_namespace ⇒ String?
readonly
An API-specific tag group of related cached parameters.
-
#connection_type ⇒ AWSCDK::APIGateway::ConnectionType?
readonly
The type of network connection to the integration endpoint.
-
#content_handling ⇒ AWSCDK::APIGateway::ContentHandling?
readonly
Specifies how to handle request payload content type conversions.
-
#credentials_passthrough ⇒ Boolean?
readonly
Requires that the caller's identity be passed through from the request.
-
#credentials_role ⇒ AWSCDK::IAM::IRole?
readonly
An IAM role that API Gateway assumes.
-
#integration_responses ⇒ Array<AWSCDK::APIGateway::IntegrationResponse>?
readonly
The response that API Gateway provides after a method's backend completes processing a request.
-
#passthrough_behavior ⇒ AWSCDK::APIGateway::PassthroughBehavior?
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.
-
#request_parameters ⇒ Hash{String => String}?
readonly
The request parameters that API Gateway sends with the backend request.
-
#request_templates ⇒ Hash{String => String}?
readonly
A map of Apache Velocity templates that are applied on the request payload.
-
#response_transfer_mode ⇒ AWSCDK::APIGateway::ResponseTransferMode?
readonly
The response transfer mode for the integration.
-
#timeout ⇒ AWSCDK::Duration?
readonly
The maximum amount of time an integration will run before it returns without a response.
-
#vpc_link ⇒ AWSCDK::APIGateway::IVPCLink?
readonly
The VpcLink used for the integration.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(cache_key_parameters: nil, cache_namespace: nil, connection_type: nil, content_handling: nil, credentials_passthrough: nil, credentials_role: nil, integration_responses: nil, passthrough_behavior: nil, request_parameters: nil, request_templates: nil, response_transfer_mode: nil, timeout: nil, vpc_link: nil) ⇒ SagemakerIntegrationOptions
constructor
A new instance of SagemakerIntegrationOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(cache_key_parameters: nil, cache_namespace: nil, connection_type: nil, content_handling: nil, credentials_passthrough: nil, credentials_role: nil, integration_responses: nil, passthrough_behavior: nil, request_parameters: nil, request_templates: nil, response_transfer_mode: nil, timeout: nil, vpc_link: nil) ⇒ SagemakerIntegrationOptions
Returns a new instance of SagemakerIntegrationOptions.
20 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 47 |
# File 'api_gateway/sagemaker_integration_options.rb', line 20 def initialize(cache_key_parameters: nil, cache_namespace: nil, connection_type: nil, content_handling: nil, credentials_passthrough: nil, credentials_role: nil, integration_responses: nil, passthrough_behavior: nil, request_parameters: nil, request_templates: nil, response_transfer_mode: nil, timeout: nil, vpc_link: nil) @cache_key_parameters = cache_key_parameters Jsii::Type.check_type(@cache_key_parameters, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "cacheKeyParameters") unless @cache_key_parameters.nil? @cache_namespace = cache_namespace Jsii::Type.check_type(@cache_namespace, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "cacheNamespace") unless @cache_namespace.nil? @connection_type = connection_type Jsii::Type.check_type(@connection_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheS5Db25uZWN0aW9uVHlwZSJ9")), "connectionType") unless @connection_type.nil? @content_handling = content_handling Jsii::Type.check_type(@content_handling, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheS5Db250ZW50SGFuZGxpbmcifQ==")), "contentHandling") unless @content_handling.nil? @credentials_passthrough = credentials_passthrough Jsii::Type.check_type(@credentials_passthrough, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "credentialsPassthrough") unless @credentials_passthrough.nil? @credentials_role = credentials_role Jsii::Type.check_type(@credentials_role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "credentialsRole") unless @credentials_role.nil? @integration_responses = integration_responses.is_a?(Array) ? integration_responses.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::APIGateway::IntegrationResponse.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : integration_responses Jsii::Type.check_type(@integration_responses, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcGlnYXRld2F5LkludGVncmF0aW9uUmVzcG9uc2UifSwia2luZCI6ImFycmF5In19")), "integrationResponses") unless @integration_responses.nil? @passthrough_behavior = passthrough_behavior Jsii::Type.check_type(@passthrough_behavior, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheS5QYXNzdGhyb3VnaEJlaGF2aW9yIn0=")), "passthroughBehavior") unless @passthrough_behavior.nil? @request_parameters = request_parameters Jsii::Type.check_type(@request_parameters, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "requestParameters") unless @request_parameters.nil? @request_templates = request_templates Jsii::Type.check_type(@request_templates, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "requestTemplates") unless @request_templates.nil? @response_transfer_mode = response_transfer_mode Jsii::Type.check_type(@response_transfer_mode, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheS5SZXNwb25zZVRyYW5zZmVyTW9kZSJ9")), "responseTransferMode") unless @response_transfer_mode.nil? @timeout = timeout Jsii::Type.check_type(@timeout, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "timeout") unless @timeout.nil? @vpc_link = vpc_link Jsii::Type.check_type(@vpc_link, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheS5JVnBjTGluayJ9")), "vpcLink") unless @vpc_link.nil? end |
Instance Attribute Details
#cache_key_parameters ⇒ Array<String>? (readonly)
A list of request parameters whose values are to be cached.
It determines request parameters that will make it into the cache key.
55 56 57 |
# File 'api_gateway/sagemaker_integration_options.rb', line 55 def cache_key_parameters @cache_key_parameters end |
#cache_namespace ⇒ String? (readonly)
An API-specific tag group of related cached parameters.
59 60 61 |
# File 'api_gateway/sagemaker_integration_options.rb', line 59 def cache_namespace @cache_namespace end |
#connection_type ⇒ AWSCDK::APIGateway::ConnectionType? (readonly)
Default: - ConnectionType.VPC_LINK if vpcLink property is configured; ConnectionType.Internet otherwise.
The type of network connection to the integration endpoint.
64 65 66 |
# File 'api_gateway/sagemaker_integration_options.rb', line 64 def connection_type @connection_type end |
#content_handling ⇒ AWSCDK::APIGateway::ContentHandling? (readonly)
Default: none if this property isn't defined, the request payload is passed through from the method request to the integration request without modification, provided that the passthroughBehaviors property is configured to support payload pass-through.
Specifies how to handle request payload content type conversions.
69 70 71 |
# File 'api_gateway/sagemaker_integration_options.rb', line 69 def content_handling @content_handling end |
#credentials_passthrough ⇒ Boolean? (readonly)
Default: Caller identity is not passed through
Requires that the caller's identity be passed through from the request.
74 75 76 |
# File 'api_gateway/sagemaker_integration_options.rb', line 74 def credentials_passthrough @credentials_passthrough end |
#credentials_role ⇒ AWSCDK::IAM::IRole? (readonly)
Default: A role is not assumed
An IAM role that API Gateway assumes.
Mutually exclusive with credentials_pass_through.
81 82 83 |
# File 'api_gateway/sagemaker_integration_options.rb', line 81 def credentials_role @credentials_role end |
#integration_responses ⇒ Array<AWSCDK::APIGateway::IntegrationResponse>? (readonly)
The response that API Gateway provides after a method's backend completes processing a request.
API Gateway intercepts the response from the backend so that you can control how API Gateway surfaces backend responses. For example, you can map the backend status codes to codes that you define.
90 91 92 |
# File 'api_gateway/sagemaker_integration_options.rb', line 90 def integration_responses @integration_responses end |
#passthrough_behavior ⇒ AWSCDK::APIGateway::PassthroughBehavior? (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.
97 98 99 |
# File 'api_gateway/sagemaker_integration_options.rb', line 97 def passthrough_behavior @passthrough_behavior end |
#request_parameters ⇒ Hash{String => String}? (readonly)
The request parameters that API Gateway sends with the backend request.
Specify request parameters as key-value pairs (string-to-string mappings), with a destination as the key and a source as the value.
Specify the destination by using the following pattern integration.request.location.name, where location is querystring, path, or header, and name is a valid, unique parameter name.
The source must be an existing method request parameter or a static value. You must enclose static values in single quotation marks and pre-encode these values based on their destination in the request.
112 113 114 |
# File 'api_gateway/sagemaker_integration_options.rb', line 112 def request_parameters @request_parameters end |
#request_templates ⇒ Hash{String => String}? (readonly)
A map of Apache Velocity templates that are applied on the request payload.
The template that API Gateway uses is based on the value of the Content-Type header that's sent by the client. The content type value is the key, and the template is the value (specified as a string), such as the following snippet:
{ "application/json": "{ \"statusCode\": 200 }" }
126 127 128 |
# File 'api_gateway/sagemaker_integration_options.rb', line 126 def request_templates @request_templates end |
#response_transfer_mode ⇒ AWSCDK::APIGateway::ResponseTransferMode? (readonly)
Default: ResponseTransferMode.BUFFERED
The response transfer mode for the integration.
To enable response streaming, set this value to ResponseTransferMode.STREAM.
133 134 135 |
# File 'api_gateway/sagemaker_integration_options.rb', line 133 def response_transfer_mode @response_transfer_mode end |
#timeout ⇒ AWSCDK::Duration? (readonly)
Default: Duration.seconds(29)
The maximum amount of time an integration will run before it returns without a response.
By default, the value must be between 50 milliseconds and 29 seconds. The upper bound can be increased for regional and private Rest APIs only, via a quota increase request for your account. This increase might require a reduction in your account-level throttle quota limit.
See https://docs.aws.amazon.com/apigateway/latest/developerguide/limits.html Amazon API Gateway quotas for more details.
145 146 147 |
# File 'api_gateway/sagemaker_integration_options.rb', line 145 def timeout @timeout end |
#vpc_link ⇒ AWSCDK::APIGateway::IVPCLink? (readonly)
The VpcLink used for the integration.
Required if connectionType is VPC_LINK
151 152 153 |
# File 'api_gateway/sagemaker_integration_options.rb', line 151 def vpc_link @vpc_link end |
Class Method Details
.jsii_properties ⇒ Object
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 |
# File 'api_gateway/sagemaker_integration_options.rb', line 153 def self.jsii_properties { :cache_key_parameters => "cacheKeyParameters", :cache_namespace => "cacheNamespace", :connection_type => "connectionType", :content_handling => "contentHandling", :credentials_passthrough => "credentialsPassthrough", :credentials_role => "credentialsRole", :integration_responses => "integrationResponses", :passthrough_behavior => "passthroughBehavior", :request_parameters => "requestParameters", :request_templates => "requestTemplates", :response_transfer_mode => "responseTransferMode", :timeout => "timeout", :vpc_link => "vpcLink", } end |
Instance Method Details
#to_jsii ⇒ Object
171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 |
# File 'api_gateway/sagemaker_integration_options.rb', line 171 def to_jsii result = {} result.merge!(super) result.merge!({ "cacheKeyParameters" => @cache_key_parameters, "cacheNamespace" => @cache_namespace, "connectionType" => @connection_type, "contentHandling" => @content_handling, "credentialsPassthrough" => @credentials_passthrough, "credentialsRole" => @credentials_role, "integrationResponses" => @integration_responses, "passthroughBehavior" => @passthrough_behavior, "requestParameters" => @request_parameters, "requestTemplates" => @request_templates, "responseTransferMode" => @response_transfer_mode, "timeout" => @timeout, "vpcLink" => @vpc_link, }) result.compact end |