ecms_​dataset

Version: v2025-01-13Includes use: No

Behavior name: Message Store data set selection

Specifies a default data set for requests to this property unless indicated otherwise in the URL. To access objects in this data set, you can skip the data set name in the URLs. To access objects in a different data set within a database, pass the data set name in the header, query parameter, or a regular expression pattern matching a URL segment. You can also configure the ecms_database behavior to specify a default database for requests.

Default behavior

These samples reflect the behavior's default settings. You can use these as is in your configurations or make adjustments based on the behavior's available options.

data "akamai_property_rules_builder" "ecms_dataset" {
  rules_v2025_02_18 {
    name     = "Message Store data set selection"
    comments = "Specifies a default data set for requests to the given property unless indicated otherwise in the URL."
    behavior {
      ecms_dataset {
        dataset          = ""
        extract_location = "CLIENT_REQUEST_HEADER"
        header_name      = "X-KV-Dataset"
      }
    }
  }
}
"behaviors": [
  {
    "name": "ecmsDataset",
    "options": {
      "dataset": "",
      "extractLocation": "CLIENT_REQUEST_HEADER",
      "headername": "X-KV-Dataset"
      }
  }
]

Options

Option Description
dataset
Specifies a default data set for this property. If you don't configure a default database in the ecms_database behavior, requests to objects in this data set follow the pattern: <hostname>/datastore/<database_name>/<object_key>.
extract_location
Specifies where to pass a database name in requests. If the specified location doesn't include the database name or the name doesn't match the regular expression, the default database is used. Value is one of:
  • CLIENT_REQUEST_HEADER. Name is a request header.
  • QUERY_STRING. Name is a query parameter.
  • REGEX. Name matches the URL.
header_name
Specifies the request header that passed the database name. By default, it points to X-KV-Database.
query_parameter_name
Specifies the query string parameter that passed the database name. By default, it points to database.
regex_pattern
Specifies the regular expression that matches the database name in the URL.