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,
) -> 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.
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
557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 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 | |