Configura um nome de domínio acelerado no ambiente de staging.
Descrição da operação
Um único usuário pode fazer até 30 chamadas por segundo.
Experimente agora
Testar
Autorização RAM
|
Ação |
Nível de acesso |
Tipo de recurso |
Chave de condição |
Ação dependente |
|
cdn:SetCdnDomainStagingConfig |
update |
*Domain
|
Nenhuma | Nenhuma |
Parâmetros da solicitação
|
Parâmetro |
Tipo |
Obrigatório |
Descrição |
Exemplo |
| DomainName |
string |
Sim |
O nome de domínio acelerado. Apenas um nome de domínio pode ser configurado por vez. |
example.com |
| Functions |
string |
Sim |
A lista de funcionalidades. O formato é o seguinte: Nota
|
[{"functionArgs":[{"argName":"enable","argValue":"on"},{"argName":"pri","argValue":"1"},{"argName":"rule","argValue":"xxx"}],"functionName":"edge_function"}] |
Descrição da funcionalidade edge_function
Todos os valores de parâmetros são processados como strings.
| Nome da funcionalidade | Parâmetros |
| edge_function: edge function | Parâmetros obrigatórios: rule: a regra DSL. pri: a prioridade. enable: especifica se a regra deve ser ativada. Valores válidos: on e off. Parâmetros opcionais: name: o nome da regra. Apenas letras e underscores (_) são suportados. pos: a posição onde a regra é executada. brk: Se esta regra for atingida, as regras restantes na posição de execução atual são ignoradas. option: controle de opção. grammar: controle de gramática. Valores válidos: empty, es2 e js. jsmode: controle de whitelist de domínio JavaScript. Valores válidos: redirect e bypass. |
Elementos de resposta
|
Elemento |
Tipo |
Descrição |
Exemplo |
|
object |
|||
| RequestId |
string |
O ID da solicitação. |
04F0F334-1335-436C-A1D7-6C044FE73368 |
| DomainConfigList |
array<object> |
A lista de configurações do nome de domínio. |
|
|
object |
|||
| ConfigId |
integer |
O ID da configuração. |
1234567 |
| DomainName |
string |
O nome de domínio. |
www.example.com |
| FunctionName |
string |
O nome da funcionalidade. |
set_resp_header |
Exemplos
Resposta de sucesso
JSON formato
{
"RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368",
"DomainConfigList": [
{
"ConfigId": 1234567,
"DomainName": "www.example.com",
"FunctionName": "set_resp_header"
}
]
}
Códigos de erro
|
Código de status HTTP |
Código de erro |
Mensagem de erro |
Descrição |
|---|---|---|---|
| 400 | InvalidFunctionName.ValueNotSupported | %s | |
| 400 | InvalidArgValue.Malformed | %s | |
| 400 | ConfigurationConflicts | The staging environment has a configuration in effect and cannot modify the production environment configuration. | Failed to modify the parameter settings in the production environment because the parameter settings are different from those in the stating environment. Set parameters in the staging environment before you publish them to the production environment. |
| 400 | InvalidArgName.ValueNotSupported | %s | |
| 400 | GrayConfigExist | The domain exists other gray config. | The staging environment already contains settings for the domain name. |
| 400 | InvalidRule.Malformed | %s | |
| 400 | InvalidDomain.BelongToConfigGroup | This Domain activated in configuration group and should modify by config group. | |
| 400 | EdgeScriptCountExceedLimit | The number of rules exceeds the default limit. | The number of rules exceeds the limit. To increase the limit, submit a ticket. |
| 400 | EdgeScripOptionsHasInnerConfig | The extension has a background configuration or a parameter of this configuration is invalid. For more information, submit a ticket. | The extension has a background configuration or a configured parameter 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. | A background custom rule exists or a configured parameter is invalid. For more information, submit a ticket. |
| 400 | EdgeScriptNotSupportJs | JavaScript rules are not supported. For more information, submit a ticket. | JavaScript rules are not supported. For more information, submit a ticket. |
| 400 | MissingRequiredArg | required argument missing. | When configuring the function, the necessary parameters are missing. |
| 400 | FunctionArgError | The function parameter of the domain configuration is incorrect. |
Consulte Códigos de Erro para uma lista completa.
Notas de versão
Consulte Notas de Versão para uma lista completa.