import { AccessLevelList } from '../shared/access-level' ; import { PolicyStatement , Operator } from '../shared' ; param sid export class Events extends PolicyStatement { public servicePrefix = 'events' ; param sid constructor ( sid ? ) { super ( sid ) ; } /**
     * Grants permission to activate partner event sources
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_ActivateEventSource.html
     */ public toActivateEventSource ( ) { return this . to ( 'ActivateEventSource' ) ; } /**
     * Grants permission to cancel a replay
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_CancelReplay.html
     */ public toCancelReplay ( ) { return this . to ( 'CancelReplay' ) ; } /**
     * Grants permission to create a new api destination
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_CreateApiDestination.html
     */ public toCreateApiDestination ( ) { return this . to ( 'CreateApiDestination' ) ; } /**
     * Grants permission to create a new archive
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_CreateArchive.html
     */ public toCreateArchive ( ) { return this . to ( 'CreateArchive' ) ; } /**
     * Grants permission to create a new connection
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_CreateConnection.html
     */ public toCreateConnection ( ) { return this . to ( 'CreateConnection' ) ; } /**
     * Grants permission to create event buses
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifAwsRequestTag()
     * - .ifAwsTagKeys()
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_CreateEventBus.html
     */ public toCreateEventBus ( ) { return this . to ( 'CreateEventBus' ) ; } /**
     * Grants permission to create partner event sources
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_CreatePartnerEventSource.html
     */ public toCreatePartnerEventSource ( ) { return this . to ( 'CreatePartnerEventSource' ) ; } /**
     * Grants permission to deactivate event sources
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_DeactivateEventSource.html
     */ public toDeactivateEventSource ( ) { return this . to ( 'DeactivateEventSource' ) ; } /**
     * Grants permission to deauthorize a connection, deleting its stored authorization secrets
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_DeauthorizeConnection.html
     */ public toDeauthorizeConnection ( ) { return this . to ( 'DeauthorizeConnection' ) ; } /**
     * Grants permission to delete an api destination
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_DeleteApiDestination.html
     */ public toDeleteApiDestination ( ) { return this . to ( 'DeleteApiDestination' ) ; } /**
     * Grants permission to delete an archive
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_DeleteArchive.html
     */ public toDeleteArchive ( ) { return this . to ( 'DeleteArchive' ) ; } /**
     * Grants permission to delete a connection
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_DeleteConnection.html
     */ public toDeleteConnection ( ) { return this . to ( 'DeleteConnection' ) ; } /**
     * Grants permission to delete event buses
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_DeletePartnerEventSource
     */ public toDeleteEventBus ( ) { return this . to ( 'DeleteEventBus' ) ; } /**
     * Grants permission to delete partner event sources
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_DeletePartnerEventSource
     */ public toDeletePartnerEventSource ( ) { return this . to ( 'DeletePartnerEventSource' ) ; } /**
     * Grants permission to delete rules
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifCreatorAccount()
     * - .ifManagedBy()
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_DeleteRule.html
     */ public toDeleteRule ( ) { return this . to ( 'DeleteRule' ) ; } /**
     * Grants permission to retrieve details about an api destination
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_DescribeApiDestination.html
     */ public toDescribeApiDestination ( ) { return this . to ( 'DescribeApiDestination' ) ; } /**
     * Grants permission to retrieve details about an archive
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_DescribeArchive.html
     */ public toDescribeArchive ( ) { return this . to ( 'DescribeArchive' ) ; } /**
     * Grants permission to retrieve details about a conection
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_DescribeConnection.html
     */ public toDescribeConnection ( ) { return this . to ( 'DescribeConnection' ) ; } /**
     * Grants permission to retrieve details about event buses
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_DescribeEventBus.html
     */ public toDescribeEventBus ( ) { return this . to ( 'DescribeEventBus' ) ; } /**
     * Grants permission to retrieve details about event sources
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_DescribeEventSource.html
     */ public toDescribeEventSource ( ) { return this . to ( 'DescribeEventSource' ) ; } /**
     * Grants permission to retrieve details about partner event sources
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_DescribePartnerEventSource.html
     */ public toDescribePartnerEventSource ( ) { return this . to ( 'DescribePartnerEventSource' ) ; } /**
     * Grants permission to retrieve the details of a replay
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_DescribeReplay.html
     */ public toDescribeReplay ( ) { return this . to ( 'DescribeReplay' ) ; } /**
     * Grants permission to retrieve details about rules
     *
     * Access Level: Read
     *
     * Possible conditions:
     * - .ifCreatorAccount()
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_DescribeRule.html
     */ public toDescribeRule ( ) { return this . to ( 'DescribeRule' ) ; } /**
     * Grants permission to disable rules
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifCreatorAccount()
     * - .ifManagedBy()
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_DisableRule.html
     */ public toDisableRule ( ) { return this . to ( 'DisableRule' ) ; } /**
     * Grants permission to enable rules
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifCreatorAccount()
     * - .ifManagedBy()
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_EnableRule.html
     */ public toEnableRule ( ) { return this . to ( 'EnableRule' ) ; } /**
     * Grants permission to invoke an api destination
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/eventbridge/latest/userguide/iam-identity-based-access-control-eventbridge.html
     */ public toInvokeApiDestination ( ) { return this . to ( 'InvokeApiDestination' ) ; } /**
     * Grants permission to retrieve a list of api destinations
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_ListApiDestinations.html
     */ public toListApiDestinations ( ) { return this . to ( 'ListApiDestinations' ) ; } /**
     * Grants permission to retrieve a list of archives
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_ListArchives.html
     */ public toListArchives ( ) { return this . to ( 'ListArchives' ) ; } /**
     * Grants permission to retrieve a list of connections
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_ListConnections.html
     */ public toListConnections ( ) { return this . to ( 'ListConnections' ) ; } /**
     * Grants permission to to retrieve a list of the event buses in your account
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_ListEventBuses.html
     */ public toListEventBuses ( ) { return this . to ( 'ListEventBuses' ) ; } /**
     * Grants permission to to retrieve a list of event sources shared with this account
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_ListEventSources.html
     */ public toListEventSources ( ) { return this . to ( 'ListEventSources' ) ; } /**
     * Grants permission to retrieve a list of AWS account IDs associated with an event source
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_ListPartnerEventSourceAccounts.html
     */ public toListPartnerEventSourceAccounts ( ) { return this . to ( 'ListPartnerEventSourceAccounts' ) ; } /**
     * Grants permission to retrieve a list partner event sources
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_ListPartnerEventSources.html
     */ public toListPartnerEventSources ( ) { return this . to ( 'ListPartnerEventSources' ) ; } /**
     * Grants permission to retrieve a list of replays
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_ListReplays.html
     */ public toListReplays ( ) { return this . to ( 'ListReplays' ) ; } /**
     * Grants permission to retrieve a list of the names of the rules associated with a target
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_ListRuleNamesByTarget.html
     */ public toListRuleNamesByTarget ( ) { return this . to ( 'ListRuleNamesByTarget' ) ; } /**
     * Grants permission to retrieve a list of the Amazon EventBridge rules in the account
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_ListRules.html
     */ public toListRules ( ) { return this . to ( 'ListRules' ) ; } /**
     * Grants permission to retrieve a list of tags associated with an Amazon EventBridge resource
     *
     * Access Level: List
     *
     * Possible conditions:
     * - .ifCreatorAccount()
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_ListTagsForResource.html
     */ public toListTagsForResource ( ) { return this . to ( 'ListTagsForResource' ) ; } /**
     * Grants permission to retrieve a list of targets defined for a rule
     *
     * Access Level: List
     *
     * Possible conditions:
     * - .ifCreatorAccount()
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_ListTargetsByRule.html
     */ public toListTargetsByRule ( ) { return this . to ( 'ListTargetsByRule' ) ; } /**
     * Grants permission to send custom events to Amazon EventBridge
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifDetailType()
     * - .ifSource()
     * - .ifEventBusInvocation()
     * - .ifAwsSourceArn()
     * - .ifAwsSourceAccount()
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutEvents.html
     */ public toPutEvents ( ) { return this . to ( 'PutEvents' ) ; } /**
     * Grants permission to sends custom events to Amazon EventBridge
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutPartnerEvents.html
     */ public toPutPartnerEvents ( ) { return this . to ( 'PutPartnerEvents' ) ; } /**
     * Grants permission to use the PutPermission action to grants permission to another AWS account to put events to your default event bus
     *
     * Access Level: Permissions management
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutPermission.html
     */ public toPutPermission ( ) { return this . to ( 'PutPermission' ) ; } /**
     * Grants permission to create or updates rules
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifDetailUserIdentityPrincipalId()
     * - .ifDetailType()
     * - .ifSource()
     * - .ifDetailService()
     * - .ifDetailEventTypeCode()
     * - .ifAwsRequestTag()
     * - .ifAwsTagKeys()
     * - .ifCreatorAccount()
     * - .ifManagedBy()
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutRule.html
     */ public toPutRule ( ) { return this . to ( 'PutRule' ) ; } /**
     * Grants permission to add targets to a rule
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifTargetArn()
     * - .ifCreatorAccount()
     * - .ifManagedBy()
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutTargets.html
     */ public toPutTargets ( ) { return this . to ( 'PutTargets' ) ; } /**
     * Grants permission to revoke the permission of another AWS account to put events to your default event bus
     *
     * Access Level: Permissions management
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_RemovePermission.html
     */ public toRemovePermission ( ) { return this . to ( 'RemovePermission' ) ; } /**
     * Grants permission to removes targets from a rule
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifCreatorAccount()
     * - .ifManagedBy()
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_RemoveTargets.html
     */ public toRemoveTargets ( ) { return this . to ( 'RemoveTargets' ) ; } /**
     * Grants permission to start a replay of an archive
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_StartReplay.html
     */ public toStartReplay ( ) { return this . to ( 'StartReplay' ) ; } /**
     * Grants permission to add a tag to an Amazon EventBridge resource
     *
     * Access Level: Tagging
     *
     * Possible conditions:
     * - .ifAwsTagKeys()
     * - .ifAwsRequestTag()
     * - .ifCreatorAccount()
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_TagResource.html
     */ public toTagResource ( ) { return this . to ( 'TagResource' ) ; } /**
     * Grants permission to test whether an event pattern matches the provided event
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_TestEventPattern.html
     */ public toTestEventPattern ( ) { return this . to ( 'TestEventPattern' ) ; } /**
     * Grants permission to remove a tag from an Amazon EventBridge resource
     *
     * Access Level: Tagging
     *
     * Possible conditions:
     * - .ifAwsTagKeys()
     * - .ifCreatorAccount()
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_UntagResource.html
     */ public toUntagResource ( ) { return this . to ( 'UntagResource' ) ; } /**
     * Grants permission to update an api destination
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_UpdateApiDestination.html
     */ public toUpdateApiDestination ( ) { return this . to ( 'UpdateApiDestination' ) ; } /**
     * Grants permission to update an archive
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_UpdateArchive.html
     */ public toUpdateArchive ( ) { return this . to ( 'UpdateArchive' ) ; } /**
     * Grants permission to update a connection
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_UpdateConnection.html
     */ public toUpdateConnection ( ) { return this . to ( 'UpdateConnection' ) ; } protected accessLevelList : AccessLevelList = { Write : [ 'ActivateEventSource' , 'CancelReplay' , 'CreateApiDestination' , 'CreateArchive' , 'CreateConnection' , 'CreateEventBus' , 'CreatePartnerEventSource' , 'DeactivateEventSource' , 'DeauthorizeConnection' , 'DeleteApiDestination' , 'DeleteArchive' , 'DeleteConnection' , 'DeleteEventBus' , 'DeletePartnerEventSource' , 'DeleteRule' , 'DisableRule' , 'EnableRule' , 'InvokeApiDestination' , 'PutEvents' , 'PutPartnerEvents' , 'PutRule' , 'PutTargets' , 'RemoveTargets' , 'StartReplay' , 'UpdateApiDestination' , 'UpdateArchive' , 'UpdateConnection' ] , Read : [ 'DescribeApiDestination' , 'DescribeArchive' , 'DescribeConnection' , 'DescribeEventBus' , 'DescribeEventSource' , 'DescribePartnerEventSource' , 'DescribeReplay' , 'DescribeRule' , 'TestEventPattern' ] , List : [ 'ListApiDestinations' , 'ListArchives' , 'ListConnections' , 'ListEventBuses' , 'ListEventSources' , 'ListPartnerEventSourceAccounts' , 'ListPartnerEventSources' , 'ListReplays' , 'ListRuleNamesByTarget' , 'ListRules' , 'ListTagsForResource' , 'ListTargetsByRule' ] , 'Permissions management' : [ 'PutPermission' , 'RemovePermission' ] , Tagging : [ 'TagResource' , 'UntagResource' ] } ; param eventSourceName param region param partition public onEventSource ( eventSourceName , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:events:${ region || '*' }::event-source/${ eventSourceName }` ) ; } param eventBusName param account param region param partition public onEventBus ( eventBusName , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:events:${ region || '*' }:${ account || '*' }:event-bus/${ eventBusName }` ) ; } param ruleName param account param region param partition public onRule ( ruleName , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:events:${ region || '*' }:${ account || '*' }:rule/${ ruleName }` ) ; } param archiveName param account param region param partition public onArchive ( archiveName , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:events:${ region || '*' }:${ account || '*' }:archive/${ archiveName }` ) ; } param replayName param account param region param partition public onReplay ( replayName , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:events:${ region || '*' }:${ account || '*' }:replay/${ replayName }` ) ; } param connectionName param account param region param partition public onConnection ( connectionName , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:events:${ region || '*' }:${ account || '*' }:connection/${ connectionName }` ) ; } param apiDestinationName param account param region param partition public onApiDestination ( apiDestinationName , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:events:${ region || '*' }:${ account || '*' }:api-destination/${ apiDestinationName }` ) ; } param value param operator public ifManagedBy ( value , operator ? ) { return this . if ( `ManagedBy` , value , operator || 'StringLike' ) ; } param value param operator public ifTargetArn ( value , operator ? ) { return this . if ( `TargetArn` , value , operator || 'ArnLike' ) ; } param value param operator public ifCreatorAccount ( value , operator ? ) { return this . if ( `creatorAccount` , value , operator || 'StringLike' ) ; } param value param operator public ifDetailType ( value , operator ? ) { return this . if ( `detail-type` , value , operator || 'StringLike' ) ; } param value param operator public ifDetailEventTypeCode ( value , operator ? ) { return this . if ( `detail.eventTypeCode` , value , operator || 'StringLike' ) ; } param value param operator public ifDetailService ( value , operator ? ) { return this . if ( `detail.service` , value , operator || 'StringLike' ) ; } param value param operator public ifDetailUserIdentityPrincipalId ( value , operator ? ) { return this . if ( `detail.userIdentity.principalId` , value , operator || 'StringLike' ) ; } param value param operator public ifEventBusInvocation ( value , operator ? ) { return this . if ( `eventBusInvocation` , value , operator || 'StringLike' ) ; } param value param operator public ifSource ( value , operator ? ) { return this . if ( `source` , value , operator || 'StringLike' ) ; } }