:doc:`EC2 <../../ec2>` / Client / get_image_block_public_access_state

***********************************
get_image_block_public_access_state
***********************************



.. py:method:: 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 <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-public-access-to-amis.html>`__ in the *Amazon EC2 User Guide*.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetImageBlockPublicAccessState>`_  


  **Request Syntax**
  ::

    response = client.get_image_block_public_access_state(
        DryRun=True|False
    )
    
  :type DryRun: boolean
  :param DryRun: 

    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 is ``UnauthorizedOperation``.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'ImageBlockPublicAccessState': 'string',
          'ManagedBy': 'account'|'declarative-policy'
      }
      
    **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.
        

        
      

      - **ManagedBy** *(string) --* 

        The entity that manages the state for block public access for AMIs. Possible values include:

         

        
        * ``account`` - The state is managed by the account.
         
        * ``declarative-policy`` - The state is managed by a declarative policy and can't be modified by the account.
        

        
  