Create of update a single named project routing expression Technical preview

PUT /_project_routing/{name}

Create of update a single named project routing expression.

Required authorization

  • Cluster privileges: manage

Path parameters

  • name string Required

    The name of project routing expression

application/json

Body Required

  • expression string Required

Responses

  • 200 application/json
    Hide response attribute Show response attribute object
    • acknowledged boolean Required

      For a successful response, this value is always true. On failure, an exception is returned instead.

PUT /_project_routing/{name}
PUT /_project_routing/aws-us-only
{
  "expression" : "_csp:aws AND _region:us*"
}
resp = client.project_routing.create(
    name="aws-us-only",
    expressions={
        "expression": "_csp:aws AND _region:us*"
    },
)
const response = await client.projectRouting.create({
  name: "aws-us-only",
  expressions: {
    expression: "_csp:aws AND _region:us*",
  },
});
response = client.project_routing.create(
  name: "aws-us-only",
  body: {
    "expression": "_csp:aws AND _region:us*"
  }
)
$resp = $client->projectRouting()->create([
    "name" => "aws-us-only",
    "body" => [
        "expression" => "_csp:aws AND _region:us*",
    ],
]);
curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d '{"expression":"_csp:aws AND _region:us*"}' "$ELASTICSEARCH_URL/_project_routing/aws-us-only"
Request example
{
  "expression" : "_csp:aws AND _region:us*"
}
Response examples (200)
{
  "acknowledged": true
}