CopyDBSnapshot
処理概要
DBスナップショットをコピーします。
コピー元のDBスナップショットはステータスが”available”でなければなりません。
自動バックアップ機能で作成されたDBスナップショットのみコピーすることができます。
指定するパラメーター
| パラメーター | 型 | 説明 | 必須 |
|---|---|---|---|
| SourceDBSnapshotIdentifier | string |
コピー元のDBスナップショット名
|
○ |
| TargetDBSnapshotIdentifier | string |
コピー先のDBスナップショット名
|
○ |
応答フィールド
| フィールド (項目) | 型 | 説明 |
|---|---|---|
| CopyDBSnapshotResponse | structure |
ルート |
| ␣CopyDBSnapshotResult | structure |
結果 |
| ␣␣DBSnapshot | structure |
DBスナップショット 備考: DBSnapshotの子要素はDescribeDBSnapshotsで返却される要素をすべて記載しているためAPIによっては返却されない要素もあります。実際のレスポンスはレスポンスサンプルを参照してください。 |
| ␣␣␣AllocatedStorage | integer |
ディスク容量 (GB) |
| ␣␣␣AvailabilityZone | string |
DBスナップショットのゾーン |
| ␣␣␣DBInstanceIdentifier | string |
DBスナップショットの元になったDBサーバー名 |
| ␣␣␣DBSnapshotIdentifier | string |
DBスナップショット名 |
| ␣␣␣Engine | string |
DBスナップショットのデータベースエンジン |
| ␣␣␣EngineVersion | string |
DBスナップショットのデータベースエンジンバージョン |
| ␣␣␣InstanceCreateTime | timestamp |
DBスナップショットの元になったDBサーバーの作成日時 |
| ␣␣␣LicenseModel | string |
DBスナップショットの元となったDBサーバーのライセンスモデル |
| ␣␣␣MasterUsername | string |
DBスナップショットの元となったDBサーバーのマスターユーザー名 |
| ␣␣␣OptionGroupName | string |
下記の固定値を返却
|
| ␣␣␣Port | integer |
DBスナップショットの元となったDBサーバーのポート |
| ␣␣␣SnapshotCreateTime | timestamp |
DBスナップショット作成日時 |
| ␣␣␣SnapshotType | string |
DBスナップショットのタイプ
|
| ␣␣␣Status | string |
DBスナップショットのステータス
|
| ␣ResponseMetadata | structure |
共通メタ情報 |
| ␣␣RequestId | string |
リクエスト識別子 |
エラー
| コード | メッセージ | タイプ | HTTPステータスコード | 説明 |
|---|---|---|---|---|
| Client.InvalidParameterCannotSpecify.CopySourceDBSnapshotIdentifier | Only automated snapshots can be copied. |
Sender | 400 | SourceDBSnapshotIdentifierに手動作成したDBスナップショットを指定した場合 |
| Client.InvalidParameterDuplicate.DBSnapshotIdentifier | Cannot create the snapshot because a snapshot with the identifier sample-snapshot already exists. |
Sender | 400 | TargetDBSnapshotIdentifierにすでに存在するDBSnapshotIdentifierを指定した場合 |
| Client.InvalidParameterFormat.CopySourceDBSnapshotIdentifier | The parameter SourceDBSnapshotIdentifier is not a valid identifier. Identifiers must begin with a letter; must contain only lowercase ASCII letters, digits, and hyphens; and must not end with a hyphen or contain two consecutive hyphens. |
Sender | 400 | SourceDBSnapshotIdentifierに無効な値(ハイフンから始まる 等)を指定した場合 |
| Client.InvalidParameterFormat.DBSnapshotIdentifier | The parameter TargetDBSnapshotIdentifier is not a valid identifier. Identifiers must begin with a letter; must contain only lowercase ASCII letters, digits, and hyphens; and must not end with a hyphen or contain two consecutive hyphens. |
Sender | 400 | TargetDBSnapshotIdentifierに無効な値(ハイフンから始まる 等)を指定した場合 |
| Client.InvalidParameterNotFound.CopySourceDBSnapshot | DBSnapshot not found: rdb:sample-snapshot-2017-05-20-19-14 |
Sender | 404 | SourceDBSnapshotIdentifierに存在しない自動作成されたDBSnapshotIdentifierを指定した場合 |
| Client.InvalidParameterRequired.CopySourceDBSnapshotIdentifier | The parameter SourceDBSnapshotIdentifier must be provided and must not be blank. |
Sender | 400 | 必須のSourceDBSnapshotIdentifierを指定しなかった場合 |
| Client.InvalidParameterRequired.DBSnapshotIdentifier | The parameter TargetDBSnapshotIdentifier must be provided and must not be blank. |
Sender | 400 | 必須のTargetDBSnapshotIdentifierを指定しなかった場合 |
| Client.InvalidParameterTooLong.CopySourceDBSnapshotIdentifier | The parameter SourceDBSnapshotIdentifier is not a valid identifier because it is longer than 255 characters. |
Sender | 400 | SourceDBSnapshotIdentifierに255文字を超える値を指定した場合 |
| Client.InvalidParameterTooLong.DBSnapshotIdentifier | The parameter TargetDBSnapshotIdentifier is not a valid identifier because it is longer than 255 characters. |
Sender | 400 | TargetDBSnapshotIdentifierに255文字を超える値を指定した場合 |
| Client.LimitExceeded.NumberOfDBSnapshot | Request would result in user exceeding the allowed number of DB Snapshots. |
Sender | 400 | 作成可能なDBスナップショットの上限に達している場合 |
| Client.ResourceIncorrectState.CopySourceDBSnapshot.Unavailable | The state of the DB Snapshot does not allow deletion. |
Sender | 400 | DBスナップショットのステータスが有効でない場合 |
リクエストサンプル
https://jp-east-1.rdb.api.nifcloud.com/
?Action=CopyDBSnapshot
&SourceDBSnapshotIdentifier=rdb:mydbinstance-2013-11-30-06-28
&TargetDBSnapshotIdentifier=mydbinstance-2013-11-30-06-28
&SignatureVersion=2
&SignatureMethod=HmacSHA256
&Timestamp=2013-12-09T00:00:00.000Z
&AWSAccessKeyId=<NIFCLOUD Access Key ID>
&Signature=<Signature>
応答サンプル
<CopyDBSnapshotResponse>
<CopyDBSnapshotResult>
<DBSnapshot>
<AllocatedStorage>50</AllocatedStorage>
<AvailabilityZone>east-13</AvailabilityZone>
<DBInstanceIdentifier>mydbinstance</DBInstanceIdentifier>
<DBSnapshotIdentifier>mydbinstance-2013-11-30-06-28</DBSnapshotIdentifier>
<Engine>mysql</Engine>
<EngineVersion>5.6.12</EngineVersion>
<InstanceCreateTime>2013-11-30T06:28:42.000Z</InstanceCreateTime>
<LicenseModel>general-public-license</LicenseModel>
<MasterUsername>mydbuser</MasterUsername>
<OptionGroupName>default:mysql-5-6</OptionGroupName>
<Port>3306</Port>
<SnapshotCreateTime>2013-11-30T06:29:10.000Z</SnapshotCreateTime>
<SnapshotType>manual</SnapshotType>
<Status>available</Status>
</DBSnapshot>
</CopyDBSnapshotResult>
<ResponseMetadata>
<RequestId>1ed1b7c2-55ab-4188-ac46-2e5c6250a10c</RequestId>
</ResponseMetadata>
</CopyDBSnapshotResponse>


