Skip to main content

cluster_policies

Creates, updates, deletes or gets a cluster_policy resource or lists cluster_policies in a region

Overview

Namecluster_policies
TypeResource
DescriptionResource Type definition for AWS::MSK::ClusterPolicy
Idaws.msk.cluster_policies

Fields

NameDatatypeDescription
policyobjectA policy document containing permissions to add to the specified cluster.
cluster_arnstringThe arn of the cluster for the resource policy.
current_versionstringThe current version of the policy attached to the specified cluster
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTPolicy, ClusterArn, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all cluster_policies in a region.

SELECT
region,
policy,
cluster_arn,
current_version
FROM aws.msk.cluster_policies
WHERE region = 'us-east-1';

Gets all properties from an individual cluster_policy.

SELECT
region,
policy,
cluster_arn,
current_version
FROM aws.msk.cluster_policies
WHERE region = 'us-east-1' AND data__Identifier = '<ClusterArn>';

INSERT example

Use the following StackQL query and manifest file to create a new cluster_policy resource, using stack-deploy.

/*+ create */
INSERT INTO aws.msk.cluster_policies (
Policy,
ClusterArn,
region
)
SELECT
'{{ Policy }}',
'{{ ClusterArn }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.msk.cluster_policies
WHERE data__Identifier = '<ClusterArn>'
AND region = 'us-east-1';

Permissions

To operate on the cluster_policies resource, the following permissions are required:

Create

kafka:PutClusterPolicy,
kafka:GetClusterPolicy

Read

kafka:GetClusterPolicy

List

kafka:GetClusterPolicy

Update

kafka:PutClusterPolicy,
kafka:GetClusterPolicy

Delete

kafka:DeleteClusterPolicy,
kafka:GetClusterPolicy