Show / Hide Table of Contents

Class EventBus

Define an EventBridge EventBus.

Inheritance
object
Resource
EventBus
Implements
IEventBus
IResourceWithPolicy
IResource
IConstruct
IDependable
IResourceWithPolicyV2
IEnvironmentAware
Inherited Members
Resource.IsOwnedResource(IConstruct)
Resource.IsResource(IConstruct)
Resource.ApplyRemovalPolicy(RemovalPolicy)
Resource.GeneratePhysicalName()
Resource.GetResourceArnAttribute(string, IArnComponents)
Resource.GetResourceNameAttribute(string)
Resource.Env
Resource.PhysicalName
Resource.Stack
Namespace: Amazon.CDK.AWS.Events
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class EventBus : Resource, IEventBus, IResourceWithPolicy, IResource, IConstruct, IDependable, IResourceWithPolicyV2, IEnvironmentAware
Syntax (vb)
Public Class EventBus Inherits Resource Implements IEventBus, IResourceWithPolicy, IResource, IConstruct, IDependable, IResourceWithPolicyV2, IEnvironmentAware
Remarks

Resource: AWS::Events::EventBus

ExampleMetadata: infused

Examples
using Amazon.CDK.AWS.Events;

             ConfigurationSet myConfigurationSet;


             var bus = EventBus.FromEventBusName(this, "EventBus", "default");

             myConfigurationSet.AddEventDestination("ToEventBus", new ConfigurationSetEventDestinationOptions {
                 Destination = EventDestination.EventBus(bus)
             });

Synopsis

Constructors

EventBus(Construct, string, IEventBusProps?)

Define an EventBridge EventBus.

Properties

EventBusArn

The ARN of the event bus, such as: arn:aws:events:us-east-2:123456789012:event-bus/aws.partner/PartnerName/acct1/repo1.

EventBusName

The physical ID of this event bus resource.

EventBusPolicy

The policy for the event bus in JSON form.

EventSourceName

The name of the partner event source.

PROPERTY_INJECTION_ID

Uniquely identifies this class.

Methods

AddToResourcePolicy(PolicyStatement)

Adds a statement to the IAM resource policy associated with this event bus.

Archive(string, IBaseArchiveProps)

Create an EventBridge archive to send events to.

FromEventBusArn(Construct, string, string)

Import an existing event bus resource.

FromEventBusAttributes(Construct, string, IEventBusAttributes)

Import an existing event bus resource.

FromEventBusName(Construct, string, string)

Import an existing event bus resource.

GrantAllPutEvents(IGrantable)

Permits an IAM Principal to send custom events to EventBridge so that they can be matched to rules.

GrantPutEventsTo(IGrantable, string?)

Grants an IAM Principal to send custom events to the eventBus so that they can be matched to rules.

Constructors

EventBus(Construct, string, IEventBusProps?)

Define an EventBridge EventBus.

public EventBus(Construct scope, string id, IEventBusProps? props = null)
Parameters
scope Construct
id string
props IEventBusProps
Remarks

Resource: AWS::Events::EventBus

ExampleMetadata: infused

Examples
using Amazon.CDK.AWS.Events;

             ConfigurationSet myConfigurationSet;


             var bus = EventBus.FromEventBusName(this, "EventBus", "default");

             myConfigurationSet.AddEventDestination("ToEventBus", new ConfigurationSetEventDestinationOptions {
                 Destination = EventDestination.EventBus(bus)
             });

Properties

EventBusArn

The ARN of the event bus, such as: arn:aws:events:us-east-2:123456789012:event-bus/aws.partner/PartnerName/acct1/repo1.

public virtual string EventBusArn { get; }
Property Value

string

Remarks

Resource: AWS::Events::EventBus

ExampleMetadata: infused

EventBusName

The physical ID of this event bus resource.

public virtual string EventBusName { get; }
Property Value

string

Remarks

Resource: AWS::Events::EventBus

ExampleMetadata: infused

EventBusPolicy

The policy for the event bus in JSON form.

public virtual string EventBusPolicy { get; }
Property Value

string

Remarks

Resource: AWS::Events::EventBus

ExampleMetadata: infused

EventSourceName

The name of the partner event source.

public virtual string? EventSourceName { get; }
Property Value

string

Remarks

Resource: AWS::Events::EventBus

ExampleMetadata: infused

PROPERTY_INJECTION_ID

Uniquely identifies this class.

public static string PROPERTY_INJECTION_ID { get; }
Property Value

string

Remarks

Resource: AWS::Events::EventBus

ExampleMetadata: infused

Methods

AddToResourcePolicy(PolicyStatement)

Adds a statement to the IAM resource policy associated with this event bus.

public virtual IAddToResourcePolicyResult AddToResourcePolicy(PolicyStatement statement)
Parameters
statement PolicyStatement
Returns

IAddToResourcePolicyResult

Remarks

Resource: AWS::Events::EventBus

ExampleMetadata: infused

Archive(string, IBaseArchiveProps)

Create an EventBridge archive to send events to.

public virtual Archive Archive(string id, IBaseArchiveProps props)
Parameters
id string
props IBaseArchiveProps
Returns

Archive

Remarks

When you create an archive, incoming events might not immediately start being sent to the archive. Allow a short period of time for changes to take effect.

FromEventBusArn(Construct, string, string)

Import an existing event bus resource.

public static IEventBus FromEventBusArn(Construct scope, string id, string eventBusArn)
Parameters
scope Construct

Parent construct.

id string

Construct ID.

eventBusArn string

ARN of imported event bus.

Returns

IEventBus

Remarks

Resource: AWS::Events::EventBus

ExampleMetadata: infused

FromEventBusAttributes(Construct, string, IEventBusAttributes)

Import an existing event bus resource.

public static IEventBus FromEventBusAttributes(Construct scope, string id, IEventBusAttributes attrs)
Parameters
scope Construct

Parent construct.

id string

Construct ID.

attrs IEventBusAttributes

Imported event bus properties.

Returns

IEventBus

Remarks

Resource: AWS::Events::EventBus

ExampleMetadata: infused

FromEventBusName(Construct, string, string)

Import an existing event bus resource.

public static IEventBus FromEventBusName(Construct scope, string id, string eventBusName)
Parameters
scope Construct

Parent construct.

id string

Construct ID.

eventBusName string

Name of imported event bus.

Returns

IEventBus

Remarks

Resource: AWS::Events::EventBus

ExampleMetadata: infused

GrantAllPutEvents(IGrantable)

Permits an IAM Principal to send custom events to EventBridge so that they can be matched to rules.

public static Grant GrantAllPutEvents(IGrantable grantee)
Parameters
grantee IGrantable

The principal (no-op if undefined).

Returns

Grant

Remarks

Resource: AWS::Events::EventBus

ExampleMetadata: infused

GrantPutEventsTo(IGrantable, string?)

Grants an IAM Principal to send custom events to the eventBus so that they can be matched to rules.

public virtual Grant GrantPutEventsTo(IGrantable grantee, string? sid = null)
Parameters
grantee IGrantable
sid string
Returns

Grant

Remarks

Resource: AWS::Events::EventBus

ExampleMetadata: infused

Implements

IEventBus
IResourceWithPolicy
IResource
Constructs.IConstruct
Constructs.IDependable
IResourceWithPolicyV2
IEnvironmentAware
Back to top Generated by DocFX