1. Packages
  2. Packages
  3. Alibaba Cloud Provider
  4. API Docs
  5. esa
  6. CustomResponseCodeRule
Viewing docs for Alibaba Cloud v3.101.0
published on Tuesday, Apr 28, 2026 by Pulumi
alicloud logo
Viewing docs for Alibaba Cloud v3.101.0
published on Tuesday, Apr 28, 2026 by Pulumi

    Provides a ESA Custom Response Code Rule resource.

    For information about ESA Custom Response Code Rule and how to use it, see What is Custom Response Code Rule.

    NOTE: Available since v1.276.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 resourceRatePlanInstanceCustomResponseCodeRuleExample = new alicloud.esa.RatePlanInstance("resource_RatePlanInstance_CustomResponseCodeRule_example", {
        type: "NS",
        autoRenew: false,
        period: 1,
        paymentType: "Subscription",
        coverage: "overseas",
        autoPay: true,
        planName: "basic",
    });
    const resourceSiteCustomResponseCodeRuleExample = new alicloud.esa.Site("resource_Site_CustomResponseCodeRule_example", {
        siteName: "hyhexample.cn",
        instanceId: resourceRatePlanInstanceCustomResponseCodeRuleExample.id,
        coverage: "overseas",
        accessType: "NS",
    });
    const _default = new alicloud.esa.CustomResponseCodeRule("default", {
        pageId: "0",
        siteId: resourceSiteCustomResponseCodeRuleExample.id,
        returnCode: "400",
        ruleEnable: "on",
        rule: "(http.host eq \"video.example.com\")",
        sequence: 1,
        siteVersion: 0,
        ruleName: name,
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "terraform-example"
    resource_rate_plan_instance_custom_response_code_rule_example = alicloud.esa.RatePlanInstance("resource_RatePlanInstance_CustomResponseCodeRule_example",
        type="NS",
        auto_renew=False,
        period=1,
        payment_type="Subscription",
        coverage="overseas",
        auto_pay=True,
        plan_name="basic")
    resource_site_custom_response_code_rule_example = alicloud.esa.Site("resource_Site_CustomResponseCodeRule_example",
        site_name="hyhexample.cn",
        instance_id=resource_rate_plan_instance_custom_response_code_rule_example.id,
        coverage="overseas",
        access_type="NS")
    default = alicloud.esa.CustomResponseCodeRule("default",
        page_id="0",
        site_id=resource_site_custom_response_code_rule_example.id,
        return_code="400",
        rule_enable="on",
        rule="(http.host eq \"video.example.com\")",
        sequence=1,
        site_version=0,
        rule_name=name)
    
    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
    		}
    		resourceRatePlanInstanceCustomResponseCodeRuleExample, err := esa.NewRatePlanInstance(ctx, "resource_RatePlanInstance_CustomResponseCodeRule_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("basic"),
    		})
    		if err != nil {
    			return err
    		}
    		resourceSiteCustomResponseCodeRuleExample, err := esa.NewSite(ctx, "resource_Site_CustomResponseCodeRule_example", &esa.SiteArgs{
    			SiteName:   pulumi.String("hyhexample.cn"),
    			InstanceId: resourceRatePlanInstanceCustomResponseCodeRuleExample.ID(),
    			Coverage:   pulumi.String("overseas"),
    			AccessType: pulumi.String("NS"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = esa.NewCustomResponseCodeRule(ctx, "default", &esa.CustomResponseCodeRuleArgs{
    			PageId:      pulumi.String("0"),
    			SiteId:      resourceSiteCustomResponseCodeRuleExample.ID(),
    			ReturnCode:  pulumi.String("400"),
    			RuleEnable:  pulumi.String("on"),
    			Rule:        pulumi.String("(http.host eq \"video.example.com\")"),
    			Sequence:    pulumi.Int(1),
    			SiteVersion: pulumi.Int(0),
    			RuleName:    pulumi.String(pulumi.String(name)),
    		})
    		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 config = new Config();
        var name = config.Get("name") ?? "terraform-example";
        var resourceRatePlanInstanceCustomResponseCodeRuleExample = new AliCloud.Esa.RatePlanInstance("resource_RatePlanInstance_CustomResponseCodeRule_example", new()
        {
            Type = "NS",
            AutoRenew = false,
            Period = 1,
            PaymentType = "Subscription",
            Coverage = "overseas",
            AutoPay = true,
            PlanName = "basic",
        });
    
        var resourceSiteCustomResponseCodeRuleExample = new AliCloud.Esa.Site("resource_Site_CustomResponseCodeRule_example", new()
        {
            SiteName = "hyhexample.cn",
            InstanceId = resourceRatePlanInstanceCustomResponseCodeRuleExample.Id,
            Coverage = "overseas",
            AccessType = "NS",
        });
    
        var @default = new AliCloud.Esa.CustomResponseCodeRule("default", new()
        {
            PageId = "0",
            SiteId = resourceSiteCustomResponseCodeRuleExample.Id,
            ReturnCode = "400",
            RuleEnable = "on",
            Rule = "(http.host eq \"video.example.com\")",
            Sequence = 1,
            SiteVersion = 0,
            RuleName = name,
        });
    
    });
    
    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.CustomResponseCodeRule;
    import com.pulumi.alicloud.esa.CustomResponseCodeRuleArgs;
    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 resourceRatePlanInstanceCustomResponseCodeRuleExample = new RatePlanInstance("resourceRatePlanInstanceCustomResponseCodeRuleExample", RatePlanInstanceArgs.builder()
                .type("NS")
                .autoRenew(false)
                .period(1)
                .paymentType("Subscription")
                .coverage("overseas")
                .autoPay(true)
                .planName("basic")
                .build());
    
            var resourceSiteCustomResponseCodeRuleExample = new Site("resourceSiteCustomResponseCodeRuleExample", SiteArgs.builder()
                .siteName("hyhexample.cn")
                .instanceId(resourceRatePlanInstanceCustomResponseCodeRuleExample.id())
                .coverage("overseas")
                .accessType("NS")
                .build());
    
            var default_ = new CustomResponseCodeRule("default", CustomResponseCodeRuleArgs.builder()
                .pageId("0")
                .siteId(resourceSiteCustomResponseCodeRuleExample.id())
                .returnCode("400")
                .ruleEnable("on")
                .rule("(http.host eq \"video.example.com\")")
                .sequence(1)
                .siteVersion(0)
                .ruleName(name)
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: terraform-example
    resources:
      resourceRatePlanInstanceCustomResponseCodeRuleExample:
        type: alicloud:esa:RatePlanInstance
        name: resource_RatePlanInstance_CustomResponseCodeRule_example
        properties:
          type: NS
          autoRenew: false
          period: '1'
          paymentType: Subscription
          coverage: overseas
          autoPay: true
          planName: basic
      resourceSiteCustomResponseCodeRuleExample:
        type: alicloud:esa:Site
        name: resource_Site_CustomResponseCodeRule_example
        properties:
          siteName: hyhexample.cn
          instanceId: ${resourceRatePlanInstanceCustomResponseCodeRuleExample.id}
          coverage: overseas
          accessType: NS
      default:
        type: alicloud:esa:CustomResponseCodeRule
        properties:
          pageId: '0'
          siteId: ${resourceSiteCustomResponseCodeRuleExample.id}
          returnCode: '400'
          ruleEnable: on
          rule: (http.host eq "video.example.com")
          sequence: '1'
          siteVersion: '0'
          ruleName: ${name}
    

    📚 Need more examples? VIEW MORE EXAMPLES

    Create CustomResponseCodeRule Resource

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

    Constructor syntax

    new CustomResponseCodeRule(name: string, args: CustomResponseCodeRuleArgs, opts?: CustomResourceOptions);
    @overload
    def CustomResponseCodeRule(resource_name: str,
                               args: CustomResponseCodeRuleArgs,
                               opts: Optional[ResourceOptions] = None)
    
    @overload
    def CustomResponseCodeRule(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               page_id: Optional[str] = None,
                               return_code: Optional[str] = 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 NewCustomResponseCodeRule(ctx *Context, name string, args CustomResponseCodeRuleArgs, opts ...ResourceOption) (*CustomResponseCodeRule, error)
    public CustomResponseCodeRule(string name, CustomResponseCodeRuleArgs args, CustomResourceOptions? opts = null)
    public CustomResponseCodeRule(String name, CustomResponseCodeRuleArgs args)
    public CustomResponseCodeRule(String name, CustomResponseCodeRuleArgs args, CustomResourceOptions options)
    
    type: alicloud:esa:CustomResponseCodeRule
    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 CustomResponseCodeRuleArgs
    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 CustomResponseCodeRuleArgs
    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 CustomResponseCodeRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CustomResponseCodeRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CustomResponseCodeRuleArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    CustomResponseCodeRule 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 CustomResponseCodeRule resource accepts the following input properties:

    PageId string
    Response page.
    ReturnCode string
    The response code.
    SiteId string
    The website ID, which can be obtained by calling the ListSites operation.
    Rule string
    The content of the rule. A conditional expression is used to match a user request. You do not need to set this parameter when you add global configurations. Use cases:

    • Match all incoming requests: Set the value to true.
    • Set the value to a custom expression, for example, (http.host eq "video.example.com"): Match the specified request.
    RuleEnable string
    Specifies whether to enable the rule. Valid values: You do not need to set this parameter when you add global configurations. Valid values:

    • on
    • off
    RuleName string
    The rule name.
    Sequence int
    The order in which the rule is executed. A smaller value gives priority to the rule.
    SiteVersion int
    The version number of the website configurations. You can use this parameter to specify a version of your website to apply the feature settings. By default, version 0 is used.
    PageId string
    Response page.
    ReturnCode string
    The response code.
    SiteId string
    The website ID, which can be obtained by calling the ListSites operation.
    Rule string
    The content of the rule. A conditional expression is used to match a user request. You do not need to set this parameter when you add global configurations. Use cases:

    • Match all incoming requests: Set the value to true.
    • Set the value to a custom expression, for example, (http.host eq "video.example.com"): Match the specified request.
    RuleEnable string
    Specifies whether to enable the rule. Valid values: You do not need to set this parameter when you add global configurations. Valid values:

    • on
    • off
    RuleName string
    The rule name.
    Sequence int
    The order in which the rule is executed. A smaller value gives priority to the rule.
    SiteVersion int
    The version number of the website configurations. You can use this parameter to specify a version of your website to apply the feature settings. By default, version 0 is used.
    pageId String
    Response page.
    returnCode String
    The response code.
    siteId String
    The website ID, which can be obtained by calling the ListSites operation.
    rule String
    The content of the rule. A conditional expression is used to match a user request. You do not need to set this parameter when you add global configurations. Use cases:

    • Match all incoming requests: Set the value to true.
    • Set the value to a custom expression, for example, (http.host eq "video.example.com"): Match the specified request.
    ruleEnable String
    Specifies whether to enable the rule. Valid values: You do not need to set this parameter when you add global configurations. Valid values:

    • on
    • off
    ruleName String
    The rule name.
    sequence Integer
    The order in which the rule is executed. A smaller value gives priority to the rule.
    siteVersion Integer
    The version number of the website configurations. You can use this parameter to specify a version of your website to apply the feature settings. By default, version 0 is used.
    pageId string
    Response page.
    returnCode string
    The response code.
    siteId string
    The website ID, which can be obtained by calling the ListSites operation.
    rule string
    The content of the rule. A conditional expression is used to match a user request. You do not need to set this parameter when you add global configurations. Use cases:

    • Match all incoming requests: Set the value to true.
    • Set the value to a custom expression, for example, (http.host eq "video.example.com"): Match the specified request.
    ruleEnable string
    Specifies whether to enable the rule. Valid values: You do not need to set this parameter when you add global configurations. Valid values:

    • on
    • off
    ruleName string
    The rule name.
    sequence number
    The order in which the rule is executed. A smaller value gives priority to the rule.
    siteVersion number
    The version number of the website configurations. You can use this parameter to specify a version of your website to apply the feature settings. By default, version 0 is used.
    page_id str
    Response page.
    return_code str
    The response code.
    site_id str
    The website ID, which can be obtained by calling the ListSites operation.
    rule str
    The content of the rule. A conditional expression is used to match a user request. You do not need to set this parameter when you add global configurations. Use cases:

    • Match all incoming requests: Set the value to true.
    • Set the value to a custom expression, for example, (http.host eq "video.example.com"): Match the specified request.
    rule_enable str
    Specifies whether to enable the rule. Valid values: You do not need to set this parameter when you add global configurations. Valid values:

    • on
    • off
    rule_name str
    The rule name.
    sequence int
    The order in which the rule is executed. A smaller value gives priority to the rule.
    site_version int
    The version number of the website configurations. You can use this parameter to specify a version of your website to apply the feature settings. By default, version 0 is used.
    pageId String
    Response page.
    returnCode String
    The response code.
    siteId String
    The website ID, which can be obtained by calling the ListSites operation.
    rule String
    The content of the rule. A conditional expression is used to match a user request. You do not need to set this parameter when you add global configurations. Use cases:

    • Match all incoming requests: Set the value to true.
    • Set the value to a custom expression, for example, (http.host eq "video.example.com"): Match the specified request.
    ruleEnable String
    Specifies whether to enable the rule. Valid values: You do not need to set this parameter when you add global configurations. Valid values:

    • on
    • off
    ruleName String
    The rule name.
    sequence Number
    The order in which the rule is executed. A smaller value gives priority to the rule.
    siteVersion Number
    The version number of the website configurations. You can use this parameter to specify a version of your website to apply the feature settings. By default, version 0 is used.

    Outputs

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

    ConfigId string
    The ID of the configuration.
    Id string
    The provider-assigned unique ID for this managed resource.
    ConfigId string
    The ID of the configuration.
    Id string
    The provider-assigned unique ID for this managed resource.
    configId String
    The ID of the configuration.
    id String
    The provider-assigned unique ID for this managed resource.
    configId string
    The ID of the configuration.
    id string
    The provider-assigned unique ID for this managed resource.
    config_id str
    The ID of the configuration.
    id str
    The provider-assigned unique ID for this managed resource.
    configId String
    The ID of the configuration.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing CustomResponseCodeRule Resource

    Get an existing CustomResponseCodeRule 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?: CustomResponseCodeRuleState, opts?: CustomResourceOptions): CustomResponseCodeRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            config_id: Optional[str] = None,
            page_id: Optional[str] = None,
            return_code: Optional[str] = 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) -> CustomResponseCodeRule
    func GetCustomResponseCodeRule(ctx *Context, name string, id IDInput, state *CustomResponseCodeRuleState, opts ...ResourceOption) (*CustomResponseCodeRule, error)
    public static CustomResponseCodeRule Get(string name, Input<string> id, CustomResponseCodeRuleState? state, CustomResourceOptions? opts = null)
    public static CustomResponseCodeRule get(String name, Output<String> id, CustomResponseCodeRuleState state, CustomResourceOptions options)
    resources:  _:    type: alicloud:esa:CustomResponseCodeRule    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.
    The following state arguments are supported:
    ConfigId string
    The ID of the configuration.
    PageId string
    Response page.
    ReturnCode string
    The response code.
    Rule string
    The content of the rule. A conditional expression is used to match a user request. You do not need to set this parameter when you add global configurations. Use cases:

    • Match all incoming requests: Set the value to true.
    • Set the value to a custom expression, for example, (http.host eq "video.example.com"): Match the specified request.
    RuleEnable string
    Specifies whether to enable the rule. Valid values: You do not need to set this parameter when you add global configurations. Valid values:

    • on
    • off
    RuleName string
    The rule name.
    Sequence int
    The order in which the rule is executed. A smaller value gives priority to the rule.
    SiteId string
    The website ID, which can be obtained by calling the ListSites operation.
    SiteVersion int
    The version number of the website configurations. You can use this parameter to specify a version of your website to apply the feature settings. By default, version 0 is used.
    ConfigId string
    The ID of the configuration.
    PageId string
    Response page.
    ReturnCode string
    The response code.
    Rule string
    The content of the rule. A conditional expression is used to match a user request. You do not need to set this parameter when you add global configurations. Use cases:

    • Match all incoming requests: Set the value to true.
    • Set the value to a custom expression, for example, (http.host eq "video.example.com"): Match the specified request.
    RuleEnable string
    Specifies whether to enable the rule. Valid values: You do not need to set this parameter when you add global configurations. Valid values:

    • on
    • off
    RuleName string
    The rule name.
    Sequence int
    The order in which the rule is executed. A smaller value gives priority to the rule.
    SiteId string
    The website ID, which can be obtained by calling the ListSites operation.
    SiteVersion int
    The version number of the website configurations. You can use this parameter to specify a version of your website to apply the feature settings. By default, version 0 is used.
    configId String
    The ID of the configuration.
    pageId String
    Response page.
    returnCode String
    The response code.
    rule String
    The content of the rule. A conditional expression is used to match a user request. You do not need to set this parameter when you add global configurations. Use cases:

    • Match all incoming requests: Set the value to true.
    • Set the value to a custom expression, for example, (http.host eq "video.example.com"): Match the specified request.
    ruleEnable String
    Specifies whether to enable the rule. Valid values: You do not need to set this parameter when you add global configurations. Valid values:

    • on
    • off
    ruleName String
    The rule name.
    sequence Integer
    The order in which the rule is executed. A smaller value gives priority to the rule.
    siteId String
    The website ID, which can be obtained by calling the ListSites operation.
    siteVersion Integer
    The version number of the website configurations. You can use this parameter to specify a version of your website to apply the feature settings. By default, version 0 is used.
    configId string
    The ID of the configuration.
    pageId string
    Response page.
    returnCode string
    The response code.
    rule string
    The content of the rule. A conditional expression is used to match a user request. You do not need to set this parameter when you add global configurations. Use cases:

    • Match all incoming requests: Set the value to true.
    • Set the value to a custom expression, for example, (http.host eq "video.example.com"): Match the specified request.
    ruleEnable string
    Specifies whether to enable the rule. Valid values: You do not need to set this parameter when you add global configurations. Valid values:

    • on
    • off
    ruleName string
    The rule name.
    sequence number
    The order in which the rule is executed. A smaller value gives priority to the rule.
    siteId string
    The website ID, which can be obtained by calling the ListSites operation.
    siteVersion number
    The version number of the website configurations. You can use this parameter to specify a version of your website to apply the feature settings. By default, version 0 is used.
    config_id str
    The ID of the configuration.
    page_id str
    Response page.
    return_code str
    The response code.
    rule str
    The content of the rule. A conditional expression is used to match a user request. You do not need to set this parameter when you add global configurations. Use cases:

    • Match all incoming requests: Set the value to true.
    • Set the value to a custom expression, for example, (http.host eq "video.example.com"): Match the specified request.
    rule_enable str
    Specifies whether to enable the rule. Valid values: You do not need to set this parameter when you add global configurations. Valid values:

    • on
    • off
    rule_name str
    The rule name.
    sequence int
    The order in which the rule is executed. A smaller value gives priority to the rule.
    site_id str
    The website ID, which can be obtained by calling the ListSites operation.
    site_version int
    The version number of the website configurations. You can use this parameter to specify a version of your website to apply the feature settings. By default, version 0 is used.
    configId String
    The ID of the configuration.
    pageId String
    Response page.
    returnCode String
    The response code.
    rule String
    The content of the rule. A conditional expression is used to match a user request. You do not need to set this parameter when you add global configurations. Use cases:

    • Match all incoming requests: Set the value to true.
    • Set the value to a custom expression, for example, (http.host eq "video.example.com"): Match the specified request.
    ruleEnable String
    Specifies whether to enable the rule. Valid values: You do not need to set this parameter when you add global configurations. Valid values:

    • on
    • off
    ruleName String
    The rule name.
    sequence Number
    The order in which the rule is executed. A smaller value gives priority to the rule.
    siteId String
    The website ID, which can be obtained by calling the ListSites operation.
    siteVersion Number
    The version number of the website configurations. You can use this parameter to specify a version of your website to apply the feature settings. By default, version 0 is used.

    Import

    ESA Custom Response Code Rule can be imported using the id, e.g.

    $ pulumi import alicloud:esa/customResponseCodeRule:CustomResponseCodeRule 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.
    alicloud logo
    Viewing docs for Alibaba Cloud v3.101.0
    published on Tuesday, Apr 28, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.