update_cluster
async
¶
update_cluster(
identifier: ClusterId,
*,
config_overrides: Optional[AsyncDSQLClientConfig] = None,
deletion_protection_enabled: Optional[DeletionProtectionEnabled] = None,
kms_encryption_key: Optional[KmsEncryptionKey] = None,
client_token: Optional[ClientToken] = None,
multi_region_properties: Optional[MultiRegionProperties] = None,
metric_groups: Optional[MetricGroupRequestList] = None,
) -> UpdateClusterOutput
The UpdateCluster API allows you to modify both single-Region and multi-Region cluster configurations. With the multiRegionProperties parameter, you can add or modify witness Region support and manage peer relationships with clusters in other Regions.
Note that updating multi-Region clusters requires additional IAM permissions beyond those needed for standard cluster updates, as detailed in the Permissions section.
Required permissions
- dsql:UpdateCluster
-
Permission to update a DSQL cluster.
Resources:
arn:aws:dsql:region:account-id:cluster/cluster-id
- dsql:PutMultiRegionProperties
-
Permission to configure multi-Region properties for a cluster.
Resources:
arn:aws:dsql:region:account-id:cluster/cluster-id
- dsql:GetCluster
-
Permission to retrieve cluster information.
Resources:
arn:aws:dsql:region:account-id:cluster/cluster-id - dsql:AddPeerCluster
-
Permission to add peer clusters.
Resources:
-
Local cluster:
arn:aws:dsql:region:account-id:cluster/cluster-id -
Each peer cluster: exact ARN of each specified peer cluster
-
- dsql:RemovePeerCluster
-
Permission to remove peer clusters. When you list peer clusters in
multiRegionProperties.clusters, you need this permission for each current peer cluster that your list omits.Resources:
-
Each removed peer cluster: exact ARN of each removed peer cluster, in its own Region
-
- dsql:PutWitnessRegion
-
Permission to set a witness Region.
Resources:
arn:aws:dsql:region:account-id:cluster/cluster-idCondition Keys: dsql:WitnessRegion (matching the specified witness Region)
This permission is checked both in the cluster Region and in the witness Region.
-
The witness Region specified in
multiRegionProperties.witnessRegioncannot be the same as the cluster's Region. -
When you list peer clusters in
multiRegionProperties.clusters, you needdsql:AddPeerClusterfor every peer cluster in your request. You needdsql:RemovePeerClusteronly for the peer clusters that the update removes.
Parameters:
-
identifier(ClusterId) –The ID of the cluster you want to update.
-
deletion_protection_enabled(Optional[DeletionProtectionEnabled], default:None) –Specifies whether to enable deletion protection in your cluster.
-
kms_encryption_key(Optional[KmsEncryptionKey], default:None) –The KMS key that encrypts and protects the data on your cluster. You can specify the ARN, ID, or alias of an existing key or have Amazon Web Services create a default key for you.
To switch to the key owned by Amazon Web Services, specify the reserved value
AWS_OWNED_KMS_KEY. -
client_token(Optional[ClientToken], default:None) –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.
-
multi_region_properties(Optional[MultiRegionProperties], default:None) –The new multi-Region cluster configuration settings to be applied during an update operation.
-
metric_groups(Optional[MetricGroupRequestList], default:None) –The complete set of metric groups to enable for advanced monitoring on the cluster. This list replaces the current set, so any metric group that you don't include is disabled. To disable all metric groups, specify an empty list (
[]). If you omit this parameter, the current setting doesn't change.To view the metric groups enabled on a cluster, use GetCluster.
Raises:
-
AccessDeniedException–You do not have sufficient access to perform this action.
-
InternalServerException–The request processing has failed because of an unknown error, exception or failure.
-
ThrottlingException–The request was denied due to request throttling.
-
ValidationException–The input failed to satisfy the constraints specified by an Amazon Web Services service.
-
ConflictException–The submitted action has conflicts.
-
ResourceNotFoundException–The resource could not be found.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Update Cluster
>>> await client.update_cluster(identifier='kiqenqglxyl2snyvkvnj2c3s2e', deletion_protection_enabled=False)
Source code in docs_src/capo_dsql/_services/async_dsql.py
576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 | |