Skip to content

modify_global_cluster

modify_global_cluster(
    *,
    config_overrides: Optional[NeptuneClientConfig] = None,
    global_cluster_identifier: Optional[GlobalClusterIdentifier] = None,
    new_global_cluster_identifier: Optional[GlobalClusterIdentifier] = None,
    deletion_protection: Optional[BooleanOptional] = None,
    engine_version: Optional[String] = None,
    allow_major_version_upgrade: Optional[BooleanOptional] = None,
) -> ModifyGlobalClusterResult

Modify a setting for an Amazon Neptune global cluster. You can change one or more database configuration parameters by specifying these parameters and their new values in the request.

Parameters:

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

    The DB cluster identifier for the global cluster being modified. This parameter is not case-sensitive.

    Constraints: Must match the identifier of an existing global database cluster.

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

    A new cluster identifier to assign to the global database. This value is stored as a lowercase string.

    Constraints:

    • Must contain from 1 to 63 letters, numbers, or hyphens.

    • The first character must be a letter.

    • Can't end with a hyphen or contain two consecutive hyphens

    Example: my-cluster2

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

    Indicates whether the global database has deletion protection enabled. The global database cannot be deleted when deletion protection is enabled.

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

    The version number of the database engine to which you want to upgrade. Changing this parameter will result in an outage. The change is applied during the next maintenance window unless ApplyImmediately is enabled.

    To list all of the available Neptune engine versions, use the following command:

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

    A value that indicates whether major version upgrades are allowed.

    Constraints: You must allow major version upgrades if you specify a value for the EngineVersion parameter that is a different major version than the DB cluster's current version.

    If you upgrade the major version of a global database, the cluster and DB instance parameter groups are set to the default parameter groups for the new version, so you will need to apply any custom parameter groups after completing the upgrade.

Raises:

Source code in docs_src/capo_neptune/_services/neptune.py
def modify_global_cluster(
    self,
    *,
    config_overrides: Optional[NeptuneClientConfig] = None,
    global_cluster_identifier: Optional[
        "capo_neptune.types.global_cluster_identifier.GlobalClusterIdentifier"
    ] = None,
    new_global_cluster_identifier: Optional[
        "capo_neptune.types.global_cluster_identifier.GlobalClusterIdentifier"
    ] = None,
    deletion_protection: Optional[
        "capo_neptune.types.boolean_optional.BooleanOptional"
    ] = None,
    engine_version: Optional["capo_neptune.types.string.String"] = None,
    allow_major_version_upgrade: Optional[
        "capo_neptune.types.boolean_optional.BooleanOptional"
    ] = None,
) -> "capo_neptune.types.modify_global_cluster_result.ModifyGlobalClusterResult":
    """<p>Modify a setting for an Amazon Neptune global cluster. You can change one or more database configuration parameters by specifying these parameters and their new values in the request.</p>

    Args:
        global_cluster_identifier: <p>The DB cluster identifier for the global cluster being modified. This parameter is not case-sensitive.</p> <p>Constraints: Must match the identifier of an existing global database cluster.</p>
        new_global_cluster_identifier: <p>A new cluster identifier to assign to the global database. This value is stored as a lowercase string.</p> <p>Constraints:</p> <ul> <li> <p>Must contain from 1 to 63 letters, numbers, or hyphens.</p> </li> <li> <p>The first character must be a letter.</p> </li> <li> <p>Can't end with a hyphen or contain two consecutive hyphens</p> </li> </ul> <p>Example: <code>my-cluster2</code> </p>
        deletion_protection: <p>Indicates whether the global database has deletion protection enabled. The global database cannot be deleted when deletion protection is enabled.</p>
        engine_version: <p>The version number of the database engine to which you want to upgrade. Changing this parameter will result in an outage. The change is applied during the next maintenance window unless <code>ApplyImmediately</code> is enabled.</p> <p>To list all of the available Neptune engine versions, use the following command:</p>
        allow_major_version_upgrade: <p>A value that indicates whether major version upgrades are allowed.</p> <p>Constraints: You must allow major version upgrades if you specify a value for the <code>EngineVersion</code> parameter that is a different major version than the DB cluster's current version.</p> <p>If you upgrade the major version of a global database, the cluster and DB instance parameter groups are set to the default parameter groups for the new version, so you will need to apply any custom parameter groups after completing the upgrade.</p>

    Raises:
        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_not_found_fault.GlobalClusterNotFoundFault: <p>The <code>GlobalClusterIdentifier</code> doesn't refer to an existing global database cluster. </p>
        capo_neptune.errors.invalid_db_cluster_state_fault.InvalidDBClusterStateFault: <p>The DB cluster is not in a valid state.</p>
        capo_neptune.errors.invalid_db_instance_state_fault.InvalidDBInstanceStateFault: <p>The specified DB instance is not in the <i>available</i> state.</p>
        capo_neptune.errors.invalid_global_cluster_state_fault.InvalidGlobalClusterStateFault: <p>The global cluster is in an invalid state and can't perform the requested operation. </p>
        capo_neptune.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_neptune.types.modify_global_cluster_message.ModifyGlobalClusterMessage]",
    ) -> OperationResponse[
        "capo_neptune.types.modify_global_cluster_result.ModifyGlobalClusterResult"
    ]:
        import capo_neptune._operations.amazon_rd_sv19.modify_global_cluster

        output, http_response = (
            capo_neptune._operations.amazon_rd_sv19.modify_global_cluster.modify_global_cluster(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ModifyGlobalCluster")
    )
    input_: capo_neptune.types.modify_global_cluster_message.ModifyGlobalClusterMessage = {}
    if global_cluster_identifier is not None:
        input_["global_cluster_identifier"] = global_cluster_identifier
    if new_global_cluster_identifier is not None:
        input_["new_global_cluster_identifier"] = new_global_cluster_identifier
    if deletion_protection is not None:
        input_["deletion_protection"] = deletion_protection
    if engine_version is not None:
        input_["engine_version"] = engine_version
    if allow_major_version_upgrade is not None:
        input_["allow_major_version_upgrade"] = allow_major_version_upgrade

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