Skip to content

Data Source: awsDbEventCategories

Example Usage

List the event categories of all the RDS resources.

import * as cdktf from "cdktf";
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const dataAwsDbEventCategoriesExample =
  new aws.dataAwsDbEventCategories.DataAwsDbEventCategories(
    this,
    "example",
    {}
  );
const cdktfTerraformOutputExample = new cdktf.TerraformOutput(
  this,
  "example_1",
  {
    value: dataAwsDbEventCategoriesExample.eventCategories,
  }
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
cdktfTerraformOutputExample.overrideLogicalId("example");

List the event categories specific to the RDS resource dbSnapshot.

import * as cdktf from "cdktf";
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const dataAwsDbEventCategoriesExample =
  new aws.dataAwsDbEventCategories.DataAwsDbEventCategories(this, "example", {
    sourceType: "db-snapshot",
  });
const cdktfTerraformOutputExample = new cdktf.TerraformOutput(
  this,
  "example_1",
  {
    value: dataAwsDbEventCategoriesExample.eventCategories,
  }
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
cdktfTerraformOutputExample.overrideLogicalId("example");

Argument Reference

The following arguments are supported:

  • sourceType - (Optional) 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.

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • eventCategories - List of the event categories.
  • id - Region of the event categories.