BatchSetCdnDomainConfig 操作を呼び出して、複数のドメイン名をバッチで設定できます。
操作説明
単一ユーザーの呼び出し頻度は、1 秒あたり 3 回に制限されています。
一度に最大 50 個のドメイン名を設定できます。 ドメイン名はコンマ (,) で区切ります。
BatchSetCdnDomainConfig 操作を呼び出してドメイン名の機能を設定すると、一意の ConfigId が生成されます。 この ConfigId を使用して、設定を更新または削除できます。 詳細については、「ConfigId の照会と使用」をご参照ください。
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
cdn:BatchSetCdnDomainConfig |
update |
*Domain
|
なし |
|
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| DomainNames |
string |
必須 |
高速化ドメイン名。 複数のドメイン名をコンマ (,) で区切ります。 次の制限事項にご注意ください:
|
www.example.com |
| Functions |
string |
必須 |
機能のリスト。 一度に最大 50 個の機能を指定できます。 形式は次のとおりです:
parentId を -1 に設定すると、設定内の既存の条件付きルールが削除されます。
次の例は、parentId を使用しない設定を示しています。 origin_request_header 機能を使用して、オリジンフェッチ HTTP ヘッダーを追加します。
次の例は、parentId を使用する設定を示しています。 origin_request_header 機能を使用してオリジンフェッチ HTTP ヘッダーを追加し、configid=222728944812032 の条件付きルールを参照します。
次の例は、条件付きルールへの参照を削除する方法を示しています。 origin_request_header 機能は、すでに configid=222728944812032 の条件付きルールを参照しています。 参照を削除するには、parentId を -1 に設定します。 |
[{"functionArgs": [{"argName": "key","argValue": "Content-Encoding"},{"argName": "value","argValue": "gzip"}],"functionName": "set_resp_header"} ] |
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
|||
| RequestId |
string |
リクエスト ID。 |
04F0F334-1335-436C-A1D7-6C044FE73368 |
| DomainConfigList |
object |
||
| DomainConfigModel |
array<object> |
ドメイン名設定のリスト。 |
|
|
object |
|||
| ConfigId |
integer |
設定 ID。 0 が返された場合、設定は失敗しています。 機能を再設定してください。 |
1234567 |
| DomainName |
string |
ドメイン名。 |
www.example.com |
| FunctionName |
string |
機能名。 |
set_resp_header |
例
成功レスポンス
JSONJSON
{
"RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368",
"DomainConfigList": {
"DomainConfigModel": [
{
"ConfigId": 1234567,
"DomainName": "www.example.com",
"FunctionName": "set_resp_header"
}
]
}
}
エラーレスポンス
JSONJSON
[{"functionArgs":[{"argName":"file_type","argValue":"jpg"},{"argName":"ttl","argValue":"18"},{"argName":"weight","argValue":"30"}],"functionName":"filetype_based_ttl_set","configId":5068995}]
エラーコード
|
HTTP ステータスコード |
エラーコード |
エラーメッセージ |
説明 |
|---|---|---|---|
| 400 | InvalidFunctions.Malformed | The specified Functions is incorrectly formatted. | 書式設定エラー。 |
| 400 | InvalidArgValue.Malformed | The specified ArgValue is invalid. | 指定されたArgValueが不正です。 |
| 400 | Invalid%s.ValueNotSupported | [%s] is not supported. | |
| 400 | Invalid%s.Malformed | The specified ArgValue [%s] is invalid. | |
| 400 | MissingParameter%s | The specified value of ArgName[%s] is missing. | |
| 400 | InvalidFunctionArgs.Malformed | The specified FunctionArgs is invalid. | |
| 400 | MissingParameter | The specified ArgValue is missing. | |
| 400 | InvalidHeaderKey.ValueNotSupported | The specified value of parameter HeaderKey is not supported. | |
| 400 | TooManyDomains | The count of domain is over 50. | |
| 400 | InvalidRule.Malformed | %s | |
| 400 | ConfigurationConflicts | The staging environment has a configuration in effect and cannot modify the production environment configuration. | |
| 400 | InvalidFunction.NotSupported | The domain is not supported to set the function. | |
| 400 | InvalidDomain.BelongToConfigGroup | This Domain activated in configuration group and should modify by config group. | |
| 400 | EntityNotExist.Role | EntityNotExist.Role | |
| 400 | MissingParameterFunctions | The specified value of Functions is missing. | |
| 400 | NoPermission.SLR | The current user does not have permission to create servicelinkedrole. Please contact the Alibaba Cloud account or administrator to authorize AliyunCDNFullAccess or custom policy:Service Name:cdn-ddos.cdn.aliyuncs.com,Role: AliyunServiceRoleForCDNAccessingDDoS,Permission: ram: CreateServiceLinkedRole | |
| 400 | ConfigExceedLimit | Count of config entries exceeds the limit. | |
| 400 | EdgeScriptCountExceedLimit | The number of rules exceeds the default limit. | |
| 400 | EdgeScripOptionsHasInnerConfig | The extension has a background configuration or a parameter of this configuration is invalid. For more information, submit a ticket. | |
| 400 | EdgeScriptGrammarNotSupport | A background customization rule exists or a parameter of this configuration is invalid. For more information, submit a ticket. | |
| 400 | EdgeScriptNotSupportJs | JavaScript rules are not supported. For more information, submit a ticket. | |
| 400 | ServiceInvokeFailed | Failed to invoke service. | |
| 400 | ConfigParentExceedLimit | Config parent exceed limit. | |
| 400 | Function.InvalidParentId | The specified parentId does not exist. | |
| 400 | BatchSetBusinessError | some configs error:%s | |
| 400 | ConfigDuplicate | Duplicate configuration. This function has already been configured and cannot be added repeatedly. | |
| 400 | FunctionArgError | The function parameter of the domain configuration is incorrect. |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。