Skip to content

put_gateway_response

Operation

put_gateway_response

put_gateway_response(request: PutGatewayResponseInput | PutGatewayResponseInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[PutGatewayResponseInputDict]) -> PutGatewayResponseOutput

Creates a customization of a GatewayResponse of a specified response type and status code on the given RestApi.

Parameters:

Name Type Description Default
request PutGatewayResponseInput | PutGatewayResponseInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[PutGatewayResponseInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
PutGatewayResponseOutput

An instance of PutGatewayResponseOutput.

put_gateway_response async

put_gateway_response(request: PutGatewayResponseInput | PutGatewayResponseInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[PutGatewayResponseInputDict]) -> PutGatewayResponseOutput

Creates a customization of a GatewayResponse of a specified response type and status code on the given RestApi.

Parameters:

Name Type Description Default
request PutGatewayResponseInput | PutGatewayResponseInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[PutGatewayResponseInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
PutGatewayResponseOutput

An instance of PutGatewayResponseOutput.

Input

Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.

PutGatewayResponseInputDict

Bases: TypedDict

Dictionary form of PutGatewayResponseInput.

Attributes

response_parameters instance-attribute
response_parameters: Mapping[str, str] | None

Response parameters (paths, query strings and headers) of the GatewayResponse as a string-to-string map of key-value pairs.

response_templates instance-attribute
response_templates: Mapping[str, str] | None

Response templates of the GatewayResponse as a string-to-string map of key-value pairs.

response_type instance-attribute
response_type: Required[str]

The response type of the associated GatewayResponse

rest_api_id instance-attribute
rest_api_id: Required[str]

The string identifier of the associated RestApi.

status_code instance-attribute
status_code: str | None

The HTTP status code of the GatewayResponse.

PutGatewayResponseInput dataclass

Bases: _SerdeShape

Creates a customization of a GatewayResponse of a specified response type and status code on the given RestApi.

Attributes

response_parameters class-attribute instance-attribute
response_parameters: dict[str, str] | None = ...

Response parameters (paths, query strings and headers) of the GatewayResponse as a string-to-string map of key-value pairs.

response_templates class-attribute instance-attribute
response_templates: dict[str, str] | None = ...

Response templates of the GatewayResponse as a string-to-string map of key-value pairs.

response_type class-attribute instance-attribute
response_type: str | None = ...

The response type of the associated GatewayResponse

rest_api_id class-attribute instance-attribute
rest_api_id: str | None = ...

The string identifier of the associated RestApi.

status_code class-attribute instance-attribute
status_code: str | None = ...

The HTTP status code of the GatewayResponse.

Output

PutGatewayResponseOutput dataclass

Bases: _SerdeShape

A gateway response of a given response type and status code, with optional response parameters and mapping templates.

Attributes

default_response class-attribute instance-attribute
default_response: bool = ...

A Boolean flag to indicate whether this GatewayResponse is the default gateway response (true) or not (false). A default gateway response is one generated by API Gateway without any customization by an API developer.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.

response_parameters class-attribute instance-attribute
response_parameters: dict[str, str] | None = ...

Response parameters (paths, query strings and headers) of the GatewayResponse as a string-to-string map of key-value pairs.

response_templates class-attribute instance-attribute
response_templates: dict[str, str] | None = ...

Response templates of the GatewayResponse as a string-to-string map of key-value pairs.

response_type class-attribute instance-attribute
response_type: str | None = ...

The response type of the associated GatewayResponse.

status_code class-attribute instance-attribute
status_code: str | None = ...

The HTTP status code for this GatewayResponse.