1. Registry
  2. Packages
  3. AWS
  4. API Docs
  5. rds
  6. getEvents
Viewing docs for AWS v7.46.0
published on Thursday, Sep 10, 2026 by Pulumi
aws logo aws logo
Viewing docs for AWS v7.46.0
published on Thursday, Sep 10, 2026 by Pulumi

    Provides details about RDS events, as recorded in the RDS event stream. RDS records events such as maintenance and failure notifications that are not always surfaced by the AWS API as errors. This data source is a thin wrapper over the DescribeEvents API and does not evaluate or interpret the events it returns.

    The events attribute reflects a wall-clock time window at read time. The events themselves are stable, but because the window moves with each read, successive pulumi preview/refresh runs can return different results. If you use this data source to inspect events generated by another resource’s most recent apply, add a dependsOn on that resource so the read happens after the operation you’re investigating.

    Reading events requires the rds:DescribeEvents IAM permission.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = aws.rds.getEvents({
        sourceIdentifier: exampleAwsDbInstance.identifier,
        sourceType: "db-instance",
        eventCategories: [
            "failure",
            "maintenance",
        ],
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.rds.get_events(source_identifier=example_aws_db_instance["identifier"],
        source_type="db-instance",
        event_categories=[
            "failure",
            "maintenance",
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/rds"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := rds.GetEvents(ctx, &rds.GetEventsArgs{
    			SourceIdentifier: pulumi.StringRef(exampleAwsDbInstance.Identifier),
    			SourceType:       pulumi.StringRef("db-instance"),
    			EventCategories: []string{
    				"failure",
    				"maintenance",
    			},
    		}, 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 example = Aws.Rds.GetEvents.Invoke(new()
        {
            SourceIdentifier = exampleAwsDbInstance.Identifier,
            SourceType = "db-instance",
            EventCategories = new[]
            {
                "failure",
                "maintenance",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.rds.RdsFunctions;
    import com.pulumi.aws.rds.inputs.GetEventsArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 = RdsFunctions.getEvents(GetEventsArgs.builder()
                .sourceIdentifier(exampleAwsDbInstance.identifier())
                .sourceType("db-instance")
                .eventCategories(            
                    "failure",
                    "maintenance")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: aws:rds:getEvents
          arguments:
            sourceIdentifier: ${exampleAwsDbInstance.identifier}
            sourceType: db-instance
            eventCategories:
              - failure
              - maintenance
    
    pulumi {
      required_providers {
        aws = {
          source = "pulumi/aws"
        }
      }
    }
    
    data "aws_rds_getevents" "example" {
      source_identifier = exampleAwsDbInstance.identifier
      source_type       = "db-instance"
      event_categories  = ["failure", "maintenance"]
    }
    

    Using getEvents

    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 getEvents(args: GetEventsArgs, opts?: InvokeOptions): Promise<GetEventsResult>
    function getEventsOutput(args: GetEventsOutputArgs, opts?: InvokeOutputOptions): Output<GetEventsResult>
    def get_events(duration: Optional[int] = None,
                   end_time: Optional[str] = None,
                   event_categories: Optional[Sequence[str]] = None,
                   region: Optional[str] = None,
                   source_identifier: Optional[str] = None,
                   source_type: Optional[str] = None,
                   start_time: Optional[str] = None,
                   opts: Optional[InvokeOptions] = None) -> GetEventsResult
    def get_events_output(duration: pulumi.Input[Optional[int]] = None,
                   end_time: pulumi.Input[Optional[str]] = None,
                   event_categories: pulumi.Input[Optional[Sequence[pulumi.Input[str]]]] = None,
                   region: pulumi.Input[Optional[str]] = None,
                   source_identifier: pulumi.Input[Optional[str]] = None,
                   source_type: pulumi.Input[Optional[str]] = None,
                   start_time: pulumi.Input[Optional[str]] = None,
                   opts: Optional[InvokeOutputOptions] = None) -> Output[GetEventsResult]
    func GetEvents(ctx *Context, args *GetEventsArgs, opts ...InvokeOption) (*GetEventsResult, error)
    func GetEventsOutput(ctx *Context, args *GetEventsOutputArgs, opts ...InvokeOption) GetEventsResultOutput

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

    public static class GetEvents 
    {
        public static Task<GetEventsResult> InvokeAsync(GetEventsArgs args, InvokeOptions? opts = null)
        public static Output<GetEventsResult> Invoke(GetEventsInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetEventsResult> Invoke(GetEventsInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetEventsResult> getEvents(GetEventsArgs args, InvokeOptions options)
    public static Output<GetEventsResult> getEvents(GetEventsArgs args, InvokeOptions options)
    public static Output<GetEventsResult> getEvents(GetEventsArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: aws:rds/getEvents:getEvents
      arguments:
        # arguments dictionary
    data "aws_rds_get_events" "name" {
        # arguments
    }

    The following arguments are supported:

    Duration int
    Number of minutes to look back from now. Conflicts with startTime and endTime.
    EndTime string
    End of the time interval, in RFC3339 format. Conflicts with duration.
    EventCategories List<string>
    Set of event categories to filter on, e.g. failure, maintenance, configuration change. Defaults to all categories.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    SourceIdentifier string
    Identifier of the source, such as a DB instance or DB cluster identifier. Requires sourceType to also be set.
    SourceType string
    Type of source. Valid values include db-instance, db-cluster, db-snapshot, db-parameter-group, db-security-group, db-cluster-snapshot, custom-engine-version, db-proxy, blue-green-deployment, db-shard-group, and zero-etl.
    StartTime string
    Start of the time interval, in RFC3339 format. Conflicts with duration.
    Duration int
    Number of minutes to look back from now. Conflicts with startTime and endTime.
    EndTime string
    End of the time interval, in RFC3339 format. Conflicts with duration.
    EventCategories []string
    Set of event categories to filter on, e.g. failure, maintenance, configuration change. Defaults to all categories.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    SourceIdentifier string
    Identifier of the source, such as a DB instance or DB cluster identifier. Requires sourceType to also be set.
    SourceType string
    Type of source. Valid values include db-instance, db-cluster, db-snapshot, db-parameter-group, db-security-group, db-cluster-snapshot, custom-engine-version, db-proxy, blue-green-deployment, db-shard-group, and zero-etl.
    StartTime string
    Start of the time interval, in RFC3339 format. Conflicts with duration.
    duration number
    Number of minutes to look back from now. Conflicts with startTime and endTime.
    end_time string
    End of the time interval, in RFC3339 format. Conflicts with duration.
    event_categories list(string)
    Set of event categories to filter on, e.g. failure, maintenance, configuration change. Defaults to all categories.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    source_identifier string
    Identifier of the source, such as a DB instance or DB cluster identifier. Requires sourceType to also be set.
    source_type string
    Type of source. Valid values include db-instance, db-cluster, db-snapshot, db-parameter-group, db-security-group, db-cluster-snapshot, custom-engine-version, db-proxy, blue-green-deployment, db-shard-group, and zero-etl.
    start_time string
    Start of the time interval, in RFC3339 format. Conflicts with duration.
    duration Integer
    Number of minutes to look back from now. Conflicts with startTime and endTime.
    endTime String
    End of the time interval, in RFC3339 format. Conflicts with duration.
    eventCategories List<String>
    Set of event categories to filter on, e.g. failure, maintenance, configuration change. Defaults to all categories.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    sourceIdentifier String
    Identifier of the source, such as a DB instance or DB cluster identifier. Requires sourceType to also be set.
    sourceType String
    Type of source. Valid values include db-instance, db-cluster, db-snapshot, db-parameter-group, db-security-group, db-cluster-snapshot, custom-engine-version, db-proxy, blue-green-deployment, db-shard-group, and zero-etl.
    startTime String
    Start of the time interval, in RFC3339 format. Conflicts with duration.
    duration number
    Number of minutes to look back from now. Conflicts with startTime and endTime.
    endTime string
    End of the time interval, in RFC3339 format. Conflicts with duration.
    eventCategories string[]
    Set of event categories to filter on, e.g. failure, maintenance, configuration change. Defaults to all categories.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    sourceIdentifier string
    Identifier of the source, such as a DB instance or DB cluster identifier. Requires sourceType to also be set.
    sourceType string
    Type of source. Valid values include db-instance, db-cluster, db-snapshot, db-parameter-group, db-security-group, db-cluster-snapshot, custom-engine-version, db-proxy, blue-green-deployment, db-shard-group, and zero-etl.
    startTime string
    Start of the time interval, in RFC3339 format. Conflicts with duration.
    duration int
    Number of minutes to look back from now. Conflicts with startTime and endTime.
    end_time str
    End of the time interval, in RFC3339 format. Conflicts with duration.
    event_categories Sequence[str]
    Set of event categories to filter on, e.g. failure, maintenance, configuration change. Defaults to all categories.
    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    source_identifier str
    Identifier of the source, such as a DB instance or DB cluster identifier. Requires sourceType to also be set.
    source_type str
    Type of source. Valid values include db-instance, db-cluster, db-snapshot, db-parameter-group, db-security-group, db-cluster-snapshot, custom-engine-version, db-proxy, blue-green-deployment, db-shard-group, and zero-etl.
    start_time str
    Start of the time interval, in RFC3339 format. Conflicts with duration.
    duration Number
    Number of minutes to look back from now. Conflicts with startTime and endTime.
    endTime String
    End of the time interval, in RFC3339 format. Conflicts with duration.
    eventCategories List<String>
    Set of event categories to filter on, e.g. failure, maintenance, configuration change. Defaults to all categories.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    sourceIdentifier String
    Identifier of the source, such as a DB instance or DB cluster identifier. Requires sourceType to also be set.
    sourceType String
    Type of source. Valid values include db-instance, db-cluster, db-snapshot, db-parameter-group, db-security-group, db-cluster-snapshot, custom-engine-version, db-proxy, blue-green-deployment, db-shard-group, and zero-etl.
    startTime String
    Start of the time interval, in RFC3339 format. Conflicts with duration.

    getEvents Result

    The following output properties are available:

    Events List<GetEventsEvent>
    List of events. See events below.
    Region string
    Duration int
    EndTime string
    EventCategories List<string>
    List of categories for the event.
    SourceIdentifier string
    Identifier of the event source.
    SourceType string
    Type of the event source.
    StartTime string
    Events []GetEventsEvent
    List of events. See events below.
    Region string
    Duration int
    EndTime string
    EventCategories []string
    List of categories for the event.
    SourceIdentifier string
    Identifier of the event source.
    SourceType string
    Type of the event source.
    StartTime string
    events list(object)
    List of events. See events below.
    region string
    duration number
    end_time string
    event_categories list(string)
    List of categories for the event.
    source_identifier string
    Identifier of the event source.
    source_type string
    Type of the event source.
    start_time string
    events List<GetEventsEvent>
    List of events. See events below.
    region String
    duration Integer
    endTime String
    eventCategories List<String>
    List of categories for the event.
    sourceIdentifier String
    Identifier of the event source.
    sourceType String
    Type of the event source.
    startTime String
    events GetEventsEvent[]
    List of events. See events below.
    region string
    duration number
    endTime string
    eventCategories string[]
    List of categories for the event.
    sourceIdentifier string
    Identifier of the event source.
    sourceType string
    Type of the event source.
    startTime string
    events Sequence[GetEventsEvent]
    List of events. See events below.
    region str
    duration int
    end_time str
    event_categories Sequence[str]
    List of categories for the event.
    source_identifier str
    Identifier of the event source.
    source_type str
    Type of the event source.
    start_time str
    events List<Property Map>
    List of events. See events below.
    region String
    duration Number
    endTime String
    eventCategories List<String>
    List of categories for the event.
    sourceIdentifier String
    Identifier of the event source.
    sourceType String
    Type of the event source.
    startTime String

    Supporting Types

    GetEventsEvent

    Date string
    Date and time of the event, in RFC3339 format.
    EventCategories List<string>
    Set of event categories to filter on, e.g. failure, maintenance, configuration change. Defaults to all categories.
    Message string
    Text of the event.
    SourceArn string
    ARN of the event source.
    SourceIdentifier string
    Identifier of the source, such as a DB instance or DB cluster identifier. Requires sourceType to also be set.
    SourceType string
    Type of source. Valid values include db-instance, db-cluster, db-snapshot, db-parameter-group, db-security-group, db-cluster-snapshot, custom-engine-version, db-proxy, blue-green-deployment, db-shard-group, and zero-etl.
    Date string
    Date and time of the event, in RFC3339 format.
    EventCategories []string
    Set of event categories to filter on, e.g. failure, maintenance, configuration change. Defaults to all categories.
    Message string
    Text of the event.
    SourceArn string
    ARN of the event source.
    SourceIdentifier string
    Identifier of the source, such as a DB instance or DB cluster identifier. Requires sourceType to also be set.
    SourceType string
    Type of source. Valid values include db-instance, db-cluster, db-snapshot, db-parameter-group, db-security-group, db-cluster-snapshot, custom-engine-version, db-proxy, blue-green-deployment, db-shard-group, and zero-etl.
    date string
    Date and time of the event, in RFC3339 format.
    event_categories list(string)
    Set of event categories to filter on, e.g. failure, maintenance, configuration change. Defaults to all categories.
    message string
    Text of the event.
    source_arn string
    ARN of the event source.
    source_identifier string
    Identifier of the source, such as a DB instance or DB cluster identifier. Requires sourceType to also be set.
    source_type string
    Type of source. Valid values include db-instance, db-cluster, db-snapshot, db-parameter-group, db-security-group, db-cluster-snapshot, custom-engine-version, db-proxy, blue-green-deployment, db-shard-group, and zero-etl.
    date String
    Date and time of the event, in RFC3339 format.
    eventCategories List<String>
    Set of event categories to filter on, e.g. failure, maintenance, configuration change. Defaults to all categories.
    message String
    Text of the event.
    sourceArn String
    ARN of the event source.
    sourceIdentifier String
    Identifier of the source, such as a DB instance or DB cluster identifier. Requires sourceType to also be set.
    sourceType String
    Type of source. Valid values include db-instance, db-cluster, db-snapshot, db-parameter-group, db-security-group, db-cluster-snapshot, custom-engine-version, db-proxy, blue-green-deployment, db-shard-group, and zero-etl.
    date string
    Date and time of the event, in RFC3339 format.
    eventCategories string[]
    Set of event categories to filter on, e.g. failure, maintenance, configuration change. Defaults to all categories.
    message string
    Text of the event.
    sourceArn string
    ARN of the event source.
    sourceIdentifier string
    Identifier of the source, such as a DB instance or DB cluster identifier. Requires sourceType to also be set.
    sourceType string
    Type of source. Valid values include db-instance, db-cluster, db-snapshot, db-parameter-group, db-security-group, db-cluster-snapshot, custom-engine-version, db-proxy, blue-green-deployment, db-shard-group, and zero-etl.
    date str
    Date and time of the event, in RFC3339 format.
    event_categories Sequence[str]
    Set of event categories to filter on, e.g. failure, maintenance, configuration change. Defaults to all categories.
    message str
    Text of the event.
    source_arn str
    ARN of the event source.
    source_identifier str
    Identifier of the source, such as a DB instance or DB cluster identifier. Requires sourceType to also be set.
    source_type str
    Type of source. Valid values include db-instance, db-cluster, db-snapshot, db-parameter-group, db-security-group, db-cluster-snapshot, custom-engine-version, db-proxy, blue-green-deployment, db-shard-group, and zero-etl.
    date String
    Date and time of the event, in RFC3339 format.
    eventCategories List<String>
    Set of event categories to filter on, e.g. failure, maintenance, configuration change. Defaults to all categories.
    message String
    Text of the event.
    sourceArn String
    ARN of the event source.
    sourceIdentifier String
    Identifier of the source, such as a DB instance or DB cluster identifier. Requires sourceType to also be set.
    sourceType String
    Type of source. Valid values include db-instance, db-cluster, db-snapshot, db-parameter-group, db-security-group, db-cluster-snapshot, custom-engine-version, db-proxy, blue-green-deployment, db-shard-group, and zero-etl.

    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 aws logo
    Viewing docs for AWS v7.46.0
    published on Thursday, Sep 10, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial