Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:eventbridge/getEventSources:getEventSources
arguments:
# arguments dictionary
The following arguments are supported:
- Ids List<string>
- A list of Event Source IDs.
- Name
Regex string - 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 []string
- A list of Event Source IDs.
- Name
Regex string - 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 List<String>
- A list of Event Source IDs.
- name
Regex String - 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 string[]
- A list of Event Source IDs.
- name
Regex string - 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 Sequence[str]
- A list of Event Source IDs.
- name_
regex 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 List<String>
- A list of Event Source IDs.
- name
Regex String - 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 string
- The detail describe of event source.
- Event
Source stringName - The code name of event source.
- External
Source Dictionary<string, string>Config - The config of external data source.
- External
Source stringType - The type of external data source.
- Id string
- The ID of the Event Source.
- Linked
External boolSource - Whether to connect to an external data source.
- Type string
- Description string
- The detail describe of event source.
- Event
Source stringName - The code name of event source.
- External
Source map[string]stringConfig - The config of external data source.
- External
Source stringType - The type of external data source.
- Id string
- The ID of the Event Source.
- Linked
External boolSource - Whether to connect to an external data source.
- Type string
- description String
- The detail describe of event source.
- event
Source StringName - The code name of event source.
- external
Source Map<String,String>Config - The config of external data source.
- external
Source StringType - The type of external data source.
- id String
- The ID of the Event Source.
- linked
External BooleanSource - Whether to connect to an external data source.
- type String
- description string
- The detail describe of event source.
- event
Source stringName - The code name of event source.
- external
Source {[key: string]: string}Config - The config of external data source.
- external
Source stringType - The type of external data source.
- id string
- The ID of the Event Source.
- linked
External booleanSource - Whether to connect to an external data source.
- type string
- description str
- The detail describe of event source.
- event_
source_ strname - The code name of event source.
- external_
source_ Mapping[str, str]config - The config of external data source.
- external_
source_ strtype - The type of external data source.
- id str
- The ID of the Event Source.
- linked_
external_ boolsource - Whether to connect to an external data source.
- type str
- description String
- The detail describe of event source.
- event
Source StringName - The code name of event source.
- external
Source Map<String>Config - The config of external data source.
- external
Source StringType - The type of external data source.
- id String
- The ID of the Event Source.
- linked
External BooleanSource - Whether to connect to an external data source.
- type String
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.