put_cluster_policy
async
¶
put_cluster_policy(
identifier: ClusterId,
policy: PolicyDocument,
*,
config_overrides: Optional[AsyncDSQLClientConfig] = None,
bypass_policy_lockout_safety_check: Optional[BypassPolicyLockoutSafetyCheck] = None,
expected_policy_version: Optional[PolicyVersion] = None,
client_token: Optional[ClientToken] = None,
) -> PutClusterPolicyOutput
Attaches a resource-based policy to a cluster. This policy defines access permissions and conditions for the cluster, allowing you to control which principals can perform actions on the cluster.
Parameters:
-
policy(PolicyDocument) –The resource-based policy document to attach to the cluster. This should be a valid JSON policy document that defines permissions and conditions.
-
bypass_policy_lockout_safety_check(Optional[BypassPolicyLockoutSafetyCheck], default:None) –A flag that allows you to bypass the policy lockout safety check. When set to true, this parameter allows you to apply a policy that might lock you out of the cluster. Use with caution.
-
expected_policy_version(Optional[PolicyVersion], default:None) –The expected version of the current policy. This parameter ensures that you're updating the correct version of the policy and helps prevent concurrent modification conflicts.
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.