AWS Classic

Pulumi Official
Package maintained by Pulumi
v5.10.0 published on Monday, Jul 11, 2022 by Pulumi

getEventBus

This data source can be used to fetch information about a specific EventBridge event bus. Use this data source to compute the ARN of an event bus, given the name of the bus.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Aws.CloudWatch.GetEventBus.InvokeAsync(new Aws.CloudWatch.GetEventBusArgs
        {
            Name = "example-bus-name",
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/cloudwatch"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cloudwatch.LookupEventBus(ctx, &cloudwatch.LookupEventBusArgs{
			Name: "example-bus-name",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var example = Output.of(CloudwatchFunctions.getEventBus(GetEventBusArgs.builder()
            .name("example-bus-name")
            .build()));

    }
}
import pulumi
import pulumi_aws as aws

example = aws.cloudwatch.get_event_bus(name="example-bus-name")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = pulumi.output(aws.cloudwatch.getEventBus({
    name: "example-bus-name",
}));
variables:
  example:
    Fn::Invoke:
      Function: aws:cloudwatch:getEventBus
      Arguments:
        name: example-bus-name

Using getEventBus

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getEventBus(args: GetEventBusArgs, opts?: InvokeOptions): Promise<GetEventBusResult>
function getEventBusOutput(args: GetEventBusOutputArgs, opts?: InvokeOptions): Output<GetEventBusResult>
def get_event_bus(name: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetEventBusResult
def get_event_bus_output(name: Optional[pulumi.Input[str]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetEventBusResult]
func LookupEventBus(ctx *Context, args *LookupEventBusArgs, opts ...InvokeOption) (*LookupEventBusResult, error)
func LookupEventBusOutput(ctx *Context, args *LookupEventBusOutputArgs, opts ...InvokeOption) LookupEventBusResultOutput

> Note: This function is named LookupEventBus in the Go SDK.

public static class GetEventBus 
{
    public static Task<GetEventBusResult> InvokeAsync(GetEventBusArgs args, InvokeOptions? opts = null)
    public static Output<GetEventBusResult> Invoke(GetEventBusInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetEventBusResult> getEventBus(GetEventBusArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: aws:cloudwatch/getEventBus:getEventBus
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Name string

The friendly EventBridge event bus name.

Name string

The friendly EventBridge event bus name.

name String

The friendly EventBridge event bus name.

name string

The friendly EventBridge event bus name.

name str

The friendly EventBridge event bus name.

name String

The friendly EventBridge event bus name.

getEventBus Result

The following output properties are available:

Arn string

The Amazon Resource Name (ARN) specifying the role.

Id string

The provider-assigned unique ID for this managed resource.

Name string
Arn string

The Amazon Resource Name (ARN) specifying the role.

Id string

The provider-assigned unique ID for this managed resource.

Name string
arn String

The Amazon Resource Name (ARN) specifying the role.

id String

The provider-assigned unique ID for this managed resource.

name String
arn string

The Amazon Resource Name (ARN) specifying the role.

id string

The provider-assigned unique ID for this managed resource.

name string
arn str

The Amazon Resource Name (ARN) specifying the role.

id str

The provider-assigned unique ID for this managed resource.

name str
arn String

The Amazon Resource Name (ARN) specifying the role.

id String

The provider-assigned unique ID for this managed resource.

name String

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.