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.
Idawscc.apigateway.methods

Fields

NameDatatypeDescription
integrationobject``Integration`` 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 &#91;Method&#93;(https://docs.aws.amazon.com/apigateway/latest/api/API&#95;Method.html) in the &#42;API Gateway API Reference&#42;.<br />If you specify the &#96;&#96;AuthorizerId&#96;&#96; property, specify &#96;&#96;CUSTOM&#96;&#96; or &#96;&#96;COGNITO&#95;USER&#95;POOLS&#96;&#96; 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 awscc.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 awscc.apigateway.methods (
RestApiId,
ResourceId,
HttpMethod,
region
)
SELECT
'{{ RestApiId }}',
'{{ ResourceId }}',
'{{ HttpMethod }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM awscc.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