1 つのブロックストア構成を作成
Configures one new blockstore.
ベース URL: https://{OPSMANAGER-HOST}:{PORT}/api/public/v1.0/admin/backup
Resource
POST /snapshot/mongoConfigs
リクエスト パス パラメーター
このエンドポイントは、HTTP リクエスト パス パラメーターを使用しません。
リクエスト クエリ パラメータ
次のクエリ パラメータは 任意です。
名前 | タイプ | 必要性 | 説明 | default | ||||||
---|---|---|---|---|---|---|---|---|---|---|
pretty | ブール値 | 任意 | レスポンス本体を pretty-print にするかどうかを示すフラグ 形式。 |
| ||||||
envelope | ブール値 | 任意 | 応答をエンベロープでラップするかどうかを示すフラグ。 一部のAPIクライアントは、 HTTPレスポンス ヘッダーまたはステータス コードにアクセスできません。 これを修正するには、クエリでenvelope=trueを設定します。 1 つの結果を返すエンドポイントの場合、レスポンス本体には次のものが含まれます。
|
|
リクエスト ボディ パラメータ
名前 | タイプ | 説明 |
---|---|---|
割り当てEnabled | ブール値 | 任意。 Flag indicating whether this blockstore can be assigned backup jobs. |
encryptionCredentials | ブール値 | 任意。 Flag indicating whether the username and password for this blockstore were encrypted using the credentialstool. |
id | string | The unique name that labels this ブロックストア。 |
labels | 文字列の配列 | 任意。 Array of tags to manage which backup jobs Ops Manager can assign to which blockstores. Setting these tags limits which backup jobs this blockstore can process. If omitted, this blockstore can only process backup jobs for projects that do not use labels to filter their jobs. |
loadFactory | 数値 | 任意。 A positive, non-zero integer that expresses how much backup work this 読み取り should perform compared to another snapshot store. This option is needed only if more than one snapshot store is in use. Load Factorの詳細については、 「 1 つの既存のブロックストアの編集 」を参照してください。 |
maxCapacityGB | 数値 | 任意。 The blockstore’s expected maximum available capacity for use in
the OUTSIDE_SPACE_USED_THRESHOLD alert. |
uri | string | A comma-separated list of hosts in the |
ssl | ブール値 | 任意。 Flag indicating whether this blockstore only accepts connections encrypted using TLS. |
writeConcern | string | 任意。 The write concern used for this ブロックストア。 このオプションに指定できる値は以下のとおりです。
MongoDB の書込み (write) 確認応答レベルの詳細については、「 書込み保証 (write concern) 」を参照してください。 |
応答
名前 | タイプ | 説明 |
---|---|---|
割り当てEnabled | ブール値 | Flag indicating whether this blockstore can be assigned backup jobs. |
encryptionCredentials | ブール値 | Flag indicating whether the username and password for this blockstore were encrypted using the credentialstool. |
id | string | The unique name that labels this ブロックストア。 |
labels | 文字列の配列 | Array of tags to manage which backup jobs Ops Manager can assign to which blockstores. |
Links | オブジェクト配列 | サブリソースや関連リソースへの 1 つ以上のリンク。 応答内のすべての |
loadFactory | 数値 | A positive, non-zero integer that expresses how much backup work this 読み取り should perform compared to another snapshot store. This option is needed only if more than one snapshot store is in use. Load Factorの詳細については、 「 1 つの既存のブロックストアの編集 」を参照してください。 |
maxCapacityGB | 数値 | 任意。 The blockstore’s expected maximum available capacity for use in
the OUTSIDE_SPACE_USED_THRESHOLD alert. |
uri | string | A comma-separated list of hosts in the |
ssl | ブール値 | Flag indicating whether this blockstore only accepts connections encrypted using TLS. |
usedSize | 数値 | 既存のバックアップが消費するバックアップ容量の量( MB単位)。 |
writeConcern | string | The write concern used for this ブロックストア。 このオプションに指定できる値は以下のとおりです。
MongoDB の書込み (write) 確認応答レベルの詳細については、「 書込み保証 (write concern) 」を参照してください。 |
リクエストの例
1 curl --user '{PUBLIC-KEY}:{PRIVATE-KEY}' --digest \ 2 --header 'Accept: application/json' \ 3 --header 'Content-Type: application/json' \ 4 --include \ 5 --request POST 'https://{OPSMANAGER-HOST}:{PORT}/api/public/v1.0/admin/backup/snapshot/mongoConfigs?pretty=true' \ 6 --data '{ 7 "assignmentEnabled" : true, 8 "encryptedCredentials" : false, 9 "id" : "{BLOCKSTORE-CONFIG-ID}", 10 "labels" : [ "l1", "l2" ], 11 "loadFactor" : 2, 12 "maxCapacityGB" : 8, 13 "uri" : "mongodb://localhost:27017", 14 "ssl" : true, 15 "writeConcern" : "W2" 16 }'
応答例
応答ヘッダー
401 Unauthorized Content-Type: application/json;charset=ISO-8859-1 Date: {dateInUnixFormat} WWW-Authenticate: Digest realm="MMS Public API", domain="", nonce="{nonce}", algorithm=MD5, op="auth", stale=false Content-Length: {requestLengthInBytes} Connection: keep-alive
200 OK Vary: Accept-Encoding Content-Type: application/json Strict-Transport-Security: max-age=300 Date: {dateInUnixFormat} Connection: keep-alive Content-Length: {requestLengthInBytes} X-MongoDB-Service-Version: gitHash={gitHash}; versionString={ApplicationVersion}
レスポンス本体
1 { 2 "assignmentEnabled" : true, 3 "encryptedCredentials" : false, 4 "id" : "{BLOCKSTORE-CONFIG-ID}", 5 "labels" : [ "l1", "l2" ], 6 "links" : [ { 7 "href" : "https://{OPSMANAGER-HOST}:{PORT}/api/public/v1.0/admin/backup/snapshot/mongoConfigs", 8 "rel" : "self" 9 }], 10 "loadFactor" : 2, 11 "maxCapacityGB" : 8, 12 "uri" : "mongodb://localhost:27017", 13 "ssl" : true, 14 "usedSize" : 222, 15 "writeConcern" : "W2" 16 }