Skip to content

associate_access_grants_identity_center async

associate_access_grants_identity_center(
    account_id: AccountId,
    identity_center_arn: IdentityCenterArn,
    *,
    config_overrides: Optional[AsyncS3ControlClientConfig] = None,
) -> None

Associate your S3 Access Grants instance with an Amazon Web Services IAM Identity Center instance. Use this action if you want to create access grants for users or groups from your corporate identity directory. First, you must add your corporate identity directory to Amazon Web Services IAM Identity Center. Then, you can associate this IAM Identity Center instance with your S3 Access Grants instance.

Permissions

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

Additional Permissions

You must also have the following permissions: sso:CreateApplication, sso:PutApplicationGrant, and sso:PutApplicationAuthenticationMethod.

Parameters:

  • account_id (AccountId) –

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

  • identity_center_arn (IdentityCenterArn) –

    The Amazon Resource Name (ARN) of the Amazon Web Services IAM Identity Center instance that you are associating with your S3 Access Grants instance. An IAM Identity Center instance is your corporate identity directory that you added to the IAM Identity Center. You can use the ListInstances API operation to retrieve a list of your Identity Center instances and their ARNs.

Raises:

Source code in docs_src/capo_s3_control/_services/async_s3_control.py
async def associate_access_grants_identity_center(
    self,
    account_id: "capo_s3_control.types.account_id.AccountId",
    identity_center_arn: "capo_s3_control.types.identity_center_arn.IdentityCenterArn",
    *,
    config_overrides: Optional[AsyncS3ControlClientConfig] = None,
) -> None:
    """<p>Associate your S3 Access Grants instance with an Amazon Web Services IAM Identity Center instance. Use this action if you want to create access grants for users or groups from your corporate identity directory. First, you must add your corporate identity directory to Amazon Web Services IAM Identity Center. Then, you can associate this IAM Identity Center instance with your S3 Access Grants instance.</p> <dl> <dt>Permissions</dt> <dd> <p>You must have the <code>s3:AssociateAccessGrantsIdentityCenter</code> permission to use this operation. </p> </dd> <dt>Additional Permissions</dt> <dd> <p>You must also have the following permissions: <code>sso:CreateApplication</code>, <code>sso:PutApplicationGrant</code>, and <code>sso:PutApplicationAuthenticationMethod</code>. </p> </dd> </dl>

    Args:
        account_id: <p>The Amazon Web Services account ID of the S3 Access Grants instance.</p>
        identity_center_arn: <p>The Amazon Resource Name (ARN) of the Amazon Web Services IAM Identity Center instance that you are associating with your S3 Access Grants instance. An IAM Identity Center instance is your corporate identity directory that you added to the IAM Identity Center. You can use the <a href="https://docs.aws.amazon.com/singlesignon/latest/APIReference/API_ListInstances.html">ListInstances</a> API operation to retrieve a list of your Identity Center instances and their ARNs.</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.associate_access_grants_identity_center_request.AssociateAccessGrantsIdentityCenterRequest]",
    ) -> AsyncOperationResponse[None]:
        import capo_s3_control._operations.awss3_control_service_v20180820.associate_access_grants_identity_center

        (
            output,
            http_response,
        ) = await capo_s3_control._operations.awss3_control_service_v20180820.associate_access_grants_identity_center.async_associate_access_grants_identity_center(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("AssociateAccessGrantsIdentityCenter")
    )
    input_: capo_s3_control.types.associate_access_grants_identity_center_request.AssociateAccessGrantsIdentityCenterRequest = {
        "account_id": account_id,
        "identity_center_arn": identity_center_arn,
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output