import { AccessLevelList } from '../shared/access-level' ; import { PolicyStatement } from '../shared' ; param sid export class KafkaCluster extends PolicyStatement { public servicePrefix = 'kafka-cluster' ; param sid constructor ( sid ? ) { super ( sid ) ; } /**
     * Grants permission to alter various aspects of the cluster, equivalent to Apache Kafka's ALTER CLUSTER ACL
     *
     * Access Level: Write
     *
     * Dependent actions:
     * - kafka-cluster:Connect
     * - kafka-cluster:DescribeCluster
     *
     * https://docs.aws.amazon.com/msk/latest/developerguide/iam-access-control.html#actions
     */ public toAlterCluster ( ) { return this . to ( 'AlterCluster' ) ; } /**
     * Grants permission to alter the dynamic configuration of a cluster, equivalent to Apache Kafka's ALTER_CONFIGS CLUSTER ACL
     *
     * Access Level: Write
     *
     * Dependent actions:
     * - kafka-cluster:Connect
     * - kafka-cluster:DescribeClusterDynamicConfiguration
     *
     * https://docs.aws.amazon.com/msk/latest/developerguide/iam-access-control.html#actions
     */ public toAlterClusterDynamicConfiguration ( ) { return this . to ( 'AlterClusterDynamicConfiguration' ) ; } /**
     * Grants permission to join groups on a cluster, equivalent to Apache Kafka's READ GROUP ACL
     *
     * Access Level: Write
     *
     * Dependent actions:
     * - kafka-cluster:Connect
     * - kafka-cluster:DescribeGroup
     *
     * https://docs.aws.amazon.com/msk/latest/developerguide/iam-access-control.html#actions
     */ public toAlterGroup ( ) { return this . to ( 'AlterGroup' ) ; } /**
     * Grants permission to alter topics on a cluster, equivalent to Apache Kafka's ALTER TOPIC ACL
     *
     * Access Level: Write
     *
     * Dependent actions:
     * - kafka-cluster:Connect
     * - kafka-cluster:DescribeTopic
     *
     * https://docs.aws.amazon.com/msk/latest/developerguide/iam-access-control.html#actions
     */ public toAlterTopic ( ) { return this . to ( 'AlterTopic' ) ; } /**
     * Grants permission to alter the dynamic configuration of topics on a cluster, equivalent to Apache Kafka's ALTER_CONFIGS TOPIC ACL
     *
     * Access Level: Write
     *
     * Dependent actions:
     * - kafka-cluster:Connect
     * - kafka-cluster:DescribeTopicDynamicConfiguration
     *
     * https://docs.aws.amazon.com/msk/latest/developerguide/iam-access-control.html#actions
     */ public toAlterTopicDynamicConfiguration ( ) { return this . to ( 'AlterTopicDynamicConfiguration' ) ; } /**
     * Grants permission to alter transactional IDs on a cluster, equivalent to Apache Kafka's WRITE TRANSACTIONAL_ID ACL
     *
     * Access Level: Write
     *
     * Dependent actions:
     * - kafka-cluster:Connect
     * - kafka-cluster:DescribeTransactionalId
     * - kafka-cluster:WriteData
     *
     * https://docs.aws.amazon.com/msk/latest/developerguide/iam-access-control.html#actions
     */ public toAlterTransactionalId ( ) { return this . to ( 'AlterTransactionalId' ) ; } /**
     * Grants permission to connect and authenticate to the cluster
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/msk/latest/developerguide/iam-access-control.html#actions
     */ public toConnect ( ) { return this . to ( 'Connect' ) ; } /**
     * Grants permission to create topics on a cluster, equivalent to Apache Kafka's CREATE CLUSTER/TOPIC ACL
     *
     * Access Level: Write
     *
     * Dependent actions:
     * - kafka-cluster:Connect
     *
     * https://docs.aws.amazon.com/msk/latest/developerguide/iam-access-control.html#actions
     */ public toCreateTopic ( ) { return this . to ( 'CreateTopic' ) ; } /**
     * Grants permission to delete groups on a cluster, equivalent to Apache Kafka's DELETE GROUP ACL
     *
     * Access Level: Write
     *
     * Dependent actions:
     * - kafka-cluster:Connect
     * - kafka-cluster:DescribeGroup
     *
     * https://docs.aws.amazon.com/msk/latest/developerguide/iam-access-control.html#actions
     */ public toDeleteGroup ( ) { return this . to ( 'DeleteGroup' ) ; } /**
     * Grants permission to delete topics on a cluster, equivalent to Apache Kafka's DELETE TOPIC ACL
     *
     * Access Level: Write
     *
     * Dependent actions:
     * - kafka-cluster:Connect
     * - kafka-cluster:DescribeTopic
     *
     * https://docs.aws.amazon.com/msk/latest/developerguide/iam-access-control.html#actions
     */ public toDeleteTopic ( ) { return this . to ( 'DeleteTopic' ) ; } /**
     * Grants permission to describe various aspects of the cluster, equivalent to Apache Kafka's DESCRIBE CLUSTER ACL
     *
     * Access Level: List
     *
     * Dependent actions:
     * - kafka-cluster:Connect
     *
     * https://docs.aws.amazon.com/msk/latest/developerguide/iam-access-control.html#actions
     */ public toDescribeCluster ( ) { return this . to ( 'DescribeCluster' ) ; } /**
     * Grants permission to describe the dynamic configuration of a cluster, equivalent to Apache Kafka's DESCRIBE_CONFIGS CLUSTER ACL
     *
     * Access Level: List
     *
     * Dependent actions:
     * - kafka-cluster:Connect
     *
     * https://docs.aws.amazon.com/msk/latest/developerguide/iam-access-control.html#actions
     */ public toDescribeClusterDynamicConfiguration ( ) { return this . to ( 'DescribeClusterDynamicConfiguration' ) ; } /**
     * Grants permission to describe groups on a cluster, equivalent to Apache Kafka's DESCRIBE GROUP ACL
     *
     * Access Level: List
     *
     * Dependent actions:
     * - kafka-cluster:Connect
     *
     * https://docs.aws.amazon.com/msk/latest/developerguide/iam-access-control.html#actions
     */ public toDescribeGroup ( ) { return this . to ( 'DescribeGroup' ) ; } /**
     * Grants permission to describe topics on a cluster, equivalent to Apache Kafka's DESCRIBE TOPIC ACL
     *
     * Access Level: List
     *
     * Dependent actions:
     * - kafka-cluster:Connect
     *
     * https://docs.aws.amazon.com/msk/latest/developerguide/iam-access-control.html#actions
     */ public toDescribeTopic ( ) { return this . to ( 'DescribeTopic' ) ; } /**
     * Grants permission to describe the dynamic configuration of topics on a cluster, equivalent to Apache Kafka's DESCRIBE_CONFIGS TOPIC ACL
     *
     * Access Level: List
     *
     * Dependent actions:
     * - kafka-cluster:Connect
     *
     * https://docs.aws.amazon.com/msk/latest/developerguide/iam-access-control.html#actions
     */ public toDescribeTopicDynamicConfiguration ( ) { return this . to ( 'DescribeTopicDynamicConfiguration' ) ; } /**
     * Grants permission to describe transactional IDs on a cluster, equivalent to Apache Kafka's DESCRIBE TRANSACTIONAL_ID ACL
     *
     * Access Level: List
     *
     * Dependent actions:
     * - kafka-cluster:Connect
     *
     * https://docs.aws.amazon.com/msk/latest/developerguide/iam-access-control.html#actions
     */ public toDescribeTransactionalId ( ) { return this . to ( 'DescribeTransactionalId' ) ; } /**
     * Grants permission to read data from topics on a cluster, equivalent to Apache Kafka's READ TOPIC ACL
     *
     * Access Level: Read
     *
     * Dependent actions:
     * - kafka-cluster:AlterGroup
     * - kafka-cluster:Connect
     * - kafka-cluster:DescribeTopic
     *
     * https://docs.aws.amazon.com/msk/latest/developerguide/iam-access-control.html#actions
     */ public toReadData ( ) { return this . to ( 'ReadData' ) ; } /**
     * Grants permission to write data to topics on a cluster, equivalent to Apache Kafka's WRITE TOPIC ACL
     *
     * Access Level: Write
     *
     * Dependent actions:
     * - kafka-cluster:Connect
     * - kafka-cluster:DescribeTopic
     *
     * https://docs.aws.amazon.com/msk/latest/developerguide/iam-access-control.html#actions
     */ public toWriteData ( ) { return this . to ( 'WriteData' ) ; } /**
     * Grants permission to write data idempotently on a cluster, equivalent to Apache Kafka's IDEMPOTENT_WRITE CLUSTER ACL
     *
     * Access Level: Write
     *
     * Dependent actions:
     * - kafka-cluster:Connect
     * - kafka-cluster:WriteData
     *
     * https://docs.aws.amazon.com/msk/latest/developerguide/iam-access-control.html#actions
     */ public toWriteDataIdempotently ( ) { return this . to ( 'WriteDataIdempotently' ) ; } protected accessLevelList : AccessLevelList = { Write : [ 'AlterCluster' , 'AlterClusterDynamicConfiguration' , 'AlterGroup' , 'AlterTopic' , 'AlterTopicDynamicConfiguration' , 'AlterTransactionalId' , 'Connect' , 'CreateTopic' , 'DeleteGroup' , 'DeleteTopic' , 'WriteData' , 'WriteDataIdempotently' ] , List : [ 'DescribeCluster' , 'DescribeClusterDynamicConfiguration' , 'DescribeGroup' , 'DescribeTopic' , 'DescribeTopicDynamicConfiguration' , 'DescribeTransactionalId' ] , Read : [ 'ReadData' ] } ; param clusterName param clusterUuid param account param region param partition public onCluster ( clusterName , clusterUuid , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:kafka:${ region || '*' }:${ account || '*' }:cluster/${ clusterName }/${ clusterUuid }` ) ; } param clusterName param clusterUuid param topicName param account param region param partition public onTopic ( clusterName , clusterUuid , topicName , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:kafka:${ region || '*' }:${ account || '*' }:topic/${ clusterName }/${ clusterUuid }/${ topicName }` ) ; } param clusterName param clusterUuid param groupName param account param region param partition public onGroup ( clusterName , clusterUuid , groupName , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:kafka:${ region || '*' }:${ account || '*' }:group/${ clusterName }/${ clusterUuid }/${ groupName }` ) ; } param clusterName param clusterUuid param transactionalId param account param region param partition public onTransactionalId ( clusterName , clusterUuid , transactionalId , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:kafka:${ region || '*' }:${ account || '*' }:transactional-id/${ clusterName }/${ clusterUuid }/${ transactionalId }` ) ; } }