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
Parameters:
-
account_id
(AccountId)
–
The Amazon Web Services account ID of the S3 Access Grants instance.
-
access_grants_location_id
(AccessGrantsLocationId)
–
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.
-
iam_role_arn
(IAMRoleArn)
–
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.
Raises:
Source code in docs_src/capo_s3_control/_services/async_s3_control.py
| async def update_access_grants_location(
self,
account_id: "capo_s3_control.types.account_id.AccountId",
access_grants_location_id: "capo_s3_control.types.access_grants_location_id.AccessGrantsLocationId",
iam_role_arn: "capo_s3_control.types.iam_role_arn.IAMRoleArn",
*,
config_overrides: Optional[AsyncS3ControlClientConfig] = None,
) -> "capo_s3_control.types.update_access_grants_location_result.UpdateAccessGrantsLocationResult":
"""<p>Updates the IAM role of a registered location in your S3 Access Grants instance.</p> <dl> <dt>Permissions</dt> <dd> <p>You must have the <code>s3:UpdateAccessGrantsLocation</code> permission to use this operation. </p> </dd> <dt>Additional Permissions</dt> <dd> <p>You must also have the following permission: <code>iam:PassRole</code> </p> </dd> </dl>
Args:
account_id: <p>The Amazon Web Services account ID of the S3 Access Grants instance.</p>
access_grants_location_id: <p>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 <code>default</code> to the default location <code>s3://</code> and assigns an auto-generated ID to other locations that you register. </p> <p>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 <code>default</code> to the default location <code>s3://</code> and assigns an auto-generated ID to other locations that you register. </p> <p>If you are passing the <code>default</code> 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 <code>Subprefix</code> field. </p>
iam_role_arn: <p>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. </p>
Raises:
capo_s3_control.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_s3_control.types.update_access_grants_location_request.UpdateAccessGrantsLocationRequest]",
) -> AsyncOperationResponse[
"capo_s3_control.types.update_access_grants_location_result.UpdateAccessGrantsLocationResult"
]:
import capo_s3_control._operations.awss3_control_service_v20180820.update_access_grants_location
(
output,
http_response,
) = await capo_s3_control._operations.awss3_control_service_v20180820.update_access_grants_location.async_update_access_grants_location(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateAccessGrantsLocation")
)
input_: capo_s3_control.types.update_access_grants_location_request.UpdateAccessGrantsLocationRequest = {
"account_id": account_id,
"access_grants_location_id": access_grants_location_id,
"iam_role_arn": iam_role_arn,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|