Class: AWSCDK::APIGateway::CfnMethod::IntegrationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::APIGateway::CfnMethod::IntegrationProperty
- Defined in:
- api_gateway/cfn_method.rb
Overview
Integration is a property of the AWS::ApiGateway::Method resource that specifies information about the target backend that a method calls.
Instance Attribute Summary collapse
-
#cache_key_parameters ⇒ Array<String>?
readonly
A list of request parameters whose values API Gateway caches.
-
#cache_namespace ⇒ String?
readonly
Specifies a group of related cached parameters.
-
#connection_id ⇒ String?
readonly
The ID of the VpcLink used for the integration when
connectionType=VPC_LINKand undefined, otherwise. -
#connection_type ⇒ String?
readonly
The type of the network connection to the integration endpoint.
-
#content_handling ⇒ String?
readonly
Specifies how to handle request payload content type conversions.
-
#credentials ⇒ String?
readonly
Specifies the credentials required for the integration, if any.
-
#integration_http_method ⇒ String?
readonly
Specifies the integration's HTTP method type.
-
#integration_responses ⇒ AWSCDK::IResolvable, ...
readonly
Specifies the integration's responses.
-
#integration_target ⇒ String?
readonly
The ALB or NLB listener to send the request to.
-
#passthrough_behavior ⇒ String?
readonly
Specifies how the method request body of an unmapped content type will be passed through the integration request to the back end without transformation.
-
#request_parameters ⇒ AWSCDK::IResolvable, ...
readonly
A key-value map specifying request parameters that are passed from the method request to the back end.
-
#request_templates ⇒ AWSCDK::IResolvable, ...
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_transfer_mode ⇒ String?
readonly
The response transfer mode of the integration.
-
#timeout_in_millis ⇒ Numeric?
readonly
Custom timeout between 50 and 29,000 milliseconds.
-
#type ⇒ String
readonly
Specifies an API method integration type.
-
#uri ⇒ String?
readonly
Specifies Uniform Resource Identifier (URI) of the integration endpoint.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(type:, cache_key_parameters: nil, cache_namespace: nil, connection_id: nil, connection_type: nil, content_handling: nil, credentials: nil, integration_http_method: nil, integration_responses: nil, integration_target: nil, passthrough_behavior: nil, request_parameters: nil, request_templates: nil, response_transfer_mode: nil, timeout_in_millis: nil, uri: nil) ⇒ IntegrationProperty
constructor
A new instance of IntegrationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(type:, cache_key_parameters: nil, cache_namespace: nil, connection_id: nil, connection_type: nil, content_handling: nil, credentials: nil, integration_http_method: nil, integration_responses: nil, integration_target: nil, passthrough_behavior: nil, request_parameters: nil, request_templates: nil, response_transfer_mode: nil, timeout_in_millis: nil, uri: nil) ⇒ IntegrationProperty
Returns a new instance of IntegrationProperty.
664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 |
# File 'api_gateway/cfn_method.rb', line 664 def initialize(type:, cache_key_parameters: nil, cache_namespace: nil, connection_id: nil, connection_type: nil, content_handling: nil, credentials: nil, integration_http_method: nil, integration_responses: nil, integration_target: nil, passthrough_behavior: nil, request_parameters: nil, request_templates: nil, response_transfer_mode: nil, timeout_in_millis: nil, uri: nil) @type = type Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type") @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_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 = content_handling Jsii::Type.check_type(@content_handling, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "contentHandling") unless @content_handling.nil? @credentials = credentials Jsii::Type.check_type(@credentials, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "credentials") unless @credentials.nil? @integration_http_method = integration_http_method Jsii::Type.check_type(@integration_http_method, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "integrationHttpMethod") unless @integration_http_method.nil? @integration_responses = integration_responses Jsii::Type.check_type(@integration_responses, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheS5DZm5NZXRob2QuSW50ZWdyYXRpb25SZXNwb25zZVByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "integrationResponses") unless @integration_responses.nil? @integration_target = integration_target Jsii::Type.check_type(@integration_target, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "integrationTarget") unless @integration_target.nil? @passthrough_behavior = passthrough_behavior Jsii::Type.check_type(@passthrough_behavior, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "passthroughBehavior") unless @passthrough_behavior.nil? @request_parameters = request_parameters Jsii::Type.check_type(@request_parameters, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsicHJpbWl0aXZlIjoic3RyaW5nIn0sImtpbmQiOiJtYXAifX1dfX0=")), "requestParameters") unless @request_parameters.nil? @request_templates = request_templates Jsii::Type.check_type(@request_templates, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsicHJpbWl0aXZlIjoic3RyaW5nIn0sImtpbmQiOiJtYXAifX1dfX0=")), "requestTemplates") unless @request_templates.nil? @response_transfer_mode = response_transfer_mode Jsii::Type.check_type(@response_transfer_mode, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "responseTransferMode") unless @response_transfer_mode.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? @uri = uri Jsii::Type.check_type(@uri, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "uri") unless @uri.nil? end |
Instance Attribute Details
#cache_key_parameters ⇒ Array<String>? (readonly)
A list of request parameters whose values API Gateway caches.
To be valid values for cache_key_parameters , these parameters must also be specified for Method request_parameters .
712 713 714 |
# File 'api_gateway/cfn_method.rb', line 712 def cache_key_parameters @cache_key_parameters end |
#cache_namespace ⇒ String? (readonly)
Specifies a group of related cached parameters.
By default, API Gateway uses the resource ID as the cache_namespace . You can specify the same cache_namespace across resources to return the same cached data for requests to different resources.
719 720 721 |
# File 'api_gateway/cfn_method.rb', line 719 def cache_namespace @cache_namespace end |
#connection_id ⇒ String? (readonly)
The ID of the VpcLink used for the integration when connectionType=VPC_LINK and undefined, otherwise.
724 725 726 |
# File 'api_gateway/cfn_method.rb', line 724 def connection_id @connection_id end |
#connection_type ⇒ String? (readonly)
The type of the network connection to the integration endpoint.
The valid value is INTERNET for connections through the public routable internet or VPC_LINK for private connections between API Gateway and a network load balancer in a VPC. The default value is INTERNET .
731 732 733 |
# File 'api_gateway/cfn_method.rb', line 731 def connection_type @connection_type end |
#content_handling ⇒ String? (readonly)
Specifies how to handle request payload content type conversions.
Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT , with the following behaviors:
If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the passthrough_behavior is configured to support payload pass-through.
740 741 742 |
# File 'api_gateway/cfn_method.rb', line 740 def content_handling @content_handling end |
#credentials ⇒ 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, specify null.
747 748 749 |
# File 'api_gateway/cfn_method.rb', line 747 def credentials @credentials end |
#integration_http_method ⇒ String? (readonly)
Specifies the integration's HTTP method type.
For the Type property, if you specify MOCK , this property is optional. For Lambda integrations, you must set the integration method to POST . For all other types, you must specify this property.
754 755 756 |
# File 'api_gateway/cfn_method.rb', line 754 def integration_http_method @integration_http_method end |
#integration_responses ⇒ AWSCDK::IResolvable, ... (readonly)
Specifies the integration's responses.
759 760 761 |
# File 'api_gateway/cfn_method.rb', line 759 def integration_responses @integration_responses end |
#integration_target ⇒ String? (readonly)
The ALB or NLB listener to send the request to.
Only supported for private integrations that use VPC links V2.
766 767 768 |
# File 'api_gateway/cfn_method.rb', line 766 def integration_target @integration_target end |
#passthrough_behavior ⇒ String? (readonly)
Specifies how the method request body of an unmapped content type will be passed through the integration request to the back end without transformation.
A content type is unmapped if no mapping template is defined in the integration or the content type does not match any of the mapped content types, as specified in request_templates . The valid value is one of the following: WHEN_NO_MATCH : passes the method request body through the integration request to the back end without transformation when the method request content type does not match any content type associated with the mapping templates defined in the integration request. WHEN_NO_TEMPLATES : passes the method request body through the integration request to the back end without transformation when no mapping template is defined in the integration request. If a template is defined when this option is selected, the method request of an unmapped content-type will be rejected with an HTTP 415 Unsupported Media Type response. NEVER : rejects the method request with an HTTP 415 Unsupported Media Type response when either the method request content type does not match any content type associated with the mapping templates defined in the integration request or no mapping template is defined in the integration request.
773 774 775 |
# File 'api_gateway/cfn_method.rb', line 773 def passthrough_behavior @passthrough_behavior end |
#request_parameters ⇒ AWSCDK::IResolvable, ... (readonly)
A key-value map specifying request parameters that are passed from the method request to the back end.
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 back end. 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.
780 781 782 |
# File 'api_gateway/cfn_method.rb', line 780 def request_parameters @request_parameters end |
#request_templates ⇒ AWSCDK::IResolvable, ... (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.
787 788 789 |
# File 'api_gateway/cfn_method.rb', line 787 def request_templates @request_templates end |
#response_transfer_mode ⇒ String? (readonly)
Default: - "BUFFERED"
The response transfer mode of the integration.
Use STREAM to have API Gateway stream response your back to you or use BUFFERED to have API Gateway wait to receive the complete response before beginning transmission.
795 796 797 |
# File 'api_gateway/cfn_method.rb', line 795 def response_transfer_mode @response_transfer_mode end |
#timeout_in_millis ⇒ Numeric? (readonly)
Custom timeout between 50 and 29,000 milliseconds.
The default value is 29,000 milliseconds or 29 seconds. You can increase the default value to longer than 29 seconds for Regional or private APIs only.
802 803 804 |
# File 'api_gateway/cfn_method.rb', line 802 def timeout_in_millis @timeout_in_millis end |
#type ⇒ String (readonly)
Specifies an API method integration type. The valid value is one of the following:.
For the HTTP and HTTP proxy integrations, each integration can specify a protocol ( http/https ), port and path. Standard 80 and 443 ports are supported as well as custom ports above 1024. An HTTP or HTTP proxy integration with a connection_type of VPC_LINK is referred to as a private integration and uses a VpcLink to connect API Gateway to a network load balancer of a VPC.
705 706 707 |
# File 'api_gateway/cfn_method.rb', line 705 def type @type end |
#uri ⇒ String? (readonly)
Specifies Uniform Resource Identifier (URI) of the integration endpoint.
For HTTP or HTTP_PROXY integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification for standard integrations. If connection_type is VPC_LINK specify the Network Load Balancer DNS name. For AWS or AWS_PROXY integrations, the URI is of the form arn:aws:apigateway:{region}:{subdomain.service|service}:path|action/{service_api} . Here, Region is the API Gateway region (e.g., us-east-1); service is the name of the integrated AWS service (e.g., s3); and subdomain is a designated subdomain supported by certain AWS service for fast host-name lookup. action can be used for an AWS service action-based API, using an Action=name&p1=v1&p2=v2... query string. The ensuing service_api refers to a supported action name plus any required input parameters. Alternatively, path can be used for an AWS service path-based API. The ensuing service_api refers to the path to an AWS service resource, including the region of the integrated AWS service, if applicable. For example, for integration with the S3 API of GetObject, the uri can be either arn:aws:apigateway:us-west-2:s3:action/GetObject&Bucket={bucket}&Key={key} or arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key}
809 810 811 |
# File 'api_gateway/cfn_method.rb', line 809 def uri @uri end |
Class Method Details
.jsii_properties ⇒ Object
811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 |
# File 'api_gateway/cfn_method.rb', line 811 def self.jsii_properties { :type => "type", :cache_key_parameters => "cacheKeyParameters", :cache_namespace => "cacheNamespace", :connection_id => "connectionId", :connection_type => "connectionType", :content_handling => "contentHandling", :credentials => "credentials", :integration_http_method => "integrationHttpMethod", :integration_responses => "integrationResponses", :integration_target => "integrationTarget", :passthrough_behavior => "passthroughBehavior", :request_parameters => "requestParameters", :request_templates => "requestTemplates", :response_transfer_mode => "responseTransferMode", :timeout_in_millis => "timeoutInMillis", :uri => "uri", } end |
Instance Method Details
#to_jsii ⇒ Object
832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 |
# File 'api_gateway/cfn_method.rb', line 832 def to_jsii result = {} result.merge!({ "type" => @type, "cacheKeyParameters" => @cache_key_parameters, "cacheNamespace" => @cache_namespace, "connectionId" => @connection_id, "connectionType" => @connection_type, "contentHandling" => @content_handling, "credentials" => @credentials, "integrationHttpMethod" => @integration_http_method, "integrationResponses" => @integration_responses, "integrationTarget" => @integration_target, "passthroughBehavior" => @passthrough_behavior, "requestParameters" => @request_parameters, "requestTemplates" => @request_templates, "responseTransferMode" => @response_transfer_mode, "timeoutInMillis" => @timeout_in_millis, "uri" => @uri, }) result.compact end |