1. Packages
  2. AWS Classic
  3. API Docs
  4. cloudwatch
  5. getEventBus

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.23.0 published on Thursday, Feb 22, 2024 by Pulumi

aws.cloudwatch.getEventBus

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.23.0 published on Thursday, Feb 22, 2024 by Pulumi

    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 System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Aws.CloudWatch.GetEventBus.Invoke(new()
        {
            Name = "example-bus-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 {
    		_, err := cloudwatch.LookupEventBus(ctx, &cloudwatch.LookupEventBusArgs{
    			Name: "example-bus-name",
    		}, nil)
    		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.GetEventBusArgs;
    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 example = 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 = 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
    Friendly EventBridge event bus name.
    Name string
    Friendly EventBridge event bus name.
    name String
    Friendly EventBridge event bus name.
    name string
    Friendly EventBridge event bus name.
    name str
    Friendly EventBridge event bus name.
    name String
    Friendly EventBridge event bus name.

    getEventBus Result

    The following output properties are available:

    Arn string
    ARN.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Arn string
    ARN.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    arn String
    ARN.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    arn string
    ARN.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    arn str
    ARN.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    arn String
    ARN.
    id String
    The provider-assigned unique ID for this managed resource.
    name String

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.23.0 published on Thursday, Feb 22, 2024 by Pulumi