:doc:`S3Control <../../s3control>` / Client / get_access_grants_instance_for_prefix

*************************************
get_access_grants_instance_for_prefix
*************************************



.. py:method:: S3Control.Client.get_access_grants_instance_for_prefix(**kwargs)

  

  Retrieve the S3 Access Grants instance that contains a particular prefix.

    Permissions  

  You must have the ``s3:GetAccessGrantsInstanceForPrefix`` permission for the caller account to use this operation.

    Additional Permissions  

  The prefix owner account must grant you the following permissions to their S3 Access Grants instance: ``s3:GetAccessGrantsInstanceForPrefix``.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/s3control-2018-08-20/GetAccessGrantsInstanceForPrefix>`_  


  **Request Syntax**
  ::

    response = client.get_access_grants_instance_for_prefix(
        AccountId='string',
        S3Prefix='string'
    )
    
  :type AccountId: string
  :param AccountId: **[REQUIRED]** 

    The ID of the Amazon Web Services account that is making this request.

    

  
  :type S3Prefix: string
  :param S3Prefix: **[REQUIRED]** 

    The S3 prefix of the access grants that you would like to retrieve.

    

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

    
    ::

      {
          'AccessGrantsInstanceArn': 'string',
          'AccessGrantsInstanceId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **AccessGrantsInstanceArn** *(string) --* 

        The Amazon Resource Name (ARN) of the S3 Access Grants instance.

        
      

      - **AccessGrantsInstanceId** *(string) --* 

        The ID of the S3 Access Grants instance. The ID is ``default``. You can have one S3 Access Grants instance per Region per account.

        
  