import { Command as $Command } from "@smithy/core/client"; import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { RestoreDBInstanceToPointInTimeMessage, RestoreDBInstanceToPointInTimeResult } from "../models/models_1"; import type { RDSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RDSClient"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link RestoreDBInstanceToPointInTimeCommand}. */ export interface RestoreDBInstanceToPointInTimeCommandInput extends RestoreDBInstanceToPointInTimeMessage { } /** * @public * * The output of {@link RestoreDBInstanceToPointInTimeCommand}. */ export interface RestoreDBInstanceToPointInTimeCommandOutput extends RestoreDBInstanceToPointInTimeResult, __MetadataBearer { } declare const RestoreDBInstanceToPointInTimeCommand_base: { new (input: RestoreDBInstanceToPointInTimeCommandInput): import("@smithy/core/client").CommandImpl; new (input: RestoreDBInstanceToPointInTimeCommandInput): import("@smithy/core/client").CommandImpl; getEndpointParameterInstructions(): { [x: string]: unknown; }; }; /** *

Restores a DB instance to an arbitrary point in time. You can restore to any point in time before the time identified by the LatestRestorableTime property. You can restore to a point up to the number of days specified by the BackupRetentionPeriod property.

The target database is created with most of the original configuration, but in a system-selected Availability Zone, with the default security group, the default subnet group, and the default DB parameter group. By default, the new DB instance is created as a single-AZ deployment except when the instance is a SQL Server instance that has an option group that is associated with mirroring; in this case, the instance becomes a mirrored deployment and not a single-AZ deployment.

This operation doesn't apply to Aurora MySQL and Aurora PostgreSQL. For Aurora, use RestoreDBClusterToPointInTime.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { RDSClient, RestoreDBInstanceToPointInTimeCommand } from "@aws-sdk/client-rds"; // ES Modules import * // const { RDSClient, RestoreDBInstanceToPointInTimeCommand } = require("@aws-sdk/client-rds"); // CommonJS import * // import type { RDSClientConfig } from "@aws-sdk/client-rds"; * const config = {}; // type is RDSClientConfig * const client = new RDSClient(config); * const input = { // RestoreDBInstanceToPointInTimeMessage * SourceDBInstanceIdentifier: "STRING_VALUE", * TargetDBInstanceIdentifier: "STRING_VALUE", // required * RestoreTime: new Date("TIMESTAMP"), * UseLatestRestorableTime: true || false, * DBInstanceClass: "STRING_VALUE", * Port: Number("int"), * AvailabilityZone: "STRING_VALUE", * DBSubnetGroupName: "STRING_VALUE", * MultiAZ: true || false, * PubliclyAccessible: true || false, * AutoMinorVersionUpgrade: true || false, * LicenseModel: "STRING_VALUE", * DBName: "STRING_VALUE", * Engine: "STRING_VALUE", * Iops: Number("int"), * StorageThroughput: Number("int"), * OptionGroupName: "STRING_VALUE", * CopyTagsToSnapshot: true || false, * Tags: [ // TagList * { // Tag * Key: "STRING_VALUE", * Value: "STRING_VALUE", * }, * ], * StorageType: "STRING_VALUE", * TdeCredentialArn: "STRING_VALUE", * TdeCredentialPassword: "STRING_VALUE", * VpcSecurityGroupIds: [ // VpcSecurityGroupIdList * "STRING_VALUE", * ], * Domain: "STRING_VALUE", * DomainIAMRoleName: "STRING_VALUE", * DomainFqdn: "STRING_VALUE", * DomainOu: "STRING_VALUE", * DomainAuthSecretArn: "STRING_VALUE", * DomainDnsIps: [ // StringList * "STRING_VALUE", * ], * EnableIAMDatabaseAuthentication: true || false, * EnableCloudwatchLogsExports: [ // LogTypeList * "STRING_VALUE", * ], * ProcessorFeatures: [ // ProcessorFeatureList * { // ProcessorFeature * Name: "STRING_VALUE", * Value: "STRING_VALUE", * }, * ], * UseDefaultProcessorFeatures: true || false, * DBParameterGroupName: "STRING_VALUE", * DeletionProtection: true || false, * SourceDbiResourceId: "STRING_VALUE", * MaxAllocatedStorage: Number("int"), * EnableCustomerOwnedIp: true || false, * NetworkType: "STRING_VALUE", * SourceDBInstanceAutomatedBackupsArn: "STRING_VALUE", * BackupTarget: "STRING_VALUE", * CustomIamInstanceProfile: "STRING_VALUE", * AllocatedStorage: Number("int"), * BackupRetentionPeriod: Number("int"), * PreferredBackupWindow: "STRING_VALUE", * DedicatedLogVolume: true || false, * CACertificateIdentifier: "STRING_VALUE", * EngineLifecycleSupport: "STRING_VALUE", * AdditionalStorageVolumes: [ // AdditionalStorageVolumesList * { // AdditionalStorageVolume * VolumeName: "STRING_VALUE", // required * AllocatedStorage: Number("int"), * IOPS: Number("int"), * MaxAllocatedStorage: Number("int"), * StorageThroughput: Number("int"), * StorageType: "STRING_VALUE", * }, * ], * TagSpecifications: [ // TagSpecificationList * { // TagSpecification * ResourceType: "STRING_VALUE", * Tags: [ * { * Key: "STRING_VALUE", * Value: "STRING_VALUE", * }, * ], * }, * ], * ManageMasterUserPassword: true || false, * MasterUserSecretKmsKeyId: "STRING_VALUE", * }; * const command = new RestoreDBInstanceToPointInTimeCommand(input); * const response = await client.send(command); * // { // RestoreDBInstanceToPointInTimeResult * // DBInstance: { // DBInstance * // DBInstanceIdentifier: "STRING_VALUE", * // DBInstanceClass: "STRING_VALUE", * // Engine: "STRING_VALUE", * // DBInstanceStatus: "STRING_VALUE", * // MasterUsername: "STRING_VALUE", * // DBName: "STRING_VALUE", * // Endpoint: { // Endpoint * // Address: "STRING_VALUE", * // Port: Number("int"), * // HostedZoneId: "STRING_VALUE", * // }, * // AllocatedStorage: Number("int"), * // InstanceCreateTime: new Date("TIMESTAMP"), * // PreferredBackupWindow: "STRING_VALUE", * // BackupRetentionPeriod: Number("int"), * // DBSecurityGroups: [ // DBSecurityGroupMembershipList * // { // DBSecurityGroupMembership * // DBSecurityGroupName: "STRING_VALUE", * // Status: "STRING_VALUE", * // }, * // ], * // VpcSecurityGroups: [ // VpcSecurityGroupMembershipList * // { // VpcSecurityGroupMembership * // VpcSecurityGroupId: "STRING_VALUE", * // Status: "STRING_VALUE", * // }, * // ], * // DBParameterGroups: [ // DBParameterGroupStatusList * // { // DBParameterGroupStatus * // DBParameterGroupName: "STRING_VALUE", * // ParameterApplyStatus: "STRING_VALUE", * // }, * // ], * // AvailabilityZone: "STRING_VALUE", * // DBSubnetGroup: { // DBSubnetGroup * // DBSubnetGroupName: "STRING_VALUE", * // DBSubnetGroupDescription: "STRING_VALUE", * // VpcId: "STRING_VALUE", * // SubnetGroupStatus: "STRING_VALUE", * // Subnets: [ // SubnetList * // { // Subnet * // SubnetIdentifier: "STRING_VALUE", * // SubnetAvailabilityZone: { // AvailabilityZone * // Name: "STRING_VALUE", * // }, * // SubnetOutpost: { // Outpost * // Arn: "STRING_VALUE", * // }, * // SubnetStatus: "STRING_VALUE", * // }, * // ], * // DBSubnetGroupArn: "STRING_VALUE", * // SupportedNetworkTypes: [ // StringList * // "STRING_VALUE", * // ], * // }, * // PreferredMaintenanceWindow: "STRING_VALUE", * // UpgradeRolloutOrder: "first" || "second" || "last", * // PendingModifiedValues: { // PendingModifiedValues * // DBInstanceClass: "STRING_VALUE", * // AllocatedStorage: Number("int"), * // MasterUserPassword: "STRING_VALUE", * // Port: Number("int"), * // BackupRetentionPeriod: Number("int"), * // MultiAZ: true || false, * // EngineVersion: "STRING_VALUE", * // LicenseModel: "STRING_VALUE", * // Iops: Number("int"), * // StorageThroughput: Number("int"), * // DBInstanceIdentifier: "STRING_VALUE", * // StorageType: "STRING_VALUE", * // CACertificateIdentifier: "STRING_VALUE", * // DBSubnetGroupName: "STRING_VALUE", * // PendingCloudwatchLogsExports: { // PendingCloudwatchLogsExports * // LogTypesToEnable: [ // LogTypeList * // "STRING_VALUE", * // ], * // LogTypesToDisable: [ * // "STRING_VALUE", * // ], * // }, * // ProcessorFeatures: [ // ProcessorFeatureList * // { // ProcessorFeature * // Name: "STRING_VALUE", * // Value: "STRING_VALUE", * // }, * // ], * // AutomationMode: "full" || "all-paused", * // ResumeFullAutomationModeTime: new Date("TIMESTAMP"), * // MultiTenant: true || false, * // IAMDatabaseAuthenticationEnabled: true || false, * // DedicatedLogVolume: true || false, * // Engine: "STRING_VALUE", * // AdditionalStorageVolumes: [ // AdditionalStorageVolumesList * // { // AdditionalStorageVolume * // VolumeName: "STRING_VALUE", // required * // AllocatedStorage: Number("int"), * // IOPS: Number("int"), * // MaxAllocatedStorage: Number("int"), * // StorageThroughput: Number("int"), * // StorageType: "STRING_VALUE", * // }, * // ], * // }, * // LatestRestorableTime: new Date("TIMESTAMP"), * // MultiAZ: true || false, * // EngineVersion: "STRING_VALUE", * // AutoMinorVersionUpgrade: true || false, * // ReadReplicaSourceDBInstanceIdentifier: "STRING_VALUE", * // ReadReplicaDBInstanceIdentifiers: [ // ReadReplicaDBInstanceIdentifierList * // "STRING_VALUE", * // ], * // ReadReplicaDBClusterIdentifiers: [ // ReadReplicaDBClusterIdentifierList * // "STRING_VALUE", * // ], * // ReplicaMode: "open-read-only" || "mounted", * // LicenseModel: "STRING_VALUE", * // Iops: Number("int"), * // StorageThroughput: Number("int"), * // OptionGroupMemberships: [ // OptionGroupMembershipList * // { // OptionGroupMembership * // OptionGroupName: "STRING_VALUE", * // Status: "STRING_VALUE", * // }, * // ], * // CharacterSetName: "STRING_VALUE", * // NcharCharacterSetName: "STRING_VALUE", * // SecondaryAvailabilityZone: "STRING_VALUE", * // PubliclyAccessible: true || false, * // StatusInfos: [ // DBInstanceStatusInfoList * // { // DBInstanceStatusInfo * // StatusType: "STRING_VALUE", * // Normal: true || false, * // Status: "STRING_VALUE", * // Message: "STRING_VALUE", * // }, * // ], * // StorageType: "STRING_VALUE", * // StorageEncryptionType: "none" || "sse-kms" || "sse-rds", * // TdeCredentialArn: "STRING_VALUE", * // DbInstancePort: Number("int"), * // DBClusterIdentifier: "STRING_VALUE", * // StorageEncrypted: true || false, * // KmsKeyId: "STRING_VALUE", * // DbiResourceId: "STRING_VALUE", * // CACertificateIdentifier: "STRING_VALUE", * // DomainMemberships: [ // DomainMembershipList * // { // DomainMembership * // Domain: "STRING_VALUE", * // Status: "STRING_VALUE", * // FQDN: "STRING_VALUE", * // IAMRoleName: "STRING_VALUE", * // OU: "STRING_VALUE", * // AuthSecretArn: "STRING_VALUE", * // DnsIps: [ * // "STRING_VALUE", * // ], * // }, * // ], * // CopyTagsToSnapshot: true || false, * // MonitoringInterval: Number("int"), * // EnhancedMonitoringResourceArn: "STRING_VALUE", * // MonitoringRoleArn: "STRING_VALUE", * // PromotionTier: Number("int"), * // DBInstanceArn: "STRING_VALUE", * // Timezone: "STRING_VALUE", * // IAMDatabaseAuthenticationEnabled: true || false, * // DatabaseInsightsMode: "standard" || "advanced", * // PerformanceInsightsEnabled: true || false, * // PerformanceInsightsKMSKeyId: "STRING_VALUE", * // PerformanceInsightsRetentionPeriod: Number("int"), * // EnabledCloudwatchLogsExports: [ * // "STRING_VALUE", * // ], * // ProcessorFeatures: [ * // { * // Name: "STRING_VALUE", * // Value: "STRING_VALUE", * // }, * // ], * // DeletionProtection: true || false, * // AssociatedRoles: [ // DBInstanceRoles * // { // DBInstanceRole * // RoleArn: "STRING_VALUE", * // FeatureName: "STRING_VALUE", * // Status: "STRING_VALUE", * // }, * // ], * // ListenerEndpoint: { * // Address: "STRING_VALUE", * // Port: Number("int"), * // HostedZoneId: "STRING_VALUE", * // }, * // MaxAllocatedStorage: Number("int"), * // TagList: [ // TagList * // { // Tag * // Key: "STRING_VALUE", * // Value: "STRING_VALUE", * // }, * // ], * // AutomationMode: "full" || "all-paused", * // ResumeFullAutomationModeTime: new Date("TIMESTAMP"), * // CustomerOwnedIpEnabled: true || false, * // NetworkType: "STRING_VALUE", * // ActivityStreamStatus: "stopped" || "starting" || "started" || "stopping", * // ActivityStreamKmsKeyId: "STRING_VALUE", * // ActivityStreamKinesisStreamName: "STRING_VALUE", * // ActivityStreamMode: "sync" || "async", * // ActivityStreamEngineNativeAuditFieldsIncluded: true || false, * // AwsBackupRecoveryPointArn: "STRING_VALUE", * // DBInstanceAutomatedBackupsReplications: [ // DBInstanceAutomatedBackupsReplicationList * // { // DBInstanceAutomatedBackupsReplication * // DBInstanceAutomatedBackupsArn: "STRING_VALUE", * // }, * // ], * // BackupTarget: "STRING_VALUE", * // AutomaticRestartTime: new Date("TIMESTAMP"), * // CustomIamInstanceProfile: "STRING_VALUE", * // ActivityStreamPolicyStatus: "locked" || "unlocked" || "locking-policy" || "unlocking-policy", * // CertificateDetails: { // CertificateDetails * // CAIdentifier: "STRING_VALUE", * // ValidTill: new Date("TIMESTAMP"), * // }, * // DBSystemId: "STRING_VALUE", * // MasterUserSecret: { // MasterUserSecret * // SecretArn: "STRING_VALUE", * // SecretStatus: "STRING_VALUE", * // KmsKeyId: "STRING_VALUE", * // }, * // ReadReplicaSourceDBClusterIdentifier: "STRING_VALUE", * // PercentProgress: "STRING_VALUE", * // MultiTenant: true || false, * // DedicatedLogVolume: true || false, * // IsStorageConfigUpgradeAvailable: true || false, * // EngineLifecycleSupport: "STRING_VALUE", * // AdditionalStorageVolumes: [ // AdditionalStorageVolumesOutputList * // { // AdditionalStorageVolumeOutput * // VolumeName: "STRING_VALUE", * // StorageVolumeStatus: "STRING_VALUE", * // AllocatedStorage: Number("int"), * // IOPS: Number("int"), * // MaxAllocatedStorage: Number("int"), * // StorageThroughput: Number("int"), * // StorageType: "STRING_VALUE", * // }, * // ], * // StorageVolumeStatus: "STRING_VALUE", * // }, * // }; * * ``` * * @param RestoreDBInstanceToPointInTimeCommandInput - {@link RestoreDBInstanceToPointInTimeCommandInput} * @returns {@link RestoreDBInstanceToPointInTimeCommandOutput} * @see {@link RestoreDBInstanceToPointInTimeCommandInput} for command's `input` shape. * @see {@link RestoreDBInstanceToPointInTimeCommandOutput} for command's `response` shape. * @see {@link RDSClientResolvedConfig | config} for RDSClient's `config` shape. * * @throws {@link AuthorizationNotFoundFault} (client fault) *

The specified CIDR IP range or Amazon EC2 security group might not be authorized for the specified DB security group.

Or, RDS might not be authorized to perform necessary actions using IAM on your behalf.

* * @throws {@link BackupPolicyNotFoundFault} (client fault) *

* * @throws {@link CertificateNotFoundFault} (client fault) *

CertificateIdentifier doesn't refer to an existing certificate.

* * @throws {@link DBInstanceAlreadyExistsFault} (client fault) *

The user already has a DB instance with the given identifier.

* * @throws {@link DBInstanceAutomatedBackupNotFoundFault} (client fault) *

No automated backup for this DB instance was found.

* * @throws {@link DBInstanceNotFoundFault} (client fault) *

DBInstanceIdentifier doesn't refer to an existing DB instance.

* * @throws {@link DBParameterGroupNotFoundFault} (client fault) *

DBParameterGroupName doesn't refer to an existing DB parameter group.

* * @throws {@link DBSecurityGroupNotFoundFault} (client fault) *

DBSecurityGroupName doesn't refer to an existing DB security group.

* * @throws {@link DBSubnetGroupDoesNotCoverEnoughAZs} (client fault) *

Subnets in the DB subnet group should cover at least two Availability Zones unless there is only one Availability Zone.

* * @throws {@link DBSubnetGroupNotFoundFault} (client fault) *

DBSubnetGroupName doesn't refer to an existing DB subnet group.

* * @throws {@link DomainNotFoundFault} (client fault) *

Domain doesn't refer to an existing Active Directory domain.

* * @throws {@link InstanceQuotaExceededFault} (client fault) *

The request would result in the user exceeding the allowed number of DB instances.

* * @throws {@link InsufficientDBInstanceCapacityFault} (client fault) *

The specified DB instance class isn't available in the specified Availability Zone.

* * @throws {@link InvalidDBInstanceStateFault} (client fault) *

The DB instance isn't in a valid state.

* * @throws {@link InvalidRestoreFault} (client fault) *

Cannot restore from VPC backup to non-VPC DB instance.

* * @throws {@link InvalidSubnet} (client fault) *

The requested subnet is invalid, or multiple subnets were requested that are not all in a common VPC.

* * @throws {@link InvalidVPCNetworkStateFault} (client fault) *

The DB subnet group doesn't cover all Availability Zones after it's created because of users' change.

* * @throws {@link KMSKeyNotAccessibleFault} (client fault) *

An error occurred accessing an Amazon Web Services KMS key.

* * @throws {@link NetworkTypeNotSupported} (client fault) *

The network type is invalid for the DB instance. Valid nework type values are IPV4 and DUAL.

* * @throws {@link OptionGroupNotFoundFault} (client fault) *

The specified option group could not be found.

* * @throws {@link PointInTimeRestoreNotEnabledFault} (client fault) *

SourceDBInstanceIdentifier refers to a DB instance with BackupRetentionPeriod equal to 0.

* * @throws {@link ProvisionedIopsNotAvailableInAZFault} (client fault) *

Provisioned IOPS not available in the specified Availability Zone.

* * @throws {@link StorageQuotaExceededFault} (client fault) *

The request would result in the user exceeding the allowed amount of storage available across all DB instances.

* * @throws {@link StorageTypeNotSupportedFault} (client fault) *

The specified StorageType can't be associated with the DB instance.

* * @throws {@link TenantDatabaseQuotaExceededFault} (client fault) *

You attempted to create more tenant databases than are permitted in your Amazon Web Services account.

* * @throws {@link VpcEncryptionControlViolationException} (client fault) *

The operation violates VPC encryption control settings. Make sure that your DB instance type supports the Nitro encryption-in-transit capability, or modify your VPC's encryption controls to not enforce encryption-in-transit.

* * @throws {@link RDSServiceException} *

Base exception class for all service exceptions from RDS service.

* * * @example To restore a DB instance to a point in time * ```javascript * // The following example restores test-instance to a new DB instance named restored-test-instance, as of the specified time. * const input = { * RestoreTime: "2018-07-30T23:45:00.000Z", * SourceDBInstanceIdentifier: "test-instance", * TargetDBInstanceIdentifier: "restored-test-instance" * }; * const command = new RestoreDBInstanceToPointInTimeCommand(input); * const response = await client.send(command); * /* response is * { * DBInstance: { * AllocatedStorage: 200, * AutoMinorVersionUpgrade: true, * AvailabilityZone: "us-west-2b", * BackupRetentionPeriod: 7, * CACertificateIdentifier: "rds-ca-2015", * CopyTagsToSnapshot: false, * DBInstanceArn: "arn:aws:rds:us-west-2:123456789012:db:restored-test-instance", * DBInstanceClass: "db.t2.small", * DBInstanceIdentifier: "restored-test-instance", * DBInstanceStatus: "available", * DBName: "sample", * DBParameterGroups: [ * { * DBParameterGroupName: "default.mysql5.6", * ParameterApplyStatus: "in-sync" * } * ], * DBSecurityGroups: [], * DBSubnetGroup: { * DBSubnetGroupDescription: "default", * DBSubnetGroupName: "default", * SubnetGroupStatus: "Complete", * Subnets: [ * { * SubnetAvailabilityZone: { * Name: "us-west-2a" * }, * SubnetIdentifier: "subnet-77e8db03", * SubnetStatus: "Active" * }, * { * SubnetAvailabilityZone: { * Name: "us-west-2b" * }, * SubnetIdentifier: "subnet-c39989a1", * SubnetStatus: "Active" * }, * { * SubnetAvailabilityZone: { * Name: "us-west-2c" * }, * SubnetIdentifier: "subnet-4b267b0d", * SubnetStatus: "Active" * } * ], * VpcId: "vpc-c1c5b3a3" * }, * DbInstancePort: 0, * DbiResourceId: "db-VNZUCCBTEDC4WR7THXNJO72HVQ", * DomainMemberships: [], * Engine: "mysql", * EngineVersion: "5.6.27", * LicenseModel: "general-public-license", * MasterUsername: "mymasteruser", * MonitoringInterval: 0, * MultiAZ: false, * OptionGroupMemberships: [ * { * OptionGroupName: "default:mysql-5-6", * Status: "in-sync" * } * ], * PendingModifiedValues: { /* empty *\/ }, * PreferredBackupWindow: "12:58-13:28", * PreferredMaintenanceWindow: "tue:10:16-tue:10:46", * PubliclyAccessible: true, * ReadReplicaDBInstanceIdentifiers: [], * StorageEncrypted: false, * StorageType: "gp2", * VpcSecurityGroups: [ * { * Status: "active", * VpcSecurityGroupId: "sg-e5e5b0d2" * } * ] * } * } * *\/ * ``` * * @public */ export declare class RestoreDBInstanceToPointInTimeCommand extends RestoreDBInstanceToPointInTimeCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: RestoreDBInstanceToPointInTimeMessage; output: RestoreDBInstanceToPointInTimeResult; }; sdk: { input: RestoreDBInstanceToPointInTimeCommandInput; output: RestoreDBInstanceToPointInTimeCommandOutput; }; }; }