Skip to main content

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

Namesnapshot_block_public_accesses
TypeResource
DescriptionResource Type definition for AWS::EC2::SnapshotBlockPublicAccess
Idaws.ec2.snapshot_block_public_accesses

Fields

NameDatatypeDescription
statestringThe state of EBS Snapshot Block Public Access.
account_idstringThe identifier for the specified AWS account.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTState, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__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.

/*+ create */
INSERT INTO aws.ec2.snapshot_block_public_accesses (
State,
region
)
SELECT
'{{ State }}',
'{{ region }}';

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