get_gateway_response¶
Operation¶
get_gateway_response
async
¶
get_gateway_response(input: GetGatewayResponseInput, plugins: list[Plugin] | None = None) -> GetGatewayResponseOutput
Gets a GatewayResponse of a specified response type on the given RestApi.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
GetGatewayResponseInput
|
An instance of |
required |
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
|
Returns:
| Type | Description |
|---|---|
GetGatewayResponseOutput
|
An instance of |
Input¶
GetGatewayResponseInput
dataclass
¶
Gets a GatewayResponse of a specified response type on the given RestApi.
Attributes¶
response_type
class-attribute
instance-attribute
¶
response_type: GatewayResponseType | None = None
The response type of the associated GatewayResponse.
rest_api_id
class-attribute
instance-attribute
¶
rest_api_id: str | None = None
The string identifier of the associated RestApi.
Output¶
GetGatewayResponseOutput
dataclass
¶
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 = False
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_parameters
class-attribute
instance-attribute
¶
response_parameters: dict[str, str] | None = 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 = None
Response templates of the GatewayResponse as a string-to-string map of key-value pairs.
response_type
class-attribute
instance-attribute
¶
response_type: GatewayResponseType | None = None
The response type of the associated GatewayResponse.
status_code
class-attribute
instance-attribute
¶
status_code: str | None = None
The HTTP status code for this GatewayResponse.