Skip to content

create_access_grants_instance

create_access_grants_instance(
    account_id: AccountId,
    *,
    config_overrides: Optional[S3ControlClientConfig] = None,
    identity_center_arn: Optional[IdentityCenterArn] = None,
    tags: Optional[TagList] = None,
) -> CreateAccessGrantsInstanceResult

Creates an S3 Access Grants instance, which serves as a logical grouping for access grants. You can create one S3 Access Grants instance per Region per account.

Permissions

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

Additional Permissions

To associate an IAM Identity Center instance with your S3 Access Grants instance, you must also have the sso:DescribeInstance, sso:CreateApplication, sso:PutApplicationGrant, and sso:PutApplicationAuthenticationMethod permissions.

Parameters:

  • account_id (AccountId) –

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

  • identity_center_arn (Optional[IdentityCenterArn], default: None ) –

    If you would like to associate your S3 Access Grants instance with an Amazon Web Services IAM Identity Center instance, use this field to pass 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.

  • tags (Optional[TagList], default: None ) –

    The Amazon Web Services resource tags that you are adding to the S3 Access Grants instance. Each tag is a label consisting of a user-defined key and value. Tags can help you manage, identify, organize, search for, and filter resources.

Raises:

Source code in docs_src/capo_s3_control/_services/s3_control.py
def create_access_grants_instance(
    self,
    account_id: "capo_s3_control.types.account_id.AccountId",
    *,
    config_overrides: Optional[S3ControlClientConfig] = None,
    identity_center_arn: Optional[
        "capo_s3_control.types.identity_center_arn.IdentityCenterArn"
    ] = None,
    tags: Optional["capo_s3_control.types.tag_list.TagList"] = None,
) -> "capo_s3_control.types.create_access_grants_instance_result.CreateAccessGrantsInstanceResult":
    """<p>Creates an S3 Access Grants instance, which serves as a logical grouping for access grants. You can create one S3 Access Grants instance per Region per account. </p> <dl> <dt>Permissions</dt> <dd> <p>You must have the <code>s3:CreateAccessGrantsInstance</code> permission to use this operation. </p> </dd> <dt>Additional Permissions</dt> <dd> <p>To associate an IAM Identity Center instance with your S3 Access Grants instance, you must also have the <code>sso:DescribeInstance</code>, <code>sso:CreateApplication</code>, <code>sso:PutApplicationGrant</code>, and <code>sso:PutApplicationAuthenticationMethod</code> permissions. </p> </dd> </dl>

    Args:
        account_id: <p>The Amazon Web Services account ID of the S3 Access Grants instance.</p>
        identity_center_arn: <p>If you would like to associate your S3 Access Grants instance with an Amazon Web Services IAM Identity Center instance, use this field to pass 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>
        tags: <p>The Amazon Web Services resource tags that you are adding to the S3 Access Grants instance. Each tag is a label consisting of a user-defined key and value. Tags can help you manage, identify, organize, search for, and filter resources. </p>

    Raises:
        capo_s3_control.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_s3_control.types.create_access_grants_instance_request.CreateAccessGrantsInstanceRequest]",
    ) -> OperationResponse[
        "capo_s3_control.types.create_access_grants_instance_result.CreateAccessGrantsInstanceResult"
    ]:
        import capo_s3_control._operations.awss3_control_service_v20180820.create_access_grants_instance

        output, http_response = (
            capo_s3_control._operations.awss3_control_service_v20180820.create_access_grants_instance.create_access_grants_instance(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateAccessGrantsInstance")
    )
    input_: capo_s3_control.types.create_access_grants_instance_request.CreateAccessGrantsInstanceRequest = {
        "account_id": account_id
    }
    if identity_center_arn is not None:
        input_["identity_center_arn"] = identity_center_arn
    if tags is not None:
        input_["tags"] = tags

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output