import { AccessLevelList } from '../shared/access-level' ; import { PolicyStatement } from '../shared' ; param sid export class Kafkaconnect extends PolicyStatement { public servicePrefix = 'kafkaconnect' ; param sid constructor ( sid ? ) { super ( sid ) ; } /**
     * Grants permission to create an MSK Connect connector
     *
     * Access Level: Write
     *
     * Dependent actions:
     * - ec2:CreateNetworkInterface
     * - ec2:DescribeSecurityGroups
     * - ec2:DescribeSubnets
     * - ec2:DescribeVpcs
     * - firehose:TagDeliveryStream
     * - iam:AttachRolePolicy
     * - iam:CreateServiceLinkedRole
     * - iam:PassRole
     * - iam:PutRolePolicy
     * - logs:CreateLogDelivery
     * - logs:DescribeLogGroups
     * - logs:DescribeResourcePolicies
     * - logs:GetLogDelivery
     * - logs:ListLogDeliveries
     * - logs:PutResourcePolicy
     * - s3:GetBucketPolicy
     * - s3:PutBucketPolicy
     *
     * https://docs.aws.amazon.com/MSKC/latest/mskc/API_CreateConnector.html
     */ public toCreateConnector ( ) { return this . to ( 'CreateConnector' ) ; } /**
     * Grants permission to create an MSK Connect custom plugin
     *
     * Access Level: Write
     *
     * Dependent actions:
     * - s3:GetObject
     *
     * https://docs.aws.amazon.com/MSKC/latest/mskc/API_CreateCustomPlugin.html
     */ public toCreateCustomPlugin ( ) { return this . to ( 'CreateCustomPlugin' ) ; } /**
     * Grants permission to create an MSK Connect worker configuration
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/MSKC/latest/mskc/API_CreateWorkerConfiguration.html
     */ public toCreateWorkerConfiguration ( ) { return this . to ( 'CreateWorkerConfiguration' ) ; } /**
     * Grants permission to delete an MSK Connect connector
     *
     * Access Level: Write
     *
     * Dependent actions:
     * - logs:DeleteLogDelivery
     * - logs:ListLogDeliveries
     *
     * https://docs.aws.amazon.com/MSKC/latest/mskc/API_DeleteConnector.html
     */ public toDeleteConnector ( ) { return this . to ( 'DeleteConnector' ) ; } /**
     * Grants permission to describe an MSK Connect connector
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/MSKC/latest/mskc/API_DescribeConnector.html
     */ public toDescribeConnector ( ) { return this . to ( 'DescribeConnector' ) ; } /**
     * Grants permission to describe an MSK Connect custom plugin
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/MSKC/latest/mskc/API_DescribeCustomPlugin.html
     */ public toDescribeCustomPlugin ( ) { return this . to ( 'DescribeCustomPlugin' ) ; } /**
     * Grants permission to describe an MSK Connect worker configuration
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/MSKC/latest/mskc/API_DescribeWorkerConfiguration.html
     */ public toDescribeWorkerConfiguration ( ) { return this . to ( 'DescribeWorkerConfiguration' ) ; } /**
     * Grants permission to list all MSK Connect connectors in this account
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/MSKC/latest/mskc/API_ListConnectors.html
     */ public toListConnectors ( ) { return this . to ( 'ListConnectors' ) ; } /**
     * Grants permission to list all MSK Connect custom plugins in this account
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/MSKC/latest/mskc/API_ListCustomPlugins.html
     */ public toListCustomPlugins ( ) { return this . to ( 'ListCustomPlugins' ) ; } /**
     * Grants permission to list all MSK Connect worker configurations in this account
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/MSKC/latest/mskc/API_ListWorkerConfigurations.html
     */ public toListWorkerConfigurations ( ) { return this . to ( 'ListWorkerConfigurations' ) ; } /**
     * Grants permission to update an MSK Connect connector
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/MSKC/latest/mskc/API_UpdateConnector.html
     */ public toUpdateConnector ( ) { return this . to ( 'UpdateConnector' ) ; } protected accessLevelList : AccessLevelList = { Write : [ 'CreateConnector' , 'CreateCustomPlugin' , 'CreateWorkerConfiguration' , 'DeleteConnector' , 'UpdateConnector' ] , Read : [ 'DescribeConnector' , 'DescribeCustomPlugin' , 'DescribeWorkerConfiguration' , 'ListConnectors' , 'ListCustomPlugins' , 'ListWorkerConfigurations' ] } ; param connectorName param uUID param account param region param partition public onConnector ( connectorName , uUID , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:kafkaconnect:${ region || '*' }:${ account || '*' }:connector/${ connectorName }/${ uUID }` ) ; } param customPluginName param uUID param account param region param partition public onCustomPlugin ( customPluginName , uUID , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:kafkaconnect:${ region || '*' }:${ account || '*' }:custom-plugin/${ customPluginName }/${ uUID }` ) ; } param workerConfigurationName param uUID param account param region param partition public onWorkerConfiguration ( workerConfigurationName , uUID , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:kafkaconnect:${ region || '*' }:${ account || '*' }:worker-configuration/${ workerConfigurationName }/${ uUID }` ) ; } }