1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. eventbridge
  5. getEventSources
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.eventbridge.getEventSources

Explore with Pulumi AI

Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

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);
Copy
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)
Copy
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
	})
}
Copy
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),
    };
});
Copy
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()));
    }
}
Copy
variables:
  example:
    fn::invoke:
      function: alicloud:eventbridge:getEventSources
      arguments:
        ids:
          - example_value
        nameRegex: the_resource_name
outputs:
  firstEventBridgeEventSourceId: ${example.sources[0].id}
Copy

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>
Copy
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]
Copy
func GetEventSources(ctx *Context, args *GetEventSourcesArgs, opts ...InvokeOption) (*GetEventSourcesResult, error)
func GetEventSourcesOutput(ctx *Context, args *GetEventSourcesOutputArgs, opts ...InvokeOption) GetEventSourcesResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetEventSourcesResult> getEventSources(GetEventSourcesArgs args, InvokeOptions options)
public static Output<GetEventSourcesResult> getEventSources(GetEventSourcesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:eventbridge/getEventSources:getEventSources
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Ids Changes to this property will trigger replacement. List<string>
A list of Event Source IDs.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter results by Event Source name.
OutputFile string
File name where to save data source results (after running pulumi preview).
Ids Changes to this property will trigger replacement. []string
A list of Event Source IDs.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter results by Event Source name.
OutputFile string
File name where to save data source results (after running pulumi preview).
ids Changes to this property will trigger replacement. List<String>
A list of Event Source IDs.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter results by Event Source name.
outputFile String
File name where to save data source results (after running pulumi preview).
ids Changes to this property will trigger replacement. string[]
A list of Event Source IDs.
nameRegex Changes to this property will trigger replacement. string
A regex string to filter results by Event Source name.
outputFile string
File name where to save data source results (after running pulumi preview).
ids Changes to this property will trigger replacement. Sequence[str]
A list of Event Source IDs.
name_regex Changes to this property will trigger replacement. str
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. List<String>
A list of Event Source IDs.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter results by Event Source name.
outputFile 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.AliCloud.EventBridge.Outputs.GetEventSourcesSource>
NameRegex string
OutputFile string
Id string
The provider-assigned unique ID for this managed resource.
Ids []string
Names []string
Sources []GetEventSourcesSource
NameRegex string
OutputFile string
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
names List<String>
sources List<GetEventSourcesSource>
nameRegex String
outputFile String
id string
The provider-assigned unique ID for this managed resource.
ids string[]
names string[]
sources GetEventSourcesSource[]
nameRegex string
outputFile string
id str
The provider-assigned unique ID for this managed resource.
ids Sequence[str]
names Sequence[str]
sources Sequence[GetEventSourcesSource]
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>
nameRegex String
outputFile String

Supporting Types

GetEventSourcesSource

Description This property is required. string
The detail describe of event source.
EventSourceName This property is required. string
The code name of event source.
ExternalSourceConfig This property is required. Dictionary<string, string>
The config of external data source.
ExternalSourceType This property is required. string
The type of external data source.
Id This property is required. string
The ID of the Event Source.
LinkedExternalSource 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.
EventSourceName This property is required. string
The code name of event source.
ExternalSourceConfig This property is required. map[string]string
The config of external data source.
ExternalSourceType This property is required. string
The type of external data source.
Id This property is required. string
The ID of the Event Source.
LinkedExternalSource 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.
eventSourceName This property is required. String
The code name of event source.
externalSourceConfig This property is required. Map<String,String>
The config of external data source.
externalSourceType This property is required. String
The type of external data source.
id This property is required. String
The ID of the Event Source.
linkedExternalSource 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.
eventSourceName This property is required. string
The code name of event source.
externalSourceConfig This property is required. {[key: string]: string}
The config of external data source.
externalSourceType This property is required. string
The type of external data source.
id This property is required. string
The ID of the Event Source.
linkedExternalSource 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.
eventSourceName This property is required. String
The code name of event source.
externalSourceConfig This property is required. Map<String>
The config of external data source.
externalSourceType This property is required. String
The type of external data source.
id This property is required. String
The ID of the Event Source.
linkedExternalSource 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.
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi