EventBusArgs

data class EventBusArgs(val deadLetterConfig: Output<EventBusDeadLetterConfigArgs>? = null, val description: Output<String>? = null, val eventSourceName: Output<String>? = null, val kmsKeyIdentifier: Output<String>? = null, val name: Output<String>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<EventBusArgs>

Provides an EventBridge event bus resource.

Note: EventBridge was formerly known as CloudWatch Events. The functionality is identical.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const messenger = new aws.cloudwatch.EventBus("messenger", {name: "chat-messages"});
import pulumi
import pulumi_aws as aws
messenger = aws.cloudwatch.EventBus("messenger", name="chat-messages")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var messenger = new Aws.CloudWatch.EventBus("messenger", new()
{
Name = "chat-messages",
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudwatch.NewEventBus(ctx, "messenger", &cloudwatch.EventBusArgs{
Name: pulumi.String("chat-messages"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.cloudwatch.EventBus;
import com.pulumi.aws.cloudwatch.EventBusArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var messenger = new EventBus("messenger", EventBusArgs.builder()
.name("chat-messages")
.build());
}
}
resources:
messenger:
type: aws:cloudwatch:EventBus
properties:
name: chat-messages
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const examplepartner = aws.cloudwatch.getEventSource({
namePrefix: "aws.partner/examplepartner.com",
});
const examplepartnerEventBus = new aws.cloudwatch.EventBus("examplepartner", {
name: examplepartner.then(examplepartner => examplepartner.name),
description: "Event bus for example partner events",
eventSourceName: examplepartner.then(examplepartner => examplepartner.name),
});
import pulumi
import pulumi_aws as aws
examplepartner = aws.cloudwatch.get_event_source(name_prefix="aws.partner/examplepartner.com")
examplepartner_event_bus = aws.cloudwatch.EventBus("examplepartner",
name=examplepartner.name,
description="Event bus for example partner events",
event_source_name=examplepartner.name)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var examplepartner = Aws.CloudWatch.GetEventSource.Invoke(new()
{
NamePrefix = "aws.partner/examplepartner.com",
});
var examplepartnerEventBus = new Aws.CloudWatch.EventBus("examplepartner", new()
{
Name = examplepartner.Apply(getEventSourceResult => getEventSourceResult.Name),
Description = "Event bus for example partner events",
EventSourceName = examplepartner.Apply(getEventSourceResult => getEventSourceResult.Name),
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
examplepartner, err := cloudwatch.GetEventSource(ctx, &cloudwatch.GetEventSourceArgs{
NamePrefix: pulumi.StringRef("aws.partner/examplepartner.com"),
}, nil)
if err != nil {
return err
}
_, err = cloudwatch.NewEventBus(ctx, "examplepartner", &cloudwatch.EventBusArgs{
Name: pulumi.String(examplepartner.Name),
Description: pulumi.String("Event bus for example partner events"),
EventSourceName: pulumi.String(examplepartner.Name),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.cloudwatch.CloudwatchFunctions;
import com.pulumi.aws.cloudwatch.inputs.GetEventSourceArgs;
import com.pulumi.aws.cloudwatch.EventBus;
import com.pulumi.aws.cloudwatch.EventBusArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var examplepartner = CloudwatchFunctions.getEventSource(GetEventSourceArgs.builder()
.namePrefix("aws.partner/examplepartner.com")
.build());
var examplepartnerEventBus = new EventBus("examplepartnerEventBus", EventBusArgs.builder()
.name(examplepartner.name())
.description("Event bus for example partner events")
.eventSourceName(examplepartner.name())
.build());
}
}
resources:
examplepartnerEventBus:
type: aws:cloudwatch:EventBus
name: examplepartner
properties:
name: ${examplepartner.name}
description: Event bus for example partner events
eventSourceName: ${examplepartner.name}
variables:
examplepartner:
fn::invoke:
function: aws:cloudwatch:getEventSource
arguments:
namePrefix: aws.partner/examplepartner.com

Import

Using pulumi import, import EventBridge event buses using the name of the event bus (which can also be a partner event source name). For example:

$ pulumi import aws:cloudwatch/eventBus:EventBus messenger chat-messages

Constructors

Link copied to clipboard
constructor(deadLetterConfig: Output<EventBusDeadLetterConfigArgs>? = null, description: Output<String>? = null, eventSourceName: Output<String>? = null, kmsKeyIdentifier: Output<String>? = null, name: Output<String>? = null, tags: Output<Map<String, String>>? = null)

Properties

Link copied to clipboard

Configuration details of the Amazon SQS queue for EventBridge to use as a dead-letter queue (DLQ). This block supports the following arguments:

Link copied to clipboard
val description: Output<String>? = null

Event bus description.

Link copied to clipboard
val eventSourceName: Output<String>? = null

Partner event source that the new event bus will be matched with. Must match name.

Link copied to clipboard
val kmsKeyIdentifier: Output<String>? = null

Identifier of the AWS KMS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt events on this event bus. The identifier can be the key Amazon Resource Name (ARN), KeyId, key alias, or key alias ARN.

Link copied to clipboard
val name: Output<String>? = null

Name of the new event bus. The names of custom event buses can't contain the / character. To create a partner event bus, ensure that the name matches the event_source_name. The following arguments are optional:

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

Map of tags assigned to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Functions

Link copied to clipboard
open override fun toJava(): EventBusArgs