« blib/lib/Paws/ApiGateway/ImportRestApi.pm
↑ Summary
blib/lib/Paws/ApiGateway/IntegrationResponse.pm »
| 1 | |||
| 2 | package Paws::ApiGateway::Integration; | ||
| 3 | use Moose; | ||
| 4 | has CacheKeyParameters => (is => 'ro', isa => 'ArrayRef[Str|Undef]', traits => ['NameInRequest'], request_name => 'cacheKeyParameters'); | ||
| 5 | has CacheNamespace => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'cacheNamespace'); | ||
| 6 | has ConnectionId => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'connectionId'); | ||
| 7 | has ConnectionType => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'connectionType'); | ||
| 8 | has ContentHandling => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'contentHandling'); | ||
| 9 | has Credentials => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'credentials'); | ||
| 10 | has HttpMethod => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'httpMethod'); | ||
| 11 | has IntegrationResponses => (is => 'ro', isa => 'Paws::ApiGateway::MapOfIntegrationResponse', traits => ['NameInRequest'], request_name => 'integrationResponses'); | ||
| 12 | has PassthroughBehavior => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'passthroughBehavior'); | ||
| 13 | has RequestParameters => (is => 'ro', isa => 'Paws::ApiGateway::MapOfStringToString', traits => ['NameInRequest'], request_name => 'requestParameters'); | ||
| 14 | has RequestTemplates => (is => 'ro', isa => 'Paws::ApiGateway::MapOfStringToString', traits => ['NameInRequest'], request_name => 'requestTemplates'); | ||
| 15 | has TimeoutInMillis => (is => 'ro', isa => 'Int', traits => ['NameInRequest'], request_name => 'timeoutInMillis'); | ||
| 16 | has TlsConfig => (is => 'ro', isa => 'Paws::ApiGateway::TlsConfig', traits => ['NameInRequest'], request_name => 'tlsConfig'); | ||
| 17 | has Type => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'type'); | ||
| 18 | has Uri => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'uri'); | ||
| 19 | |||
| 20 | has _request_id => (is => 'ro', isa => 'Str'); | ||
| 21 | 1; | ||
| 22 | |||
| 23 | ### main pod documentation begin ### | ||
| 24 | |||
| 25 | =head1 NAME | ||
| 26 | |||
| 27 | Paws::ApiGateway::Integration | ||
| 28 | |||
| 29 | =head1 ATTRIBUTES | ||
| 30 | |||
| 31 | |||
| 32 | =head2 CacheKeyParameters => ArrayRef[Str|Undef] | ||
| 33 | |||
| 34 | A list of request parameters whose values API Gateway caches. To be | ||
| 35 | valid values for C<cacheKeyParameters>, these parameters must also be | ||
| 36 | specified for Method C<requestParameters>. | ||
| 37 | |||
| 38 | |||
| 39 | =head2 CacheNamespace => Str | ||
| 40 | |||
| 41 | Specifies a group of related cached parameters. By default, API Gateway | ||
| 42 | uses the resource ID as the C<cacheNamespace>. You can specify the same | ||
| 43 | C<cacheNamespace> across resources to return the same cached data for | ||
| 44 | requests to different resources. | ||
| 45 | |||
| 46 | |||
| 47 | =head2 ConnectionId => Str | ||
| 48 | |||
| 49 | The (C<id> | ||
| 50 | (https://docs.aws.amazon.com/apigateway/api-reference/resource/vpc-link/#id)) | ||
| 51 | of the VpcLink used for the integration when C<connectionType=VPC_LINK> | ||
| 52 | and undefined, otherwise. | ||
| 53 | |||
| 54 | |||
| 55 | =head2 ConnectionType => Str | ||
| 56 | |||
| 57 | The type of the network connection to the integration endpoint. The | ||
| 58 | valid value is C<INTERNET> for connections through the public routable | ||
| 59 | internet or C<VPC_LINK> for private connections between API Gateway and | ||
| 60 | a network load balancer in a VPC. The default value is C<INTERNET>. | ||
| 61 | |||
| 62 | Valid values are: C<"INTERNET">, C<"VPC_LINK"> | ||
| 63 | =head2 ContentHandling => Str | ||
| 64 | |||
| 65 | Specifies how to handle request payload content type conversions. | ||
| 66 | Supported values are C<CONVERT_TO_BINARY> and C<CONVERT_TO_TEXT>, with | ||
| 67 | the following behaviors: | ||
| 68 | |||
| 69 | =over | ||
| 70 | |||
| 71 | =item * | ||
| 72 | |||
| 73 | C<CONVERT_TO_BINARY>: Converts a request payload from a Base64-encoded | ||
| 74 | string to the corresponding binary blob. | ||
| 75 | |||
| 76 | =item * | ||
| 77 | |||
| 78 | C<CONVERT_TO_TEXT>: Converts a request payload from a binary blob to a | ||
| 79 | Base64-encoded string. | ||
| 80 | |||
| 81 | =back | ||
| 82 | |||
| 83 | If this property is not defined, the request payload will be passed | ||
| 84 | through from the method request to integration request without | ||
| 85 | modification, provided that the C<passthroughBehavior> is configured to | ||
| 86 | support payload pass-through. | ||
| 87 | |||
| 88 | Valid values are: C<"CONVERT_TO_BINARY">, C<"CONVERT_TO_TEXT"> | ||
| 89 | =head2 Credentials => Str | ||
| 90 | |||
| 91 | Specifies the credentials required for the integration, if any. For AWS | ||
| 92 | integrations, three options are available. To specify an IAM Role for | ||
| 93 | API Gateway to assume, use the role's Amazon Resource Name (ARN). To | ||
| 94 | require that the caller's identity be passed through from the request, | ||
| 95 | specify the string C<arn:aws:iam::\*:user/\*>. To use resource-based | ||
| 96 | permissions on supported AWS services, specify null. | ||
| 97 | |||
| 98 | |||
| 99 | =head2 HttpMethod => Str | ||
| 100 | |||
| 101 | Specifies the integration's HTTP method type. | ||
| 102 | |||
| 103 | |||
| 104 | =head2 IntegrationResponses => L<Paws::ApiGateway::MapOfIntegrationResponse> | ||
| 105 | |||
| 106 | Specifies the integration's responses. | ||
| 107 | |||
| 108 | =head1 Example: Get integration responses of a method | ||
| 109 | |||
| 110 | =head2 Request | ||
| 111 | |||
| 112 | GET /restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200 HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com X-Amz-Date: 20160607T191449Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160607/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash} | ||
| 113 | |||
| 114 | =head2 Response | ||
| 115 | |||
| 116 | The successful response returns C<200 OK> status and a payload as | ||
| 117 | follows: | ||
| 118 | |||
| 119 | { "_links": { "curies": { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", "name": "integrationresponse", "templated": true }, "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200", "title": "200" }, "integrationresponse:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" }, "integrationresponse:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" } }, "responseParameters": { "method.response.header.Content-Type": "'application/xml'" }, "responseTemplates": { "application/json": "$util.urlDecode(\"%3CkinesisStreams%3E#foreach($stream in $input.path('$.StreamNames'))%3Cstream%3E%3Cname%3E$stream%3C/name%3E%3C/stream%3E#end%3C/kinesisStreams%3E\")\n" }, "statusCode": "200" } | ||
| 120 | |||
| 121 | Creating an API | ||
| 122 | (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-create-api.html) | ||
| 123 | |||
| 124 | |||
| 125 | =head2 PassthroughBehavior => Str | ||
| 126 | |||
| 127 | Specifies how the method request body of an unmapped content type will | ||
| 128 | be passed through the integration request to the back end without | ||
| 129 | transformation. A content type is unmapped if no mapping template is | ||
| 130 | defined in the integration or the content type does not match any of | ||
| 131 | the mapped content types, as specified in C<requestTemplates>. The | ||
| 132 | valid value is one of the following: | ||
| 133 | |||
| 134 | =over | ||
| 135 | |||
| 136 | =item * C<WHEN_NO_MATCH>: passes the method request body through the | ||
| 137 | integration request to the back end without transformation when the | ||
| 138 | method request content type does not match any content type associated | ||
| 139 | with the mapping templates defined in the integration request. | ||
| 140 | |||
| 141 | =item * C<WHEN_NO_TEMPLATES>: passes the method request body through | ||
| 142 | the integration request to the back end without transformation when no | ||
| 143 | mapping template is defined in the integration request. If a template | ||
| 144 | is defined when this option is selected, the method request of an | ||
| 145 | unmapped content-type will be rejected with an HTTP C<415 Unsupported | ||
| 146 | Media Type> response. | ||
| 147 | |||
| 148 | =item * C<NEVER>: rejects the method request with an HTTP C<415 | ||
| 149 | Unsupported Media Type> response when either the method request content | ||
| 150 | type does not match any content type associated with the mapping | ||
| 151 | templates defined in the integration request or no mapping template is | ||
| 152 | defined in the integration request. | ||
| 153 | |||
| 154 | =back | ||
| 155 | |||
| 156 | |||
| 157 | |||
| 158 | =head2 RequestParameters => L<Paws::ApiGateway::MapOfStringToString> | ||
| 159 | |||
| 160 | A key-value map specifying request parameters that are passed from the | ||
| 161 | method request to the back end. The key is an integration request | ||
| 162 | parameter name and the associated value is a method request parameter | ||
| 163 | value or static value that must be enclosed within single quotes and | ||
| 164 | pre-encoded as required by the back end. The method request parameter | ||
| 165 | value must match the pattern of C<method.request.{location}.{name}>, | ||
| 166 | where C<location> is C<querystring>, C<path>, or C<header> and C<name> | ||
| 167 | must be a valid and unique method request parameter name. | ||
| 168 | |||
| 169 | |||
| 170 | =head2 RequestTemplates => L<Paws::ApiGateway::MapOfStringToString> | ||
| 171 | |||
| 172 | Represents a map of Velocity templates that are applied on the request | ||
| 173 | payload based on the value of the Content-Type header sent by the | ||
| 174 | client. The content type value is the key in this map, and the template | ||
| 175 | (as a String) is the value. | ||
| 176 | |||
| 177 | |||
| 178 | =head2 TimeoutInMillis => Int | ||
| 179 | |||
| 180 | Custom timeout between 50 and 29,000 milliseconds. The default value is | ||
| 181 | 29,000 milliseconds or 29 seconds. | ||
| 182 | |||
| 183 | |||
| 184 | =head2 TlsConfig => L<Paws::ApiGateway::TlsConfig> | ||
| 185 | |||
| 186 | Specifies the TLS configuration for an integration. | ||
| 187 | |||
| 188 | |||
| 189 | =head2 Type => Str | ||
| 190 | |||
| 191 | Specifies an API method integration type. The valid value is one of the | ||
| 192 | following: | ||
| 193 | |||
| 194 | =over | ||
| 195 | |||
| 196 | =item * C<AWS>: for integrating the API method request with an AWS | ||
| 197 | service action, including the Lambda function-invoking action. With the | ||
| 198 | Lambda function-invoking action, this is referred to as the Lambda | ||
| 199 | custom integration. With any other AWS service action, this is known as | ||
| 200 | AWS integration. | ||
| 201 | |||
| 202 | =item * C<AWS_PROXY>: for integrating the API method request with the | ||
| 203 | Lambda function-invoking action with the client request passed through | ||
| 204 | as-is. This integration is also referred to as the Lambda proxy | ||
| 205 | integration. | ||
| 206 | |||
| 207 | =item * C<HTTP>: for integrating the API method request with an HTTP | ||
| 208 | endpoint, including a private HTTP endpoint within a VPC. This | ||
| 209 | integration is also referred to as the HTTP custom integration. | ||
| 210 | |||
| 211 | =item * C<HTTP_PROXY>: for integrating the API method request with an | ||
| 212 | HTTP endpoint, including a private HTTP endpoint within a VPC, with the | ||
| 213 | client request passed through as-is. This is also referred to as the | ||
| 214 | HTTP proxy integration. | ||
| 215 | |||
| 216 | =item * C<MOCK>: for integrating the API method request with API | ||
| 217 | Gateway as a "loop-back" endpoint without invoking any backend. | ||
| 218 | |||
| 219 | =back | ||
| 220 | |||
| 221 | For the HTTP and HTTP proxy integrations, each integration can specify | ||
| 222 | a protocol (C<http/https>), port and path. Standard 80 and 443 ports | ||
| 223 | are supported as well as custom ports above 1024. An HTTP or HTTP proxy | ||
| 224 | integration with a C<connectionType> of C<VPC_LINK> is referred to as a | ||
| 225 | private integration and uses a VpcLink to connect API Gateway to a | ||
| 226 | network load balancer of a VPC. | ||
| 227 | |||
| 228 | Valid values are: C<"HTTP">, C<"AWS">, C<"MOCK">, C<"HTTP_PROXY">, C<"AWS_PROXY"> | ||
| 229 | =head2 Uri => Str | ||
| 230 | |||
| 231 | Specifies Uniform Resource Identifier (URI) of the integration | ||
| 232 | endpoint. | ||
| 233 | |||
| 234 | =over | ||
| 235 | |||
| 236 | =item * | ||
| 237 | |||
| 238 | For C<HTTP> or C<HTTP_PROXY> integrations, the URI must be a fully | ||
| 239 | formed, encoded HTTP(S) URL according to the RFC-3986 specification | ||
| 240 | (https://en.wikipedia.org/wiki/Uniform_Resource_Identifier), for either | ||
| 241 | standard integration, where C<connectionType> is not C<VPC_LINK>, or | ||
| 242 | private integration, where C<connectionType> is C<VPC_LINK>. For a | ||
| 243 | private HTTP integration, the URI is not used for routing. | ||
| 244 | |||
| 245 | =item * | ||
| 246 | |||
| 247 | For C<AWS> or C<AWS_PROXY> integrations, the URI is of the form | ||
| 248 | C<arn:aws:apigateway:{region}:{subdomain.service|service}:path|action/{service_api}>. | ||
| 249 | Here, C<{Region}> is the API Gateway region (e.g., C<us-east-1>); | ||
| 250 | C<{service}> is the name of the integrated AWS service (e.g., C<s3>); | ||
| 251 | and C<{subdomain}> is a designated subdomain supported by certain AWS | ||
| 252 | service for fast host-name lookup. C<action> can be used for an AWS | ||
| 253 | service action-based API, using an | ||
| 254 | C<Action={name}&{p1}={v1}&p2={v2}...> query string. The ensuing | ||
| 255 | C<{service_api}> refers to a supported action C<{name}> plus any | ||
| 256 | required input parameters. Alternatively, C<path> can be used for an | ||
| 257 | AWS service path-based API. The ensuing C<service_api> refers to the | ||
| 258 | path to an AWS service resource, including the region of the integrated | ||
| 259 | AWS service, if applicable. For example, for integration with the S3 | ||
| 260 | API of C<GetObject | ||
| 261 | (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectGET.html)>, | ||
| 262 | the C<uri> can be either | ||
| 263 | C<arn:aws:apigateway:us-west-2:s3:action/GetObject&Bucket={bucket}&Key={key}> | ||
| 264 | or C<arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key}> | ||
| 265 | |||
| 266 | =back | ||
| 267 | |||
| 268 | |||
| 269 | |||
| 270 | =head2 _request_id => Str | ||
| 271 | |||
| 272 | |||
| 273 | =cut | ||
| 274 |