本文へジャンプします。

ニフクラ ユーザーガイド

クラウド トップ>API> RDB> CreateDBSnapshot
本ページは2023/9/5をもって、新ページhttps://docs.nifcloud.com/rdb/api/CreateDBSnapshot.htmへ移行しました。 今後は新ページをご参照ください。

CreateDBSnapshot

処理概要

DBスナップショットを作成します。

作成元となるDBサーバーのステータスは“available”でなければなりません。

指定するパラメーター

パラメーター 説明 必須
DBInstanceIdentifier string

スナップショットの元になるDBサーバー名

  • ※ステータスが“available”のDBサーバーのみ指定できます

DBSnapshotIdentifier string

作成するDBスナップショット名

  • ※1〜255字のアルファベット(小文字)・数字・ハイフン(‘-’)が使用できます
  • ※最初の文字はアルファベットである必要があります
  • ※末尾にハイフンをつけたりハイフンを2個連続させたりすることはできません

応答フィールド

フィールド (項目) 説明
CreateDBSnapshotResponse structure ルート
CreateDBSnapshotResult 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

下記の固定値を返却

  • DBエンジンがMySQL 5.5系の場合、default:mysql-5-5
  • DBエンジンがMySQL 5.6系の場合、default:mysql-5-6
  • DBエンジンがMySQL 5.7系の場合、default:mysql-5-7
  • DBエンジンがPostgreSQL9.3系の場合、default:postgres-9-3
  • DBエンジンがPostgreSQL9.6系の場合、default:postgres-9-6
  • DBエンジンがPostgreSQL11系の場合、default:postgres-11
  • DBエンジンがPostgreSQL13系の場合、default:postgres-13

Port integer DBスナップショットの元となったDBサーバーのポート
SnapshotCreateTime timestamp DBスナップショット作成日時
SnapshotType string

DBスナップショットのタイプ

  • 値:automated(自動) | manual(手動)

Status string

DBスナップショットのステータス

  • 値:creating(作成中) | availabile(作成完了) | failed(作成失敗)

ResponseMetadata structure 共通メタ情報
RequestId string リクエスト識別子

エラー

コード メッセージ タイプ HTTPステータスコード 説明
Client.InvalidParameterCannotSpecify.DBInstanceIdentifier

Cannot create a snapshot because the DB Instance is a read replica

Sender 400 作成元のDBサーバーがリードレプリカの場合
Client.InvalidParameterDuplicate.DBSnapshotIdentifier

Cannot create the snapshot because a snapshot with the identifier sample-snapshot already exists.

Sender 400 DBSnapshotIdentifierにすでに存在するDBSnapshotIdentifierを指定した場合
Client.InvalidParameterFormat.DBInstanceIdentifier

The parameter DBInstanceIdentifier 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 DBInstanceIdentifierに無効な値(ハイフンから始まる 等)を指定した場合
Client.InvalidParameterFormat.DBSnapshotIdentifier

The parameter DBSnapshotIdentifier 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 DBSnapshotIdentifierに無効な値(ハイフンから始まる 等)を場合
Client.InvalidParameterNotFound.DBInstance

DBInstance not found: aaa

Sender 404 存在しないDBInstanceIdentifierを指定した場合
Client.InvalidParameterRequired.DBInstanceIdentifier

The parameter DBInstanceIdentifier must be provided and must not be blank.

Sender 400 必須のDBInstanceIdentifierを指定しなかった場合
Client.InvalidParameterRequired.DBSnapshotIdentifier

The parameter DBSnapshotIdentifier must be provided and must not be blank.

Sender 400 必須のDBSnapshotIdentifierを指定しなかった場合
Client.InvalidParameterTooLong.DBInstanceIdentifier

The parameter DBInstanceIdentifier is not a valid identifier because it is longer than 63 characters.

Sender 400 DBInstanceIdentifierに63文字を超える値を指定した場合
Client.InvalidParameterTooLong.DBSnapshotIdentifier

The parameter DBSnapshotIdentifier is not a valid identifier because it is longer than 255 characters.

Sender 400 DBSnapshotIdentifierに255文字を超える値を指定した場合
Client.LimitExceeded.NumberOfDBSnapshot

Request would result in user exceeding the allowed number of DB Snapshots.

Sender 400 作成可能なDBスナップショットの上限に達している場合
Client.ResourceIncorrectState.DBInstance.Unavailable

Cannot create a snapshot because the database instance sample-snapshot is not currently in the available state.

Sender 400 DBサーバーのステータスが有効でない場合

リクエストサンプル

    https://jp-east-1.rdb.api.nifcloud.com/
  ?Action=CreateDBSnapshot
  &DBInstanceIdentifier=mydbinstance
  &DBSnapshotIdentifier=mydbsnapshot
  &SignatureVersion=2
  &SignatureMethod=HmacSHA256
  &Timestamp=2013-12-09T00:00:00.000Z
  &AWSAccessKeyId=<NIFCLOUD Access Key ID>
  &Signature=<Signature>

  

応答サンプル

    <CreateDBSnapshotResponse>
  <CreateDBSnapshotResult>
    <DBSnapshot>
      <AllocatedStorage>50</AllocatedStorage>
      <AvailabilityZone>east-13</AvailabilityZone>
      <DBInstanceIdentifier>mydbinstance</DBInstanceIdentifier>
      <DBSnapshotIdentifier>mydbsnapshot</DBSnapshotIdentifier>
      <Engine>mysql</Engine>
      <EngineVersion>5.6.12</EngineVersion>
      <InstanceCreateTime>2013-11-30T09:55:59.000Z</InstanceCreateTime>
      <LicenseModel>general-public-license</LicenseModel>
      <MasterUsername>mydbuser</MasterUsername>
      <OptionGroupName>default:mysql-5-6</OptionGroupName>
      <Port>3306</Port>
      <SnapshotType>manual</SnapshotType>
      <Status>creating</Status>
    </DBSnapshot>
  </CreateDBSnapshotResult>
  <ResponseMetadata>
    <RequestId>02611a43-a2f1-4c4b-9703-1b31ae405d95</RequestId>
  </ResponseMetadata>
</CreateDBSnapshotResponse>

  
  • ※本ページ記載の金額は、すべて税抜表示です。
  • ※本ページ記載の他社製品名および会社名などは、各社の商標または登録商標です。
  • ※本ページの内容は、2023年9月05日時点の情報です。

推奨画面サイズ 1024×768 以上