@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
232 lines (231 loc) • 10.1 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* Provides an RDS DB option group resource. Documentation of the available options for various RDS engines can be found at:
*
* * [MariaDB Options](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.MariaDB.Options.html)
* * [Microsoft SQL Server Options](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.SQLServer.Options.html)
* * [MySQL Options](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.MySQL.Options.html)
* * [Oracle Options](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.Oracle.Options.html)
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.rds.OptionGroup("example", {
* name: "option-group-test",
* optionGroupDescription: "Option Group",
* engineName: "sqlserver-ee",
* majorEngineVersion: "11.00",
* options: [
* {
* optionName: "Timezone",
* optionSettings: [{
* name: "TIME_ZONE",
* value: "UTC",
* }],
* },
* {
* optionName: "SQLSERVER_BACKUP_RESTORE",
* optionSettings: [{
* name: "IAM_ROLE_ARN",
* value: exampleAwsIamRole.arn,
* }],
* },
* {
* optionName: "TDE",
* },
* ],
* });
* ```
*
* > **Note:** Any modifications to the `aws.rds.OptionGroup` are set to happen immediately as we default to applying immediately.
*
* > **WARNING:** You can perform a destroy on a `aws.rds.OptionGroup`, as long as it is not associated with any Amazon RDS resource. An option group can be associated with a DB instance, a manual DB snapshot, or an automated DB snapshot.
*
* If you try to delete an option group that is associated with an Amazon RDS resource, an error similar to the following is returned:
*
* > An error occurred (InvalidOptionGroupStateFault) when calling the DeleteOptionGroup operation: The option group 'optionGroupName' cannot be deleted because it is in use.
*
* More information about this can be found [here](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithOptionGroups.html#USER_WorkingWithOptionGroups.Delete).
*
* ## Import
*
* Using `pulumi import`, import DB option groups using the `name`. For example:
*
* ```sh
* $ pulumi import aws:rds/optionGroup:OptionGroup example mysql-option-group
* ```
*/
export declare class OptionGroup extends pulumi.CustomResource {
/**
* Get an existing OptionGroup resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: OptionGroupState, opts?: pulumi.CustomResourceOptions): OptionGroup;
/**
* Returns true if the given object is an instance of OptionGroup. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is OptionGroup;
/**
* ARN of the DB option group.
*/
readonly arn: pulumi.Output<string>;
/**
* Specifies the name of the engine that this option group should be associated with.
*/
readonly engineName: pulumi.Output<string>;
/**
* Specifies the major version of the engine that this option group should be associated with.
*/
readonly majorEngineVersion: pulumi.Output<string>;
/**
* Name of the option group. If omitted, the provider will assign a random, unique name. Must be lowercase, to match as it is stored in AWS.
*/
readonly name: pulumi.Output<string>;
/**
* Creates a unique name beginning with the specified prefix. Conflicts with `name`. Must be lowercase, to match as it is stored in AWS.
*/
readonly namePrefix: pulumi.Output<string>;
/**
* Description of the option group. Defaults to "Managed by Pulumi".
*/
readonly optionGroupDescription: pulumi.Output<string>;
/**
* The options to apply. See `option` Block below for more details.
*/
readonly options: pulumi.Output<outputs.rds.OptionGroupOption[] | undefined>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
readonly region: pulumi.Output<string>;
/**
* Set to true if you do not wish the option group to be deleted at destroy time, and instead just remove the option group from the Pulumi state.
*/
readonly skipDestroy: pulumi.Output<boolean | undefined>;
/**
* Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
readonly tags: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
*/
readonly tagsAll: pulumi.Output<{
[key: string]: string;
}>;
/**
* Create a OptionGroup resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: OptionGroupArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering OptionGroup resources.
*/
export interface OptionGroupState {
/**
* ARN of the DB option group.
*/
arn?: pulumi.Input<string>;
/**
* Specifies the name of the engine that this option group should be associated with.
*/
engineName?: pulumi.Input<string>;
/**
* Specifies the major version of the engine that this option group should be associated with.
*/
majorEngineVersion?: pulumi.Input<string>;
/**
* Name of the option group. If omitted, the provider will assign a random, unique name. Must be lowercase, to match as it is stored in AWS.
*/
name?: pulumi.Input<string>;
/**
* Creates a unique name beginning with the specified prefix. Conflicts with `name`. Must be lowercase, to match as it is stored in AWS.
*/
namePrefix?: pulumi.Input<string>;
/**
* Description of the option group. Defaults to "Managed by Pulumi".
*/
optionGroupDescription?: pulumi.Input<string>;
/**
* The options to apply. See `option` Block below for more details.
*/
options?: pulumi.Input<pulumi.Input<inputs.rds.OptionGroupOption>[]>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: pulumi.Input<string>;
/**
* Set to true if you do not wish the option group to be deleted at destroy time, and instead just remove the option group from the Pulumi state.
*/
skipDestroy?: pulumi.Input<boolean>;
/**
* Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
*/
tagsAll?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
}
/**
* The set of arguments for constructing a OptionGroup resource.
*/
export interface OptionGroupArgs {
/**
* Specifies the name of the engine that this option group should be associated with.
*/
engineName: pulumi.Input<string>;
/**
* Specifies the major version of the engine that this option group should be associated with.
*/
majorEngineVersion: pulumi.Input<string>;
/**
* Name of the option group. If omitted, the provider will assign a random, unique name. Must be lowercase, to match as it is stored in AWS.
*/
name?: pulumi.Input<string>;
/**
* Creates a unique name beginning with the specified prefix. Conflicts with `name`. Must be lowercase, to match as it is stored in AWS.
*/
namePrefix?: pulumi.Input<string>;
/**
* Description of the option group. Defaults to "Managed by Pulumi".
*/
optionGroupDescription?: pulumi.Input<string>;
/**
* The options to apply. See `option` Block below for more details.
*/
options?: pulumi.Input<pulumi.Input<inputs.rds.OptionGroupOption>[]>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: pulumi.Input<string>;
/**
* Set to true if you do not wish the option group to be deleted at destroy time, and instead just remove the option group from the Pulumi state.
*/
skipDestroy?: pulumi.Input<boolean>;
/**
* Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
}