State module for managing Amazon API Gateway Methods.

async, ctx, name: str, rest_api_id: str, http_method: str, parent_resource_id: str, resource_id: str = None, api_key_required: bool = False, authorization_type: str = None, request_parameters: dict = None) Dict[str, Any][source]#

Creates an API Gateway Method resource.

Parameters not yet supported by Idem:

  • authorization_scopes(list, Optional): A list of authorization scopes configured on the method. The scopes are used with a COGNITO_USER_POOLS authorizer to authorize the method invocation. The authorization works by matching the method scopes against the scopes parsed from the access token in the incoming request. The method invocation is authorized if any method scopes matches a claimed scope in the access token. Otherwise, the invocation is not authorized. When the method scope is configured, the client must provide an access token instead of an identity token for authorization purposes.

  • authorizer_id(str, Optional): The identifier of an Authorizer to use on this method. The authorizationType must be CUSTOM .

  • operation_name(str, Optional): A human-friendly operation identifier for the method.

  • request_parameters(dict, Optional): A key-value map defining required or optional method request parameters that can be accepted by API Gateway. A key is a method request parameter name matching the pattern of method.request.{location}.{name} , where location is querystring , path , or header and name is a valid and unique parameter name. The value associated with the key is a Boolean flag indicating whether the parameter is required (true ) or optional (false ). The method request parameter names defined here are available in Integration to be mapped to integration request parameters or templates.

  • request_models(dict, Optional): A key-value map specifying data schemas, represented by Model resources, (as the mapped value) of the request payloads of given content types (as the mapping key).

  • request_validator_id(str, Optional): The identifier of a RequestValidator for request validation.

  • name (str) – Idem name of the resource.

  • rest_api_id (str) – The string identifier of the associated Rest API.

  • http_method (str) – String that specifies the method request’s HTTP method type.

  • parent_resource_id (str) – AWS Parent Resource ID.

  • authorization_type (str, Optional) – The method’s authorization type. Valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, CUSTOM for using a custom authorizer, or COGNITO_USER_POOLS for using a Cognito user pool. Necessary for creation but not for updating.

  • resource_id (str, Optional) – Idem Resource ID that is generated once the resource is created.

  • api_key_required (bool, Optional) – A boolean flag specifying whether a valid ApiKey is required to invoke this method.


dict[str, Any]


    - name: test_method
    - rest_api_id: ${aws.apigateway.rest_api:idem_test_aws_apigateway_rest_api:resource_id}
    - parent_resource_id: ${aws.apigateway.rest_api:idem_test_aws_apigateway_rest_api:root_resource_id}
    - http_method: GET

    - name: test_rest_api

Note that either idem_test_aws_apigateway_rest_api or test_rest_api can be used in the reference; ${aws.apigateway.rest_api:idem_test_aws_apigateway_rest_api:resource_id} would work above.

    - name: 'string'
    - rest_api_id: 'string'
    - parent_resource_id: 'string'
    - http_method: 'string'
    - authorization_type: 'string'
async, ctx, name: str, rest_api_id: str = None, http_method: str = None, parent_resource_id: str = None, resource_id: str = None) Dict[str, Any][source]#

Deletes an API Gateway Method resource

  • name (str, Optional) – An Idem name of the resource.

  • parent_resource_id (str, Optional) – AWS Parent Resource ID.

  • rest_api_id (str, Optional) – The string identifier of the associated RestApi.

  • http_method (str, Optional) – The HTTP verb of the Method resource.

  • resource_id (str, Optional) – The resource identifier for the Method resource. Idem automatically considers this resource being absent if this field is not specified.


Dict[str, Any]


    - name: value
    - parent_resource_id: value
    - rest_api_id: value
    - resource_id: value
    - http_method: value
async, ctx) Dict[str, Dict[str, Any]][source]#

Describe the API Gateway Methods associated with a specific Rest API.

Returns a list of apigateway.method descriptions


Dict[str, Any]


$ idem describe aws.apigateway.method