EC2 / Client / get_image_block_public_access_state
get_image_block_public_access_state#
- EC2.Client.get_image_block_public_access_state(**kwargs)#
Gets the current state of block public access for AMIs at the account level in the specified Amazon Web Services Region.
For more information, see Block public access to your AMIs in the Amazon EC2 User Guide.
See also: AWS API Documentation
Request Syntax
response = client.get_image_block_public_access_state( DryRun=True|False )
- Parameters:
DryRun (boolean) – Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
.- Return type:
dict
- Returns:
Response Syntax
{ 'ImageBlockPublicAccessState': 'string' }
Response Structure
(dict) –
ImageBlockPublicAccessState (string) –
The current state of block public access for AMIs at the account level in the specified Amazon Web Services Region.
Possible values:
block-new-sharing
- Any attempt to publicly share your AMIs in the specified Region is blocked.unblocked
- Your AMIs in the specified Region can be publicly shared.