Skip to main content

methods

Creates, updates, deletes or gets a method resource or lists methods in a region

Overview

Namemethods
TypeResource
DescriptionThe AWS::ApiGateway::Method resource creates API Gateway methods that define the parameters and body that clients must send in their requests.
Idaws.apigateway.methods

Fields

NameDatatypeDescription
integrationobjectIntegration is a property of the [AWS::ApiGateway::Method](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-method.html) resource that specifies information about the target backend that a method calls.
operation_namestring
request_modelsobject
rest_api_idstring
authorization_scopesarray
request_validator_idstring
request_parametersobject
method_responsesarray
authorizer_idstring
resource_idstring
api_key_requiredboolean
authorization_typestringThe method's authorization type. This parameter is required. For valid values, see [Method](https://docs.aws.amazon.com/apigateway/latest/api/API_Method.html) in the *API Gateway API Reference*.
If you specify the AuthorizerId property, specify CUSTOM or COGNITO_USER_POOLS for this property.
http_methodstring
regionstringAWS region.

For more information, see AWS::ApiGateway::Method.

Methods

NameAccessible byRequired Params
create_resourceINSERTRestApiId, ResourceId, HttpMethod, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all properties from an individual method.

SELECT
region,
integration,
operation_name,
request_models,
rest_api_id,
authorization_scopes,
request_validator_id,
request_parameters,
method_responses,
authorizer_id,
resource_id,
api_key_required,
authorization_type,
http_method
FROM aws.apigateway.methods
WHERE region = 'us-east-1' AND data__Identifier = '<RestApiId>|<ResourceId>|<HttpMethod>';

INSERT example

Use the following StackQL query and manifest file to create a new method resource, using stack-deploy.

/*+ create */
INSERT INTO aws.apigateway.methods (
RestApiId,
ResourceId,
HttpMethod,
region
)
SELECT
'{{ RestApiId }}',
'{{ ResourceId }}',
'{{ HttpMethod }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.apigateway.methods
WHERE data__Identifier = '<RestApiId|ResourceId|HttpMethod>'
AND region = 'us-east-1';

Permissions

To operate on the methods resource, the following permissions are required:

Read

apigateway:GET

Create

apigateway:PUT,
apigateway:GET,
iam:PassRole

Update

apigateway:GET,
apigateway:DELETE,
apigateway:PUT,
iam:PassRole

Delete

apigateway:DELETE