« blib/lib/Paws/ApiGatewayV2/CreateDomainNameResponse.pm
↑ Summary
blib/lib/Paws/ApiGatewayV2/CreateIntegrationInput.pm »
| 1 | |||
| 2 | package Paws::ApiGatewayV2::CreateIntegration; | ||
| 3 | use Moose; | ||
| 4 | has ApiId => (is => 'ro', isa => 'Str', traits => ['ParamInURI'], uri_name => 'apiId', required => 1); | ||
| 5 | has ConnectionId => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'connectionId'); | ||
| 6 | has ConnectionType => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'connectionType'); | ||
| 7 | has ContentHandlingStrategy => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'contentHandlingStrategy'); | ||
| 8 | has CredentialsArn => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'credentialsArn'); | ||
| 9 | has Description => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'description'); | ||
| 10 | has IntegrationMethod => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'integrationMethod'); | ||
| 11 | has IntegrationSubtype => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'integrationSubtype'); | ||
| 12 | has IntegrationType => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'integrationType', required => 1); | ||
| 13 | has IntegrationUri => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'integrationUri'); | ||
| 14 | has PassthroughBehavior => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'passthroughBehavior'); | ||
| 15 | has PayloadFormatVersion => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'payloadFormatVersion'); | ||
| 16 | has RequestParameters => (is => 'ro', isa => 'Paws::ApiGatewayV2::IntegrationParameters', traits => ['NameInRequest'], request_name => 'requestParameters'); | ||
| 17 | has RequestTemplates => (is => 'ro', isa => 'Paws::ApiGatewayV2::TemplateMap', traits => ['NameInRequest'], request_name => 'requestTemplates'); | ||
| 18 | has ResponseParameters => (is => 'ro', isa => 'Paws::ApiGatewayV2::ResponseParameters', traits => ['NameInRequest'], request_name => 'responseParameters'); | ||
| 19 | has TemplateSelectionExpression => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'templateSelectionExpression'); | ||
| 20 | has TimeoutInMillis => (is => 'ro', isa => 'Int', traits => ['NameInRequest'], request_name => 'timeoutInMillis'); | ||
| 21 | has TlsConfig => (is => 'ro', isa => 'Paws::ApiGatewayV2::TlsConfigInput', traits => ['NameInRequest'], request_name => 'tlsConfig'); | ||
| 22 | |||
| 23 | use MooseX::ClassAttribute; | ||
| 24 | |||
| 25 | class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateIntegration'); | ||
| 26 | class_has _api_uri => (isa => 'Str', is => 'ro', default => '/v2/apis/{apiId}/integrations'); | ||
| 27 | class_has _api_method => (isa => 'Str', is => 'ro', default => 'POST'); | ||
| 28 | class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::ApiGatewayV2::CreateIntegrationResult'); | ||
| 29 | 1; | ||
| 30 | |||
| 31 | ### main pod documentation begin ### | ||
| 32 | |||
| 33 | =head1 NAME | ||
| 34 | |||
| 35 | Paws::ApiGatewayV2::CreateIntegration - Arguments for method CreateIntegration on L<Paws::ApiGatewayV2> | ||
| 36 | |||
| 37 | =head1 DESCRIPTION | ||
| 38 | |||
| 39 | This class represents the parameters used for calling the method CreateIntegration on the | ||
| 40 | L<AmazonApiGatewayV2|Paws::ApiGatewayV2> service. Use the attributes of this class | ||
| 41 | as arguments to method CreateIntegration. | ||
| 42 | |||
| 43 | You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateIntegration. | ||
| 44 | |||
| 45 | =head1 SYNOPSIS | ||
| 46 | |||
| 47 | my $apigateway = Paws->service('ApiGatewayV2'); | ||
| 48 | my $CreateIntegrationResult = $apigateway->CreateIntegration( | ||
| 49 | ApiId => 'My__string', | ||
| 50 | IntegrationType => 'AWS', | ||
| 51 | ConnectionId => 'MyStringWithLengthBetween1And1024', # OPTIONAL | ||
| 52 | ConnectionType => 'INTERNET', # OPTIONAL | ||
| 53 | ContentHandlingStrategy => 'CONVERT_TO_BINARY', # OPTIONAL | ||
| 54 | CredentialsArn => 'MyArn', # OPTIONAL | ||
| 55 | Description => 'MyStringWithLengthBetween0And1024', # OPTIONAL | ||
| 56 | IntegrationMethod => 'MyStringWithLengthBetween1And64', # OPTIONAL | ||
| 57 | IntegrationSubtype => 'MyStringWithLengthBetween1And128', # OPTIONAL | ||
| 58 | IntegrationUri => 'MyUriWithLengthBetween1And2048', # OPTIONAL | ||
| 59 | PassthroughBehavior => 'WHEN_NO_MATCH', # OPTIONAL | ||
| 60 | PayloadFormatVersion => 'MyStringWithLengthBetween1And64', # OPTIONAL | ||
| 61 | RequestParameters => | ||
| 62 | { 'My__string' => 'MyStringWithLengthBetween1And512', }, # OPTIONAL | ||
| 63 | RequestTemplates => | ||
| 64 | { 'My__string' => 'MyStringWithLengthBetween0And32K', }, # OPTIONAL | ||
| 65 | ResponseParameters => { | ||
| 66 | 'My__string' => { 'My__string' => 'MyStringWithLengthBetween1And512', }, | ||
| 67 | }, # OPTIONAL | ||
| 68 | TemplateSelectionExpression => 'MySelectionExpression', # OPTIONAL | ||
| 69 | TimeoutInMillis => 1, # OPTIONAL | ||
| 70 | TlsConfig => { ServerNameToVerify => 'MyStringWithLengthBetween1And512', } | ||
| 71 | , # OPTIONAL | ||
| 72 | ); | ||
| 73 | |||
| 74 | # Results: | ||
| 75 | my $ApiGatewayManaged = $CreateIntegrationResult->ApiGatewayManaged; | ||
| 76 | my $ConnectionId = $CreateIntegrationResult->ConnectionId; | ||
| 77 | my $ConnectionType = $CreateIntegrationResult->ConnectionType; | ||
| 78 | my $ContentHandlingStrategy = | ||
| 79 | $CreateIntegrationResult->ContentHandlingStrategy; | ||
| 80 | my $CredentialsArn = $CreateIntegrationResult->CredentialsArn; | ||
| 81 | my $Description = $CreateIntegrationResult->Description; | ||
| 82 | my $IntegrationId = $CreateIntegrationResult->IntegrationId; | ||
| 83 | my $IntegrationMethod = $CreateIntegrationResult->IntegrationMethod; | ||
| 84 | my $IntegrationResponseSelectionExpression = | ||
| 85 | $CreateIntegrationResult->IntegrationResponseSelectionExpression; | ||
| 86 | my $IntegrationSubtype = $CreateIntegrationResult->IntegrationSubtype; | ||
| 87 | my $IntegrationType = $CreateIntegrationResult->IntegrationType; | ||
| 88 | my $IntegrationUri = $CreateIntegrationResult->IntegrationUri; | ||
| 89 | my $PassthroughBehavior = $CreateIntegrationResult->PassthroughBehavior; | ||
| 90 | my $PayloadFormatVersion = $CreateIntegrationResult->PayloadFormatVersion; | ||
| 91 | my $RequestParameters = $CreateIntegrationResult->RequestParameters; | ||
| 92 | my $RequestTemplates = $CreateIntegrationResult->RequestTemplates; | ||
| 93 | my $ResponseParameters = $CreateIntegrationResult->ResponseParameters; | ||
| 94 | my $TemplateSelectionExpression = | ||
| 95 | $CreateIntegrationResult->TemplateSelectionExpression; | ||
| 96 | my $TimeoutInMillis = $CreateIntegrationResult->TimeoutInMillis; | ||
| 97 | my $TlsConfig = $CreateIntegrationResult->TlsConfig; | ||
| 98 | |||
| 99 | # Returns a L<Paws::ApiGatewayV2::CreateIntegrationResult> object. | ||
| 100 | |||
| 101 | Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object. | ||
| 102 | For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/apigateway/CreateIntegration> | ||
| 103 | |||
| 104 | =head1 ATTRIBUTES | ||
| 105 | |||
| 106 | |||
| 107 | =head2 B<REQUIRED> ApiId => Str | ||
| 108 | |||
| 109 | The API identifier. | ||
| 110 | |||
| 111 | |||
| 112 | |||
| 113 | =head2 ConnectionId => Str | ||
| 114 | |||
| 115 | The ID of the VPC link for a private integration. Supported only for | ||
| 116 | HTTP APIs. | ||
| 117 | |||
| 118 | |||
| 119 | |||
| 120 | =head2 ConnectionType => Str | ||
| 121 | |||
| 122 | The type of the network connection to the integration endpoint. Specify | ||
| 123 | INTERNET for connections through the public routable internet or | ||
| 124 | VPC_LINK for private connections between API Gateway and resources in a | ||
| 125 | VPC. The default value is INTERNET. | ||
| 126 | |||
| 127 | Valid values are: C<"INTERNET">, C<"VPC_LINK"> | ||
| 128 | |||
| 129 | =head2 ContentHandlingStrategy => Str | ||
| 130 | |||
| 131 | Supported only for WebSocket APIs. Specifies how to handle response | ||
| 132 | payload content type conversions. Supported values are | ||
| 133 | CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors: | ||
| 134 | |||
| 135 | CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded | ||
| 136 | string to the corresponding binary blob. | ||
| 137 | |||
| 138 | CONVERT_TO_TEXT: Converts a response payload from a binary blob to a | ||
| 139 | Base64-encoded string. | ||
| 140 | |||
| 141 | If this property is not defined, the response payload will be passed | ||
| 142 | through from the integration response to the route response or method | ||
| 143 | response without modification. | ||
| 144 | |||
| 145 | Valid values are: C<"CONVERT_TO_BINARY">, C<"CONVERT_TO_TEXT"> | ||
| 146 | |||
| 147 | =head2 CredentialsArn => Str | ||
| 148 | |||
| 149 | Specifies the credentials required for the integration, if any. For AWS | ||
| 150 | integrations, three options are available. To specify an IAM Role for | ||
| 151 | API Gateway to assume, use the role's Amazon Resource Name (ARN). To | ||
| 152 | require that the caller's identity be passed through from the request, | ||
| 153 | specify the string arn:aws:iam::*:user/*. To use resource-based | ||
| 154 | permissions on supported AWS services, specify null. | ||
| 155 | |||
| 156 | |||
| 157 | |||
| 158 | =head2 Description => Str | ||
| 159 | |||
| 160 | The description of the integration. | ||
| 161 | |||
| 162 | |||
| 163 | |||
| 164 | =head2 IntegrationMethod => Str | ||
| 165 | |||
| 166 | Specifies the integration's HTTP method type. | ||
| 167 | |||
| 168 | |||
| 169 | |||
| 170 | =head2 IntegrationSubtype => Str | ||
| 171 | |||
| 172 | Supported only for HTTP API AWS_PROXY integrations. Specifies the AWS | ||
| 173 | service action to invoke. To learn more, see Integration subtype | ||
| 174 | reference | ||
| 175 | (https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-aws-services-reference.html). | ||
| 176 | |||
| 177 | |||
| 178 | |||
| 179 | =head2 B<REQUIRED> IntegrationType => Str | ||
| 180 | |||
| 181 | The integration type of an integration. One of the following: | ||
| 182 | |||
| 183 | AWS: for integrating the route or method request with an AWS service | ||
| 184 | action, including the Lambda function-invoking action. With the Lambda | ||
| 185 | function-invoking action, this is referred to as the Lambda custom | ||
| 186 | integration. With any other AWS service action, this is known as AWS | ||
| 187 | integration. Supported only for WebSocket APIs. | ||
| 188 | |||
| 189 | AWS_PROXY: for integrating the route or method request with a Lambda | ||
| 190 | function or other AWS service action. This integration is also referred | ||
| 191 | to as a Lambda proxy integration. | ||
| 192 | |||
| 193 | HTTP: for integrating the route or method request with an HTTP | ||
| 194 | endpoint. This integration is also referred to as the HTTP custom | ||
| 195 | integration. Supported only for WebSocket APIs. | ||
| 196 | |||
| 197 | HTTP_PROXY: for integrating the route or method request with an HTTP | ||
| 198 | endpoint, with the client request passed through as-is. This is also | ||
| 199 | referred to as HTTP proxy integration. For HTTP API private | ||
| 200 | integrations, use an HTTP_PROXY integration. | ||
| 201 | |||
| 202 | MOCK: for integrating the route or method request with API Gateway as a | ||
| 203 | "loopback" endpoint without invoking any backend. Supported only for | ||
| 204 | WebSocket APIs. | ||
| 205 | |||
| 206 | Valid values are: C<"AWS">, C<"HTTP">, C<"MOCK">, C<"HTTP_PROXY">, C<"AWS_PROXY"> | ||
| 207 | |||
| 208 | =head2 IntegrationUri => Str | ||
| 209 | |||
| 210 | For a Lambda integration, specify the URI of a Lambda function. | ||
| 211 | |||
| 212 | For an HTTP integration, specify a fully-qualified URL. | ||
| 213 | |||
| 214 | For an HTTP API private integration, specify the ARN of an Application | ||
| 215 | Load Balancer listener, Network Load Balancer listener, or AWS Cloud | ||
| 216 | Map service. If you specify the ARN of an AWS Cloud Map service, API | ||
| 217 | Gateway uses DiscoverInstances to identify resources. You can use query | ||
| 218 | parameters to target specific resources. To learn more, see | ||
| 219 | DiscoverInstances | ||
| 220 | (https://docs.aws.amazon.com/cloud-map/latest/api/API_DiscoverInstances.html). | ||
| 221 | For private integrations, all resources must be owned by the same AWS | ||
| 222 | account. | ||
| 223 | |||
| 224 | |||
| 225 | |||
| 226 | =head2 PassthroughBehavior => Str | ||
| 227 | |||
| 228 | Specifies the pass-through behavior for incoming requests based on the | ||
| 229 | Content-Type header in the request, and the available mapping templates | ||
| 230 | specified as the requestTemplates property on the Integration resource. | ||
| 231 | There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and | ||
| 232 | NEVER. Supported only for WebSocket APIs. | ||
| 233 | |||
| 234 | WHEN_NO_MATCH passes the request body for unmapped content types | ||
| 235 | through to the integration backend without transformation. | ||
| 236 | |||
| 237 | NEVER rejects unmapped content types with an HTTP 415 Unsupported Media | ||
| 238 | Type response. | ||
| 239 | |||
| 240 | WHEN_NO_TEMPLATES allows pass-through when the integration has no | ||
| 241 | content types mapped to templates. However, if there is at least one | ||
| 242 | content type defined, unmapped content types will be rejected with the | ||
| 243 | same HTTP 415 Unsupported Media Type response. | ||
| 244 | |||
| 245 | Valid values are: C<"WHEN_NO_MATCH">, C<"NEVER">, C<"WHEN_NO_TEMPLATES"> | ||
| 246 | |||
| 247 | =head2 PayloadFormatVersion => Str | ||
| 248 | |||
| 249 | Specifies the format of the payload sent to an integration. Required | ||
| 250 | for HTTP APIs. | ||
| 251 | |||
| 252 | |||
| 253 | |||
| 254 | =head2 RequestParameters => L<Paws::ApiGatewayV2::IntegrationParameters> | ||
| 255 | |||
| 256 | For WebSocket APIs, a key-value map specifying request parameters that | ||
| 257 | are passed from the method request to the backend. The key is an | ||
| 258 | integration request parameter name and the associated value is a method | ||
| 259 | request parameter value or static value that must be enclosed within | ||
| 260 | single quotes and pre-encoded as required by the backend. The method | ||
| 261 | request parameter value must match the pattern of | ||
| 262 | method.request.{location}.{name} , where {location} is querystring, | ||
| 263 | path, or header; and {name} must be a valid and unique method request | ||
| 264 | parameter name. | ||
| 265 | |||
| 266 | For HTTP API integrations with a specified integrationSubtype, request | ||
| 267 | parameters are a key-value map specifying parameters that are passed to | ||
| 268 | AWS_PROXY integrations. You can provide static values, or map request | ||
| 269 | data, stage variables, or context variables that are evaluated at | ||
| 270 | runtime. To learn more, see Working with AWS service integrations for | ||
| 271 | HTTP APIs | ||
| 272 | (https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-aws-services.html). | ||
| 273 | |||
| 274 | For HTTP API integrations without a specified integrationSubtype | ||
| 275 | request parameters are a key-value map specifying how to transform HTTP | ||
| 276 | requests before sending them to the backend. The key should follow the | ||
| 277 | pattern | ||
| 278 | E<lt>actionE<gt>:E<lt>header|querystring|pathE<gt>.E<lt>locationE<gt> | ||
| 279 | where action can be append, overwrite or remove. For values, you can | ||
| 280 | provide static values, or map request data, stage variables, or context | ||
| 281 | variables that are evaluated at runtime. To learn more, see | ||
| 282 | Transforming API requests and responses | ||
| 283 | (https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html). | ||
| 284 | |||
| 285 | |||
| 286 | |||
| 287 | =head2 RequestTemplates => L<Paws::ApiGatewayV2::TemplateMap> | ||
| 288 | |||
| 289 | Represents a map of Velocity templates that are applied on the request | ||
| 290 | payload based on the value of the Content-Type header sent by the | ||
| 291 | client. The content type value is the key in this map, and the template | ||
| 292 | (as a String) is the value. Supported only for WebSocket APIs. | ||
| 293 | |||
| 294 | |||
| 295 | |||
| 296 | =head2 ResponseParameters => L<Paws::ApiGatewayV2::ResponseParameters> | ||
| 297 | |||
| 298 | Supported only for HTTP APIs. You use response parameters to transform | ||
| 299 | the HTTP response from a backend integration before returning the | ||
| 300 | response to clients. Specify a key-value map from a selection key to | ||
| 301 | response parameters. The selection key must be a valid HTTP status code | ||
| 302 | within the range of 200-599. Response parameters are a key-value map. | ||
| 303 | The key must match pattern | ||
| 304 | E<lt>actionE<gt>:E<lt>headerE<gt>.E<lt>locationE<gt> or | ||
| 305 | overwrite.statuscode. The action can be append, overwrite or remove. | ||
| 306 | The value can be a static value, or map to response data, stage | ||
| 307 | variables, or context variables that are evaluated at runtime. To learn | ||
| 308 | more, see Transforming API requests and responses | ||
| 309 | (https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html). | ||
| 310 | |||
| 311 | |||
| 312 | |||
| 313 | =head2 TemplateSelectionExpression => Str | ||
| 314 | |||
| 315 | The template selection expression for the integration. | ||
| 316 | |||
| 317 | |||
| 318 | |||
| 319 | =head2 TimeoutInMillis => Int | ||
| 320 | |||
| 321 | Custom timeout between 50 and 29,000 milliseconds for WebSocket APIs | ||
| 322 | and between 50 and 30,000 milliseconds for HTTP APIs. The default | ||
| 323 | timeout is 29 seconds for WebSocket APIs and 30 seconds for HTTP APIs. | ||
| 324 | |||
| 325 | |||
| 326 | |||
| 327 | =head2 TlsConfig => L<Paws::ApiGatewayV2::TlsConfigInput> | ||
| 328 | |||
| 329 | The TLS configuration for a private integration. If you specify a TLS | ||
| 330 | configuration, private integration traffic uses the HTTPS protocol. | ||
| 331 | Supported only for HTTP APIs. | ||
| 332 | |||
| 333 | |||
| 334 | |||
| 335 | |||
| 336 | =head1 SEE ALSO | ||
| 337 | |||
| 338 | This class forms part of L<Paws>, documenting arguments for method CreateIntegration in L<Paws::ApiGatewayV2> | ||
| 339 | |||
| 340 | =head1 BUGS and CONTRIBUTIONS | ||
| 341 | |||
| 342 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 343 | |||
| 344 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 345 | |||
| 346 | =cut | ||
| 347 |