1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. eventbridge
  5. EventBus
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.eventbridge.EventBus

Explore with Pulumi AI

Provides a Event Bridge Event Bus resource.

For information about Event Bridge Event Bus and how to use it, see What is Event Bus.

NOTE: Available since v1.129.0.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const config = new pulumi.Config();
const name = config.get("name") || "tf-example";
const example = new alicloud.eventbridge.EventBus("example", {eventBusName: name});
Copy
import pulumi
import pulumi_alicloud as alicloud

config = pulumi.Config()
name = config.get("name")
if name is None:
    name = "tf-example"
example = alicloud.eventbridge.EventBus("example", event_bus_name=name)
Copy
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/eventbridge"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		name := "tf-example"
		if param := cfg.Get("name"); param != "" {
			name = param
		}
		_, err := eventbridge.NewEventBus(ctx, "example", &eventbridge.EventBusArgs{
			EventBusName: pulumi.String(name),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var config = new Config();
    var name = config.Get("name") ?? "tf-example";
    var example = new AliCloud.EventBridge.EventBus("example", new()
    {
        EventBusName = name,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.eventbridge.EventBus;
import com.pulumi.alicloud.eventbridge.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 config = ctx.config();
        final var name = config.get("name").orElse("tf-example");
        var example = new EventBus("example", EventBusArgs.builder()
            .eventBusName(name)
            .build());

    }
}
Copy
configuration:
  name:
    type: string
    default: tf-example
resources:
  example:
    type: alicloud:eventbridge:EventBus
    properties:
      eventBusName: ${name}
Copy

Create EventBus Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new EventBus(name: string, args: EventBusArgs, opts?: CustomResourceOptions);
@overload
def EventBus(resource_name: str,
             args: EventBusArgs,
             opts: Optional[ResourceOptions] = None)

@overload
def EventBus(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             event_bus_name: Optional[str] = None,
             description: Optional[str] = None)
func NewEventBus(ctx *Context, name string, args EventBusArgs, opts ...ResourceOption) (*EventBus, error)
public EventBus(string name, EventBusArgs args, CustomResourceOptions? opts = null)
public EventBus(String name, EventBusArgs args)
public EventBus(String name, EventBusArgs args, CustomResourceOptions options)
type: alicloud:eventbridge:EventBus
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. EventBusArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. EventBusArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. EventBusArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. EventBusArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. EventBusArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var eventBusResource = new AliCloud.EventBridge.EventBus("eventBusResource", new()
{
    EventBusName = "string",
    Description = "string",
});
Copy
example, err := eventbridge.NewEventBus(ctx, "eventBusResource", &eventbridge.EventBusArgs{
	EventBusName: pulumi.String("string"),
	Description:  pulumi.String("string"),
})
Copy
var eventBusResource = new EventBus("eventBusResource", EventBusArgs.builder()
    .eventBusName("string")
    .description("string")
    .build());
Copy
event_bus_resource = alicloud.eventbridge.EventBus("eventBusResource",
    event_bus_name="string",
    description="string")
Copy
const eventBusResource = new alicloud.eventbridge.EventBus("eventBusResource", {
    eventBusName: "string",
    description: "string",
});
Copy
type: alicloud:eventbridge:EventBus
properties:
    description: string
    eventBusName: string
Copy

EventBus Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The EventBus resource accepts the following input properties:

EventBusName
This property is required.
Changes to this property will trigger replacement.
string
The name of event bus. The length is limited to 2 ~ 127 characters, which can be composed of letters, numbers or hyphens (-)
Description string
The description of event bus.
EventBusName
This property is required.
Changes to this property will trigger replacement.
string
The name of event bus. The length is limited to 2 ~ 127 characters, which can be composed of letters, numbers or hyphens (-)
Description string
The description of event bus.
eventBusName
This property is required.
Changes to this property will trigger replacement.
String
The name of event bus. The length is limited to 2 ~ 127 characters, which can be composed of letters, numbers or hyphens (-)
description String
The description of event bus.
eventBusName
This property is required.
Changes to this property will trigger replacement.
string
The name of event bus. The length is limited to 2 ~ 127 characters, which can be composed of letters, numbers or hyphens (-)
description string
The description of event bus.
event_bus_name
This property is required.
Changes to this property will trigger replacement.
str
The name of event bus. The length is limited to 2 ~ 127 characters, which can be composed of letters, numbers or hyphens (-)
description str
The description of event bus.
eventBusName
This property is required.
Changes to this property will trigger replacement.
String
The name of event bus. The length is limited to 2 ~ 127 characters, which can be composed of letters, numbers or hyphens (-)
description String
The description of event bus.

Outputs

All input properties are implicitly available as output properties. Additionally, the EventBus resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing EventBus Resource

Get an existing EventBus resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: EventBusState, opts?: CustomResourceOptions): EventBus
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        description: Optional[str] = None,
        event_bus_name: Optional[str] = None) -> EventBus
func GetEventBus(ctx *Context, name string, id IDInput, state *EventBusState, opts ...ResourceOption) (*EventBus, error)
public static EventBus Get(string name, Input<string> id, EventBusState? state, CustomResourceOptions? opts = null)
public static EventBus get(String name, Output<String> id, EventBusState state, CustomResourceOptions options)
resources:  _:    type: alicloud:eventbridge:EventBus    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Description string
The description of event bus.
EventBusName Changes to this property will trigger replacement. string
The name of event bus. The length is limited to 2 ~ 127 characters, which can be composed of letters, numbers or hyphens (-)
Description string
The description of event bus.
EventBusName Changes to this property will trigger replacement. string
The name of event bus. The length is limited to 2 ~ 127 characters, which can be composed of letters, numbers or hyphens (-)
description String
The description of event bus.
eventBusName Changes to this property will trigger replacement. String
The name of event bus. The length is limited to 2 ~ 127 characters, which can be composed of letters, numbers or hyphens (-)
description string
The description of event bus.
eventBusName Changes to this property will trigger replacement. string
The name of event bus. The length is limited to 2 ~ 127 characters, which can be composed of letters, numbers or hyphens (-)
description str
The description of event bus.
event_bus_name Changes to this property will trigger replacement. str
The name of event bus. The length is limited to 2 ~ 127 characters, which can be composed of letters, numbers or hyphens (-)
description String
The description of event bus.
eventBusName Changes to this property will trigger replacement. String
The name of event bus. The length is limited to 2 ~ 127 characters, which can be composed of letters, numbers or hyphens (-)

Import

Event Bridge Event Bus can be imported using the id, e.g.

$ pulumi import alicloud:eventbridge/eventBus:EventBus example <event_bus_name>
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.