1. Packages
  2. AWS Classic
  3. API Docs
  4. cloudwatch
  5. getEventSource

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.32.0 published on Friday, Apr 19, 2024 by Pulumi

aws.cloudwatch.getEventSource

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.32.0 published on Friday, Apr 19, 2024 by Pulumi

    Use this data source to get information about an EventBridge Partner Event Source. This data source will only return one partner event source. An error will be returned if multiple sources match the same name prefix.

    Note: EventBridge was formerly known as CloudWatch Events. The functionality is identical.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const examplepartner = aws.cloudwatch.getEventSource({
        namePrefix: "aws.partner/examplepartner.com",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    examplepartner = aws.cloudwatch.get_event_source(name_prefix="aws.partner/examplepartner.com")
    
    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.GetEventSource(ctx, &cloudwatch.GetEventSourceArgs{
    			NamePrefix: pulumi.StringRef("aws.partner/examplepartner.com"),
    		}, 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 examplepartner = Aws.CloudWatch.GetEventSource.Invoke(new()
        {
            NamePrefix = "aws.partner/examplepartner.com",
        });
    
    });
    
    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.GetEventSourceArgs;
    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 examplepartner = CloudwatchFunctions.getEventSource(GetEventSourceArgs.builder()
                .namePrefix("aws.partner/examplepartner.com")
                .build());
    
        }
    }
    
    variables:
      examplepartner:
        fn::invoke:
          Function: aws:cloudwatch:getEventSource
          Arguments:
            namePrefix: aws.partner/examplepartner.com
    

    Using getEventSource

    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 getEventSource(args: GetEventSourceArgs, opts?: InvokeOptions): Promise<GetEventSourceResult>
    function getEventSourceOutput(args: GetEventSourceOutputArgs, opts?: InvokeOptions): Output<GetEventSourceResult>
    def get_event_source(name_prefix: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetEventSourceResult
    def get_event_source_output(name_prefix: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetEventSourceResult]
    func GetEventSource(ctx *Context, args *GetEventSourceArgs, opts ...InvokeOption) (*GetEventSourceResult, error)
    func GetEventSourceOutput(ctx *Context, args *GetEventSourceOutputArgs, opts ...InvokeOption) GetEventSourceResultOutput

    > Note: This function is named GetEventSource in the Go SDK.

    public static class GetEventSource 
    {
        public static Task<GetEventSourceResult> InvokeAsync(GetEventSourceArgs args, InvokeOptions? opts = null)
        public static Output<GetEventSourceResult> Invoke(GetEventSourceInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetEventSourceResult> getEventSource(GetEventSourceArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:cloudwatch/getEventSource:getEventSource
      arguments:
        # arguments dictionary

    The following arguments are supported:

    NamePrefix string
    Specifying this limits the results to only those partner event sources with names that start with the specified prefix
    NamePrefix string
    Specifying this limits the results to only those partner event sources with names that start with the specified prefix
    namePrefix String
    Specifying this limits the results to only those partner event sources with names that start with the specified prefix
    namePrefix string
    Specifying this limits the results to only those partner event sources with names that start with the specified prefix
    name_prefix str
    Specifying this limits the results to only those partner event sources with names that start with the specified prefix
    namePrefix String
    Specifying this limits the results to only those partner event sources with names that start with the specified prefix

    getEventSource Result

    The following output properties are available:

    Arn string
    ARN of the partner event source
    CreatedBy string
    Name of the SaaS partner that created the event source
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Name of the event source
    State string
    State of the event source (ACTIVE or PENDING)
    NamePrefix string
    Arn string
    ARN of the partner event source
    CreatedBy string
    Name of the SaaS partner that created the event source
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Name of the event source
    State string
    State of the event source (ACTIVE or PENDING)
    NamePrefix string
    arn String
    ARN of the partner event source
    createdBy String
    Name of the SaaS partner that created the event source
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Name of the event source
    state String
    State of the event source (ACTIVE or PENDING)
    namePrefix String
    arn string
    ARN of the partner event source
    createdBy string
    Name of the SaaS partner that created the event source
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    Name of the event source
    state string
    State of the event source (ACTIVE or PENDING)
    namePrefix string
    arn str
    ARN of the partner event source
    created_by str
    Name of the SaaS partner that created the event source
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    Name of the event source
    state str
    State of the event source (ACTIVE or PENDING)
    name_prefix str
    arn String
    ARN of the partner event source
    createdBy String
    Name of the SaaS partner that created the event source
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Name of the event source
    state String
    State of the event source (ACTIVE or PENDING)
    namePrefix String

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.32.0 published on Friday, Apr 19, 2024 by Pulumi