UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

274 lines (273 loc) • 9.96 kB
import * as pulumi from "@pulumi/pulumi"; /** * Manages an RDS database instance snapshot. For managing RDS database cluster snapshots, see the `aws.rds.ClusterSnapshot` resource. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const bar = new aws.rds.Instance("bar", { * allocatedStorage: 10, * engine: "mysql", * engineVersion: "5.6.21", * instanceClass: aws.rds.InstanceType.T2_Micro, * dbName: "baz", * password: "barbarbarbar", * username: "foo", * maintenanceWindow: "Fri:09:00-Fri:09:30", * backupRetentionPeriod: 0, * parameterGroupName: "default.mysql5.6", * }); * const test = new aws.rds.Snapshot("test", { * dbInstanceIdentifier: bar.identifier, * dbSnapshotIdentifier: "testsnapshot1234", * }); * ``` * * ## Import * * Using `pulumi import`, import `aws_db_snapshot` using the snapshot identifier. For example: * * ```sh * $ pulumi import aws:rds/snapshot:Snapshot example my-snapshot * ``` */ export declare class Snapshot extends pulumi.CustomResource { /** * Get an existing Snapshot 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?: SnapshotState, opts?: pulumi.CustomResourceOptions): Snapshot; /** * Returns true if the given object is an instance of Snapshot. 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 Snapshot; /** * Specifies the allocated storage size in gigabytes (GB). */ readonly allocatedStorage: pulumi.Output<number>; /** * Specifies the name of the Availability Zone the DB instance was located in at the time of the DB snapshot. */ readonly availabilityZone: pulumi.Output<string>; /** * The DB Instance Identifier from which to take the snapshot. */ readonly dbInstanceIdentifier: pulumi.Output<string>; /** * The Amazon Resource Name (ARN) for the DB snapshot. */ readonly dbSnapshotArn: pulumi.Output<string>; /** * The Identifier for the snapshot. */ readonly dbSnapshotIdentifier: pulumi.Output<string>; /** * Specifies whether the DB snapshot is encrypted. */ readonly encrypted: pulumi.Output<boolean>; /** * Specifies the name of the database engine. */ readonly engine: pulumi.Output<string>; /** * Specifies the version of the database engine. */ readonly engineVersion: pulumi.Output<string>; /** * Specifies the Provisioned IOPS (I/O operations per second) value of the DB instance at the time of the snapshot. */ readonly iops: pulumi.Output<number>; /** * The ARN for the KMS encryption key. */ readonly kmsKeyId: pulumi.Output<string>; /** * License model information for the restored DB instance. */ readonly licenseModel: pulumi.Output<string>; /** * Provides the option group name for the DB snapshot. */ readonly optionGroupName: pulumi.Output<string>; readonly port: pulumi.Output<number>; /** * 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>; /** * List of AWS Account IDs to share the snapshot with. Use `all` to make the snapshot public. */ readonly sharedAccounts: pulumi.Output<string[] | undefined>; readonly snapshotType: pulumi.Output<string>; /** * The DB snapshot Arn that the DB snapshot was copied from. It only has value in case of cross customer or cross region copy. */ readonly sourceDbSnapshotIdentifier: pulumi.Output<string>; /** * The region that the DB snapshot was created in or copied from. */ readonly sourceRegion: pulumi.Output<string>; /** * Specifies the status of this DB snapshot. */ readonly status: pulumi.Output<string>; /** * Specifies the storage type associated with DB snapshot. */ readonly storageType: pulumi.Output<string>; /** * Key-value map of resource tags. .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>; /** * A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ readonly tagsAll: pulumi.Output<{ [key: string]: string; }>; /** * Provides the VPC ID associated with the DB snapshot. */ readonly vpcId: pulumi.Output<string>; /** * Create a Snapshot 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: SnapshotArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Snapshot resources. */ export interface SnapshotState { /** * Specifies the allocated storage size in gigabytes (GB). */ allocatedStorage?: pulumi.Input<number>; /** * Specifies the name of the Availability Zone the DB instance was located in at the time of the DB snapshot. */ availabilityZone?: pulumi.Input<string>; /** * The DB Instance Identifier from which to take the snapshot. */ dbInstanceIdentifier?: pulumi.Input<string>; /** * The Amazon Resource Name (ARN) for the DB snapshot. */ dbSnapshotArn?: pulumi.Input<string>; /** * The Identifier for the snapshot. */ dbSnapshotIdentifier?: pulumi.Input<string>; /** * Specifies whether the DB snapshot is encrypted. */ encrypted?: pulumi.Input<boolean>; /** * Specifies the name of the database engine. */ engine?: pulumi.Input<string>; /** * Specifies the version of the database engine. */ engineVersion?: pulumi.Input<string>; /** * Specifies the Provisioned IOPS (I/O operations per second) value of the DB instance at the time of the snapshot. */ iops?: pulumi.Input<number>; /** * The ARN for the KMS encryption key. */ kmsKeyId?: pulumi.Input<string>; /** * License model information for the restored DB instance. */ licenseModel?: pulumi.Input<string>; /** * Provides the option group name for the DB snapshot. */ optionGroupName?: pulumi.Input<string>; port?: pulumi.Input<number>; /** * 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>; /** * List of AWS Account IDs to share the snapshot with. Use `all` to make the snapshot public. */ sharedAccounts?: pulumi.Input<pulumi.Input<string>[]>; snapshotType?: pulumi.Input<string>; /** * The DB snapshot Arn that the DB snapshot was copied from. It only has value in case of cross customer or cross region copy. */ sourceDbSnapshotIdentifier?: pulumi.Input<string>; /** * The region that the DB snapshot was created in or copied from. */ sourceRegion?: pulumi.Input<string>; /** * Specifies the status of this DB snapshot. */ status?: pulumi.Input<string>; /** * Specifies the storage type associated with DB snapshot. */ storageType?: pulumi.Input<string>; /** * Key-value map of resource tags. .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>; }>; /** * A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ tagsAll?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * Provides the VPC ID associated with the DB snapshot. */ vpcId?: pulumi.Input<string>; } /** * The set of arguments for constructing a Snapshot resource. */ export interface SnapshotArgs { /** * The DB Instance Identifier from which to take the snapshot. */ dbInstanceIdentifier: pulumi.Input<string>; /** * The Identifier for the snapshot. */ dbSnapshotIdentifier: pulumi.Input<string>; /** * 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>; /** * List of AWS Account IDs to share the snapshot with. Use `all` to make the snapshot public. */ sharedAccounts?: pulumi.Input<pulumi.Input<string>[]>; /** * Key-value map of resource tags. .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>; }>; }