Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi
alicloud.eventbridge.getEventSources
Explore with Pulumi AI
This data source provides the Event Bridge Event Sources of the current Alibaba Cloud user.
NOTE: Available in v1.130.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const example = alicloud.eventbridge.getEventSources({
ids: ["example_value"],
nameRegex: "the_resource_name",
});
export const firstEventBridgeEventSourceId = example.then(example => example.sources?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
example = alicloud.eventbridge.get_event_sources(ids=["example_value"],
name_regex="the_resource_name")
pulumi.export("firstEventBridgeEventSourceId", example.sources[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 {
example, err := eventbridge.GetEventSources(ctx, &eventbridge.GetEventSourcesArgs{
Ids: []string{
"example_value",
},
NameRegex: pulumi.StringRef("the_resource_name"),
}, nil)
if err != nil {
return err
}
ctx.Export("firstEventBridgeEventSourceId", example.Sources[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var example = AliCloud.EventBridge.GetEventSources.Invoke(new()
{
Ids = new[]
{
"example_value",
},
NameRegex = "the_resource_name",
});
return new Dictionary<string, object?>
{
["firstEventBridgeEventSourceId"] = example.Apply(getEventSourcesResult => getEventSourcesResult.Sources[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.GetEventSourcesArgs;
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 = EventbridgeFunctions.getEventSources(GetEventSourcesArgs.builder()
.ids("example_value")
.nameRegex("the_resource_name")
.build());
ctx.export("firstEventBridgeEventSourceId", example.applyValue(getEventSourcesResult -> getEventSourcesResult.sources()[0].id()));
}
}
variables:
example:
fn::invoke:
function: alicloud:eventbridge:getEventSources
arguments:
ids:
- example_value
nameRegex: the_resource_name
outputs:
firstEventBridgeEventSourceId: ${example.sources[0].id}
Using getEventSources
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 getEventSources(args: GetEventSourcesArgs, opts?: InvokeOptions): Promise<GetEventSourcesResult>
function getEventSourcesOutput(args: GetEventSourcesOutputArgs, opts?: InvokeOptions): Output<GetEventSourcesResult>
def get_event_sources(ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetEventSourcesResult
def get_event_sources_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetEventSourcesResult]
func GetEventSources(ctx *Context, args *GetEventSourcesArgs, opts ...InvokeOption) (*GetEventSourcesResult, error)
func GetEventSourcesOutput(ctx *Context, args *GetEventSourcesOutputArgs, opts ...InvokeOption) GetEventSourcesResultOutput
> Note: This function is named GetEventSources
in the Go SDK.
public static class GetEventSources
{
public static Task<GetEventSourcesResult> InvokeAsync(GetEventSourcesArgs args, InvokeOptions? opts = null)
public static Output<GetEventSourcesResult> Invoke(GetEventSourcesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetEventSourcesResult> getEventSources(GetEventSourcesArgs args, InvokeOptions options)
public static Output<GetEventSourcesResult> getEventSources(GetEventSourcesArgs args, InvokeOptions options)
fn::invoke:
function: alicloud:eventbridge/getEventSources:getEventSources
arguments:
# arguments dictionary
The following arguments are supported:
- Ids
Changes to this property will trigger replacement.
- A list of Event Source IDs.
- Name
Regex Changes to this property will trigger replacement.
- A regex string to filter results by Event Source name.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- Ids
Changes to this property will trigger replacement.
- A list of Event Source IDs.
- Name
Regex Changes to this property will trigger replacement.
- A regex string to filter results by Event Source name.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- ids
Changes to this property will trigger replacement.
- A list of Event Source IDs.
- name
Regex Changes to this property will trigger replacement.
- A regex string to filter results by Event Source name.
- output
File String - File name where to save data source results (after running
pulumi preview
).
- ids
Changes to this property will trigger replacement.
- A list of Event Source IDs.
- name
Regex Changes to this property will trigger replacement.
- A regex string to filter results by Event Source name.
- output
File string - File name where to save data source results (after running
pulumi preview
).
- ids
Changes to this property will trigger replacement.
- A list of Event Source IDs.
- name_
regex Changes to this property will trigger replacement.
- A regex string to filter results by Event Source name.
- output_
file str - File name where to save data source results (after running
pulumi preview
).
- ids
Changes to this property will trigger replacement.
- A list of Event Source IDs.
- name
Regex Changes to this property will trigger replacement.
- A regex string to filter results by Event Source name.
- output
File String - File name where to save data source results (after running
pulumi preview
).
getEventSources Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- Sources
List<Pulumi.
Ali Cloud. Event Bridge. Outputs. Get Event Sources Source> - Name
Regex string - Output
File string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- Sources
[]Get
Event Sources Source - Name
Regex string - Output
File string
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- sources
List<Get
Event Sources Source> - name
Regex String - output
File String
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- sources
Get
Event Sources Source[] - name
Regex string - output
File string
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- sources
Sequence[Get
Event Sources Source] - name_
regex str - output_
file str
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- sources List<Property Map>
- name
Regex String - output
File String
Supporting Types
GetEventSourcesSource
- Description
This property is required. string - The detail describe of event source.
- Event
Source Name This property is required. string - The code name of event source.
- External
Source Config This property is required. Dictionary<string, string> - The config of external data source.
- External
Source Type This property is required. string - The type of external data source.
- Id
This property is required. string - The ID of the Event Source.
- Linked
External Source This property is required. bool - Whether to connect to an external data source.
- Type
This property is required. string
- Description
This property is required. string - The detail describe of event source.
- Event
Source Name This property is required. string - The code name of event source.
- External
Source Config This property is required. map[string]string - The config of external data source.
- External
Source Type This property is required. string - The type of external data source.
- Id
This property is required. string - The ID of the Event Source.
- Linked
External Source This property is required. bool - Whether to connect to an external data source.
- Type
This property is required. string
- description
This property is required. String - The detail describe of event source.
- event
Source Name This property is required. String - The code name of event source.
- external
Source Config This property is required. Map<String,String> - The config of external data source.
- external
Source Type This property is required. String - The type of external data source.
- id
This property is required. String - The ID of the Event Source.
- linked
External Source This property is required. Boolean - Whether to connect to an external data source.
- type
This property is required. String
- description
This property is required. string - The detail describe of event source.
- event
Source Name This property is required. string - The code name of event source.
- external
Source Config This property is required. {[key: string]: string} - The config of external data source.
- external
Source Type This property is required. string - The type of external data source.
- id
This property is required. string - The ID of the Event Source.
- linked
External Source This property is required. boolean - Whether to connect to an external data source.
- type
This property is required. string
- description
This property is required. str - The detail describe of event source.
- event_
source_ name This property is required. str - The code name of event source.
- external_
source_ config This property is required. Mapping[str, str] - The config of external data source.
- external_
source_ type This property is required. str - The type of external data source.
- id
This property is required. str - The ID of the Event Source.
- linked_
external_ source This property is required. bool - Whether to connect to an external data source.
- type
This property is required. str
- description
This property is required. String - The detail describe of event source.
- event
Source Name This property is required. String - The code name of event source.
- external
Source Config This property is required. Map<String> - The config of external data source.
- external
Source Type This property is required. String - The type of external data source.
- id
This property is required. String - The ID of the Event Source.
- linked
External Source This property is required. Boolean - Whether to connect to an external data source.
- type
This property is required. String
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.