Provides a ESA Http Incoming Request Header Modification Rule resource.
For information about ESA Http Incoming Request Header Modification Rule and how to use it, see What is Http Incoming Request Header Modification Rule.
NOTE: Available since v1.266.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
import * as random from "@pulumi/random";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const _default = new random.index.Integer("default", {
min: 10000,
max: 99999,
});
const resourceHttpIncomingRequestHeaderModificationRuleExample = new alicloud.esa.RatePlanInstance("resource_HttpIncomingRequestHeaderModificationRule_example", {
type: "NS",
autoRenew: false,
period: 1,
paymentType: "Subscription",
coverage: "overseas",
autoPay: true,
planName: "high",
});
const resourceSiteHttpIncomingRequestHeaderModificationRuleExample = new alicloud.esa.Site("resource_Site_HttpIncomingRequestHeaderModificationRule_example", {
siteName: `gositecdn${_default.result}.cn`,
instanceId: resourceHttpIncomingRequestHeaderModificationRuleExample.id,
coverage: "overseas",
accessType: "NS",
});
const defaultHttpIncomingRequestHeaderModificationRule = new alicloud.esa.HttpIncomingRequestHeaderModificationRule("default", {
siteId: resourceSiteHttpIncomingRequestHeaderModificationRuleExample.id,
ruleEnable: "on",
rule: "(http.host eq \"video.example.com\")",
sequence: 1,
siteVersion: 0,
ruleName: "example",
requestHeaderModifications: [
{
type: "static",
value: "add",
operation: "add",
name: "exampleadd",
},
{
operation: "del",
name: "exampledel",
},
{
type: "dynamic",
value: "ip.geoip.country",
operation: "modify",
name: "examplemodify",
},
],
});
import pulumi
import pulumi_alicloud as alicloud
import pulumi_random as random
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
default = random.index.Integer("default",
min=10000,
max=99999)
resource_http_incoming_request_header_modification_rule_example = alicloud.esa.RatePlanInstance("resource_HttpIncomingRequestHeaderModificationRule_example",
type="NS",
auto_renew=False,
period=1,
payment_type="Subscription",
coverage="overseas",
auto_pay=True,
plan_name="high")
resource_site_http_incoming_request_header_modification_rule_example = alicloud.esa.Site("resource_Site_HttpIncomingRequestHeaderModificationRule_example",
site_name=f"gositecdn{default['result']}.cn",
instance_id=resource_http_incoming_request_header_modification_rule_example.id,
coverage="overseas",
access_type="NS")
default_http_incoming_request_header_modification_rule = alicloud.esa.HttpIncomingRequestHeaderModificationRule("default",
site_id=resource_site_http_incoming_request_header_modification_rule_example.id,
rule_enable="on",
rule="(http.host eq \"video.example.com\")",
sequence=1,
site_version=0,
rule_name="example",
request_header_modifications=[
{
"type": "static",
"value": "add",
"operation": "add",
"name": "exampleadd",
},
{
"operation": "del",
"name": "exampledel",
},
{
"type": "dynamic",
"value": "ip.geoip.country",
"operation": "modify",
"name": "examplemodify",
},
])
package main
import (
"fmt"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/esa"
"github.com/pulumi/pulumi-random/sdk/v4/go/random"
"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
}
_default, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
Min: 10000,
Max: 99999,
})
if err != nil {
return err
}
resourceHttpIncomingRequestHeaderModificationRuleExample, err := esa.NewRatePlanInstance(ctx, "resource_HttpIncomingRequestHeaderModificationRule_example", &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
}
resourceSiteHttpIncomingRequestHeaderModificationRuleExample, err := esa.NewSite(ctx, "resource_Site_HttpIncomingRequestHeaderModificationRule_example", &esa.SiteArgs{
SiteName: pulumi.Sprintf("gositecdn%v.cn", _default.Result),
InstanceId: resourceHttpIncomingRequestHeaderModificationRuleExample.ID(),
Coverage: pulumi.String("overseas"),
AccessType: pulumi.String("NS"),
})
if err != nil {
return err
}
_, err = esa.NewHttpIncomingRequestHeaderModificationRule(ctx, "default", &esa.HttpIncomingRequestHeaderModificationRuleArgs{
SiteId: resourceSiteHttpIncomingRequestHeaderModificationRuleExample.ID(),
RuleEnable: pulumi.String("on"),
Rule: pulumi.String("(http.host eq \"video.example.com\")"),
Sequence: pulumi.Int(1),
SiteVersion: pulumi.Int(0),
RuleName: pulumi.String("example"),
RequestHeaderModifications: esa.HttpIncomingRequestHeaderModificationRuleRequestHeaderModificationArray{
&esa.HttpIncomingRequestHeaderModificationRuleRequestHeaderModificationArgs{
Type: pulumi.String("static"),
Value: pulumi.String("add"),
Operation: pulumi.String("add"),
Name: pulumi.String("exampleadd"),
},
&esa.HttpIncomingRequestHeaderModificationRuleRequestHeaderModificationArgs{
Operation: pulumi.String("del"),
Name: pulumi.String("exampledel"),
},
&esa.HttpIncomingRequestHeaderModificationRuleRequestHeaderModificationArgs{
Type: pulumi.String("dynamic"),
Value: pulumi.String("ip.geoip.country"),
Operation: pulumi.String("modify"),
Name: pulumi.String("examplemodify"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
using Random = Pulumi.Random;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform-example";
var @default = new Random.Index.Integer("default", new()
{
Min = 10000,
Max = 99999,
});
var resourceHttpIncomingRequestHeaderModificationRuleExample = new AliCloud.Esa.RatePlanInstance("resource_HttpIncomingRequestHeaderModificationRule_example", new()
{
Type = "NS",
AutoRenew = false,
Period = 1,
PaymentType = "Subscription",
Coverage = "overseas",
AutoPay = true,
PlanName = "high",
});
var resourceSiteHttpIncomingRequestHeaderModificationRuleExample = new AliCloud.Esa.Site("resource_Site_HttpIncomingRequestHeaderModificationRule_example", new()
{
SiteName = $"gositecdn{@default.Result}.cn",
InstanceId = resourceHttpIncomingRequestHeaderModificationRuleExample.Id,
Coverage = "overseas",
AccessType = "NS",
});
var defaultHttpIncomingRequestHeaderModificationRule = new AliCloud.Esa.HttpIncomingRequestHeaderModificationRule("default", new()
{
SiteId = resourceSiteHttpIncomingRequestHeaderModificationRuleExample.Id,
RuleEnable = "on",
Rule = "(http.host eq \"video.example.com\")",
Sequence = 1,
SiteVersion = 0,
RuleName = "example",
RequestHeaderModifications = new[]
{
new AliCloud.Esa.Inputs.HttpIncomingRequestHeaderModificationRuleRequestHeaderModificationArgs
{
Type = "static",
Value = "add",
Operation = "add",
Name = "exampleadd",
},
new AliCloud.Esa.Inputs.HttpIncomingRequestHeaderModificationRuleRequestHeaderModificationArgs
{
Operation = "del",
Name = "exampledel",
},
new AliCloud.Esa.Inputs.HttpIncomingRequestHeaderModificationRuleRequestHeaderModificationArgs
{
Type = "dynamic",
Value = "ip.geoip.country",
Operation = "modify",
Name = "examplemodify",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.random.Integer;
import com.pulumi.random.IntegerArgs;
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.HttpIncomingRequestHeaderModificationRule;
import com.pulumi.alicloud.esa.HttpIncomingRequestHeaderModificationRuleArgs;
import com.pulumi.alicloud.esa.inputs.HttpIncomingRequestHeaderModificationRuleRequestHeaderModificationArgs;
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 default_ = new Integer("default", IntegerArgs.builder()
.min(10000)
.max(99999)
.build());
var resourceHttpIncomingRequestHeaderModificationRuleExample = new RatePlanInstance("resourceHttpIncomingRequestHeaderModificationRuleExample", RatePlanInstanceArgs.builder()
.type("NS")
.autoRenew(false)
.period(1)
.paymentType("Subscription")
.coverage("overseas")
.autoPay(true)
.planName("high")
.build());
var resourceSiteHttpIncomingRequestHeaderModificationRuleExample = new Site("resourceSiteHttpIncomingRequestHeaderModificationRuleExample", SiteArgs.builder()
.siteName(String.format("gositecdn%s.cn", default_.result()))
.instanceId(resourceHttpIncomingRequestHeaderModificationRuleExample.id())
.coverage("overseas")
.accessType("NS")
.build());
var defaultHttpIncomingRequestHeaderModificationRule = new HttpIncomingRequestHeaderModificationRule("defaultHttpIncomingRequestHeaderModificationRule", HttpIncomingRequestHeaderModificationRuleArgs.builder()
.siteId(resourceSiteHttpIncomingRequestHeaderModificationRuleExample.id())
.ruleEnable("on")
.rule("(http.host eq \"video.example.com\")")
.sequence(1)
.siteVersion(0)
.ruleName("example")
.requestHeaderModifications(
HttpIncomingRequestHeaderModificationRuleRequestHeaderModificationArgs.builder()
.type("static")
.value("add")
.operation("add")
.name("exampleadd")
.build(),
HttpIncomingRequestHeaderModificationRuleRequestHeaderModificationArgs.builder()
.operation("del")
.name("exampledel")
.build(),
HttpIncomingRequestHeaderModificationRuleRequestHeaderModificationArgs.builder()
.type("dynamic")
.value("ip.geoip.country")
.operation("modify")
.name("examplemodify")
.build())
.build());
}
}
configuration:
name:
type: string
default: terraform-example
resources:
default:
type: random:Integer
properties:
min: 10000
max: 99999
resourceHttpIncomingRequestHeaderModificationRuleExample:
type: alicloud:esa:RatePlanInstance
name: resource_HttpIncomingRequestHeaderModificationRule_example
properties:
type: NS
autoRenew: false
period: '1'
paymentType: Subscription
coverage: overseas
autoPay: true
planName: high
resourceSiteHttpIncomingRequestHeaderModificationRuleExample:
type: alicloud:esa:Site
name: resource_Site_HttpIncomingRequestHeaderModificationRule_example
properties:
siteName: gositecdn${default.result}.cn
instanceId: ${resourceHttpIncomingRequestHeaderModificationRuleExample.id}
coverage: overseas
accessType: NS
defaultHttpIncomingRequestHeaderModificationRule:
type: alicloud:esa:HttpIncomingRequestHeaderModificationRule
name: default
properties:
siteId: ${resourceSiteHttpIncomingRequestHeaderModificationRuleExample.id}
ruleEnable: on
rule: (http.host eq "video.example.com")
sequence: '1'
siteVersion: '0'
ruleName: example
requestHeaderModifications:
- type: static
value: add
operation: add
name: exampleadd
- operation: del
name: exampledel
- type: dynamic
value: ip.geoip.country
operation: modify
name: examplemodify
📚 Need more examples? VIEW MORE EXAMPLES
Create HttpIncomingRequestHeaderModificationRule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new HttpIncomingRequestHeaderModificationRule(name: string, args: HttpIncomingRequestHeaderModificationRuleArgs, opts?: CustomResourceOptions);@overload
def HttpIncomingRequestHeaderModificationRule(resource_name: str,
args: HttpIncomingRequestHeaderModificationRuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def HttpIncomingRequestHeaderModificationRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
request_header_modifications: Optional[Sequence[HttpIncomingRequestHeaderModificationRuleRequestHeaderModificationArgs]] = None,
site_id: Optional[str] = None,
rule: Optional[str] = None,
rule_enable: Optional[str] = None,
rule_name: Optional[str] = None,
sequence: Optional[int] = None,
site_version: Optional[int] = None)func NewHttpIncomingRequestHeaderModificationRule(ctx *Context, name string, args HttpIncomingRequestHeaderModificationRuleArgs, opts ...ResourceOption) (*HttpIncomingRequestHeaderModificationRule, error)public HttpIncomingRequestHeaderModificationRule(string name, HttpIncomingRequestHeaderModificationRuleArgs args, CustomResourceOptions? opts = null)
public HttpIncomingRequestHeaderModificationRule(String name, HttpIncomingRequestHeaderModificationRuleArgs args)
public HttpIncomingRequestHeaderModificationRule(String name, HttpIncomingRequestHeaderModificationRuleArgs args, CustomResourceOptions options)
type: alicloud:esa:HttpIncomingRequestHeaderModificationRule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args HttpIncomingRequestHeaderModificationRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args HttpIncomingRequestHeaderModificationRuleArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args HttpIncomingRequestHeaderModificationRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args HttpIncomingRequestHeaderModificationRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args HttpIncomingRequestHeaderModificationRuleArgs
- 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 httpIncomingRequestHeaderModificationRuleResource = new AliCloud.Esa.HttpIncomingRequestHeaderModificationRule("httpIncomingRequestHeaderModificationRuleResource", new()
{
RequestHeaderModifications = new[]
{
new AliCloud.Esa.Inputs.HttpIncomingRequestHeaderModificationRuleRequestHeaderModificationArgs
{
Name = "string",
Operation = "string",
Type = "string",
Value = "string",
},
},
SiteId = "string",
Rule = "string",
RuleEnable = "string",
RuleName = "string",
Sequence = 0,
SiteVersion = 0,
});
example, err := esa.NewHttpIncomingRequestHeaderModificationRule(ctx, "httpIncomingRequestHeaderModificationRuleResource", &esa.HttpIncomingRequestHeaderModificationRuleArgs{
RequestHeaderModifications: esa.HttpIncomingRequestHeaderModificationRuleRequestHeaderModificationArray{
&esa.HttpIncomingRequestHeaderModificationRuleRequestHeaderModificationArgs{
Name: pulumi.String("string"),
Operation: pulumi.String("string"),
Type: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
SiteId: pulumi.String("string"),
Rule: pulumi.String("string"),
RuleEnable: pulumi.String("string"),
RuleName: pulumi.String("string"),
Sequence: pulumi.Int(0),
SiteVersion: pulumi.Int(0),
})
var httpIncomingRequestHeaderModificationRuleResource = new HttpIncomingRequestHeaderModificationRule("httpIncomingRequestHeaderModificationRuleResource", HttpIncomingRequestHeaderModificationRuleArgs.builder()
.requestHeaderModifications(HttpIncomingRequestHeaderModificationRuleRequestHeaderModificationArgs.builder()
.name("string")
.operation("string")
.type("string")
.value("string")
.build())
.siteId("string")
.rule("string")
.ruleEnable("string")
.ruleName("string")
.sequence(0)
.siteVersion(0)
.build());
http_incoming_request_header_modification_rule_resource = alicloud.esa.HttpIncomingRequestHeaderModificationRule("httpIncomingRequestHeaderModificationRuleResource",
request_header_modifications=[{
"name": "string",
"operation": "string",
"type": "string",
"value": "string",
}],
site_id="string",
rule="string",
rule_enable="string",
rule_name="string",
sequence=0,
site_version=0)
const httpIncomingRequestHeaderModificationRuleResource = new alicloud.esa.HttpIncomingRequestHeaderModificationRule("httpIncomingRequestHeaderModificationRuleResource", {
requestHeaderModifications: [{
name: "string",
operation: "string",
type: "string",
value: "string",
}],
siteId: "string",
rule: "string",
ruleEnable: "string",
ruleName: "string",
sequence: 0,
siteVersion: 0,
});
type: alicloud:esa:HttpIncomingRequestHeaderModificationRule
properties:
requestHeaderModifications:
- name: string
operation: string
type: string
value: string
rule: string
ruleEnable: string
ruleName: string
sequence: 0
siteId: string
siteVersion: 0
HttpIncomingRequestHeaderModificationRule 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 HttpIncomingRequestHeaderModificationRule resource accepts the following input properties:
- Request
Header List<Pulumi.Modifications Ali Cloud. Esa. Inputs. Http Incoming Request Header Modification Rule Request Header Modification> - The configurations of modifying request headers. You can add, delete, or modify a request header. See
request_header_modificationbelow. - Site
Id string - 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")
- Rule
Enable string - Rule switch. When adding global configuration, this parameter does not need to be set. Value range:
- on: open.
- off: close.
- Rule
Name string - Rule name. When adding global configuration, this parameter does not need to be set.
- Sequence int
- Order of rule execution. The smaller the value, the higher the priority for execution.
- Site
Version int - 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.
- Request
Header []HttpModifications Incoming Request Header Modification Rule Request Header Modification Args - The configurations of modifying request headers. You can add, delete, or modify a request header. See
request_header_modificationbelow. - Site
Id string - 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")
- Rule
Enable string - Rule switch. When adding global configuration, this parameter does not need to be set. Value range:
- on: open.
- off: close.
- Rule
Name string - Rule name. When adding global configuration, this parameter does not need to be set.
- Sequence int
- Order of rule execution. The smaller the value, the higher the priority for execution.
- Site
Version int - 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.
- request
Header List<HttpModifications Incoming Request Header Modification Rule Request Header Modification> - The configurations of modifying request headers. You can add, delete, or modify a request header. See
request_header_modificationbelow. - site
Id String - 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")
- rule
Enable String - Rule switch. When adding global configuration, this parameter does not need to be set. Value range:
- on: open.
- off: close.
- rule
Name String - Rule name. When adding global configuration, this parameter does not need to be set.
- sequence Integer
- Order of rule execution. The smaller the value, the higher the priority for execution.
- site
Version Integer - 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.
- request
Header HttpModifications Incoming Request Header Modification Rule Request Header Modification[] - The configurations of modifying request headers. You can add, delete, or modify a request header. See
request_header_modificationbelow. - site
Id string - 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")
- rule
Enable string - Rule switch. When adding global configuration, this parameter does not need to be set. Value range:
- on: open.
- off: close.
- rule
Name string - Rule name. When adding global configuration, this parameter does not need to be set.
- sequence number
- Order of rule execution. The smaller the value, the higher the priority for execution.
- site
Version number - 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.
- request_
header_ Sequence[Httpmodifications Incoming Request Header Modification Rule Request Header Modification Args] - The configurations of modifying request headers. You can add, delete, or modify a request header. See
request_header_modificationbelow. - site_
id str - 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.
- sequence int
- Order of rule execution. The smaller the value, the higher the priority for execution.
- site_
version int - 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.
- request
Header List<Property Map>Modifications - The configurations of modifying request headers. You can add, delete, or modify a request header. See
request_header_modificationbelow. - site
Id String - 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")
- rule
Enable String - Rule switch. When adding global configuration, this parameter does not need to be set. Value range:
- on: open.
- off: close.
- rule
Name String - Rule name. When adding global configuration, this parameter does not need to be set.
- sequence Number
- Order of rule execution. The smaller the value, the higher the priority for execution.
- site
Version Number - 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.
Outputs
All input properties are implicitly available as output properties. Additionally, the HttpIncomingRequestHeaderModificationRule resource produces the following output properties:
Look up Existing HttpIncomingRequestHeaderModificationRule Resource
Get an existing HttpIncomingRequestHeaderModificationRule 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?: HttpIncomingRequestHeaderModificationRuleState, opts?: CustomResourceOptions): HttpIncomingRequestHeaderModificationRule@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
config_id: Optional[int] = None,
request_header_modifications: Optional[Sequence[HttpIncomingRequestHeaderModificationRuleRequestHeaderModificationArgs]] = None,
rule: Optional[str] = None,
rule_enable: Optional[str] = None,
rule_name: Optional[str] = None,
sequence: Optional[int] = None,
site_id: Optional[str] = None,
site_version: Optional[int] = None) -> HttpIncomingRequestHeaderModificationRulefunc GetHttpIncomingRequestHeaderModificationRule(ctx *Context, name string, id IDInput, state *HttpIncomingRequestHeaderModificationRuleState, opts ...ResourceOption) (*HttpIncomingRequestHeaderModificationRule, error)public static HttpIncomingRequestHeaderModificationRule Get(string name, Input<string> id, HttpIncomingRequestHeaderModificationRuleState? state, CustomResourceOptions? opts = null)public static HttpIncomingRequestHeaderModificationRule get(String name, Output<String> id, HttpIncomingRequestHeaderModificationRuleState state, CustomResourceOptions options)resources: _: type: alicloud:esa:HttpIncomingRequestHeaderModificationRule get: id: ${id}- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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.
- Config
Id int - Config Id
- Request
Header List<Pulumi.Modifications Ali Cloud. Esa. Inputs. Http Incoming Request Header Modification Rule Request Header Modification> - The configurations of modifying request headers. You can add, delete, or modify a request header. See
request_header_modificationbelow. - 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")
- Rule
Enable string - Rule switch. When adding global configuration, this parameter does not need to be set. Value range:
- on: open.
- off: close.
- Rule
Name string - Rule name. When adding global configuration, this parameter does not need to be set.
- Sequence int
- Order of rule execution. The smaller the value, the higher the priority for execution.
- Site
Id string - The site ID.
- Site
Version int - 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.
- Config
Id int - Config Id
- Request
Header []HttpModifications Incoming Request Header Modification Rule Request Header Modification Args - The configurations of modifying request headers. You can add, delete, or modify a request header. See
request_header_modificationbelow. - 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")
- Rule
Enable string - Rule switch. When adding global configuration, this parameter does not need to be set. Value range:
- on: open.
- off: close.
- Rule
Name string - Rule name. When adding global configuration, this parameter does not need to be set.
- Sequence int
- Order of rule execution. The smaller the value, the higher the priority for execution.
- Site
Id string - The site ID.
- Site
Version int - 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.
- config
Id Integer - Config Id
- request
Header List<HttpModifications Incoming Request Header Modification Rule Request Header Modification> - The configurations of modifying request headers. You can add, delete, or modify a request header. See
request_header_modificationbelow. - 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")
- rule
Enable String - Rule switch. When adding global configuration, this parameter does not need to be set. Value range:
- on: open.
- off: close.
- rule
Name String - Rule name. When adding global configuration, this parameter does not need to be set.
- sequence Integer
- Order of rule execution. The smaller the value, the higher the priority for execution.
- site
Id String - The site ID.
- site
Version Integer - 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.
- config
Id number - Config Id
- request
Header HttpModifications Incoming Request Header Modification Rule Request Header Modification[] - The configurations of modifying request headers. You can add, delete, or modify a request header. See
request_header_modificationbelow. - 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")
- rule
Enable string - Rule switch. When adding global configuration, this parameter does not need to be set. Value range:
- on: open.
- off: close.
- rule
Name string - Rule name. When adding global configuration, this parameter does not need to be set.
- sequence number
- Order of rule execution. The smaller the value, the higher the priority for execution.
- site
Id string - The site ID.
- site
Version number - 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.
- config_
id int - Config Id
- request_
header_ Sequence[Httpmodifications Incoming Request Header Modification Rule Request Header Modification Args] - The configurations of modifying request headers. You can add, delete, or modify a request header. See
request_header_modificationbelow. - 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.
- sequence int
- Order of rule execution. The smaller the value, the higher the priority for execution.
- site_
id str - The site ID.
- site_
version int - 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.
- config
Id Number - Config Id
- request
Header List<Property Map>Modifications - The configurations of modifying request headers. You can add, delete, or modify a request header. See
request_header_modificationbelow. - 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")
- rule
Enable String - Rule switch. When adding global configuration, this parameter does not need to be set. Value range:
- on: open.
- off: close.
- rule
Name String - Rule name. When adding global configuration, this parameter does not need to be set.
- sequence Number
- Order of rule execution. The smaller the value, the higher the priority for execution.
- site
Id String - The site ID.
- site
Version Number - 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.
Supporting Types
HttpIncomingRequestHeaderModificationRuleRequestHeaderModification, HttpIncomingRequestHeaderModificationRuleRequestHeaderModificationArgs
Import
ESA Http Incoming Request Header Modification Rule can be imported using the id, e.g.
$ pulumi import alicloud:esa/httpIncomingRequestHeaderModificationRule:HttpIncomingRequestHeaderModificationRule example <site_id>:<config_id>
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
alicloudTerraform Provider.
