AWS v6.71.0 published on Friday, Mar 7, 2025 by Pulumi
aws.rds.getEventCategories
Explore with Pulumi AI
Example Usage
List the event categories of all the RDS resources.
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
export = async () => {
    const example = await aws.rds.getEventCategories({});
    return {
        example: example.eventCategories,
    };
}
import pulumi
import pulumi_aws as aws
example = aws.rds.get_event_categories()
pulumi.export("example", example.event_categories)
package main
import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/rds"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := rds.GetEventCategories(ctx, &rds.GetEventCategoriesArgs{}, nil)
		if err != nil {
			return err
		}
		ctx.Export("example", example.EventCategories)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() => 
{
    var example = Aws.Rds.GetEventCategories.Invoke();
    return new Dictionary<string, object?>
    {
        ["example"] = example.Apply(getEventCategoriesResult => getEventCategoriesResult.EventCategories),
    };
});
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.GetEventCategoriesArgs;
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 = RdsFunctions.getEventCategories();
        ctx.export("example", example.applyValue(getEventCategoriesResult -> getEventCategoriesResult.eventCategories()));
    }
}
variables:
  example:
    fn::invoke:
      function: aws:rds:getEventCategories
      arguments: {}
outputs:
  example: ${example.eventCategories}
List the event categories specific to the RDS resource db-snapshot.
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
export = async () => {
    const example = await aws.rds.getEventCategories({
        sourceType: "db-snapshot",
    });
    return {
        example: example.eventCategories,
    };
}
import pulumi
import pulumi_aws as aws
example = aws.rds.get_event_categories(source_type="db-snapshot")
pulumi.export("example", example.event_categories)
package main
import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/rds"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := rds.GetEventCategories(ctx, &rds.GetEventCategoriesArgs{
			SourceType: pulumi.StringRef("db-snapshot"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("example", example.EventCategories)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() => 
{
    var example = Aws.Rds.GetEventCategories.Invoke(new()
    {
        SourceType = "db-snapshot",
    });
    return new Dictionary<string, object?>
    {
        ["example"] = example.Apply(getEventCategoriesResult => getEventCategoriesResult.EventCategories),
    };
});
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.GetEventCategoriesArgs;
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 = RdsFunctions.getEventCategories(GetEventCategoriesArgs.builder()
            .sourceType("db-snapshot")
            .build());
        ctx.export("example", example.applyValue(getEventCategoriesResult -> getEventCategoriesResult.eventCategories()));
    }
}
variables:
  example:
    fn::invoke:
      function: aws:rds:getEventCategories
      arguments:
        sourceType: db-snapshot
outputs:
  example: ${example.eventCategories}
Using getEventCategories
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 getEventCategories(args: GetEventCategoriesArgs, opts?: InvokeOptions): Promise<GetEventCategoriesResult>
function getEventCategoriesOutput(args: GetEventCategoriesOutputArgs, opts?: InvokeOptions): Output<GetEventCategoriesResult>def get_event_categories(source_type: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetEventCategoriesResult
def get_event_categories_output(source_type: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetEventCategoriesResult]func GetEventCategories(ctx *Context, args *GetEventCategoriesArgs, opts ...InvokeOption) (*GetEventCategoriesResult, error)
func GetEventCategoriesOutput(ctx *Context, args *GetEventCategoriesOutputArgs, opts ...InvokeOption) GetEventCategoriesResultOutput> Note: This function is named GetEventCategories in the Go SDK.
public static class GetEventCategories 
{
    public static Task<GetEventCategoriesResult> InvokeAsync(GetEventCategoriesArgs args, InvokeOptions? opts = null)
    public static Output<GetEventCategoriesResult> Invoke(GetEventCategoriesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetEventCategoriesResult> getEventCategories(GetEventCategoriesArgs args, InvokeOptions options)
public static Output<GetEventCategoriesResult> getEventCategories(GetEventCategoriesArgs args, InvokeOptions options)
fn::invoke:
  function: aws:rds/getEventCategories:getEventCategories
  arguments:
    # arguments dictionaryThe following arguments are supported:
- SourceType string
- Type of source that will be generating the events. Valid options are db-instance, db-security-group, db-parameter-group, db-snapshot, db-cluster or db-cluster-snapshot.
- SourceType string
- Type of source that will be generating the events. Valid options are db-instance, db-security-group, db-parameter-group, db-snapshot, db-cluster or db-cluster-snapshot.
- sourceType String
- Type of source that will be generating the events. Valid options are db-instance, db-security-group, db-parameter-group, db-snapshot, db-cluster or db-cluster-snapshot.
- sourceType string
- Type of source that will be generating the events. Valid options are db-instance, db-security-group, db-parameter-group, db-snapshot, db-cluster or db-cluster-snapshot.
- source_type str
- Type of source that will be generating the events. Valid options are db-instance, db-security-group, db-parameter-group, db-snapshot, db-cluster or db-cluster-snapshot.
- sourceType String
- Type of source that will be generating the events. Valid options are db-instance, db-security-group, db-parameter-group, db-snapshot, db-cluster or db-cluster-snapshot.
getEventCategories Result
The following output properties are available:
- EventCategories List<string>
- List of the event categories.
- Id string
- The provider-assigned unique ID for this managed resource.
- SourceType string
- EventCategories []string
- List of the event categories.
- Id string
- The provider-assigned unique ID for this managed resource.
- SourceType string
- eventCategories List<String>
- List of the event categories.
- id String
- The provider-assigned unique ID for this managed resource.
- sourceType String
- eventCategories string[]
- List of the event categories.
- id string
- The provider-assigned unique ID for this managed resource.
- sourceType string
- event_categories Sequence[str]
- List of the event categories.
- id str
- The provider-assigned unique ID for this managed resource.
- source_type str
- eventCategories List<String>
- List of the event categories.
- id String
- The provider-assigned unique ID for this managed resource.
- sourceType String
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the awsTerraform Provider.