rest_api#
State module for managing Amazon API Rest APIs.
- async idem_aws.states.aws.apigateway.rest_api.present(hub, ctx, name: str, resource_id: str = None, description: str = None, version: str = None, binary_media_types: List[str] = None, minimum_compression_size: int = None, api_key_source: str = None, endpoint_configuration: EndpointConfiguration = None, policy: str = None, disable_execute_api_endpoint: bool = None, tags: Dict[str, Any] = None) Dict[str, Any] [source]#
Autogenerated function
Creates a new rest_api resource or modifies an existing one.
- Parameters:
name (str) – An idem name of the resource.
resource_id (str, Optional) – AWS rest_api id. Defaults to None.
description (str, Optional) – The description of the RestApi.
version (str, Optional) – A version identifier for the API.
binary_media_types (list[str], Optional) – The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads.
minimum_compression_size (int, Optional) – A nullable integer that is used to enable compression (with non-negative between 0 and 10485760 (10M) bytes, inclusive) or disable compression (with a null value) on an API. When compression is enabled, compression or decompression is not applied on the payload if the payload size is smaller than this value. Setting it to zero allows compression for any payload size.
api_key_source (str, Optional) – The source of the API key for metering requests according to a usage plan.
endpoint_configuration (dict[str, Any], Optional) –
The endpoint configuration of this RestApi showing the endpoint types of the API. Defaults to None.
- types (list[str], Optional):
A list of endpoint types of an API (RestApi) or its custom domain name (DomainName). For an edge-optimized API and its custom domain name, the endpoint type is “EDGE”. For a regional API and its custom domain name, the endpoint type is REGIONAL. For a private API, the endpoint type is PRIVATE.
- vpcEndpointIds (list[str], Optional):
A list of VpcEndpointIds of an API (RestApi) against which to create Route53 ALIASes. It is only supported for PRIVATE endpoint type.
policy (str, Optional) – A stringified JSON policy document that applies to this RestApi regardless of the caller and Method configuration.
tags (dict, Optional) – The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not start with aws:. The tag value can be up to 256 characters. Defaults to None.
disable_execute_api_endpoint (bool, Optional) – Specifies whether clients can invoke your API by using the default execute-api endpoint. By default, clients can invoke your API with the default https://{api_id}.execute-api.{region}.amazonaws.com endpoint. To require that clients use a custom domain name to invoke your API, disable the default endpoint.
- Returns:
dict[str, Any]
Examples
idem_test_aws_apigateway_rest_api: aws.apigateway.rest_api.present: - name: test_rest_api - endpoint_configuration: types: - PRIVATE
[idem_test_aws_apigateway_rest_api]: aws.apigateway.rest_api.present: - name: 'string' - resource_id: 'string' - api_key_source: 'string' - binary_media_types: - 'string' - endpoint_configuration: types: - REGIONAL | EDGE | PRIVATE vpcEndpointIds: - 'string' - tags: 'string': 'string' - disable_execute_api_endpoint: True | False - minimum_compression_size: int(0 to 10485760) - policy: 'string'
- async idem_aws.states.aws.apigateway.rest_api.absent(hub, ctx, name: str, resource_id: str = None) Dict[str, Any] [source]#
Autogenerated function
Deletes the specified rest_api resource.
- Parameters:
- Returns:
dict[str, Any]
Examples
resource_is_absent: aws.apigateway.rest_api.absent: - name: value - resource_id: value
- async idem_aws.states.aws.apigateway.rest_api.describe(hub, ctx) Dict[str, Dict[str, Any]] [source]#
Autogenerated function
Describe the resource in a way that can be recreated/managed with the corresponding “present” function
Returns a list of apigateway.rest_api descriptions
- Returns:
dict[str, Any]
Examples
$ idem describe aws.apigateway.rest_api