1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. esa
  5. WaitingRoomRule
Alibaba Cloud v3.75.0 published on Friday, Mar 7, 2025 by Pulumi

alicloud.esa.WaitingRoomRule

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.75.0 published on Friday, Mar 7, 2025 by Pulumi

    Provides a ESA Waiting Room Rule resource.

    For information about ESA Waiting Room Rule and how to use it, see What is Waiting Room 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 defaultSite = new alicloud.esa.Site("default", {
        siteName: "terraform.site",
        instanceId: _default.then(_default => _default.sites?.[0]?.instanceId),
        coverage: "overseas",
        accessType: "NS",
    });
    const defaultWaitingRoom = new alicloud.esa.WaitingRoom("default", {
        status: "off",
        siteId: defaultSite.id,
        jsonResponseEnable: "off",
        description: "example",
        waitingRoomType: "default",
        disableSessionRenewalEnable: "off",
        cookieName: "__aliwaitingroom_example",
        waitingRoomName: "waitingroom_example",
        queueAllEnable: "off",
        queuingStatusCode: "200",
        customPageHtml: "",
        newUsersPerMinute: "200",
        sessionDuration: "5",
        language: "zhcn",
        totalActiveUsers: "300",
        queuingMethod: "fifo",
        hostNameAndPaths: [{
            domain: "sub_domain.com",
            path: "/example",
            subdomain: "example_sub_domain.com.",
        }],
    });
    const defaultWaitingRoomRule = new alicloud.esa.WaitingRoomRule("default", {
        rule: "(http.host eq \"video.example.com\")",
        waitingRoomId: defaultWaitingRoom.waitingRoomId,
        ruleName: "WaitingRoomRule_example1",
        status: "off",
        siteId: defaultSite.id,
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default = alicloud.esa.get_sites(plan_subscribe_type="enterpriseplan")
    default_site = alicloud.esa.Site("default",
        site_name="terraform.site",
        instance_id=default.sites[0].instance_id,
        coverage="overseas",
        access_type="NS")
    default_waiting_room = alicloud.esa.WaitingRoom("default",
        status="off",
        site_id=default_site.id,
        json_response_enable="off",
        description="example",
        waiting_room_type="default",
        disable_session_renewal_enable="off",
        cookie_name="__aliwaitingroom_example",
        waiting_room_name="waitingroom_example",
        queue_all_enable="off",
        queuing_status_code="200",
        custom_page_html="",
        new_users_per_minute="200",
        session_duration="5",
        language="zhcn",
        total_active_users="300",
        queuing_method="fifo",
        host_name_and_paths=[{
            "domain": "sub_domain.com",
            "path": "/example",
            "subdomain": "example_sub_domain.com.",
        }])
    default_waiting_room_rule = alicloud.esa.WaitingRoomRule("default",
        rule="(http.host eq \"video.example.com\")",
        waiting_room_id=default_waiting_room.waiting_room_id,
        rule_name="WaitingRoomRule_example1",
        status="off",
        site_id=default_site.id)
    
    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
    		}
    		defaultSite, err := esa.NewSite(ctx, "default", &esa.SiteArgs{
    			SiteName:   pulumi.String("terraform.site"),
    			InstanceId: pulumi.String(_default.Sites[0].InstanceId),
    			Coverage:   pulumi.String("overseas"),
    			AccessType: pulumi.String("NS"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultWaitingRoom, err := esa.NewWaitingRoom(ctx, "default", &esa.WaitingRoomArgs{
    			Status:                      pulumi.String("off"),
    			SiteId:                      defaultSite.ID(),
    			JsonResponseEnable:          pulumi.String("off"),
    			Description:                 pulumi.String("example"),
    			WaitingRoomType:             pulumi.String("default"),
    			DisableSessionRenewalEnable: pulumi.String("off"),
    			CookieName:                  pulumi.String("__aliwaitingroom_example"),
    			WaitingRoomName:             pulumi.String("waitingroom_example"),
    			QueueAllEnable:              pulumi.String("off"),
    			QueuingStatusCode:           pulumi.String("200"),
    			CustomPageHtml:              pulumi.String(""),
    			NewUsersPerMinute:           pulumi.String("200"),
    			SessionDuration:             pulumi.String("5"),
    			Language:                    pulumi.String("zhcn"),
    			TotalActiveUsers:            pulumi.String("300"),
    			QueuingMethod:               pulumi.String("fifo"),
    			HostNameAndPaths: esa.WaitingRoomHostNameAndPathArray{
    				&esa.WaitingRoomHostNameAndPathArgs{
    					Domain:    pulumi.String("sub_domain.com"),
    					Path:      pulumi.String("/example"),
    					Subdomain: pulumi.String("example_sub_domain.com."),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = esa.NewWaitingRoomRule(ctx, "default", &esa.WaitingRoomRuleArgs{
    			Rule:          pulumi.String("(http.host eq \"video.example.com\")"),
    			WaitingRoomId: defaultWaitingRoom.WaitingRoomId,
    			RuleName:      pulumi.String("WaitingRoomRule_example1"),
    			Status:        pulumi.String("off"),
    			SiteId:        defaultSite.ID(),
    		})
    		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 defaultSite = new AliCloud.Esa.Site("default", new()
        {
            SiteName = "terraform.site",
            InstanceId = @default.Apply(@default => @default.Apply(getSitesResult => getSitesResult.Sites[0]?.InstanceId)),
            Coverage = "overseas",
            AccessType = "NS",
        });
    
        var defaultWaitingRoom = new AliCloud.Esa.WaitingRoom("default", new()
        {
            Status = "off",
            SiteId = defaultSite.Id,
            JsonResponseEnable = "off",
            Description = "example",
            WaitingRoomType = "default",
            DisableSessionRenewalEnable = "off",
            CookieName = "__aliwaitingroom_example",
            WaitingRoomName = "waitingroom_example",
            QueueAllEnable = "off",
            QueuingStatusCode = "200",
            CustomPageHtml = "",
            NewUsersPerMinute = "200",
            SessionDuration = "5",
            Language = "zhcn",
            TotalActiveUsers = "300",
            QueuingMethod = "fifo",
            HostNameAndPaths = new[]
            {
                new AliCloud.Esa.Inputs.WaitingRoomHostNameAndPathArgs
                {
                    Domain = "sub_domain.com",
                    Path = "/example",
                    Subdomain = "example_sub_domain.com.",
                },
            },
        });
    
        var defaultWaitingRoomRule = new AliCloud.Esa.WaitingRoomRule("default", new()
        {
            Rule = "(http.host eq \"video.example.com\")",
            WaitingRoomId = defaultWaitingRoom.WaitingRoomId,
            RuleName = "WaitingRoomRule_example1",
            Status = "off",
            SiteId = defaultSite.Id,
        });
    
    });
    
    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.Site;
    import com.pulumi.alicloud.esa.SiteArgs;
    import com.pulumi.alicloud.esa.WaitingRoom;
    import com.pulumi.alicloud.esa.WaitingRoomArgs;
    import com.pulumi.alicloud.esa.inputs.WaitingRoomHostNameAndPathArgs;
    import com.pulumi.alicloud.esa.WaitingRoomRule;
    import com.pulumi.alicloud.esa.WaitingRoomRuleArgs;
    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 defaultSite = new Site("defaultSite", SiteArgs.builder()
                .siteName("terraform.site")
                .instanceId(default_.sites()[0].instanceId())
                .coverage("overseas")
                .accessType("NS")
                .build());
    
            var defaultWaitingRoom = new WaitingRoom("defaultWaitingRoom", WaitingRoomArgs.builder()
                .status("off")
                .siteId(defaultSite.id())
                .jsonResponseEnable("off")
                .description("example")
                .waitingRoomType("default")
                .disableSessionRenewalEnable("off")
                .cookieName("__aliwaitingroom_example")
                .waitingRoomName("waitingroom_example")
                .queueAllEnable("off")
                .queuingStatusCode("200")
                .customPageHtml("")
                .newUsersPerMinute("200")
                .sessionDuration("5")
                .language("zhcn")
                .totalActiveUsers("300")
                .queuingMethod("fifo")
                .hostNameAndPaths(WaitingRoomHostNameAndPathArgs.builder()
                    .domain("sub_domain.com")
                    .path("/example")
                    .subdomain("example_sub_domain.com.")
                    .build())
                .build());
    
            var defaultWaitingRoomRule = new WaitingRoomRule("defaultWaitingRoomRule", WaitingRoomRuleArgs.builder()
                .rule("(http.host eq \"video.example.com\")")
                .waitingRoomId(defaultWaitingRoom.waitingRoomId())
                .ruleName("WaitingRoomRule_example1")
                .status("off")
                .siteId(defaultSite.id())
                .build());
    
        }
    }
    
    resources:
      defaultSite:
        type: alicloud:esa:Site
        name: default
        properties:
          siteName: terraform.site
          instanceId: ${default.sites[0].instanceId}
          coverage: overseas
          accessType: NS
      defaultWaitingRoom:
        type: alicloud:esa:WaitingRoom
        name: default
        properties:
          status: off
          siteId: ${defaultSite.id}
          jsonResponseEnable: off
          description: example
          waitingRoomType: default
          disableSessionRenewalEnable: off
          cookieName: __aliwaitingroom_example
          waitingRoomName: waitingroom_example
          queueAllEnable: off
          queuingStatusCode: '200'
          customPageHtml: ""
          newUsersPerMinute: '200'
          sessionDuration: '5'
          language: zhcn
          totalActiveUsers: '300'
          queuingMethod: fifo
          hostNameAndPaths:
            - domain: sub_domain.com
              path: /example
              subdomain: example_sub_domain.com.
      defaultWaitingRoomRule:
        type: alicloud:esa:WaitingRoomRule
        name: default
        properties:
          rule: (http.host eq "video.example.com")
          waitingRoomId: ${defaultWaitingRoom.waitingRoomId}
          ruleName: WaitingRoomRule_example1
          status: off
          siteId: ${defaultSite.id}
    variables:
      default:
        fn::invoke:
          function: alicloud:esa:getSites
          arguments:
            planSubscribeType: enterpriseplan
    

    Create WaitingRoomRule Resource

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

    Constructor syntax

    new WaitingRoomRule(name: string, args: WaitingRoomRuleArgs, opts?: CustomResourceOptions);
    @overload
    def WaitingRoomRule(resource_name: str,
                        args: WaitingRoomRuleArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def WaitingRoomRule(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        rule: Optional[str] = None,
                        rule_name: Optional[str] = None,
                        site_id: Optional[int] = None,
                        status: Optional[str] = None,
                        waiting_room_id: Optional[str] = None)
    func NewWaitingRoomRule(ctx *Context, name string, args WaitingRoomRuleArgs, opts ...ResourceOption) (*WaitingRoomRule, error)
    public WaitingRoomRule(string name, WaitingRoomRuleArgs args, CustomResourceOptions? opts = null)
    public WaitingRoomRule(String name, WaitingRoomRuleArgs args)
    public WaitingRoomRule(String name, WaitingRoomRuleArgs args, CustomResourceOptions options)
    
    type: alicloud:esa:WaitingRoomRule
    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 WaitingRoomRuleArgs
    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 WaitingRoomRuleArgs
    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 WaitingRoomRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args WaitingRoomRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args WaitingRoomRuleArgs
    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 waitingRoomRuleResource = new AliCloud.Esa.WaitingRoomRule("waitingRoomRuleResource", new()
    {
        Rule = "string",
        RuleName = "string",
        SiteId = 0,
        Status = "string",
        WaitingRoomId = "string",
    });
    
    example, err := esa.NewWaitingRoomRule(ctx, "waitingRoomRuleResource", &esa.WaitingRoomRuleArgs{
    	Rule:          pulumi.String("string"),
    	RuleName:      pulumi.String("string"),
    	SiteId:        pulumi.Int(0),
    	Status:        pulumi.String("string"),
    	WaitingRoomId: pulumi.String("string"),
    })
    
    var waitingRoomRuleResource = new WaitingRoomRule("waitingRoomRuleResource", WaitingRoomRuleArgs.builder()
        .rule("string")
        .ruleName("string")
        .siteId(0)
        .status("string")
        .waitingRoomId("string")
        .build());
    
    waiting_room_rule_resource = alicloud.esa.WaitingRoomRule("waitingRoomRuleResource",
        rule="string",
        rule_name="string",
        site_id=0,
        status="string",
        waiting_room_id="string")
    
    const waitingRoomRuleResource = new alicloud.esa.WaitingRoomRule("waitingRoomRuleResource", {
        rule: "string",
        ruleName: "string",
        siteId: 0,
        status: "string",
        waitingRoomId: "string",
    });
    
    type: alicloud:esa:WaitingRoomRule
    properties:
        rule: string
        ruleName: string
        siteId: 0
        status: string
        waitingRoomId: string
    

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

    Rule string
    Specifies whether to enable the rule. Valid values:

    • on
    • off
    RuleName string
    Optional. The rule ID, which can be used to query a specific rule.
    SiteId int
    The site ID, which can be obtained by calling the ListSites API.
    Status string
    The rule name.
    WaitingRoomId string
    The website ID, which can be obtained by calling the ListSites operation.
    Rule string
    Specifies whether to enable the rule. Valid values:

    • on
    • off
    RuleName string
    Optional. The rule ID, which can be used to query a specific rule.
    SiteId int
    The site ID, which can be obtained by calling the ListSites API.
    Status string
    The rule name.
    WaitingRoomId string
    The website ID, which can be obtained by calling the ListSites operation.
    rule String
    Specifies whether to enable the rule. Valid values:

    • on
    • off
    ruleName String
    Optional. The rule ID, which can be used to query a specific rule.
    siteId Integer
    The site ID, which can be obtained by calling the ListSites API.
    status String
    The rule name.
    waitingRoomId String
    The website ID, which can be obtained by calling the ListSites operation.
    rule string
    Specifies whether to enable the rule. Valid values:

    • on
    • off
    ruleName string
    Optional. The rule ID, which can be used to query a specific rule.
    siteId number
    The site ID, which can be obtained by calling the ListSites API.
    status string
    The rule name.
    waitingRoomId string
    The website ID, which can be obtained by calling the ListSites operation.
    rule str
    Specifies whether to enable the rule. Valid values:

    • on
    • off
    rule_name str
    Optional. The rule ID, which can be used to query a specific rule.
    site_id int
    The site ID, which can be obtained by calling the ListSites API.
    status str
    The rule name.
    waiting_room_id str
    The website ID, which can be obtained by calling the ListSites operation.
    rule String
    Specifies whether to enable the rule. Valid values:

    • on
    • off
    ruleName String
    Optional. The rule ID, which can be used to query a specific rule.
    siteId Number
    The site ID, which can be obtained by calling the ListSites API.
    status String
    The rule name.
    waitingRoomId String
    The website ID, which can be obtained by calling the ListSites operation.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    WaitingRoomRuleId int
    WaitingRoomRuleId Id
    Id string
    The provider-assigned unique ID for this managed resource.
    WaitingRoomRuleId int
    WaitingRoomRuleId Id
    id String
    The provider-assigned unique ID for this managed resource.
    waitingRoomRuleId Integer
    WaitingRoomRuleId Id
    id string
    The provider-assigned unique ID for this managed resource.
    waitingRoomRuleId number
    WaitingRoomRuleId Id
    id str
    The provider-assigned unique ID for this managed resource.
    waiting_room_rule_id int
    WaitingRoomRuleId Id
    id String
    The provider-assigned unique ID for this managed resource.
    waitingRoomRuleId Number
    WaitingRoomRuleId Id

    Look up Existing WaitingRoomRule Resource

    Get an existing WaitingRoomRule 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?: WaitingRoomRuleState, opts?: CustomResourceOptions): WaitingRoomRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            rule: Optional[str] = None,
            rule_name: Optional[str] = None,
            site_id: Optional[int] = None,
            status: Optional[str] = None,
            waiting_room_id: Optional[str] = None,
            waiting_room_rule_id: Optional[int] = None) -> WaitingRoomRule
    func GetWaitingRoomRule(ctx *Context, name string, id IDInput, state *WaitingRoomRuleState, opts ...ResourceOption) (*WaitingRoomRule, error)
    public static WaitingRoomRule Get(string name, Input<string> id, WaitingRoomRuleState? state, CustomResourceOptions? opts = null)
    public static WaitingRoomRule get(String name, Output<String> id, WaitingRoomRuleState state, CustomResourceOptions options)
    resources:  _:    type: alicloud:esa:WaitingRoomRule    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:
    Rule string
    Specifies whether to enable the rule. Valid values:

    • on
    • off
    RuleName string
    Optional. The rule ID, which can be used to query a specific rule.
    SiteId int
    The site ID, which can be obtained by calling the ListSites API.
    Status string
    The rule name.
    WaitingRoomId string
    The website ID, which can be obtained by calling the ListSites operation.
    WaitingRoomRuleId int
    WaitingRoomRuleId Id
    Rule string
    Specifies whether to enable the rule. Valid values:

    • on
    • off
    RuleName string
    Optional. The rule ID, which can be used to query a specific rule.
    SiteId int
    The site ID, which can be obtained by calling the ListSites API.
    Status string
    The rule name.
    WaitingRoomId string
    The website ID, which can be obtained by calling the ListSites operation.
    WaitingRoomRuleId int
    WaitingRoomRuleId Id
    rule String
    Specifies whether to enable the rule. Valid values:

    • on
    • off
    ruleName String
    Optional. The rule ID, which can be used to query a specific rule.
    siteId Integer
    The site ID, which can be obtained by calling the ListSites API.
    status String
    The rule name.
    waitingRoomId String
    The website ID, which can be obtained by calling the ListSites operation.
    waitingRoomRuleId Integer
    WaitingRoomRuleId Id
    rule string
    Specifies whether to enable the rule. Valid values:

    • on
    • off
    ruleName string
    Optional. The rule ID, which can be used to query a specific rule.
    siteId number
    The site ID, which can be obtained by calling the ListSites API.
    status string
    The rule name.
    waitingRoomId string
    The website ID, which can be obtained by calling the ListSites operation.
    waitingRoomRuleId number
    WaitingRoomRuleId Id
    rule str
    Specifies whether to enable the rule. Valid values:

    • on
    • off
    rule_name str
    Optional. The rule ID, which can be used to query a specific rule.
    site_id int
    The site ID, which can be obtained by calling the ListSites API.
    status str
    The rule name.
    waiting_room_id str
    The website ID, which can be obtained by calling the ListSites operation.
    waiting_room_rule_id int
    WaitingRoomRuleId Id
    rule String
    Specifies whether to enable the rule. Valid values:

    • on
    • off
    ruleName String
    Optional. The rule ID, which can be used to query a specific rule.
    siteId Number
    The site ID, which can be obtained by calling the ListSites API.
    status String
    The rule name.
    waitingRoomId String
    The website ID, which can be obtained by calling the ListSites operation.
    waitingRoomRuleId Number
    WaitingRoomRuleId Id

    Import

    ESA Waiting Room Rule can be imported using the id, e.g.

    $ pulumi import alicloud:esa/waitingRoomRule:WaitingRoomRule example <site_id>:<waiting_room_id>:<waiting_room_rule_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
    Alibaba Cloud v3.75.0 published on Friday, Mar 7, 2025 by Pulumi