put_integration
async
¶
put_integration(
rest_api_id: String,
resource_id: String,
http_method: String,
type: IntegrationType,
*,
config_overrides: Optional[AsyncAPIGatewayClientConfig] = None,
integration_http_method: Optional[String] = None,
uri: Optional[String] = None,
connection_type: Optional[ConnectionType] = None,
connection_id: Optional[String] = None,
credentials: Optional[String] = None,
request_parameters: Optional[MapOfStringToString] = None,
request_templates: Optional[MapOfStringToString] = None,
passthrough_behavior: Optional[String] = None,
cache_namespace: Optional[String] = None,
cache_key_parameters: Optional[ListOfString] = None,
content_handling: Optional[ContentHandlingStrategy] = None,
timeout_in_millis: Optional[NullableInteger] = None,
tls_config: Optional[TlsConfig] = None,
response_transfer_mode: Optional[ResponseTransferMode] = None,
integration_target: Optional[String] = None,
) -> Integration
Sets up a method's integration.
Parameters:
-
rest_api_id(String) –The string identifier of the associated RestApi.
-
resource_id(String) –Specifies a put integration request's resource ID.
-
http_method(String) –Specifies the HTTP method for the integration.
-
type(IntegrationType) –Specifies a put integration input's type.
-
integration_http_method(Optional[String], default:None) –The HTTP method for the integration.
-
uri(Optional[String], default:None) –Specifies Uniform Resource Identifier (URI) of the integration endpoint. For HTTP or
HTTP_PROXYintegrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification, for either standard integration, whereconnectionTypeis notVPC_LINK, or private integration, whereconnectionTypeisVPC_LINK. For a private HTTP integration, the URI is not used for routing. ForAWSorAWS_PROXYintegrations, the URI is of the formarn: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 Amazon Web Services service (e.g., s3); and {subdomain} is a designated subdomain supported by certain Amazon Web Services service for fast host-name lookup. action can be used for an Amazon Web Services 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 Amazon Web Services service path-based API. The ensuing service_api refers to the path to an Amazon Web Services service resource, including the region of the integrated Amazon Web Services service, if applicable. For example, for integration with the S3 API ofGetObject, theurican be eitherarn:aws:apigateway:us-west-2:s3:action/GetObject&Bucket={bucket}&Key={key}orarn:aws:apigateway:us-west-2:s3:path/{bucket}/{key}. -
connection_type(Optional[ConnectionType], default:None) –The type of the network connection to the integration endpoint. The valid value is
INTERNETfor connections through the public routable internet orVPC_LINKfor private connections between API Gateway and a network load balancer in a VPC. The default value isINTERNET. -
connection_id(Optional[String], default:None) –The ID of the VpcLink used for the integration. Specify this value only if you specify
VPC_LINKas the connection type. -
credentials(Optional[String], default:None) –Specifies whether credentials are required for a put integration.
-
request_parameters(Optional[MapOfStringToString], default:None) –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}, wherelocationisquerystring,path, orheaderandnamemust be a valid and unique method request parameter name. -
request_templates(Optional[MapOfStringToString], default:None) –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.
-
passthrough_behavior(Optional[String], default:None) –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
requestTemplatesproperty on the Integration resource. There are three valid values:WHEN_NO_MATCH,WHEN_NO_TEMPLATES, andNEVER. -
cache_namespace(Optional[String], default:None) –Specifies a group of related cached parameters. By default, API Gateway uses the resource ID as the
cacheNamespace. You can specify the samecacheNamespaceacross resources to return the same cached data for requests to different resources. -
cache_key_parameters(Optional[ListOfString], default:None) –A list of request parameters whose values API Gateway caches. To be valid values for
cacheKeyParameters, these parameters must also be specified for MethodrequestParameters. -
content_handling(Optional[ContentHandlingStrategy], default:None) –Specifies how to handle request payload content type conversions. Supported values are
CONVERT_TO_BINARYandCONVERT_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
passthroughBehavioris configured to support payload pass-through. -
timeout_in_millis(Optional[NullableInteger], default:None) –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.
-
response_transfer_mode(Optional[ResponseTransferMode], default:None) –The response transfer mode of the integration.
-
integration_target(Optional[String], default:None) –The ALB or NLB listener to send the request to.
Raises:
-
BadRequestException–The submitted request is not valid, for example, the input is incomplete or incorrect. See the accompanying error message for details.
-
ConflictException–The request configuration has conflicts. For details, see the accompanying error message.
-
LimitExceededException–The request exceeded the rate limit. Retry after the specified time period.
-
NotFoundException–The requested resource is not found. Make sure that the request URI is correct.
-
TooManyRequestsException–The request has reached its throttling limit. Retry after the specified time period.
-
UnauthorizedException–The request is denied because the caller has insufficient permissions.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_api_gateway/_services/async_api_gateway.py
6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 | |