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.
Source code in docs_src/capo_dsql/_services/async_dsql.py
953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 | |