Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EC2:enable_snapshot_block_public_access doesn't accept unblocked as argument option #3942

Closed
gabl-ch opened this issue Nov 22, 2023 · 2 comments
Assignees
Labels
documentation This is a problem with documentation. ec2 service-api This issue is caused by the service API, not the SDK implementation.

Comments

@gabl-ch
Copy link

gabl-ch commented Nov 22, 2023

Describe the issue

The doc describes the method as receiving a State argument with three possible values. Though the method actually accepts only two values 'block-all-sharing'|'block-new-sharing'

response = client.enable_snapshot_block_public_access(
    State='block-all-sharing'|'block-new-sharing'|'unblocked',
    DryRun=True|False
)

It should be

response = client.enable_snapshot_block_public_access(
    State='block-all-sharing'|'block-new-sharing',
    DryRun=True|False
)

Since unblocked is not supported, there is a dedicated method to disable the protection.

The error when using unblocked

[cloudshell-user@ip-XXXXXXXX ~]$ aws ec2 enable-snapshot-block-public-access --state unblocked

An error occurred (InvalidRequest) when calling the EnableSnapshotBlockPublicAccess operation: Value 'unblocked' for State is not valid. Valid values are 'block-all-sharing' and 'block-new-sharing'.

Links

The enable method
https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/enable-snapshot-block-public-access.html

The disable method
https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/disable-snapshot-block-public-access.html

@gabl-ch gabl-ch added documentation This is a problem with documentation. needs-triage This issue or PR still needs to be triaged. labels Nov 22, 2023
@tim-finnigan tim-finnigan self-assigned this Nov 24, 2023
@tim-finnigan
Copy link
Contributor

tim-finnigan commented Nov 24, 2023

Hi @gabl-ch thanks for reaching out. I can confirm the issue you described using the latest versions of Boto3/Botocore. It looks like support for EnableSnapshotBlockPublicAccess was just released in a recent version per the CHANGELOG.

Since the EnableSnapshotBlockPublicAccess API is modeled for use across SDKs, I created an issue for this in our cross-SDK repository: aws/aws-sdk#651. I escalated this issue to the EC2 team so this issue should be addressed soon. Please refer to that new issue I created for updates going forward. Thanks again for reporting this.

@tim-finnigan tim-finnigan added ec2 service-api This issue is caused by the service API, not the SDK implementation. and removed needs-triage This issue or PR still needs to be triaged. labels Nov 24, 2023
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation This is a problem with documentation. ec2 service-api This issue is caused by the service API, not the SDK implementation.
Projects
None yet
Development

No branches or pull requests

2 participants