accounts
Creates, updates, deletes or gets an account
resource or lists accounts
in a region
Overview
Name | accounts |
Type | Resource |
Description | The 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. |
Id | aws.apigateway.accounts |
Fields
Name | Datatype | Description |
---|---|---|
id | string | |
cloud_watch_role_arn | string | The ARN of an Amazon CloudWatch role for the current Account. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.apigateway.accounts (
CloudWatchRoleArn,
region
)
SELECT
'{{ CloudWatchRoleArn }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.apigateway.accounts (
CloudWatchRoleArn,
region
)
SELECT
'{{ CloudWatchRoleArn }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: account
props:
- name: CloudWatchRoleArn
value: '{{ CloudWatchRoleArn }}'
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