Docs Menu

1 つの同期ストア構成を作成

Configures one new sync store.

ベース URL: https://{OPSMANAGER-HOST}:{PORT}/api/public/v1.0/admin/backup

POST /sync/mongoConfigs

このエンドポイントは、HTTP リクエスト パス パラメーターを使用しません。

次のクエリ パラメータは 任意です。

名前
タイプ
必要性
説明
default

pretty

ブール値

任意

レスポンス本体を pretty-print にするかどうかを示すフラグ 形式。

false

envelope

ブール値

任意

応答をエンベロープでラップするかどうかを示すフラグ。

一部のAPIクライアントは、 HTTPレスポンス ヘッダーまたはステータス コードにアクセスできません。 これを修正するには、クエリでenvelope=trueを設定します。

1 つの結果を返すエンドポイントの場合、レスポンス本体には次のものが含まれます。

名前
説明

status

HTTPレスポンス コード

content

期待される応答本体

false

名前
タイプ
説明

割り当てEnabled

ブール値

任意。 Flag indicating whether this sync store can be assigned backup jobs.

encryptionCredentials

ブール値

任意。 Flag indicating whether the username and password for this sync store were encrypted using the credentialstool.

id

string

The unique name that labels this sync store.

labels

文字列の配列

任意。 Array of tags to manage which backup jobs Ops Manager can assign to which sync stores.

Setting these tags limits which backup jobs this sync store can process. If omitted, this sync store can only process backup jobs for projects that do not use labels to filter their jobs.

maxCapacityGB

数値

任意。 The sync store’s expected maximum available capacity for use in the OUTSIDE_SPACE_USED_THRESHOLD alert. maxCapacityGB does not enforce any limitation on the size of the backing database.

uri

string

A comma-separated list of hosts in the <hostname:port> format that can be used to access this sync store.

ssl

ブール値

任意。 Flag indicating whether this sync store only accepts connections encrypted using TLS.

writeConcern

string

任意。 The write concern used for this sync store.

このオプションに指定できる値は以下のとおりです。

  • ACKNOWLEDGED

  • W2

  • JOURNALED

  • MAJORITY

MongoDB の書込み (write) 確認応答レベルの詳細については、「 書込み保証 (write concern) 」を参照してください。

名前
タイプ
説明

割り当てEnabled

ブール値

Flag indicating whether this sync store can be assigned backup jobs.

encryptionCredentials

ブール値

Flag indicating whether the username and password for this sync store were encrypted using the credentialstool.

id

string

The unique name that labels this sync store.

labels

文字列の配列

Array of tags to manage which backup jobs Ops Manager can assign to which sync stores.

Links

オブジェクト配列

サブリソースや関連リソースへの 1 つ以上のリンク。 応答内のすべてのlinks配列には、 selfと呼ばれるリンクが少なくとも 1 つ含まれています。 URL の関係は、 Web リンク仕様 で説明されています。

maxCapacityGB

数値

任意。 The sync store’s expected maximum available capacity for use in the OUTSIDE_SPACE_USED_THRESHOLD alert. maxCapacityGB does not enforce any limitation on the size of the backing database.

uri

string

A comma-separated list of hosts in the <hostname:port> format that can be used to access this sync store.

ssl

ブール値

Flag indicating whether this sync store only accepts connections encrypted using TLS.

usedSize

数値

既存のバックアップが消費するバックアップ容量の量( MB単位)。

writeConcern

string

The write concern used for this sync store.

このオプションに指定できる値は以下のとおりです。

  • ACKNOWLEDGED

  • W2

  • JOURNALED

  • MAJORITY

MongoDB の書込み (write) 確認応答レベルの詳細については、「 書込み保証 (write concern) 」を参照してください。

1curl --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/sync/mongoConfigs?pretty=true' \
6 --data '{
7 "assignmentEnabled" : true,
8 "encryptedCredentials" : false,
9 "id" : "{SYNCSTORE-CONFIG-ID}",
10 "labels" : [ "l1", "l2" ],
11 "maxCapacityGB" : 8,
12 "uri" : "mongodb://localhost:27017",
13 "ssl" : true,
14 "writeConcern" : "W2"
15 }'
HTTP/1.1 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
HTTP/1.1 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" : "{SYNCSTORE-CONFIG-ID}",
5 "labels" : [ "l1", "l2" ],
6 "links" : [ {
7 "href" : "https://{OPSMANAGER-HOST}:{PORT}/api/public/v1.0/admin/backup/sync/mongoConfigs",
8 "rel" : "self"
9 }],
10 "maxCapacityGB" : 8,
11 "uri" : "mongodb://localhost:27017",
12 "ssl" : true,
13 "usedSize" : 222,
14 "writeConcern" : "W2"
15}