integration_response#
State module for managing Amazon API Gateway Integration Responses.
- async idem_aws.states.aws.apigateway.integration_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_templates: Dict = None, response_parameters: Dict = None, content_handling: str = None, selection_pattern: str = None)[source]#
Creates a new API Gateway Integration 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.
http_method (str) – String that specifies the method request’s HTTP method type.
status_code (str) – The method response’s status code.
parent_resource_id (str) – The parent resource’s id.
resource_id (str, Optional) – Defaults to None. Idem Resource id, formatted as: rest_api_id-parent_resource_id-http_method-status_code.
response_parameters (dict, Optional) –
- A key-value map specifying response parameters that are passed to the method response from the back end.
The key is a method response header parameter name and the mapped value is an integration response header value, a static value enclosed within a pair of single quotes, or a JSON expression from the integration response body. The mapping key must match the pattern of method.response.header.{name} , where name is a valid and unique header name. The mapped non-static value must match the pattern of integration.response.header.{name} or integration.response.body.{JSON-expression} , where name must be a valid and unique response header name and JSON-expression a valid JSON expression without the $ prefix. Must be of format {‘string’: ‘string’}.
response_templates (dict, Optional) – Specifies a put integration response’s templates. Must be of format {‘string’: ‘string’}.
content_handling (str, Optional) –
- Specifies how to handle response 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 response payload will be passed through from the integration response to the method response without modification.
selection_pattern (str, Optional) – Specifies the selection pattern of a put integration response.
- Returns:
dict[str, Any]
- Request Syntax:
[idem_test_aws_apigateway_integration_response]: aws.apigateway.integration_response.present: - name: 'string' - rest_api_id: 'string' - parent_resource_id: 'string' - http_method: 'string' - status_code: 'string' - response_parameters: dict - response_templates: dict - content_handling: 'string' - selection_pattern: 'string'
Examples
idem_test_apigateway_integration_response: aws.apigateway.integration_response.present: - name: 'idem_test_apigateway_integration_response' - rest_api_id: 'integration.get('rest_api_id')' - parent_resource_id: 'integration.get('parent_resource_id')' - http_method: 'GET' - status_code: '400'
- async idem_aws.states.aws.apigateway.integration_response.absent(hub, ctx, name: str, resource_id: str = None)[source]#
Deletes an API Gateway Integration Response.
- Parameters:
- Request Syntax:
[idem_test_aws_apigateway_integration_response]: aws.apigateway.integration_response.absent: - name: 'string' - resource_id: 'string'
- Returns:
dict[str, Any]
Examples
idem_test_aws_apigateway_integration_response: aws.apigateway.integration_response.absent: - name: 'idem_test_apigateway_integration_response' - resource_id: 'rest_api_id-parent_resource_id-http_method-status_code'
- async idem_aws.states.aws.apigateway.integration_response.describe(hub, ctx) Dict[str, Dict[str, Any]] [source]#
Describe the API Gateway Integration Responses associated with a specific Integration.
Returns a list of apigateway.integration_response descriptions
- Returns:
dict[str, dict[str, Any]]
Examples
$ idem describe aws.apigateway.integration_response