alicloud_esa_waiting_room_rule

更新时间:

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


data "alicloud_esa_sites" "default" {
  plan_subscribe_type = "enterpriseplan"
}

resource "alicloud_esa_site" "default" {
  site_name   = "terraform.site"
  instance_id = data.alicloud_esa_sites.default.sites.0.instance_id
  coverage    = "overseas"
  access_type = "NS"
}

resource "alicloud_esa_waiting_room" "default" {
  status                         = "off"
  site_id                        = alicloud_esa_site.default.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_path {
    domain    = "sub_domain.com"
    path      = "/example"
    subdomain = "example_sub_domain.com."
  }
}

resource "alicloud_esa_waiting_room_rule" "default" {
  rule            = "(http.host eq \"video.example.com\")"
  waiting_room_id = alicloud_esa_waiting_room.default.waiting_room_id
  rule_name       = "WaitingRoomRule_example1"
  status          = "off"
  site_id         = alicloud_esa_site.default.id
}

Argument Reference

The following arguments are supported:

  • rule - (Required) The content of the rule, the implemented policy or conditional expression.
  • rule_name - (Required) Rule name, optional, used to query by waiting room bypass rule name.
  • site_id - (Required, ForceNew, Int) The site ID, which can be obtained by calling the ListSites API.
  • status - (Required) Rule enabled status, supporting: -'on': means enabled. -'off': means disabled.
  • waiting_room_id - (Required, ForceNew) Waiting room ID, used to identify a specific waiting room. It can be obtained by calling the listwaitingroom interface.

Attributes Reference

The following attributes are exported:

  • id - The ID of the resource supplied above.The value is formulated as <site_id>:<waiting_room_id>:<waiting_room_rule_id>.
  • waiting_room_rule_id - The rule ID, which can be used to query a specific rule.

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • create - (Defaults to 5 mins) Used when create the Waiting Room Rule.
  • delete - (Defaults to 5 mins) Used when delete the Waiting Room Rule.
  • update - (Defaults to 5 mins) Used when update the Waiting Room Rule.

Import

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

$ terraform import alicloud_esa_waiting_room_rule.example <site_id>:<waiting_room_id>:<waiting_room_rule_id>