Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi
alicloud.eventbridge.getEventBuses
Explore with Pulumi AI
This data source provides the Event Bridge Event Buses of the current Alibaba Cloud user.
NOTE: Available in v1.129.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.eventbridge.getEventBuses({});
export const eventBridgeEventBusId1 = ids.then(ids => ids.buses?.[0]?.id);
const nameRegex = alicloud.eventbridge.getEventBuses({
nameRegex: "^my-EventBus",
});
export const eventBridgeEventBusId2 = nameRegex.then(nameRegex => nameRegex.buses?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.eventbridge.get_event_buses()
pulumi.export("eventBridgeEventBusId1", ids.buses[0].id)
name_regex = alicloud.eventbridge.get_event_buses(name_regex="^my-EventBus")
pulumi.export("eventBridgeEventBusId2", name_regex.buses[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/eventbridge"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
ids, err := eventbridge.GetEventBuses(ctx, nil, nil)
if err != nil {
return err
}
ctx.Export("eventBridgeEventBusId1", ids.Buses[0].Id)
nameRegex, err := eventbridge.GetEventBuses(ctx, &eventbridge.GetEventBusesArgs{
NameRegex: pulumi.StringRef("^my-EventBus"),
}, nil)
if err != nil {
return err
}
ctx.Export("eventBridgeEventBusId2", nameRegex.Buses[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var ids = AliCloud.EventBridge.GetEventBuses.Invoke();
var nameRegex = AliCloud.EventBridge.GetEventBuses.Invoke(new()
{
NameRegex = "^my-EventBus",
});
return new Dictionary<string, object?>
{
["eventBridgeEventBusId1"] = ids.Apply(getEventBusesResult => getEventBusesResult.Buses[0]?.Id),
["eventBridgeEventBusId2"] = nameRegex.Apply(getEventBusesResult => getEventBusesResult.Buses[0]?.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.eventbridge.EventbridgeFunctions;
import com.pulumi.alicloud.eventbridge.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 ids = EventbridgeFunctions.getEventBuses();
ctx.export("eventBridgeEventBusId1", ids.applyValue(getEventBusesResult -> getEventBusesResult.buses()[0].id()));
final var nameRegex = EventbridgeFunctions.getEventBuses(GetEventBusesArgs.builder()
.nameRegex("^my-EventBus")
.build());
ctx.export("eventBridgeEventBusId2", nameRegex.applyValue(getEventBusesResult -> getEventBusesResult.buses()[0].id()));
}
}
variables:
ids:
fn::invoke:
Function: alicloud:eventbridge:getEventBuses
Arguments: {}
nameRegex:
fn::invoke:
Function: alicloud:eventbridge:getEventBuses
Arguments:
nameRegex: ^my-EventBus
outputs:
eventBridgeEventBusId1: ${ids.buses[0].id}
eventBridgeEventBusId2: ${nameRegex.buses[0].id}
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(event_bus_type: Optional[str] = None,
ids: Optional[Sequence[str]] = None,
name_prefix: Optional[str] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetEventBusesResult
def get_event_buses_output(event_bus_type: Optional[pulumi.Input[str]] = None,
ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name_prefix: Optional[pulumi.Input[str]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: 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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:eventbridge/getEventBuses:getEventBuses
arguments:
# arguments dictionary
The following arguments are supported:
- Event
Bus stringType - The event bus type.
- Ids List<string>
- A list of Event Bus IDs. Its element value is same as Event Bus Name.
- Name
Prefix string - The name prefix.
- Name
Regex string - A regex string to filter results by Event Bus name.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- Event
Bus stringType - The event bus type.
- Ids []string
- A list of Event Bus IDs. Its element value is same as Event Bus Name.
- Name
Prefix string - The name prefix.
- Name
Regex string - A regex string to filter results by Event Bus name.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- event
Bus StringType - The event bus type.
- ids List<String>
- A list of Event Bus IDs. Its element value is same as Event Bus Name.
- name
Prefix String - The name prefix.
- name
Regex String - A regex string to filter results by Event Bus name.
- output
File String - File name where to save data source results (after running
pulumi preview
).
- event
Bus stringType - The event bus type.
- ids string[]
- A list of Event Bus IDs. Its element value is same as Event Bus Name.
- name
Prefix string - The name prefix.
- name
Regex string - A regex string to filter results by Event Bus name.
- output
File string - File name where to save data source results (after running
pulumi preview
).
- event_
bus_ strtype - The event bus type.
- ids Sequence[str]
- A list of Event Bus IDs. Its element value is same as Event Bus Name.
- name_
prefix str - The name prefix.
- name_
regex str - A regex string to filter results by Event Bus name.
- output_
file str - File name where to save data source results (after running
pulumi preview
).
- event
Bus StringType - The event bus type.
- ids List<String>
- A list of Event Bus IDs. Its element value is same as Event Bus Name.
- name
Prefix String - The name prefix.
- name
Regex String - A regex string to filter results by Event Bus name.
- output
File String - File name where to save data source results (after running
pulumi preview
).
getEventBuses Result
The following output properties are available:
- Buses
List<Pulumi.
Ali Cloud. Event Bridge. Outputs. Get Event Buses Bus> - Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- Event
Bus stringType - Name
Prefix string - Name
Regex string - Output
File string
- Buses
[]Get
Event Buses Bus - Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- Event
Bus stringType - Name
Prefix string - Name
Regex string - Output
File string
- buses
List<Get
Event Buses Bus> - id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- event
Bus StringType - name
Prefix String - name
Regex String - output
File String
- buses
Get
Event Buses Bus[] - id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- event
Bus stringType - name
Prefix string - name
Regex string - output
File string
- buses
Sequence[Get
Event Buses Bus] - id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- event_
bus_ strtype - name_
prefix str - name_
regex str - output_
file str
- buses List<Property Map>
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- event
Bus StringType - name
Prefix String - name
Regex String - output
File String
Supporting Types
GetEventBusesBus
- Create
Time string - The time of this bus was created.
- Description string
- The description of event bus.
- Event
Bus stringName - The name of event bus.
- Id string
- The ID of the Event Bus. Its value is same as Queue Name.
- Create
Time string - The time of this bus was created.
- Description string
- The description of event bus.
- Event
Bus stringName - The name of event bus.
- Id string
- The ID of the Event Bus. Its value is same as Queue Name.
- create
Time String - The time of this bus was created.
- description String
- The description of event bus.
- event
Bus StringName - The name of event bus.
- id String
- The ID of the Event Bus. Its value is same as Queue Name.
- create
Time string - The time of this bus was created.
- description string
- The description of event bus.
- event
Bus stringName - The name of event bus.
- id string
- The ID of the Event Bus. Its value is same as Queue Name.
- create_
time str - The time of this bus was created.
- description str
- The description of event bus.
- event_
bus_ strname - The name of event bus.
- id str
- The ID of the Event Bus. Its value is same as Queue Name.
- create
Time String - The time of this bus was created.
- description String
- The description of event bus.
- event
Bus StringName - The name of event bus.
- id String
- The ID of the Event Bus. Its value is same as Queue Name.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.