1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. eventbridge
  5. EventBus
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

alicloud.eventbridge.EventBus

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

    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});
    
    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)
    
    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
    	})
    }
    
    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,
        });
    
    });
    
    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());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: tf-example
    resources:
      example:
        type: alicloud:eventbridge:EventBus
        properties:
          eventBusName: ${name}
    

    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 string
    The unique name of the resource.
    args EventBusArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args 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 string
    The unique name of the resource.
    args EventBusArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args EventBusArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args EventBusArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

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

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

    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

    The EventBus resource accepts the following input properties:

    EventBusName 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 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 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 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 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 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)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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 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 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 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 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 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 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>
    

    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.
    alicloud logo
    Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi