Retrieves the details of a particular location registered in your S3 Access Grants instance.
- Permissions
-
You must have the s3:GetAccessGrantsLocation permission to use this operation.
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 retrieving. 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.
Raises:
Source code in docs_src/capo_s3_control/_services/async_s3_control.py
| async def get_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",
*,
config_overrides: Optional[AsyncS3ControlClientConfig] = None,
) -> "capo_s3_control.types.get_access_grants_location_result.GetAccessGrantsLocationResult":
"""<p>Retrieves the details of a particular location registered in your S3 Access Grants instance. </p> <dl> <dt>Permissions</dt> <dd> <p>You must have the <code>s3:GetAccessGrantsLocation</code> permission to use this operation. </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 retrieving. 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>
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.get_access_grants_location_request.GetAccessGrantsLocationRequest]",
) -> AsyncOperationResponse[
"capo_s3_control.types.get_access_grants_location_result.GetAccessGrantsLocationResult"
]:
import capo_s3_control._operations.awss3_control_service_v20180820.get_access_grants_location
(
output,
http_response,
) = await capo_s3_control._operations.awss3_control_service_v20180820.get_access_grants_location.async_get_access_grants_location(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetAccessGrantsLocation")
)
input_: capo_s3_control.types.get_access_grants_location_request.GetAccessGrantsLocationRequest = {
"account_id": account_id,
"access_grants_location_id": access_grants_location_id,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|