Skip to content

create_global_cluster async

create_global_cluster(
    *,
    config_overrides: Optional[AsyncNeptuneClientConfig] = None,
    global_cluster_identifier: Optional[GlobalClusterIdentifier] = None,
    source_db_cluster_identifier: Optional[String] = None,
    engine: Optional[String] = None,
    engine_version: Optional[String] = None,
    deletion_protection: Optional[BooleanOptional] = None,
    database_name: Optional[String] = None,
    tags: Optional[TagList] = None,
    storage_encrypted: Optional[BooleanOptional] = None,
) -> CreateGlobalClusterResult

Creates a Neptune global database spread across multiple Amazon Regions. The global database contains a single primary cluster with read-write capability, and read-only secondary clusters that receive data from the primary cluster through high-speed replication performed by the Neptune storage subsystem.

You can create a global database that is initially empty, and then add a primary cluster and secondary clusters to it, or you can specify an existing Neptune cluster during the create operation to become the primary cluster of the global database.

Parameters:

  • global_cluster_identifier (Optional[GlobalClusterIdentifier], default: None ) –

    The cluster identifier of the new global database cluster.

  • source_db_cluster_identifier (Optional[String], default: None ) –

    (Optional) The Amazon Resource Name (ARN) of an existing Neptune DB cluster to use as the primary cluster of the new global database.

  • engine (Optional[String], default: None ) –

    The name of the database engine to be used in the global database.

    Valid values: neptune

  • engine_version (Optional[String], default: None ) –

    The Neptune engine version to be used by the global database.

    Valid values: 1.2.0.0 or above.

  • deletion_protection (Optional[BooleanOptional], default: None ) –

    The deletion protection setting for the new global database. The global database can't be deleted when deletion protection is enabled.

  • database_name (Optional[String], default: None ) –

    The name for the new global database (up to 64 alpha-numeric characters).

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

    Tags to assign to the global cluster.

  • storage_encrypted (Optional[BooleanOptional], default: None ) –

    The storage encryption setting for the new global database cluster.

Raises:

Source code in docs_src/capo_neptune/_services/async_neptune.py
async def create_global_cluster(
    self,
    *,
    config_overrides: Optional[AsyncNeptuneClientConfig] = None,
    global_cluster_identifier: Optional[
        "capo_neptune.types.global_cluster_identifier.GlobalClusterIdentifier"
    ] = None,
    source_db_cluster_identifier: Optional[
        "capo_neptune.types.string.String"
    ] = None,
    engine: Optional["capo_neptune.types.string.String"] = None,
    engine_version: Optional["capo_neptune.types.string.String"] = None,
    deletion_protection: Optional[
        "capo_neptune.types.boolean_optional.BooleanOptional"
    ] = None,
    database_name: Optional["capo_neptune.types.string.String"] = None,
    tags: Optional["capo_neptune.types.tag_list.TagList"] = None,
    storage_encrypted: Optional[
        "capo_neptune.types.boolean_optional.BooleanOptional"
    ] = None,
) -> "capo_neptune.types.create_global_cluster_result.CreateGlobalClusterResult":
    """<p>Creates a Neptune global database spread across multiple Amazon Regions. The global database contains a single primary cluster with read-write capability, and read-only secondary clusters that receive data from the primary cluster through high-speed replication performed by the Neptune storage subsystem.</p> <p>You can create a global database that is initially empty, and then add a primary cluster and secondary clusters to it, or you can specify an existing Neptune cluster during the create operation to become the primary cluster of the global database.</p>

    Args:
        global_cluster_identifier: <p>The cluster identifier of the new global database cluster.</p>
        source_db_cluster_identifier: <p>(<i>Optional</i>) The Amazon Resource Name (ARN) of an existing Neptune DB cluster to use as the primary cluster of the new global database.</p>
        engine: <p>The name of the database engine to be used in the global database.</p> <p>Valid values: <code>neptune</code> </p>
        engine_version: <p>The Neptune engine version to be used by the global database.</p> <p>Valid values: <code>1.2.0.0</code> or above.</p>
        deletion_protection: <p>The deletion protection setting for the new global database. The global database can't be deleted when deletion protection is enabled.</p>
        database_name: <p>The name for the new global database (up to 64 alpha-numeric characters).</p>
        tags: <p>Tags to assign to the global cluster.</p>
        storage_encrypted: <p>The storage encryption setting for the new global database cluster.</p>

    Raises:
        capo_neptune.errors.db_cluster_not_found_fault.DBClusterNotFoundFault: <p> <i>DBClusterIdentifier</i> does not refer to an existing DB cluster.</p>
        capo_neptune.errors.global_cluster_already_exists_fault.GlobalClusterAlreadyExistsFault: <p>The <code>GlobalClusterIdentifier</code> already exists. Choose a new global database identifier (unique name) to create a new global database cluster.</p>
        capo_neptune.errors.global_cluster_quota_exceeded_fault.GlobalClusterQuotaExceededFault: <p>The number of global database clusters for this account is already at the maximum allowed.</p>
        capo_neptune.errors.invalid_db_cluster_state_fault.InvalidDBClusterStateFault: <p>The DB cluster is not in a valid state.</p>
        capo_neptune.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_neptune.types.create_global_cluster_message.CreateGlobalClusterMessage]",
    ) -> AsyncOperationResponse[
        "capo_neptune.types.create_global_cluster_result.CreateGlobalClusterResult"
    ]:
        import capo_neptune._operations.amazon_rd_sv19.create_global_cluster

        (
            output,
            http_response,
        ) = await capo_neptune._operations.amazon_rd_sv19.create_global_cluster.async_create_global_cluster(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateGlobalCluster")
    )
    input_: capo_neptune.types.create_global_cluster_message.CreateGlobalClusterMessage = {}
    if global_cluster_identifier is not None:
        input_["global_cluster_identifier"] = global_cluster_identifier
    if source_db_cluster_identifier is not None:
        input_["source_db_cluster_identifier"] = source_db_cluster_identifier
    if engine is not None:
        input_["engine"] = engine
    if engine_version is not None:
        input_["engine_version"] = engine_version
    if deletion_protection is not None:
        input_["deletion_protection"] = deletion_protection
    if database_name is not None:
        input_["database_name"] = database_name
    if tags is not None:
        input_["tags"] = tags
    if storage_encrypted is not None:
        input_["storage_encrypted"] = storage_encrypted

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