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

*****************************
update_access_grants_location
*****************************



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

  

  Updates the IAM role of a registered location in your S3 Access Grants instance.

    Permissions  

  You must have the ``s3:UpdateAccessGrantsLocation`` permission to use this operation.

    Additional Permissions  

  You must also have the following permission: ``iam:PassRole``

  

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


  **Request Syntax**
  ::

    response = client.update_access_grants_location(
        AccountId='string',
        AccessGrantsLocationId='string',
        IAMRoleArn='string'
    )
    
  :type AccountId: string
  :param AccountId: **[REQUIRED]** 

    The Amazon Web Services account ID of the S3 Access Grants instance.

    

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

    The ID of the registered location that you are updating. S3 Access Grants assigns this ID when you register the location. S3 Access Grants assigns the ID ``default`` to the default location ``s3://`` and assigns an auto-generated ID to other locations that you register.

     

    The ID of the registered location to which you are granting access. S3 Access Grants assigned this ID when you registered the location. S3 Access Grants assigns the ID ``default`` to the default location ``s3://`` and assigns an auto-generated ID to other locations that you register.

     

    If you are passing the ``default`` location, you cannot create an access grant for the entire default location. You must also specify a bucket or a bucket and prefix in the ``Subprefix`` field.

    

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

    The Amazon Resource Name (ARN) of the IAM role for the registered location. S3 Access Grants assumes this role to manage access to the registered location.

    

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

    
    ::

      {
          'CreatedAt': datetime(2015, 1, 1),
          'AccessGrantsLocationId': 'string',
          'AccessGrantsLocationArn': 'string',
          'LocationScope': 'string',
          'IAMRoleArn': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **CreatedAt** *(datetime) --* 

        The date and time when you registered the location.

        
      

      - **AccessGrantsLocationId** *(string) --* 

        The ID of the registered location to which you are granting access. S3 Access Grants assigned this ID when you registered the location. S3 Access Grants assigns the ID ``default`` to the default location ``s3://`` and assigns an auto-generated ID to other locations that you register.

        
      

      - **AccessGrantsLocationArn** *(string) --* 

        The Amazon Resource Name (ARN) of the registered location that you are updating.

        
      

      - **LocationScope** *(string) --* 

        The S3 URI path of the location that you are updating. You cannot update the scope of the registered location. The location scope can be the default S3 location ``s3://``, the S3 path to a bucket ``s3://<bucket>``, or the S3 path to a bucket and prefix ``s3://<bucket>/<prefix>``.

        
      

      - **IAMRoleArn** *(string) --* 

        The Amazon Resource Name (ARN) of the IAM role of the registered location. S3 Access Grants assumes this role to manage access to the registered location.

        
  