Skip to main content

accounts

Creates, updates, deletes or gets an account resource or lists accounts in a region

Overview

Nameaccounts
TypeResource
DescriptionThe AWS::ApiGateway::Account resource specifies the IAM role that Amazon API Gateway uses to write API logs to Amazon CloudWatch Logs. To avoid overwriting other roles, you should only have one AWS::ApiGateway::Account resource per region per account.
Idaws.apigateway.accounts

Fields

NameDatatypeDescription
idstring
cloud_watch_role_arnstringThe ARN of an Amazon CloudWatch role for the current Account.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTregion
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all properties from an individual account.

SELECT
region,
id,
cloud_watch_role_arn
FROM aws.apigateway.accounts
WHERE region = 'us-east-1' AND data__Identifier = '<Id>';

INSERT example

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

/*+ create */
INSERT INTO aws.apigateway.accounts (
CloudWatchRoleArn,
region
)
SELECT
'{{ CloudWatchRoleArn }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.apigateway.accounts
WHERE data__Identifier = '<Id>'
AND region = 'us-east-1';

Permissions

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

Read

apigateway:GET

Create

apigateway:PATCH,
iam:GetRole,
iam:PassRole

Update

apigateway:PATCH,
iam:GetRole,
iam:PassRole

Delete

apigateway:PATCH