Todos os produtos
Search
Central de documentação

Resource Orchestration Service:ALIYUN::ESA::HttpRequestHeaderModificationRule

Última atualização: Jun 27, 2026

Cria configurações para modificar cabeçalhos de requisição HTTP.

Sintaxe

{
  "Type": "ALIYUN::ESA::HttpRequestHeaderModificationRule",
  "Properties": {
    "RequestHeaderModification": List,
    "SiteId": Integer,
    "RuleEnable": String,
    "Rule": String,
    "RuleName": String,
    "Sequence": Integer,
    "SiteVersion": Integer
  }
}

Propriedades

Propriedade

Tipo

Obrigatória

Atualização permitida

Descrição

Restrições

RequestHeaderModification

List

Sim

Sim

Configurações de modificação do cabeçalho de requisição.

Permite adicionar, excluir e modifique. Para mais informações, consulte Propriedades de RequestHeaderModification.

SiteId

Integer

Sim

Não

ID do site.

Nenhuma

RuleEnable

String

Não

Sim

Ative ou desativa a regra.

Não obrigatório para configurações globais. Valores válidos:

  • on

  • Off

Rule

String

Não

Sim

Conteúdo da regra.

Expressão condicional que corresponde às requisições do usuário. Não obrigatório para configurações globais. Cenários:

  • Para corresponder a todas as requisições recebidas, defina o valor como true.

  • Para corresponder a requisições específicas, defina o valor como uma expressão personalizada, como (http.host eq "video.example.com").

RuleName

String

Não

Sim

Nome da regra.

Não obrigatório para configurações globais.

Sequence

Integer

Não

Não

Prioridade de execução da regra.

Um valor menor indica maior prioridade.

SiteVersion

Integer

Não

Não

Número da versão da configuração do site.

Em sites com gerenciamento de versão de configuração ativado, especifique a versão em que a configuração entra em vigor. Valor padrão: 0.

Sintaxe de RequestHeaderModification

"RequestHeaderModification": [
  {
    "Type": String,
    "Value": String,
    "Operation": String,
    "Name": String
  }
]

Propriedades de RequestHeaderModification

Propriedade

Tipo

Obrigatória

Atualização permitida

Descrição

Restrições

Name

String

Sim

Sim

Nome do cabeçalho de requisição.

Nenhuma

Operation

String

Sim

Sim

Tipo de operação.

Valores válidos:

  • add

  • del: Exclusão.

  • modify

Type

String

Não

Sim

Tipo de valor.

Valores válidos:

  • static: Modo estático.

  • dynamic: Modo dinâmico.

Value

String

Não

Sim

Valor do cabeçalho de requisição.

Nenhuma

Valores de retorno

Fn::GetAtt

  • RuleEnable: Indica se a regra está ativada.

  • Sequence: Prioridade de execução da regra.

  • Rule: Conteúdo da regra.

  • ConfigId: ID da configuração.

  • SiteVersion: Número da versão da configuração do site.

  • ConfigType: Tipo da configuração.

  • RequestHeaderModification: Configurações de modificação do cabeçalho de requisição.

  • RuleName: Nome da regra.

Exemplos

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  SiteId:
    Type: Number
    Description:
      en: The site ID.
    Required: true
  RequestHeaderModification:
    AssociationPropertyMetadata:
      Parameters:
        Type:
          Type: String
          Description:
            en: |-
              Value type. Value range:
              - `static`:static mode.
              - `dynamic`:dynamic mode.
          AllowedValues:
            - static
            - dynamic
          Required: false
        Value:
          Type: String
          Description:
            en: Request header value.
          Required: false
        Operation:
          Type: String
          Description:
            en: |-
              Mode of operation. Value range:
              - `add`: add.
              - `del`: delete
              - `modify`: change.
          AllowedValues:
            - add
            - del
            - modify
          Required: true
        Name:
          Type: String
          Description:
            en: Request Header Name.
          Required: true
    AssociationProperty: List[Parameters]
    Type: Json
    Description:
      en: The configurations of modifying request headers. You can add, delete, or modify a request header.
    Required: true
Resources:
  ExtensionResource:
    Type: ALIYUN::ESA::HttpRequestHeaderModificationRule
    Properties:
      SiteId:
        Ref: SiteId
      RequestHeaderModification:
        Ref: RequestHeaderModification
Outputs:
  RuleEnable:
    Description: Rule switch. When adding global configuration, this parameter does not need to be set.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - RuleEnable
  Sequence:
    Description: Order of rule execution. The smaller the value, the higher the priority for execution.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Sequence
  Rule:
    Description: Rule content, using conditional expressions to match user requests. When adding global configuration, this parameter does not need to be set.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Rule
  ConfigId:
    Description: Config Id.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ConfigId
  SiteVersion:
    Description: The version number of the site configuration. For sites that have enabled configuration version management, this parameter can be used to specify the effective version of the configuration site, which defaults to version 0.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - SiteVersion
  ConfigType:
    Description: The configuration type. You can use this parameter to check the global configuration or rule configuration.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ConfigType
  RequestHeaderModification:
    Description: The configurations of modifying request headers. You can add, delete, or modify a request header.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - RequestHeaderModification
  RuleName:
    Description: Rule name. When adding global configuration, this parameter does not need to be set.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - RuleName
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "SiteId": {
      "Type": "Number",
      "Description": {
        "en": "The site ID."
      },
      "Required": true
    },
    "RequestHeaderModification": {
      "AssociationPropertyMetadata": {
        "Parameters": {
          "Type": {
            "Type": "String",
            "Description": {
              "en": "Value type. Value range:\n- `static`:static mode.\n- `dynamic`:dynamic mode."
            },
            "AllowedValues": [
              "static",
              "dynamic"
            ],
            "Required": false
          },
          "Value": {
            "Type": "String",
            "Description": {
              "en": "Request header value."
            },
            "Required": false
          },
          "Operation": {
            "Type": "String",
            "Description": {
              "en": "Mode of operation. Value range:\n- `add`: add.\n- `del`: delete\n- `modify`: change."
            },
            "AllowedValues": [
              "add",
              "del",
              "modify"
            ],
            "Required": true
          },
          "Name": {
            "Type": "String",
            "Description": {
              "en": "Request Header Name."
            },
            "Required": true
          }
        }
      },
      "AssociationProperty": "List[Parameters]",
      "Type": "Json",
      "Description": {
        "en": "The configurations of modifying request headers. You can add, delete, or modify a request header."
      },
      "Required": true
    }
  },
  "Resources": {
    "ExtensionResource": {
      "Type": "ALIYUN::ESA::HttpRequestHeaderModificationRule",
      "Properties": {
        "SiteId": {
          "Ref": "SiteId"
        },
        "RequestHeaderModification": {
          "Ref": "RequestHeaderModification"
        }
      }
    }
  },
  "Outputs": {
    "RuleEnable": {
      "Description": "Rule switch. When adding global configuration, this parameter does not need to be set.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "RuleEnable"
        ]
      }
    },
    "Sequence": {
      "Description": "Order of rule execution. The smaller the value, the higher the priority for execution.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Sequence"
        ]
      }
    },
    "Rule": {
      "Description": "Rule content, using conditional expressions to match user requests. When adding global configuration, this parameter does not need to be set.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Rule"
        ]
      }
    },
    "ConfigId": {
      "Description": "Config Id.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ConfigId"
        ]
      }
    },
    "SiteVersion": {
      "Description": "The version number of the site configuration. For sites that have enabled configuration version management, this parameter can be used to specify the effective version of the configuration site, which defaults to version 0.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "SiteVersion"
        ]
      }
    },
    "ConfigType": {
      "Description": "The configuration type. You can use this parameter to check the global configuration or rule configuration.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ConfigType"
        ]
      }
    },
    "RequestHeaderModification": {
      "Description": "The configurations of modifying request headers. You can add, delete, or modify a request header.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "RequestHeaderModification"
        ]
      }
    },
    "RuleName": {
      "Description": "Rule name. When adding global configuration, this parameter does not need to be set.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "RuleName"
        ]
      }
    }
  }
}