snapshot_block_public_accesses
Creates, updates, deletes or gets a snapshot_block_public_access
resource or lists snapshot_block_public_accesses
in a region
Overview
Name | snapshot_block_public_accesses |
Type | Resource |
Description | Resource Type definition for AWS::EC2::SnapshotBlockPublicAccess |
Id | aws.ec2.snapshot_block_public_accesses |
Fields
Name | Datatype | Description |
---|---|---|
state | string | The state of EBS Snapshot Block Public Access. |
account_id | string | The identifier for the specified AWS account. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | State, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all snapshot_block_public_accesses
in a region.
SELECT
region,
state,
account_id
FROM aws.ec2.snapshot_block_public_accesses
WHERE region = 'us-east-1';
Gets all properties from an individual snapshot_block_public_access
.
SELECT
region,
state,
account_id
FROM aws.ec2.snapshot_block_public_accesses
WHERE region = 'us-east-1' AND data__Identifier = '<AccountId>';
INSERT
example
Use the following StackQL query and manifest file to create a new snapshot_block_public_access
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.ec2.snapshot_block_public_accesses (
State,
region
)
SELECT
'{{ State }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.ec2.snapshot_block_public_accesses (
State,
region
)
SELECT
'{{ State }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: snapshot_block_public_access
props:
- name: State
value: '{{ State }}'
DELETE
example
/*+ delete */
DELETE FROM aws.ec2.snapshot_block_public_accesses
WHERE data__Identifier = '<AccountId>'
AND region = 'us-east-1';
Permissions
To operate on the snapshot_block_public_accesses
resource, the following permissions are required:
Create
ec2:EnableSnapshotBlockPublicAccess,
ec2:GetSnapshotBlockPublicAccessState
Read
ec2:GetSnapshotBlockPublicAccessState
Update
ec2:EnableSnapshotBlockPublicAccess,
ec2:GetSnapshotBlockPublicAccessState
Delete
ec2:DisableSnapshotBlockPublicAccess,
ec2:GetSnapshotBlockPublicAccessState
List
ec2:GetSnapshotBlockPublicAccessState