Nacos 構成をファイルとしてインポートします。
操作説明
現在の OpenAPI は Nacos-SDK API ではありません。 Nacos-SDK API については、「公式ドキュメント」をご参照ください。
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
mse:ImportNacosConfig |
create |
*All Resource
|
なし | なし |
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| InstanceId |
string |
必須 |
インスタンス ID。 |
mse_prepaid_public_cn-**** |
| NamespaceId |
string |
任意 |
名前空間 ID。 デフォルト値: public |
f5cdc80a-****-8094-282f5650fc00 |
| Policy |
string |
任意 |
ポリシー。 |
overwrite |
| FileUrl |
string |
必須 |
インポートするファイルの URL。 このパラメータは、Microservices Engine (MSE) によって生成された URL に設定する必要があります。 そうしないと、必要な権限が付与されていないことを示すエラー情報が返されます。 URL を取得するには、次の手順を実行します。 1. GetImportFileUrl 操作を呼び出して URL を取得します。 2. HTTP PUT メソッドを使用して、前の手順で返された HTTP URL にファイルをアップロードします。 3. ImportNacosConfig 操作を呼び出して Nacos 構成をインポートします。 |
http://mse-shared.oss-xxx.aliyuncs.com/cfg/import/xxxx/2021/01/11/xxxx.zip |
| AcceptLanguage |
string |
任意 |
レスポンスの言語。 有効な値:
|
zh |
レスポンスフィールド
|
パラメーター |
型 |
説明 |
例 |
|
object |
データ構造。 |
||
| HttpStatusCode |
integer |
HTTP ステータスコード。 |
200 |
| RequestId |
string |
リクエスト ID。 |
AF21683A-29C7-4853-AC0F-B5ADEE4**** |
| Success |
boolean |
呼び出しが成功したかどうかを示します。 有効な値:
|
true |
| ErrorCode |
string |
エラーコード。 |
mse-100-100 |
| Code |
integer |
コード。 |
1 |
| Message |
string |
リクエストに対して返されるメッセージ。 |
The dynamic part in the error message. This parameter is used to replace the **%s** variable in the **ErrMessage** parameter. > If the return value of the **ErrMessage** parameter is **The Value of Input Parameter %s is not valid** and the return value of the **DynamicMessage** parameter is **DtsJobId**, the specified **DtsJobId** parameter is invalid. |
| DynamicMessage |
string |
動的エラーメッセージ。 ErrMessage パラメータの %s を置き換えるために使用されます。 説明
ErrMessage が The Value of Input Parameter %s is not valid を返し、DynamicMessage が DtsJobId を返す場合、リクエストパラメータ DtsJobId が無効であることを意味します。 |
The specified parameter is invalid. |
| Data |
object |
返されるデータ。 |
|
| SuccCount |
integer |
インポートされる構成の数。 |
100 |
| SkipCount |
integer |
スキップされる構成の数。 |
10 |
| SkipData |
array |
スキップされた構成に関する情報。 |
|
|
object |
データ構造。 |
||
| DataId |
string |
データの ID。 |
test.yaml |
| Group |
string |
グループ ID。 |
public |
| FailData |
array |
インポートに失敗した構成に関する情報。 |
|
|
object |
データ構造。 |
||
| DataId |
string |
データの ID。 |
test2.yaml |
| Group |
string |
グループ ID。 |
test |
| Reason |
string |
失敗の理由 |
例
成功レスポンス
JSONJSON
{
"HttpStatusCode": 200,
"RequestId": "AF21683A-29C7-4853-AC0F-B5ADEE4****",
"Success": true,
"ErrorCode": "mse-100-100",
"Code": 1,
"Message": "The dynamic part in the error message. This parameter is used to replace the **%s** variable in the **ErrMessage** parameter.\n\n> If the return value of the **ErrMessage** parameter is **The Value of Input Parameter %s is not valid** and the return value of the **DynamicMessage** parameter is **DtsJobId**, the specified **DtsJobId** parameter is invalid.\n",
"DynamicMessage": "The specified parameter is invalid.",
"Data": {
"SuccCount": 100,
"SkipCount": 10,
"SkipData": [
{
"DataId": "test.yaml",
"Group": "public "
}
],
"FailData": [
{
"DataId": "test2.yaml",
"Group": "test",
"Reason": ""
}
]
}
}
エラーコード
|
HTTP ステータスコード |
エラーコード |
エラーメッセージ |
説明 |
|---|---|---|---|
| 400 | IllegalRequest | Invalid request:%s | |
| 400 | InvalidParameter | Parameter error:%s | |
| 500 | InternalError | Console error. Try again later:%s | |
| 403 | NoPermission | You are not authorized to perform this operation:%s | |
| 404 | NotFound | Not found:%s |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。