// This file is autogenerated, DO NOT EDIT
// Use `node scripts/generate-docs-examples.js` to generate the docs examples

[source, js]
----
const response = await client.transport.request({
  method: "PUT",
  path: "/_query_rules/my-ruleset/_rule/my-rule1",
  body: {
    type: "pinned",
    criteria: [
      {
        type: "contains",
        metadata: "user_query",
        values: ["pugs", "puggles"],
      },
      {
        type: "exact",
        metadata: "user_country",
        values: ["us"],
      },
    ],
    actions: {
      ids: ["id1", "id2"],
    },
  },
});
console.log(response);
----
