Skip to content

APIGatewayClient.put_integration

rboto-api-gateway==0.4.0 · Service index · Types

Model summary (excerpt): Sets up a method's integration.

Install and imports

python -m pip install "rboto[api-gateway]==0.4.0"
from rboto import APIGatewayClient
from collections.abc import Sequence
from rboto_api_gateway.types import (
    ConnectionType,
    ContentHandlingStrategy,
    IntegrationType,
    PutIntegrationOutput,
    ResponseTransferMode,
    TlsConfig,
)

Signature

async def put_integration(
    *,
    rest_api_id: str,
    resource_id: str,
    http_method: str,
    type: IntegrationType,
    integration_http_method: str | None = None,
    uri: str | None = None,
    connection_type: ConnectionType | None = None,
    connection_id: str | None = None,
    credentials: str | None = None,
    request_parameters: dict[str, str] | None = None,
    request_templates: dict[str, str] | None = None,
    passthrough_behavior: str | None = None,
    cache_namespace: str | None = None,
    cache_key_parameters: Sequence[str] | None = None,
    content_handling: ContentHandlingStrategy | None = None,
    timeout_in_millis: int | None = None,
    tls_config: TlsConfig | None = None,
    response_transfer_mode: ResponseTransferMode | None = None,
    integration_target: str | None = None,
) -> PutIntegrationOutput: ...

Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.

Arguments

Argument Required Model notes (excerpt)
rest_api_id Yes The string identifier of the associated RestApi.
resource_id Yes Specifies a put integration request's resource ID.
http_method Yes Specifies the HTTP method for the integration.
type Yes Specifies a put integration input's type.
integration_http_method No The HTTP method for the integration.
uri No 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 either standard integration, where connectionType is not VPC_LINK , or private integration, where connectionType is VPC_LINK . For a private HTTP integration, the URI is not used for...
connection_type No 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 .
connection_id No The ID of the VpcLink used for the integration. Specify this value only if you specify VPC_LINK as the connection type.
credentials No Specifies whether credentials are required for a put integration.
request_parameters No 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...
request_templates No 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 No 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 requestTemplates property on the Integration resource. There are three valid values: WHEN_NO_MATCH , WHEN_NO_TEMPLATES , and NEVER .
cache_namespace No Specifies a group of related cached parameters. By default, API Gateway uses the resource ID as the cacheNamespace . You can specify the same cacheNamespace across resources to return the same cached data for requests to different resources.
cache_key_parameters No A list of request parameters whose values API Gateway caches. To be valid values for cacheKeyParameters , these parameters must also be specified for Method requestParameters .
content_handling No 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 passthroughBehavior is configured to support payload pass-through.
timeout_in_millis No 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.
tls_config No
response_transfer_mode No The response transfer mode of the integration.
integration_target No The ALB or NLB ARN to send the request to.

Output

PutIntegrationOutput.

Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.

Field Type Presence References
type IntegrationTypeOutput | None Always present IntegrationTypeOutput
http_method str | None Always present —
uri str | None Always present —
connection_type ConnectionTypeOutput | None Always present ConnectionTypeOutput
connection_id str | None Always present —
credentials str | None Always present —
request_parameters dict[str, str] | None Always present —
request_templates dict[str, str] | None Always present —
passthrough_behavior str | None Always present —
content_handling ContentHandlingStrategyOutput | None Always present ContentHandlingStrategyOutput
timeout_in_millis int Always present —
cache_namespace str | None Always present —
cache_key_parameters list[str] | None Always present —
integration_responses dict[str, IntegrationResponse] | None Always present IntegrationResponse
tls_config TlsConfigOutput | None Always present TlsConfigOutput
response_transfer_mode ResponseTransferModeOutput | None Always present ResponseTransferModeOutput
integration_target str | None Always present —

| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.

ConnectionType, ContentHandlingStrategy, IntegrationType, PutIntegrationOutput, ResponseTransferMode, TlsConfig

Follow these links for nested inputs and outputs; recursive types link back to the same type page.

Pagination and streaming

No generated paginator for this operation.

No output stream.

Errors

Import from rboto_api_gateway.exceptions:

BadRequestError, ConflictError, LimitExceededError, NotFoundError, TooManyRequestsError, UnauthorizedError.

Other service failures use the service base error; credential, transport and timeout failures use shared errors.

Service guide · Pinned model