AuroraDSQL / Client / create_cluster

create_cluster

AuroraDSQL.Client.create_cluster(**kwargs)

The CreateCluster API allows you to create both single-region clusters and multi-Region clusters. With the addition of the multiRegionProperties parameter, you can create a cluster with witness Region support and establish peer relationships with clusters in other Regions during creation.

Note

Creating multi-Region clusters requires additional IAM permissions beyond those needed for single-Region clusters, as detailed in the Required permissions section below.

Required permissions

dsql:CreateCluster

Required to create a cluster.

Resources: arn:aws:dsql:region:account-id:cluster/*

dsql:TagResource

Permission to add tags to a resource.

Resources: arn:aws:dsql:region:account-id:cluster/*

dsql:PutMultiRegionProperties

Permission to configure multi-region properties for a cluster.

Resources: arn:aws:dsql:region:account-id:cluster/*

dsql:AddPeerCluster

When specifying multiRegionProperties.clusters, permission to add peer clusters.

Resources:

  • Local cluster: arn:aws:dsql:region:account-id:cluster/*

  • Each peer cluster: exact ARN of each specified peer cluster

    dsql:PutWitnessRegion

When specifying multiRegionProperties.witnessRegion, permission to set a witness Region. This permission is checked both in the cluster Region and in the witness Region.

Resources: arn:aws:dsql:region:account-id:cluster/*

Condition Keys: dsql:WitnessRegion (matching the specified witness region)

Warning

  • The witness Region specified in multiRegionProperties.witnessRegion cannot be the same as the cluster’s Region.

See also: AWS API Documentation

Request Syntax

response = client.create_cluster(
    deletionProtectionEnabled=True|False,
    tags={
        'string': 'string'
    },
    clientToken='string',
    multiRegionProperties={
        'witnessRegion': 'string',
        'clusters': [
            'string',
        ]
    }
)
Parameters:
  • deletionProtectionEnabled (boolean) – If enabled, you can’t delete your cluster. You must first disable this property before you can delete your cluster.

  • tags (dict) –

    A map of key and value pairs to use to tag your cluster.

    • (string) –

      Unique tag key, maximum 128 Unicode characters in UTF-8.

      • (string) –

        Tag value, maximum 256 Unicode characters in UTF-8.

  • clientToken (string) –

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, the subsequent retries with the same client token return the result from the original successful request and they have no additional effect.

    If you don’t specify a client token, the Amazon Web Services SDK automatically generates one.

    This field is autopopulated if not provided.

  • multiRegionProperties (dict) –

    The configuration settings when creating a multi-Region cluster, including the witness region and linked cluster properties.

    • witnessRegion (string) –

      The that serves as the witness region for a multi-Region cluster. The witness region helps maintain cluster consistency and quorum.

    • clusters (list) –

      The set of linked clusters that form the multi-Region cluster configuration. Each linked cluster represents a database instance in a different Region.

      • (string) –

        The Amazon Resource Name of the cluster.

Return type:

dict

Returns:

Response Syntax

{
    'identifier': 'string',
    'arn': 'string',
    'status': 'CREATING'|'ACTIVE'|'IDLE'|'INACTIVE'|'UPDATING'|'DELETING'|'DELETED'|'FAILED'|'PENDING_SETUP'|'PENDING_DELETE',
    'creationTime': datetime(2015, 1, 1),
    'multiRegionProperties': {
        'witnessRegion': 'string',
        'clusters': [
            'string',
        ]
    },
    'deletionProtectionEnabled': True|False
}

Response Structure

  • (dict) –

    The output of a created cluster.

    • identifier (string) –

      The ID of the created cluster.

    • arn (string) –

      The ARN of the created cluster.

    • status (string) –

      The status of the created cluster.

    • creationTime (datetime) –

      The time of when created the cluster.

    • multiRegionProperties (dict) –

      The multi-Region cluster configuration details that were set during cluster creation

      • witnessRegion (string) –

        The that serves as the witness region for a multi-Region cluster. The witness region helps maintain cluster consistency and quorum.

      • clusters (list) –

        The set of linked clusters that form the multi-Region cluster configuration. Each linked cluster represents a database instance in a different Region.

        • (string) –

          The Amazon Resource Name of the cluster.

    • deletionProtectionEnabled (boolean) –

      Whether deletion protection is enabled on this cluster.

Exceptions