AWS v6.71.0 published on Friday, Mar 7, 2025 by Pulumi
aws.cloudwatch.getEventBuses
Explore with Pulumi AI
Data source for managing an AWS EventBridge Event Buses.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.cloudwatch.getEventBuses({
    namePrefix: "test",
});
import pulumi
import pulumi_aws as aws
example = aws.cloudwatch.get_event_buses(name_prefix="test")
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.GetEventBuses(ctx, &cloudwatch.GetEventBusesArgs{
			NamePrefix: pulumi.StringRef("test"),
		}, 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.GetEventBuses.Invoke(new()
    {
        NamePrefix = "test",
    });
});
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.GetEventBusesArgs;
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.getEventBuses(GetEventBusesArgs.builder()
            .namePrefix("test")
            .build());
    }
}
variables:
  example:
    fn::invoke:
      function: aws:cloudwatch:getEventBuses
      arguments:
        namePrefix: test
Using getEventBuses
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 getEventBuses(args: GetEventBusesArgs, opts?: InvokeOptions): Promise<GetEventBusesResult>
function getEventBusesOutput(args: GetEventBusesOutputArgs, opts?: InvokeOptions): Output<GetEventBusesResult>def get_event_buses(name_prefix: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetEventBusesResult
def get_event_buses_output(name_prefix: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetEventBusesResult]func GetEventBuses(ctx *Context, args *GetEventBusesArgs, opts ...InvokeOption) (*GetEventBusesResult, error)
func GetEventBusesOutput(ctx *Context, args *GetEventBusesOutputArgs, opts ...InvokeOption) GetEventBusesResultOutput> Note: This function is named GetEventBuses in the Go SDK.
public static class GetEventBuses 
{
    public static Task<GetEventBusesResult> InvokeAsync(GetEventBusesArgs args, InvokeOptions? opts = null)
    public static Output<GetEventBusesResult> Invoke(GetEventBusesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetEventBusesResult> getEventBuses(GetEventBusesArgs args, InvokeOptions options)
public static Output<GetEventBusesResult> getEventBuses(GetEventBusesArgs args, InvokeOptions options)
fn::invoke:
  function: aws:cloudwatch/getEventBuses:getEventBuses
  arguments:
    # arguments dictionaryThe following arguments are supported:
- NamePrefix string
- Specifying this limits the results to only those event buses with names that start with the specified prefix.
- NamePrefix string
- Specifying this limits the results to only those event buses with names that start with the specified prefix.
- namePrefix String
- Specifying this limits the results to only those event buses with names that start with the specified prefix.
- namePrefix string
- Specifying this limits the results to only those event buses with names that start with the specified prefix.
- name_prefix str
- Specifying this limits the results to only those event buses with names that start with the specified prefix.
- namePrefix String
- Specifying this limits the results to only those event buses with names that start with the specified prefix.
getEventBuses Result
The following output properties are available:
- EventBuses List<GetEvent Buses Event Bus> 
- This list of event buses.
- Id string
- The provider-assigned unique ID for this managed resource.
- NamePrefix string
- EventBuses []GetEvent Buses Event Bus 
- This list of event buses.
- Id string
- The provider-assigned unique ID for this managed resource.
- NamePrefix string
- eventBuses List<GetEvent Buses Event Bus> 
- This list of event buses.
- id String
- The provider-assigned unique ID for this managed resource.
- namePrefix String
- eventBuses GetEvent Buses Event Bus[] 
- This list of event buses.
- id string
- The provider-assigned unique ID for this managed resource.
- namePrefix string
- event_buses Sequence[GetEvent Buses Event Bus] 
- This list of event buses.
- id str
- The provider-assigned unique ID for this managed resource.
- name_prefix str
- eventBuses List<Property Map>
- This list of event buses.
- id String
- The provider-assigned unique ID for this managed resource.
- namePrefix String
Supporting Types
GetEventBusesEventBus    
- Arn string
- The ARN of the event bus.
- CreationTime string
- The time the event bus was created.
- Description string
- The event bus description.
- LastModified stringTime 
- The time the event bus was last modified.
- Name string
- The name of the event bus.
- Policy string
- The permissions policy of the event bus, describing which other AWS accounts can write events to this event bus.
- Arn string
- The ARN of the event bus.
- CreationTime string
- The time the event bus was created.
- Description string
- The event bus description.
- LastModified stringTime 
- The time the event bus was last modified.
- Name string
- The name of the event bus.
- Policy string
- The permissions policy of the event bus, describing which other AWS accounts can write events to this event bus.
- arn String
- The ARN of the event bus.
- creationTime String
- The time the event bus was created.
- description String
- The event bus description.
- lastModified StringTime 
- The time the event bus was last modified.
- name String
- The name of the event bus.
- policy String
- The permissions policy of the event bus, describing which other AWS accounts can write events to this event bus.
- arn string
- The ARN of the event bus.
- creationTime string
- The time the event bus was created.
- description string
- The event bus description.
- lastModified stringTime 
- The time the event bus was last modified.
- name string
- The name of the event bus.
- policy string
- The permissions policy of the event bus, describing which other AWS accounts can write events to this event bus.
- arn str
- The ARN of the event bus.
- creation_time str
- The time the event bus was created.
- description str
- The event bus description.
- last_modified_ strtime 
- The time the event bus was last modified.
- name str
- The name of the event bus.
- policy str
- The permissions policy of the event bus, describing which other AWS accounts can write events to this event bus.
- arn String
- The ARN of the event bus.
- creationTime String
- The time the event bus was created.
- description String
- The event bus description.
- lastModified StringTime 
- The time the event bus was last modified.
- name String
- The name of the event bus.
- policy String
- The permissions policy of the event bus, describing which other AWS accounts can write events to this event bus.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the awsTerraform Provider.