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 | awscc.ec2.snapshot_block_public_accesses |
Fields
- get (all properties)
- list (identifiers only)
| 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. |
| Name | Datatype | Description |
|---|---|---|
account_id | string | The identifier for the specified AWS account. |
region | string | AWS region. |
For more information, see AWS::EC2::SnapshotBlockPublicAccess.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | snapshot_block_public_accesses | INSERT | State, region |
delete_resource | snapshot_block_public_accesses | DELETE | Identifier, region |
update_resource | snapshot_block_public_accesses | UPDATE | Identifier, PatchDocument, region |
list_resources | snapshot_block_public_accesses_list_only | SELECT | region |
get_resource | snapshot_block_public_accesses | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual snapshot_block_public_access.
SELECT
region,
state,
account_id
FROM awscc.ec2.snapshot_block_public_accesses
WHERE
region = 'us-east-1' AND
Identifier = '{{ account_id }}';
Lists all snapshot_block_public_accesses in a region.
SELECT
region,
account_id
FROM awscc.ec2.snapshot_block_public_accesses_list_only
WHERE
region = 'us-east-1';
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 awscc.ec2.snapshot_block_public_accesses (
State,
region
)
SELECT
'{{ state }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.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 }}'
UPDATE example
Use the following StackQL query and manifest file to update a snapshot_block_public_access resource, using stack-deploy.
/*+ update */
UPDATE awscc.ec2.snapshot_block_public_accesses
SET PatchDocument = string('{{ {
"State": state
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ account_id }}';
DELETE example
/*+ delete */
DELETE FROM awscc.ec2.snapshot_block_public_accesses
WHERE
Identifier = '{{ account_id }}' AND
region = 'us-east-1';
Permissions
To operate on the snapshot_block_public_accesses resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
ec2:EnableSnapshotBlockPublicAccess,
ec2:GetSnapshotBlockPublicAccessState
ec2:GetSnapshotBlockPublicAccessState
ec2:EnableSnapshotBlockPublicAccess,
ec2:GetSnapshotBlockPublicAccessState
ec2:DisableSnapshotBlockPublicAccess,
ec2:GetSnapshotBlockPublicAccessState
ec2:GetSnapshotBlockPublicAccessState