[ aws . rds ]

modify-db-snapshot

Description

Updates a manual DB snapshot with a new engine version. The snapshot can be encrypted or unencrypted, but not shared or public.

Amazon RDS supports upgrading DB snapshots for MySQL, Oracle, and PostgreSQL.

See also: AWS API Documentation

See ‘aws help’ for descriptions of global parameters.

Synopsis

  modify-db-snapshot
--db-snapshot-identifier <value>
[--engine-version <value>]
[--option-group-name <value>]
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]

Options

--db-snapshot-identifier (string)

The identifier of the DB snapshot to modify.

--engine-version (string)

The engine version to upgrade the DB snapshot to.

The following are the database engines and engine versions that are available when you upgrade a DB snapshot.

MySQL

  • 5.5.46 (supported for 5.1 DB snapshots)

Oracle

  • 12.1.0.2.v8 (supported for 12.1.0.1 DB snapshots)

  • 11.2.0.4.v12 (supported for 11.2.0.2 DB snapshots)

  • 11.2.0.4.v11 (supported for 11.2.0.3 DB snapshots)

PostgreSQL

For the list of engine versions that are available for upgrading a DB snapshot, see Upgrading the PostgreSQL DB Engine for Amazon RDS .

--option-group-name (string)

The option group to identify with the upgraded DB snapshot.

You can specify this parameter when you upgrade an Oracle DB snapshot. The same option group considerations apply when upgrading a DB snapshot as when upgrading a DB instance. For more information, see Option group considerations in the Amazon RDS User Guide.

--cli-input-json | --cli-input-yaml (string) Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with --cli-input-yaml.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. Similarly, if provided yaml-input it will print a sample input YAML that can be used with --cli-input-yaml. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

See ‘aws help’ for descriptions of global parameters.

Examples

To modify a DB snapshot

The following modify-db-snapshot example upgrades a PostgeSQL 10.6 snapshot named db5-snapshot-upg-test to PostgreSQL 11.7. The new DB engine version is shown after the snapshot has finished upgrading and its status is available.

aws rds modify-db-snapshot \
    --db-snapshot-identifier db5-snapshot-upg-test \
    --engine-version 11.7

Output:

{
    "DBSnapshot": {
        "DBSnapshotIdentifier": "db5-snapshot-upg-test",
        "DBInstanceIdentifier": "database-5",
        "SnapshotCreateTime": "2020-03-27T20:49:17.092Z",
        "Engine": "postgres",
        "AllocatedStorage": 20,
        "Status": "upgrading",
        "Port": 5432,
        "AvailabilityZone": "us-west-2a",
        "VpcId": "vpc-2ff27557",
        "InstanceCreateTime": "2020-03-27T19:59:04.735Z",
        "MasterUsername": "postgres",
        "EngineVersion": "10.6",
        "LicenseModel": "postgresql-license",
        "SnapshotType": "manual",
        "OptionGroupName": "default:postgres-11",
        "PercentProgress": 100,
        "StorageType": "gp2",
        "Encrypted": false,
        "DBSnapshotArn": "arn:aws:rds:us-west-2:123456789012:snapshot:db5-snapshot-upg-test",
        "IAMDatabaseAuthenticationEnabled": false,
        "ProcessorFeatures": [],
        "DbiResourceId": "db-GJMF75LM42IL6BTFRE4UZJ5YM4"
    }
}

For more information, see Upgrading a PostgreSQL DB Snapshot in the Amazon RDS User Guide.

Output

DBSnapshot -> (structure)

Contains the details of an Amazon RDS DB snapshot.

This data type is used as a response element in the DescribeDBSnapshots action.

DBSnapshotIdentifier -> (string)

Specifies the identifier for the DB snapshot.

DBInstanceIdentifier -> (string)

Specifies the DB instance identifier of the DB instance this DB snapshot was created from.

SnapshotCreateTime -> (timestamp)

Specifies when the snapshot was taken in Coordinated Universal Time (UTC).

Engine -> (string)

Specifies the name of the database engine.

AllocatedStorage -> (integer)

Specifies the allocated storage size in gibibytes (GiB).

Status -> (string)

Specifies the status of this DB snapshot.

Port -> (integer)

Specifies the port that the database engine was listening on at the time of the snapshot.

AvailabilityZone -> (string)

Specifies the name of the Availability Zone the DB instance was located in at the time of the DB snapshot.

VpcId -> (string)

Provides the VPC ID associated with the DB snapshot.

InstanceCreateTime -> (timestamp)

Specifies the time in Coordinated Universal Time (UTC) when the DB instance, from which the snapshot was taken, was created.

MasterUsername -> (string)

Provides the master username for the DB snapshot.

EngineVersion -> (string)

Specifies the version of the database engine.

LicenseModel -> (string)

License model information for the restored DB instance.

SnapshotType -> (string)

Provides the type of the DB snapshot.

Iops -> (integer)

Specifies the Provisioned IOPS (I/O operations per second) value of the DB instance at the time of the snapshot.

OptionGroupName -> (string)

Provides the option group name for the DB snapshot.

PercentProgress -> (integer)

The percentage of the estimated data that has been transferred.

SourceRegion -> (string)

The AWS Region that the DB snapshot was created in or copied from.

SourceDBSnapshotIdentifier -> (string)

The DB snapshot Amazon Resource Name (ARN) that the DB snapshot was copied from. It only has value in case of cross-customer or cross-region copy.

StorageType -> (string)

Specifies the storage type associated with DB snapshot.

TdeCredentialArn -> (string)

The ARN from the key store with which to associate the instance for TDE encryption.

Encrypted -> (boolean)

Specifies whether the DB snapshot is encrypted.

KmsKeyId -> (string)

If Encrypted is true, the AWS KMS key identifier for the encrypted DB snapshot.

The AWS KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the AWS KMS customer master key (CMK).

DBSnapshotArn -> (string)

The Amazon Resource Name (ARN) for the DB snapshot.

Timezone -> (string)

The time zone of the DB snapshot. In most cases, the Timezone element is empty. Timezone content appears only for snapshots taken from Microsoft SQL Server DB instances that were created with a time zone specified.

IAMDatabaseAuthenticationEnabled -> (boolean)

True if mapping of AWS Identity and Access Management (IAM) accounts to database accounts is enabled, and otherwise false.

ProcessorFeatures -> (list)

The number of CPU cores and the number of threads per core for the DB instance class of the DB instance when the DB snapshot was created.

(structure)

Contains the processor features of a DB instance class.

To specify the number of CPU cores, use the coreCount feature name for the Name parameter. To specify the number of threads per core, use the threadsPerCore feature name for the Name parameter.

You can set the processor features of the DB instance class for a DB instance when you call one of the following actions:

  • CreateDBInstance

  • ModifyDBInstance

  • RestoreDBInstanceFromDBSnapshot

  • RestoreDBInstanceFromS3

  • RestoreDBInstanceToPointInTime

You can view the valid processor values for a particular instance class by calling the DescribeOrderableDBInstanceOptions action and specifying the instance class for the DBInstanceClass parameter.

In addition, you can use the following actions for DB instance class processor information:

  • DescribeDBInstances

  • DescribeDBSnapshots

  • DescribeValidDBInstanceModifications

If you call DescribeDBInstances , ProcessorFeature returns non-null values only if the following conditions are met:

  • You are accessing an Oracle DB instance.

  • Your Oracle DB instance class supports configuring the number of CPU cores and threads per core.

  • The current number CPU cores and threads is set to a non-default value.

For more information, see Configuring the Processor of the DB Instance Class in the Amazon RDS User Guide.

Name -> (string)

The name of the processor feature. Valid names are coreCount and threadsPerCore .

Value -> (string)

The value of a processor feature name.

DbiResourceId -> (string)

The identifier for the source DB instance, which can’t be changed and which is unique to an AWS Region.

TagList -> (list)

A list of tags. For more information, see Tagging Amazon RDS Resources in the Amazon RDS User Guide.

(structure)

Metadata assigned to an Amazon RDS resource consisting of a key-value pair.

Key -> (string)

A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and can’t be prefixed with “aws:” or “rds:”. The string can only contain only the set of Unicode letters, digits, white-space, ‘_’, ‘.’, ‘:’, ‘/’, ‘=’, ‘+’, ‘-‘, ‘@’ (Java regex: “^([\p{L}\p{Z}\p{N}_.:/=+-@]*)$”).

Value -> (string)

A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and can’t be prefixed with “aws:” or “rds:”. The string can only contain only the set of Unicode letters, digits, white-space, ‘_’, ‘.’, ‘:’, ‘/’, ‘=’, ‘+’, ‘-‘, ‘@’ (Java regex: “^([\p{L}\p{Z}\p{N}_.:/=+-@]*)$”).