AuroraDSQL / Client / put_cluster_policy

put_cluster_policy

AuroraDSQL.Client.put_cluster_policy(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.put_cluster_policy(
    identifier='string',
    policy='string',
    bypassPolicyLockoutSafetyCheck=True|False,
    expectedPolicyVersion='string',
    clientToken='string'
)
Parameters:
  • identifier (string) –

    [REQUIRED]

    The ID of the cluster.

  • policy (string) –

    [REQUIRED]

    The resource-based policy document to attach to the cluster. This should be a valid JSON policy document that defines permissions and conditions.

  • bypassPolicyLockoutSafetyCheck (boolean) – 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.

  • expectedPolicyVersion (string) – 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.

  • clientToken (string) –

    Idempotency token so a request is only processed once.

    This field is autopopulated if not provided.

Return type:

dict

Returns:

Response Syntax

{
    'policyVersion': 'string'
}

Response Structure

  • (dict) –

    • policyVersion (string) –

      The version of the policy after it has been updated or created.

Exceptions