put_integration
¶
put_integration(
rest_api_id: String,
resource_id: String,
http_method: String,
type: IntegrationType,
*,
config_overrides: Optional[APIGatewayClientConfig] = 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/api_gateway.py
5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 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 | |