BatchSetCdnDomainConfig を呼び出し、複数のドメイン名を一括で設定できます。
操作説明
ユーザーあたりの最大リクエストレート:1 秒あたり 3 リクエスト。
BatchSetCdnDomainConfig を呼び出してドメインの機能を設定すると、一意の ConfigId が生成されます。この ConfigId を使用して、設定を更新または削除します。詳細については、「ConfigId の使用とクエリ」をご参照ください。
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
cdn:BatchSetCdnDomainConfig |
update |
*Domain
|
なし |
|
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| DomainNames |
string |
必須 |
加速ドメイン名。複数のドメイン名はコンマ (,) で区切ります。次の制限に注意してください:
|
www.example.com |
| Functions |
string |
必須 |
機能のリスト。1 回のリクエストで最大 50 項目を指定できます。形式は次のとおりです:
parentId を -1 に設定すると、この設定における既存のルール条件への参照が削除されます。
parentId を使用しない例:
parentId を使用する例:
既存の設定から parentId の参照を削除する例: |
[{"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"
}
]
}
}
エラーコード
|
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. |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。