alicloud.esa.OriginRule
Explore with Pulumi AI
Provides a ESA Origin Rule resource.
For information about ESA Origin Rule and how to use it, see What is Origin Rule.
NOTE: Available since v1.244.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const _default = alicloud.esa.getSites({
planSubscribeType: "enterpriseplan",
});
const defaultOriginRule = new alicloud.esa.OriginRule("default", {
originSni: "origin.example.com",
siteId: _default.then(_default => _default.sites?.[0]?.id),
originHost: "origin.example.com",
dnsRecord: "tf.example.com",
siteVersion: 0,
ruleName: "tf",
originHttpsPort: "443",
originScheme: "http",
range: "on",
originHttpPort: "8080",
rule: "(http.host eq \"video.example.com\")",
ruleEnable: "on",
});
import pulumi
import pulumi_alicloud as alicloud
default = alicloud.esa.get_sites(plan_subscribe_type="enterpriseplan")
default_origin_rule = alicloud.esa.OriginRule("default",
origin_sni="origin.example.com",
site_id=default.sites[0].id,
origin_host="origin.example.com",
dns_record="tf.example.com",
site_version=0,
rule_name="tf",
origin_https_port="443",
origin_scheme="http",
range="on",
origin_http_port="8080",
rule="(http.host eq \"video.example.com\")",
rule_enable="on")
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/esa"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_default, err := esa.GetSites(ctx, &esa.GetSitesArgs{
PlanSubscribeType: pulumi.StringRef("enterpriseplan"),
}, nil)
if err != nil {
return err
}
_, err = esa.NewOriginRule(ctx, "default", &esa.OriginRuleArgs{
OriginSni: pulumi.String("origin.example.com"),
SiteId: pulumi.Int(_default.Sites[0].Id),
OriginHost: pulumi.String("origin.example.com"),
DnsRecord: pulumi.String("tf.example.com"),
SiteVersion: pulumi.Int(0),
RuleName: pulumi.String("tf"),
OriginHttpsPort: pulumi.String("443"),
OriginScheme: pulumi.String("http"),
Range: pulumi.String("on"),
OriginHttpPort: pulumi.String("8080"),
Rule: pulumi.String("(http.host eq \"video.example.com\")"),
RuleEnable: pulumi.String("on"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var @default = AliCloud.Esa.GetSites.Invoke(new()
{
PlanSubscribeType = "enterpriseplan",
});
var defaultOriginRule = new AliCloud.Esa.OriginRule("default", new()
{
OriginSni = "origin.example.com",
SiteId = @default.Apply(@default => @default.Apply(getSitesResult => getSitesResult.Sites[0]?.Id)),
OriginHost = "origin.example.com",
DnsRecord = "tf.example.com",
SiteVersion = 0,
RuleName = "tf",
OriginHttpsPort = "443",
OriginScheme = "http",
Range = "on",
OriginHttpPort = "8080",
Rule = "(http.host eq \"video.example.com\")",
RuleEnable = "on",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.esa.EsaFunctions;
import com.pulumi.alicloud.esa.inputs.GetSitesArgs;
import com.pulumi.alicloud.esa.OriginRule;
import com.pulumi.alicloud.esa.OriginRuleArgs;
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 default = EsaFunctions.getSites(GetSitesArgs.builder()
.planSubscribeType("enterpriseplan")
.build());
var defaultOriginRule = new OriginRule("defaultOriginRule", OriginRuleArgs.builder()
.originSni("origin.example.com")
.siteId(default_.sites()[0].id())
.originHost("origin.example.com")
.dnsRecord("tf.example.com")
.siteVersion("0")
.ruleName("tf")
.originHttpsPort("443")
.originScheme("http")
.range("on")
.originHttpPort("8080")
.rule("(http.host eq \"video.example.com\")")
.ruleEnable("on")
.build());
}
}
resources:
defaultOriginRule:
type: alicloud:esa:OriginRule
name: default
properties:
originSni: origin.example.com
siteId: ${default.sites[0].id}
originHost: origin.example.com
dnsRecord: tf.example.com
siteVersion: '0'
ruleName: tf
originHttpsPort: '443'
originScheme: http
range: on
originHttpPort: '8080'
rule: (http.host eq "video.example.com")
ruleEnable: on
variables:
default:
fn::invoke:
function: alicloud:esa:getSites
arguments:
planSubscribeType: enterpriseplan
Create OriginRule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new OriginRule(name: string, args: OriginRuleArgs, opts?: CustomResourceOptions);
@overload
def OriginRule(resource_name: str,
args: OriginRuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def OriginRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
site_id: Optional[int] = None,
dns_record: Optional[str] = None,
origin_host: Optional[str] = None,
origin_http_port: Optional[str] = None,
origin_https_port: Optional[str] = None,
origin_scheme: Optional[str] = None,
origin_sni: Optional[str] = None,
range: Optional[str] = None,
rule: Optional[str] = None,
rule_enable: Optional[str] = None,
rule_name: Optional[str] = None,
site_version: Optional[int] = None)
func NewOriginRule(ctx *Context, name string, args OriginRuleArgs, opts ...ResourceOption) (*OriginRule, error)
public OriginRule(string name, OriginRuleArgs args, CustomResourceOptions? opts = null)
public OriginRule(String name, OriginRuleArgs args)
public OriginRule(String name, OriginRuleArgs args, CustomResourceOptions options)
type: alicloud:esa:OriginRule
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 OriginRuleArgs
- 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 OriginRuleArgs
- 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 OriginRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args OriginRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args OriginRuleArgs
- 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 originRuleResource = new AliCloud.Esa.OriginRule("originRuleResource", new()
{
SiteId = 0,
DnsRecord = "string",
OriginHost = "string",
OriginHttpPort = "string",
OriginHttpsPort = "string",
OriginScheme = "string",
OriginSni = "string",
Range = "string",
Rule = "string",
RuleEnable = "string",
RuleName = "string",
SiteVersion = 0,
});
example, err := esa.NewOriginRule(ctx, "originRuleResource", &esa.OriginRuleArgs{
SiteId: pulumi.Int(0),
DnsRecord: pulumi.String("string"),
OriginHost: pulumi.String("string"),
OriginHttpPort: pulumi.String("string"),
OriginHttpsPort: pulumi.String("string"),
OriginScheme: pulumi.String("string"),
OriginSni: pulumi.String("string"),
Range: pulumi.String("string"),
Rule: pulumi.String("string"),
RuleEnable: pulumi.String("string"),
RuleName: pulumi.String("string"),
SiteVersion: pulumi.Int(0),
})
var originRuleResource = new OriginRule("originRuleResource", OriginRuleArgs.builder()
.siteId(0)
.dnsRecord("string")
.originHost("string")
.originHttpPort("string")
.originHttpsPort("string")
.originScheme("string")
.originSni("string")
.range("string")
.rule("string")
.ruleEnable("string")
.ruleName("string")
.siteVersion(0)
.build());
origin_rule_resource = alicloud.esa.OriginRule("originRuleResource",
site_id=0,
dns_record="string",
origin_host="string",
origin_http_port="string",
origin_https_port="string",
origin_scheme="string",
origin_sni="string",
range="string",
rule="string",
rule_enable="string",
rule_name="string",
site_version=0)
const originRuleResource = new alicloud.esa.OriginRule("originRuleResource", {
siteId: 0,
dnsRecord: "string",
originHost: "string",
originHttpPort: "string",
originHttpsPort: "string",
originScheme: "string",
originSni: "string",
range: "string",
rule: "string",
ruleEnable: "string",
ruleName: "string",
siteVersion: 0,
});
type: alicloud:esa:OriginRule
properties:
dnsRecord: string
originHost: string
originHttpPort: string
originHttpsPort: string
originScheme: string
originSni: string
range: string
rule: string
ruleEnable: string
ruleName: string
siteId: 0
siteVersion: 0
OriginRule 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 OriginRule resource accepts the following input properties:
- Site
Id int - The site ID.
- Dns
Record string - Overwrite the DNS resolution record of the origin request.
- Origin
Host string - The HOST carried in the back-to-origin request.
- Origin
Http stringPort - The port of the origin station accessed when the HTTP protocol is used to return to the origin.
- Origin
Https stringPort - The port of the origin station accessed when the HTTPS protocol is used to return to the origin.
- Origin
Scheme string - The protocol used by the back-to-origin request. Value range:
- Origin
Sni string - SNI carried in the back-to-origin request.
- Range string
- Use the range sharding method to download the file from the source. Value range:
- 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.
- 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.
- Site
Id int - The site ID.
- Dns
Record string - Overwrite the DNS resolution record of the origin request.
- Origin
Host string - The HOST carried in the back-to-origin request.
- Origin
Http stringPort - The port of the origin station accessed when the HTTP protocol is used to return to the origin.
- Origin
Https stringPort - The port of the origin station accessed when the HTTPS protocol is used to return to the origin.
- Origin
Scheme string - The protocol used by the back-to-origin request. Value range:
- Origin
Sni string - SNI carried in the back-to-origin request.
- Range string
- Use the range sharding method to download the file from the source. Value range:
- 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.
- 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.
- site
Id Integer - The site ID.
- dns
Record String - Overwrite the DNS resolution record of the origin request.
- origin
Host String - The HOST carried in the back-to-origin request.
- origin
Http StringPort - The port of the origin station accessed when the HTTP protocol is used to return to the origin.
- origin
Https StringPort - The port of the origin station accessed when the HTTPS protocol is used to return to the origin.
- origin
Scheme String - The protocol used by the back-to-origin request. Value range:
- origin
Sni String - SNI carried in the back-to-origin request.
- range String
- Use the range sharding method to download the file from the source. Value range:
- 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.
- 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.
- site
Id number - The site ID.
- dns
Record string - Overwrite the DNS resolution record of the origin request.
- origin
Host string - The HOST carried in the back-to-origin request.
- origin
Http stringPort - The port of the origin station accessed when the HTTP protocol is used to return to the origin.
- origin
Https stringPort - The port of the origin station accessed when the HTTPS protocol is used to return to the origin.
- origin
Scheme string - The protocol used by the back-to-origin request. Value range:
- origin
Sni string - SNI carried in the back-to-origin request.
- range string
- Use the range sharding method to download the file from the source. Value range:
- 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.
- 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.
- site_
id int - The site ID.
- dns_
record str - Overwrite the DNS resolution record of the origin request.
- origin_
host str - The HOST carried in the back-to-origin request.
- origin_
http_ strport - The port of the origin station accessed when the HTTP protocol is used to return to the origin.
- origin_
https_ strport - The port of the origin station accessed when the HTTPS protocol is used to return to the origin.
- origin_
scheme str - The protocol used by the back-to-origin request. Value range:
- origin_
sni str - SNI carried in the back-to-origin request.
- range str
- Use the range sharding method to download the file from the source. Value range:
- 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 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.
- site
Id Number - The site ID.
- dns
Record String - Overwrite the DNS resolution record of the origin request.
- origin
Host String - The HOST carried in the back-to-origin request.
- origin
Http StringPort - The port of the origin station accessed when the HTTP protocol is used to return to the origin.
- origin
Https StringPort - The port of the origin station accessed when the HTTPS protocol is used to return to the origin.
- origin
Scheme String - The protocol used by the back-to-origin request. Value range:
- origin
Sni String - SNI carried in the back-to-origin request.
- range String
- Use the range sharding method to download the file from the source. Value range:
- 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.
- 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 OriginRule resource produces the following output properties:
Look up Existing OriginRule Resource
Get an existing OriginRule 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?: OriginRuleState, opts?: CustomResourceOptions): OriginRule
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
config_id: Optional[int] = None,
dns_record: Optional[str] = None,
origin_host: Optional[str] = None,
origin_http_port: Optional[str] = None,
origin_https_port: Optional[str] = None,
origin_scheme: Optional[str] = None,
origin_sni: Optional[str] = None,
range: Optional[str] = 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) -> OriginRule
func GetOriginRule(ctx *Context, name string, id IDInput, state *OriginRuleState, opts ...ResourceOption) (*OriginRule, error)
public static OriginRule Get(string name, Input<string> id, OriginRuleState? state, CustomResourceOptions? opts = null)
public static OriginRule get(String name, Output<String> id, OriginRuleState state, CustomResourceOptions options)
resources: _: type: alicloud:esa:OriginRule 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 - Back-to-source rule configuration ID
- Dns
Record string - Overwrite the DNS resolution record of the origin request.
- Origin
Host string - The HOST carried in the back-to-origin request.
- Origin
Http stringPort - The port of the origin station accessed when the HTTP protocol is used to return to the origin.
- Origin
Https stringPort - The port of the origin station accessed when the HTTPS protocol is used to return to the origin.
- Origin
Scheme string - The protocol used by the back-to-origin request. Value range:
- Origin
Sni string - SNI carried in the back-to-origin request.
- Range string
- Use the range sharding method to download the file from the source. Value range:
- 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.
- Site
Id int - 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 - Back-to-source rule configuration ID
- Dns
Record string - Overwrite the DNS resolution record of the origin request.
- Origin
Host string - The HOST carried in the back-to-origin request.
- Origin
Http stringPort - The port of the origin station accessed when the HTTP protocol is used to return to the origin.
- Origin
Https stringPort - The port of the origin station accessed when the HTTPS protocol is used to return to the origin.
- Origin
Scheme string - The protocol used by the back-to-origin request. Value range:
- Origin
Sni string - SNI carried in the back-to-origin request.
- Range string
- Use the range sharding method to download the file from the source. Value range:
- 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.
- Site
Id int - 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 - Back-to-source rule configuration ID
- dns
Record String - Overwrite the DNS resolution record of the origin request.
- origin
Host String - The HOST carried in the back-to-origin request.
- origin
Http StringPort - The port of the origin station accessed when the HTTP protocol is used to return to the origin.
- origin
Https StringPort - The port of the origin station accessed when the HTTPS protocol is used to return to the origin.
- origin
Scheme String - The protocol used by the back-to-origin request. Value range:
- origin
Sni String - SNI carried in the back-to-origin request.
- range String
- Use the range sharding method to download the file from the source. Value range:
- 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.
- site
Id Integer - 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 - Back-to-source rule configuration ID
- dns
Record string - Overwrite the DNS resolution record of the origin request.
- origin
Host string - The HOST carried in the back-to-origin request.
- origin
Http stringPort - The port of the origin station accessed when the HTTP protocol is used to return to the origin.
- origin
Https stringPort - The port of the origin station accessed when the HTTPS protocol is used to return to the origin.
- origin
Scheme string - The protocol used by the back-to-origin request. Value range:
- origin
Sni string - SNI carried in the back-to-origin request.
- range string
- Use the range sharding method to download the file from the source. Value range:
- 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.
- site
Id number - 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 - Back-to-source rule configuration ID
- dns_
record str - Overwrite the DNS resolution record of the origin request.
- origin_
host str - The HOST carried in the back-to-origin request.
- origin_
http_ strport - The port of the origin station accessed when the HTTP protocol is used to return to the origin.
- origin_
https_ strport - The port of the origin station accessed when the HTTPS protocol is used to return to the origin.
- origin_
scheme str - The protocol used by the back-to-origin request. Value range:
- origin_
sni str - SNI carried in the back-to-origin request.
- range str
- Use the range sharding method to download the file from the source. Value range:
- 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 int - 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 - Back-to-source rule configuration ID
- dns
Record String - Overwrite the DNS resolution record of the origin request.
- origin
Host String - The HOST carried in the back-to-origin request.
- origin
Http StringPort - The port of the origin station accessed when the HTTP protocol is used to return to the origin.
- origin
Https StringPort - The port of the origin station accessed when the HTTPS protocol is used to return to the origin.
- origin
Scheme String - The protocol used by the back-to-origin request. Value range:
- origin
Sni String - SNI carried in the back-to-origin request.
- range String
- Use the range sharding method to download the file from the source. Value range:
- 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.
- site
Id Number - 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.
Import
ESA Origin Rule can be imported using the id, e.g.
$ pulumi import alicloud:esa/originRule:OriginRule 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
alicloud
Terraform Provider.