cluster_policies
Creates, updates, deletes or gets a cluster_policy
resource or lists cluster_policies
in a region
Overview
Name | cluster_policies |
Type | Resource |
Description | Resource Type definition for AWS::MSK::ClusterPolicy |
Id | aws.msk.cluster_policies |
Fields
Name | Datatype | Description |
---|---|---|
policy | object | A policy document containing permissions to add to the specified cluster. |
cluster_arn | string | The arn of the cluster for the resource policy. |
current_version | string | The current version of the policy attached to the specified cluster |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Policy, ClusterArn, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.msk.cluster_policies (
Policy,
ClusterArn,
region
)
SELECT
'{{ Policy }}',
'{{ ClusterArn }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.msk.cluster_policies (
Policy,
ClusterArn,
region
)
SELECT
'{{ Policy }}',
'{{ ClusterArn }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: cluster_policy
props:
- name: Policy
value: {}
- name: ClusterArn
value: '{{ ClusterArn }}'
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