1. Packages
  2. AWS
  3. API Docs
  4. cloudwatch
  5. getEventBus
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

aws.cloudwatch.getEventBus

Explore with Pulumi AI

aws logo
AWS v6.60.0 published on Tuesday, Nov 19, 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

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = aws.cloudwatch.getEventBus({
        name: "example-bus-name",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.cloudwatch.get_event_bus(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
    	})
    }
    
    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 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());
    
        }
    }
    
    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
    Name of the event bus.
    Name string
    Name of the event bus.
    name String
    Name of the event bus.
    name string
    Name of the event bus.
    name str
    Name of the event bus.
    name String
    Name of the event bus.

    getEventBus Result

    The following output properties are available:

    Arn string
    ARN of the event bus.
    Description string
    Event bus description.
    Id string
    The provider-assigned unique ID for this managed resource.
    KmsKeyIdentifier string
    Identifier of the AWS KMS customer managed key for EventBridge to use to encrypt events on this event bus, if one has been specified.
    Name string
    Arn string
    ARN of the event bus.
    Description string
    Event bus description.
    Id string
    The provider-assigned unique ID for this managed resource.
    KmsKeyIdentifier string
    Identifier of the AWS KMS customer managed key for EventBridge to use to encrypt events on this event bus, if one has been specified.
    Name string
    arn String
    ARN of the event bus.
    description String
    Event bus description.
    id String
    The provider-assigned unique ID for this managed resource.
    kmsKeyIdentifier String
    Identifier of the AWS KMS customer managed key for EventBridge to use to encrypt events on this event bus, if one has been specified.
    name String
    arn string
    ARN of the event bus.
    description string
    Event bus description.
    id string
    The provider-assigned unique ID for this managed resource.
    kmsKeyIdentifier string
    Identifier of the AWS KMS customer managed key for EventBridge to use to encrypt events on this event bus, if one has been specified.
    name string
    arn str
    ARN of the event bus.
    description str
    Event bus description.
    id str
    The provider-assigned unique ID for this managed resource.
    kms_key_identifier str
    Identifier of the AWS KMS customer managed key for EventBridge to use to encrypt events on this event bus, if one has been specified.
    name str
    arn String
    ARN of the event bus.
    description String
    Event bus description.
    id String
    The provider-assigned unique ID for this managed resource.
    kmsKeyIdentifier String
    Identifier of the AWS KMS customer managed key for EventBridge to use to encrypt events on this event bus, if one has been specified.
    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
    AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi