1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. esa
  5. HttpRequestHeaderModificationRule
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.esa.HttpRequestHeaderModificationRule

Explore with Pulumi AI

Provides a ESA Http Request Header Modification Rule resource.

For information about ESA Http Request Header Modification Rule and how to use it, see What is Http Request Header Modification Rule.

NOTE: Available since v1.242.0.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const instance = new alicloud.esa.RatePlanInstance("instance", {
    type: "NS",
    autoRenew: false,
    period: 1,
    paymentType: "Subscription",
    coverage: "overseas",
    autoPay: true,
    planName: "high",
});
const site = new alicloud.esa.Site("site", {
    siteName: "gositecdn.cn",
    instanceId: instance.id,
    coverage: "overseas",
    accessType: "NS",
});
const _default = new alicloud.esa.HttpRequestHeaderModificationRule("default", {
    ruleName: "example_modify",
    requestHeaderModifications: [{
        value: "modify1",
        operation: "modify",
        name: "example_modify1",
    }],
    siteId: site.id,
    ruleEnable: "off",
    rule: "(http.request.uri eq \"/content?page=1234\")",
    siteVersion: 0,
});
Copy
import pulumi
import pulumi_alicloud as alicloud

config = pulumi.Config()
name = config.get("name")
if name is None:
    name = "terraform-example"
instance = alicloud.esa.RatePlanInstance("instance",
    type="NS",
    auto_renew=False,
    period=1,
    payment_type="Subscription",
    coverage="overseas",
    auto_pay=True,
    plan_name="high")
site = alicloud.esa.Site("site",
    site_name="gositecdn.cn",
    instance_id=instance.id,
    coverage="overseas",
    access_type="NS")
default = alicloud.esa.HttpRequestHeaderModificationRule("default",
    rule_name="example_modify",
    request_header_modifications=[{
        "value": "modify1",
        "operation": "modify",
        "name": "example_modify1",
    }],
    site_id=site.id,
    rule_enable="off",
    rule="(http.request.uri eq \"/content?page=1234\")",
    site_version=0)
Copy
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/esa"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		name := "terraform-example"
		if param := cfg.Get("name"); param != "" {
			name = param
		}
		instance, err := esa.NewRatePlanInstance(ctx, "instance", &esa.RatePlanInstanceArgs{
			Type:        pulumi.String("NS"),
			AutoRenew:   pulumi.Bool(false),
			Period:      pulumi.Int(1),
			PaymentType: pulumi.String("Subscription"),
			Coverage:    pulumi.String("overseas"),
			AutoPay:     pulumi.Bool(true),
			PlanName:    pulumi.String("high"),
		})
		if err != nil {
			return err
		}
		site, err := esa.NewSite(ctx, "site", &esa.SiteArgs{
			SiteName:   pulumi.String("gositecdn.cn"),
			InstanceId: instance.ID(),
			Coverage:   pulumi.String("overseas"),
			AccessType: pulumi.String("NS"),
		})
		if err != nil {
			return err
		}
		_, err = esa.NewHttpRequestHeaderModificationRule(ctx, "default", &esa.HttpRequestHeaderModificationRuleArgs{
			RuleName: pulumi.String("example_modify"),
			RequestHeaderModifications: esa.HttpRequestHeaderModificationRuleRequestHeaderModificationArray{
				&esa.HttpRequestHeaderModificationRuleRequestHeaderModificationArgs{
					Value:     pulumi.String("modify1"),
					Operation: pulumi.String("modify"),
					Name:      pulumi.String("example_modify1"),
				},
			},
			SiteId:      site.ID(),
			RuleEnable:  pulumi.String("off"),
			Rule:        pulumi.String("(http.request.uri eq \"/content?page=1234\")"),
			SiteVersion: pulumi.Int(0),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var config = new Config();
    var name = config.Get("name") ?? "terraform-example";
    var instance = new AliCloud.Esa.RatePlanInstance("instance", new()
    {
        Type = "NS",
        AutoRenew = false,
        Period = 1,
        PaymentType = "Subscription",
        Coverage = "overseas",
        AutoPay = true,
        PlanName = "high",
    });

    var site = new AliCloud.Esa.Site("site", new()
    {
        SiteName = "gositecdn.cn",
        InstanceId = instance.Id,
        Coverage = "overseas",
        AccessType = "NS",
    });

    var @default = new AliCloud.Esa.HttpRequestHeaderModificationRule("default", new()
    {
        RuleName = "example_modify",
        RequestHeaderModifications = new[]
        {
            new AliCloud.Esa.Inputs.HttpRequestHeaderModificationRuleRequestHeaderModificationArgs
            {
                Value = "modify1",
                Operation = "modify",
                Name = "example_modify1",
            },
        },
        SiteId = site.Id,
        RuleEnable = "off",
        Rule = "(http.request.uri eq \"/content?page=1234\")",
        SiteVersion = 0,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.esa.RatePlanInstance;
import com.pulumi.alicloud.esa.RatePlanInstanceArgs;
import com.pulumi.alicloud.esa.Site;
import com.pulumi.alicloud.esa.SiteArgs;
import com.pulumi.alicloud.esa.HttpRequestHeaderModificationRule;
import com.pulumi.alicloud.esa.HttpRequestHeaderModificationRuleArgs;
import com.pulumi.alicloud.esa.inputs.HttpRequestHeaderModificationRuleRequestHeaderModificationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var config = ctx.config();
        final var name = config.get("name").orElse("terraform-example");
        var instance = new RatePlanInstance("instance", RatePlanInstanceArgs.builder()
            .type("NS")
            .autoRenew("false")
            .period("1")
            .paymentType("Subscription")
            .coverage("overseas")
            .autoPay("true")
            .planName("high")
            .build());

        var site = new Site("site", SiteArgs.builder()
            .siteName("gositecdn.cn")
            .instanceId(instance.id())
            .coverage("overseas")
            .accessType("NS")
            .build());

        var default_ = new HttpRequestHeaderModificationRule("default", HttpRequestHeaderModificationRuleArgs.builder()
            .ruleName("example_modify")
            .requestHeaderModifications(HttpRequestHeaderModificationRuleRequestHeaderModificationArgs.builder()
                .value("modify1")
                .operation("modify")
                .name("example_modify1")
                .build())
            .siteId(site.id())
            .ruleEnable("off")
            .rule("(http.request.uri eq \"/content?page=1234\")")
            .siteVersion("0")
            .build());

    }
}
Copy
configuration:
  name:
    type: string
    default: terraform-example
resources:
  instance:
    type: alicloud:esa:RatePlanInstance
    properties:
      type: NS
      autoRenew: 'false'
      period: '1'
      paymentType: Subscription
      coverage: overseas
      autoPay: 'true'
      planName: high
  site:
    type: alicloud:esa:Site
    properties:
      siteName: gositecdn.cn
      instanceId: ${instance.id}
      coverage: overseas
      accessType: NS
  default:
    type: alicloud:esa:HttpRequestHeaderModificationRule
    properties:
      ruleName: example_modify
      requestHeaderModifications:
        - value: modify1
          operation: modify
          name: example_modify1
      siteId: ${site.id}
      ruleEnable: off
      rule: (http.request.uri eq "/content?page=1234")
      siteVersion: '0'
Copy

Create HttpRequestHeaderModificationRule Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new HttpRequestHeaderModificationRule(name: string, args: HttpRequestHeaderModificationRuleArgs, opts?: CustomResourceOptions);
@overload
def HttpRequestHeaderModificationRule(resource_name: str,
                                      args: HttpRequestHeaderModificationRuleArgs,
                                      opts: Optional[ResourceOptions] = None)

@overload
def HttpRequestHeaderModificationRule(resource_name: str,
                                      opts: Optional[ResourceOptions] = None,
                                      request_header_modifications: Optional[Sequence[HttpRequestHeaderModificationRuleRequestHeaderModificationArgs]] = None,
                                      site_id: Optional[int] = None,
                                      rule: Optional[str] = None,
                                      rule_enable: Optional[str] = None,
                                      rule_name: Optional[str] = None,
                                      site_version: Optional[int] = None)
func NewHttpRequestHeaderModificationRule(ctx *Context, name string, args HttpRequestHeaderModificationRuleArgs, opts ...ResourceOption) (*HttpRequestHeaderModificationRule, error)
public HttpRequestHeaderModificationRule(string name, HttpRequestHeaderModificationRuleArgs args, CustomResourceOptions? opts = null)
public HttpRequestHeaderModificationRule(String name, HttpRequestHeaderModificationRuleArgs args)
public HttpRequestHeaderModificationRule(String name, HttpRequestHeaderModificationRuleArgs args, CustomResourceOptions options)
type: alicloud:esa:HttpRequestHeaderModificationRule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. HttpRequestHeaderModificationRuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. HttpRequestHeaderModificationRuleArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. HttpRequestHeaderModificationRuleArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. HttpRequestHeaderModificationRuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. HttpRequestHeaderModificationRuleArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var httpRequestHeaderModificationRuleResource = new AliCloud.Esa.HttpRequestHeaderModificationRule("httpRequestHeaderModificationRuleResource", new()
{
    RequestHeaderModifications = new[]
    {
        new AliCloud.Esa.Inputs.HttpRequestHeaderModificationRuleRequestHeaderModificationArgs
        {
            Name = "string",
            Operation = "string",
            Value = "string",
        },
    },
    SiteId = 0,
    Rule = "string",
    RuleEnable = "string",
    RuleName = "string",
    SiteVersion = 0,
});
Copy
example, err := esa.NewHttpRequestHeaderModificationRule(ctx, "httpRequestHeaderModificationRuleResource", &esa.HttpRequestHeaderModificationRuleArgs{
	RequestHeaderModifications: esa.HttpRequestHeaderModificationRuleRequestHeaderModificationArray{
		&esa.HttpRequestHeaderModificationRuleRequestHeaderModificationArgs{
			Name:      pulumi.String("string"),
			Operation: pulumi.String("string"),
			Value:     pulumi.String("string"),
		},
	},
	SiteId:      pulumi.Int(0),
	Rule:        pulumi.String("string"),
	RuleEnable:  pulumi.String("string"),
	RuleName:    pulumi.String("string"),
	SiteVersion: pulumi.Int(0),
})
Copy
var httpRequestHeaderModificationRuleResource = new HttpRequestHeaderModificationRule("httpRequestHeaderModificationRuleResource", HttpRequestHeaderModificationRuleArgs.builder()
    .requestHeaderModifications(HttpRequestHeaderModificationRuleRequestHeaderModificationArgs.builder()
        .name("string")
        .operation("string")
        .value("string")
        .build())
    .siteId(0)
    .rule("string")
    .ruleEnable("string")
    .ruleName("string")
    .siteVersion(0)
    .build());
Copy
http_request_header_modification_rule_resource = alicloud.esa.HttpRequestHeaderModificationRule("httpRequestHeaderModificationRuleResource",
    request_header_modifications=[{
        "name": "string",
        "operation": "string",
        "value": "string",
    }],
    site_id=0,
    rule="string",
    rule_enable="string",
    rule_name="string",
    site_version=0)
Copy
const httpRequestHeaderModificationRuleResource = new alicloud.esa.HttpRequestHeaderModificationRule("httpRequestHeaderModificationRuleResource", {
    requestHeaderModifications: [{
        name: "string",
        operation: "string",
        value: "string",
    }],
    siteId: 0,
    rule: "string",
    ruleEnable: "string",
    ruleName: "string",
    siteVersion: 0,
});
Copy
type: alicloud:esa:HttpRequestHeaderModificationRule
properties:
    requestHeaderModifications:
        - name: string
          operation: string
          value: string
    rule: string
    ruleEnable: string
    ruleName: string
    siteId: 0
    siteVersion: 0
Copy

HttpRequestHeaderModificationRule Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The HttpRequestHeaderModificationRule resource accepts the following input properties:

RequestHeaderModifications This property is required. List<Pulumi.AliCloud.Esa.Inputs.HttpRequestHeaderModificationRuleRequestHeaderModification>
The configurations of modifying request headers. You can add, delete, or modify a request header. See request_header_modification below.
SiteId
This property is required.
Changes to this property will trigger replacement.
int
The site ID.
Rule string
Rule content, using conditional expressions to match user requests. When adding global configuration, this parameter does not need to be set. There are two usage scenarios:

  • Match all incoming requests: value set to true
  • Match specified request: Set the value to a custom expression, for example: (http.host eq "video.example.com")
RuleEnable string
Rule switch. When adding global configuration, this parameter does not need to be set. Value range:

  • on: open.
  • off: close.
RuleName string
Rule name. When adding global configuration, this parameter does not need to be set.
SiteVersion Changes to this property will trigger replacement. int
The version number of the website configurations.
RequestHeaderModifications This property is required. []HttpRequestHeaderModificationRuleRequestHeaderModificationArgs
The configurations of modifying request headers. You can add, delete, or modify a request header. See request_header_modification below.
SiteId
This property is required.
Changes to this property will trigger replacement.
int
The site ID.
Rule string
Rule content, using conditional expressions to match user requests. When adding global configuration, this parameter does not need to be set. There are two usage scenarios:

  • Match all incoming requests: value set to true
  • Match specified request: Set the value to a custom expression, for example: (http.host eq "video.example.com")
RuleEnable string
Rule switch. When adding global configuration, this parameter does not need to be set. Value range:

  • on: open.
  • off: close.
RuleName string
Rule name. When adding global configuration, this parameter does not need to be set.
SiteVersion Changes to this property will trigger replacement. int
The version number of the website configurations.
requestHeaderModifications This property is required. List<HttpRequestHeaderModificationRuleRequestHeaderModification>
The configurations of modifying request headers. You can add, delete, or modify a request header. See request_header_modification below.
siteId
This property is required.
Changes to this property will trigger replacement.
Integer
The site ID.
rule String
Rule content, using conditional expressions to match user requests. When adding global configuration, this parameter does not need to be set. There are two usage scenarios:

  • Match all incoming requests: value set to true
  • Match specified request: Set the value to a custom expression, for example: (http.host eq "video.example.com")
ruleEnable String
Rule switch. When adding global configuration, this parameter does not need to be set. Value range:

  • on: open.
  • off: close.
ruleName String
Rule name. When adding global configuration, this parameter does not need to be set.
siteVersion Changes to this property will trigger replacement. Integer
The version number of the website configurations.
requestHeaderModifications This property is required. HttpRequestHeaderModificationRuleRequestHeaderModification[]
The configurations of modifying request headers. You can add, delete, or modify a request header. See request_header_modification below.
siteId
This property is required.
Changes to this property will trigger replacement.
number
The site ID.
rule string
Rule content, using conditional expressions to match user requests. When adding global configuration, this parameter does not need to be set. There are two usage scenarios:

  • Match all incoming requests: value set to true
  • Match specified request: Set the value to a custom expression, for example: (http.host eq "video.example.com")
ruleEnable string
Rule switch. When adding global configuration, this parameter does not need to be set. Value range:

  • on: open.
  • off: close.
ruleName string
Rule name. When adding global configuration, this parameter does not need to be set.
siteVersion Changes to this property will trigger replacement. number
The version number of the website configurations.
request_header_modifications This property is required. Sequence[HttpRequestHeaderModificationRuleRequestHeaderModificationArgs]
The configurations of modifying request headers. You can add, delete, or modify a request header. See request_header_modification below.
site_id
This property is required.
Changes to this property will trigger replacement.
int
The site ID.
rule str
Rule content, using conditional expressions to match user requests. When adding global configuration, this parameter does not need to be set. There are two usage scenarios:

  • Match all incoming requests: value set to true
  • Match specified request: Set the value to a custom expression, for example: (http.host eq "video.example.com")
rule_enable str
Rule switch. When adding global configuration, this parameter does not need to be set. Value range:

  • on: open.
  • off: close.
rule_name str
Rule name. When adding global configuration, this parameter does not need to be set.
site_version Changes to this property will trigger replacement. int
The version number of the website configurations.
requestHeaderModifications This property is required. List<Property Map>
The configurations of modifying request headers. You can add, delete, or modify a request header. See request_header_modification below.
siteId
This property is required.
Changes to this property will trigger replacement.
Number
The site ID.
rule String
Rule content, using conditional expressions to match user requests. When adding global configuration, this parameter does not need to be set. There are two usage scenarios:

  • Match all incoming requests: value set to true
  • Match specified request: Set the value to a custom expression, for example: (http.host eq "video.example.com")
ruleEnable String
Rule switch. When adding global configuration, this parameter does not need to be set. Value range:

  • on: open.
  • off: close.
ruleName String
Rule name. When adding global configuration, this parameter does not need to be set.
siteVersion Changes to this property will trigger replacement. Number
The version number of the website configurations.

Outputs

All input properties are implicitly available as output properties. Additionally, the HttpRequestHeaderModificationRule resource produces the following output properties:

ConfigId int
Config Id
Id string
The provider-assigned unique ID for this managed resource.
ConfigId int
Config Id
Id string
The provider-assigned unique ID for this managed resource.
configId Integer
Config Id
id String
The provider-assigned unique ID for this managed resource.
configId number
Config Id
id string
The provider-assigned unique ID for this managed resource.
config_id int
Config Id
id str
The provider-assigned unique ID for this managed resource.
configId Number
Config Id
id String
The provider-assigned unique ID for this managed resource.

Look up Existing HttpRequestHeaderModificationRule Resource

Get an existing HttpRequestHeaderModificationRule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: HttpRequestHeaderModificationRuleState, opts?: CustomResourceOptions): HttpRequestHeaderModificationRule
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        config_id: Optional[int] = None,
        request_header_modifications: Optional[Sequence[HttpRequestHeaderModificationRuleRequestHeaderModificationArgs]] = None,
        rule: Optional[str] = None,
        rule_enable: Optional[str] = None,
        rule_name: Optional[str] = None,
        site_id: Optional[int] = None,
        site_version: Optional[int] = None) -> HttpRequestHeaderModificationRule
func GetHttpRequestHeaderModificationRule(ctx *Context, name string, id IDInput, state *HttpRequestHeaderModificationRuleState, opts ...ResourceOption) (*HttpRequestHeaderModificationRule, error)
public static HttpRequestHeaderModificationRule Get(string name, Input<string> id, HttpRequestHeaderModificationRuleState? state, CustomResourceOptions? opts = null)
public static HttpRequestHeaderModificationRule get(String name, Output<String> id, HttpRequestHeaderModificationRuleState state, CustomResourceOptions options)
resources:  _:    type: alicloud:esa:HttpRequestHeaderModificationRule    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
ConfigId int
Config Id
RequestHeaderModifications List<Pulumi.AliCloud.Esa.Inputs.HttpRequestHeaderModificationRuleRequestHeaderModification>
The configurations of modifying request headers. You can add, delete, or modify a request header. See request_header_modification below.
Rule string
Rule content, using conditional expressions to match user requests. When adding global configuration, this parameter does not need to be set. There are two usage scenarios:

  • Match all incoming requests: value set to true
  • Match specified request: Set the value to a custom expression, for example: (http.host eq "video.example.com")
RuleEnable string
Rule switch. When adding global configuration, this parameter does not need to be set. Value range:

  • on: open.
  • off: close.
RuleName string
Rule name. When adding global configuration, this parameter does not need to be set.
SiteId Changes to this property will trigger replacement. int
The site ID.
SiteVersion Changes to this property will trigger replacement. int
The version number of the website configurations.
ConfigId int
Config Id
RequestHeaderModifications []HttpRequestHeaderModificationRuleRequestHeaderModificationArgs
The configurations of modifying request headers. You can add, delete, or modify a request header. See request_header_modification below.
Rule string
Rule content, using conditional expressions to match user requests. When adding global configuration, this parameter does not need to be set. There are two usage scenarios:

  • Match all incoming requests: value set to true
  • Match specified request: Set the value to a custom expression, for example: (http.host eq "video.example.com")
RuleEnable string
Rule switch. When adding global configuration, this parameter does not need to be set. Value range:

  • on: open.
  • off: close.
RuleName string
Rule name. When adding global configuration, this parameter does not need to be set.
SiteId Changes to this property will trigger replacement. int
The site ID.
SiteVersion Changes to this property will trigger replacement. int
The version number of the website configurations.
configId Integer
Config Id
requestHeaderModifications List<HttpRequestHeaderModificationRuleRequestHeaderModification>
The configurations of modifying request headers. You can add, delete, or modify a request header. See request_header_modification below.
rule String
Rule content, using conditional expressions to match user requests. When adding global configuration, this parameter does not need to be set. There are two usage scenarios:

  • Match all incoming requests: value set to true
  • Match specified request: Set the value to a custom expression, for example: (http.host eq "video.example.com")
ruleEnable String
Rule switch. When adding global configuration, this parameter does not need to be set. Value range:

  • on: open.
  • off: close.
ruleName String
Rule name. When adding global configuration, this parameter does not need to be set.
siteId Changes to this property will trigger replacement. Integer
The site ID.
siteVersion Changes to this property will trigger replacement. Integer
The version number of the website configurations.
configId number
Config Id
requestHeaderModifications HttpRequestHeaderModificationRuleRequestHeaderModification[]
The configurations of modifying request headers. You can add, delete, or modify a request header. See request_header_modification below.
rule string
Rule content, using conditional expressions to match user requests. When adding global configuration, this parameter does not need to be set. There are two usage scenarios:

  • Match all incoming requests: value set to true
  • Match specified request: Set the value to a custom expression, for example: (http.host eq "video.example.com")
ruleEnable string
Rule switch. When adding global configuration, this parameter does not need to be set. Value range:

  • on: open.
  • off: close.
ruleName string
Rule name. When adding global configuration, this parameter does not need to be set.
siteId Changes to this property will trigger replacement. number
The site ID.
siteVersion Changes to this property will trigger replacement. number
The version number of the website configurations.
config_id int
Config Id
request_header_modifications Sequence[HttpRequestHeaderModificationRuleRequestHeaderModificationArgs]
The configurations of modifying request headers. You can add, delete, or modify a request header. See request_header_modification below.
rule str
Rule content, using conditional expressions to match user requests. When adding global configuration, this parameter does not need to be set. There are two usage scenarios:

  • Match all incoming requests: value set to true
  • Match specified request: Set the value to a custom expression, for example: (http.host eq "video.example.com")
rule_enable str
Rule switch. When adding global configuration, this parameter does not need to be set. Value range:

  • on: open.
  • off: close.
rule_name str
Rule name. When adding global configuration, this parameter does not need to be set.
site_id Changes to this property will trigger replacement. int
The site ID.
site_version Changes to this property will trigger replacement. int
The version number of the website configurations.
configId Number
Config Id
requestHeaderModifications List<Property Map>
The configurations of modifying request headers. You can add, delete, or modify a request header. See request_header_modification below.
rule String
Rule content, using conditional expressions to match user requests. When adding global configuration, this parameter does not need to be set. There are two usage scenarios:

  • Match all incoming requests: value set to true
  • Match specified request: Set the value to a custom expression, for example: (http.host eq "video.example.com")
ruleEnable String
Rule switch. When adding global configuration, this parameter does not need to be set. Value range:

  • on: open.
  • off: close.
ruleName String
Rule name. When adding global configuration, this parameter does not need to be set.
siteId Changes to this property will trigger replacement. Number
The site ID.
siteVersion Changes to this property will trigger replacement. Number
The version number of the website configurations.

Supporting Types

HttpRequestHeaderModificationRuleRequestHeaderModification
, HttpRequestHeaderModificationRuleRequestHeaderModificationArgs

Name This property is required. string
Request Header Name.
Operation This property is required. string
Mode of operation. Value range:
Value string
Request header value
Name This property is required. string
Request Header Name.
Operation This property is required. string
Mode of operation. Value range:
Value string
Request header value
name This property is required. String
Request Header Name.
operation This property is required. String
Mode of operation. Value range:
value String
Request header value
name This property is required. string
Request Header Name.
operation This property is required. string
Mode of operation. Value range:
value string
Request header value
name This property is required. str
Request Header Name.
operation This property is required. str
Mode of operation. Value range:
value str
Request header value
name This property is required. String
Request Header Name.
operation This property is required. String
Mode of operation. Value range:
value String
Request header value

Import

ESA Http Request Header Modification Rule can be imported using the id, e.g.

$ pulumi import alicloud:esa/httpRequestHeaderModificationRule:HttpRequestHeaderModificationRule example <site_id>:<config_id>
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.