method_response#
- async idem_aws.states.aws.apigateway.method_response.present(hub, ctx, name: str, rest_api_id: str, http_method: str, status_code: str, parent_resource_id: str, resource_id: str = None, response_models: Dict = None, response_parameters: Dict = None)[source]#
Creates a new API Gateway Method Response or modifies an existing one.
- Parameters:
name (str) – An idem name of the resource.
rest_api_id (str) – AWS rest_api id of the associated RestApi.
parent_resource_id (str) – The parent resource’s id.
http_method (str) – String that specifies the method request’s HTTP method type.
status_code (str) – The method response’s status code.
resource_id (str, Optional) – Defaults to None. Idem Resource id, formatted as: rest_api_id-parent_resource_id-http_method-status_code.
response_models (dict, Optional) –
- Specifies the Model resources used for the response’s content-type.
Response models are represented as a key/value map, with a content-type as the key and a Model name as the value.
response_parameters (dict, Optional) –
- A key-value map specifying required or optional response parameters
that API Gateway can send back to the caller. A key defines a method response header and the value specifies whether the associated method response header is required or not. The expression of the key must match the pattern method.response.header.{name} , where name is a valid and unique header name. API Gateway passes certain integration response data to the method response headers specified here according to the mapping you prescribe in the API’s IntegrationResponse. The integration response data that can be mapped include an integration response header expressed in integration.response.header.{name}, a static value enclosed within a pair of single quotes (e.g., ‘application/json’ ), or a JSON expression from the back-end response payload in the form of integration.response.body.{JSON-expression}, where JSON-expression is a valid JSON expression without the $ prefix.)
- Request Syntax:
- [idem_test_aws_apigateway_method_response]:
- aws.apigateway.method_response.present:
name: ‘string’
rest_api_id: ‘string’
parent_resource_id: ‘string’
http_method: ‘string’
status_code: ‘string’
- Returns:
Dict[str, Any]
- async idem_aws.states.aws.apigateway.method_response.absent(hub, ctx, name: str, resource_id: str = None) Dict[str, Any] [source]#
Deletes an API Gateway Method Response.
- Parameters:
- Returns:
Dict[str, Any]
Examples
- idem_test_aws_apigateway_method_response:
- aws.apigateway.method_response.absent:
name: value
resource_id: value
- async idem_aws.states.aws.apigateway.method_response.describe(hub, ctx) Dict[str, Dict[str, Any]] [source]#
Describe the API Gateway Method Responses associated with a specific Method.
Returns a list of apigateway.method_response descriptions
- Returns:
Dict[str, Any]
Examples
$ idem describe aws.apigateway.method_response