import * as iam from '@aws-cdk/aws-iam'; import { Construct, IResource, Resource } from '@aws-cdk/core'; /** * Interface which all EventBus based classes MUST implement */ export interface IEventBus extends IResource { /** * The physical ID of this event bus resource * * @attribute * @link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-eventbus.html#cfn-events-eventbus-name */ readonly eventBusName: string; /** * The ARN of this event bus resource * * @attribute * @link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-eventbus.html#Arn-fn::getatt */ readonly eventBusArn: string; /** * The JSON policy of this event bus resource * * @attribute * @link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-eventbus.html#Policy-fn::getatt */ readonly eventBusPolicy: string; /** * The partner event source to associate with this event bus resource * * @link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-eventbus.html#cfn-events-eventbus-eventsourcename */ readonly eventSourceName?: string; } /** * Properties to define an event bus */ export interface EventBusProps { /** * The name of the event bus you are creating * Note: If 'eventSourceName' is passed in, you cannot set this * * @link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-eventbus.html#cfn-events-eventbus-name * @default - automatically generated name */ readonly eventBusName?: string; /** * The partner event source to associate with this event bus resource * Note: If 'eventBusName' is passed in, you cannot set this * * @link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-eventbus.html#cfn-events-eventbus-eventsourcename * @default - no partner event source */ readonly eventSourceName?: string; } /** * Interface with properties necessary to import a reusable EventBus */ export interface EventBusAttributes { /** * The physical ID of this event bus resource * * @link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-eventbus.html#cfn-events-eventbus-name */ readonly eventBusName: string; /** * The ARN of this event bus resource * * @link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-eventbus.html#Arn-fn::getatt */ readonly eventBusArn: string; /** * The JSON policy of this event bus resource * * @link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-eventbus.html#Policy-fn::getatt */ readonly eventBusPolicy: string; /** * The partner event source to associate with this event bus resource * * @link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-eventbus.html#cfn-events-eventbus-eventsourcename * @default - no partner event source */ readonly eventSourceName?: string; } /** * Define an EventBridge EventBus * * @resource AWS::Events::EventBus */ export declare class EventBus extends Resource implements IEventBus { /** * Import an existing event bus resource * @param scope Parent construct * @param id Construct ID * @param eventBusArn ARN of imported event bus */ static fromEventBusArn(scope: Construct, id: string, eventBusArn: string): IEventBus; /** * Import an existing event bus resource * @param scope Parent construct * @param id Construct ID * @param attrs Imported event bus properties */ static fromEventBusAttributes(scope: Construct, id: string, attrs: EventBusAttributes): IEventBus; /** * Permits an IAM Principal to send custom events to EventBridge * so that they can be matched to rules. * * @param grantee The principal (no-op if undefined) */ static grantPutEvents(grantee: iam.IGrantable): iam.Grant; private static eventBusProps; /** * The physical ID of this event bus resource */ readonly eventBusName: string; /** * The ARN of the event bus, such as: * arn:aws:events:us-east-2:123456789012:event-bus/aws.partner/PartnerName/acct1/repo1. */ readonly eventBusArn: string; /** * The policy for the event bus in JSON form. */ readonly eventBusPolicy: string; /** * The name of the partner event source */ readonly eventSourceName?: string; constructor(scope: Construct, id: string, props?: EventBusProps); }