AWS Tools for Windows PowerShell
Command Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Synopsis

Calls the Amazon Relational Database Service RestoreDBInstanceFromDBSnapshot API operation.

Syntax

Restore-RDSDBInstanceFromDBSnapshot
-DBInstanceIdentifier <String>
-DBSnapshotIdentifier <String>
-AutoMinorVersionUpgrade <Boolean>
-AvailabilityZone <String>
-CopyTagsToSnapshot <Boolean>
-DBInstanceClass <String>
-DBName <String>
-DBSubnetGroupName <String>
-Domain <String>
-DomainIAMRoleName <String>
-EnableIAMDatabaseAuthentication <Boolean>
-Engine <String>
-Iops <Int32>
-LicenseModel <String>
-MultiAZ <Boolean>
-OptionGroupName <String>
-Port <Int32>
-PubliclyAccessible <Boolean>
-StorageType <String>
-Tag <Tag[]>
-TdeCredentialArn <String>
-TdeCredentialPassword <String>
-Force <SwitchParameter>

Description

Creates a new DB instance from a DB snapshot. The target database is created from the source database restore point with the most of original configuration with the default security 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 AZ deployment and not a single-AZ deployment. If your intent is to replace your original DB instance with the new, restored DB instance, then rename your original DB instance before you call the RestoreDBInstanceFromDBSnapshot action. RDS does not allow two DB instances with the same name. Once you have renamed your original DB instance with a different identifier, then you can pass the original name of the DB instance as the DBInstanceIdentifier in the call to the RestoreDBInstanceFromDBSnapshot action. The result is that you will replace the original DB instance with the DB instance created from the snapshot. If you are restoring from a shared manual DB snapshot, the DBSnapshotIdentifier must be the ARN of the shared DB snapshot.

Parameters

-AutoMinorVersionUpgrade <Boolean>
Indicates that minor version upgrades are applied automatically to the DB instance during the maintenance window.
Required?False
Position?Named
Accept pipeline input?False
-AvailabilityZone <String>
The EC2 Availability Zone that the DB instance is created in.Default: A random, system-chosen Availability Zone.Constraint: You can't specify the AvailabilityZone parameter if the MultiAZ parameter is set to true.Example: us-east-1a
Required?False
Position?Named
Accept pipeline input?False
-CopyTagsToSnapshot <Boolean>
True to copy all tags from the restored DB instance to snapshots of the DB instance, and otherwise false. The default is false.
Required?False
Position?Named
Accept pipeline input?False
-DBInstanceClass <String>
The compute and memory capacity of the Amazon RDS DB instance, for example, db.m4.large. Not all DB instance classes are available in all AWS Regions, or for all database engines. For the full list of DB instance classes, and availability for your engine, see DB Instance Class in the Amazon RDS User Guide. Default: The same DBInstanceClass as the original DB instance.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-DBInstanceIdentifier <String>
Name of the DB instance to create from the DB snapshot. This parameter isn't case-sensitive.Constraints:
  • Must contain from 1 to 63 numbers, letters, or hyphens
  • First character must be a letter
  • Cannot end with a hyphen or contain two consecutive hyphens
Example: my-snapshot-id
Required?False
Position?1
Accept pipeline input?True (ByValue, ByPropertyName)
-DBName <String>
The database name for the restored DB instance.This parameter doesn't apply to the MySQL, PostgreSQL, or MariaDB engines.
Required?False
Position?Named
Accept pipeline input?False
-DBSnapshotIdentifier <String>
The identifier for the DB snapshot to restore from.Constraints:
  • Must match the identifier of an existing DBSnapshot.
  • If you are restoring from a shared manual DB snapshot, the DBSnapshotIdentifier must be the ARN of the shared DB snapshot.
Required?False
Position?2
Accept pipeline input?True (ByPropertyName)
-DBSubnetGroupName <String>
The DB subnet group name to use for the new instance.Constraints: If supplied, must match the name of an existing DBSubnetGroup.Example: mySubnetgroup
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Domain <String>
Specify the Active Directory Domain to restore the instance in.
Required?False
Position?Named
Accept pipeline input?False
-DomainIAMRoleName <String>
Specify the name of the IAM role to be used when making API calls to the Directory Service.
Required?False
Position?Named
Accept pipeline input?False
-EnableIAMDatabaseAuthentication <Boolean>
True to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts, and otherwise false.You can enable IAM database authentication for the following database engines
  • For MySQL 5.6, minor version 5.6.34 or higher
  • For MySQL 5.7, minor version 5.7.16 or higher
  • Aurora 5.6 or higher.
Default: false
Required?False
Position?Named
Accept pipeline input?False
-Engine <String>
The database engine to use for the new instance.Default: The same as sourceConstraint: Must be compatible with the engine of the source. You can restore a MariaDB 10.1 DB instance from a MySQL 5.6 snapshot.Valid Values:
  • aurora
  • aurora-postgresql
  • mariadb
  • mysql
  • oracle-ee
  • oracle-se2
  • oracle-se1
  • oracle-se
  • postgres
  • sqlserver-ee
  • sqlserver-se
  • sqlserver-ex
  • sqlserver-web
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Force <SwitchParameter>
This parameter overrides confirmation prompts to force the cmdlet to continue its operation. This parameter should always be used with caution.
Required?False
Position?Named
Accept pipeline input?False
-Iops <Int32>
Specifies the amount of provisioned IOPS for the DB instance, expressed in I/O operations per second. If this parameter is not specified, the IOPS value is taken from the backup. If this parameter is set to 0, the new instance is converted to a non-PIOPS instance. The conversion takes additional time, though your DB instance is available for connections before the conversion starts. The provisioned IOPS value must follow the requirements for your database engine. For more information, see Amazon RDS Provisioned IOPS Storage to Improve Performance. Constraints: Must be an integer greater than 1000.
Required?False
Position?Named
Accept pipeline input?False
-LicenseModel <String>
License model information for the restored DB instance.Default: Same as source. Valid values: license-included | bring-your-own-license | general-public-license
Required?False
Position?Named
Accept pipeline input?False
-MultiAZ <Boolean>
Specifies if the DB instance is a Multi-AZ deployment.Constraint: You can't specify the AvailabilityZone parameter if the MultiAZ parameter is set to true.
Required?False
Position?Named
Accept pipeline input?False
-OptionGroupName <String>
The name of the option group to be used for the restored DB instance.Permanent options, such as the TDE option for Oracle Advanced Security TDE, can't be removed from an option group, and that option group can't be removed from a DB instance once it is associated with a DB instance
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Port <Int32>
The port number on which the database accepts connections.Default: The same port as the original DB instanceConstraints: Value must be 1150-65535
Required?False
Position?Named
Accept pipeline input?False
-PubliclyAccessible <Boolean>
Specifies the accessibility options for the DB instance. A value of true specifies an Internet-facing instance with a publicly resolvable DNS name, which resolves to a public IP address. A value of false specifies an internal instance with a DNS name that resolves to a private IP address.Default: The default behavior varies depending on whether a VPC has been requested or not. The following list shows the default behavior in each case.
  • Default VPC: true
  • VPC: false
If no DB subnet group has been specified as part of the request and the PubliclyAccessible value has not been set, the DB instance is publicly accessible. If a specific DB subnet group has been specified as part of the request and the PubliclyAccessible value has not been set, the DB instance is private.
Required?False
Position?Named
Accept pipeline input?False
-StorageType <String>
Specifies the storage type to be associated with the DB instance. Valid values: standard | gp2 | io1 If you specify io1, you must also include a value for the Iops parameter. Default: io1 if the Iops parameter is specified, otherwise standard
Required?False
Position?Named
Accept pipeline input?False
-Tag <Tag[]>
Documentation for this parameter is not currently available; please refer to the service API documentation.
Required?False
Position?Named
Accept pipeline input?False
-TdeCredentialArn <String>
The ARN from the key store with which to associate the instance for TDE encryption.
Required?False
Position?Named
Accept pipeline input?False
-TdeCredentialPassword <String>
The password for the given ARN from the key store in order to access the device.
Required?False
Position?Named
Accept pipeline input?False

Common Credential and Region Parameters

-AccessKey <String>
The AWS access key for the user account. This can be a temporary access key if the corresponding session token is supplied to the -SessionToken parameter.
Required? False
Position? Named
Accept pipeline input? False
-Credential <AWSCredentials>
An AWSCredentials object instance containing access and secret key information, and optionally a token for session-based credentials.
Required? False
Position? Named
Accept pipeline input? False
-ProfileLocation <String>

Used to specify the name and location of the ini-format credential file (shared with the AWS CLI and other AWS SDKs)

If this optional parameter is omitted this cmdlet will search the encrypted credential file used by the AWS SDK for .NET and AWS Toolkit for Visual Studio first. If the profile is not found then the cmdlet will search in the ini-format credential file at the default location: (user's home directory)\.aws\credentials. Note that the encrypted credential file is not supported on all platforms. It will be skipped when searching for profiles on Windows Nano Server, Mac, and Linux platforms.

If this parameter is specified then this cmdlet will only search the ini-format credential file at the location given.

As the current folder can vary in a shell or during script execution it is advised that you use specify a fully qualified path instead of a relative path.

Required? False
Position? Named
Accept pipeline input? False
-ProfileName <String>
The user-defined name of an AWS credentials or SAML-based role profile containing credential information. The profile is expected to be found in the secure credential file shared with the AWS SDK for .NET and AWS Toolkit for Visual Studio. You can also specify the name of a profile stored in the .ini-format credential file used with the AWS CLI and other AWS SDKs.
Required? False
Position? Named
Accept pipeline input? False
-NetworkCredential <PSCredential>
Used with SAML-based authentication when ProfileName references a SAML role profile. Contains the network credentials to be supplied during authentication with the configured identity provider's endpoint. This parameter is not required if the user's default network identity can or should be used during authentication.
Required? False
Position? Named
Accept pipeline input? False
-SecretKey <String>
The AWS secret key for the user account. This can be a temporary secret key if the corresponding session token is supplied to the -SessionToken parameter.
Required? False
Position? Named
Accept pipeline input? False
-SessionToken <String>
The session token if the access and secret keys are temporary session-based credentials.
Required? False
Position? Named
Accept pipeline input? False
-Region <String>
The system name of the AWS region in which the operation should be invoked. For example, us-east-1, eu-west-1 etc.
Required? False
Position? Named
Accept pipeline input? False
-EndpointUrl <String>

The endpoint to make the call against.

Note: This parameter is primarily for internal AWS use and is not required/should not be specified for normal usage. The cmdlets normally determine which endpoint to call based on the region specified to the -Region parameter or set as default in the shell (via Set-DefaultAWSRegion). Only specify this parameter if you must direct the call to a specific custom endpoint.

Required? False
Position? Named
Accept pipeline input? False

Inputs

You can pipe a String object to this cmdlet for the DBInstanceIdentifier parameter.

Outputs

This cmdlet returns a DBInstance object. The service call response (type Amazon.RDS.Model.RestoreDBInstanceFromDBSnapshotResponse) can also be referenced from properties attached to the cmdlet entry in the $AWSHistory stack.

Supported Version

AWS Tools for PowerShell: 2.x.y.z