// 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.indices.create({
  index: "my-index-000001",
  mappings: {
    dynamic_templates: [
      {
        ip_fields: {
          match: ["ip_*", "*_ip"],
          unmatch: ["one*", "*two"],
          mapping: {
            type: "ip",
          },
        },
      },
    ],
  },
});
console.log(response);

const response1 = await client.index({
  index: "my-index",
  id: 1,
  document: {
    one_ip: "will not match",
    ip_two: "will not match",
    three_ip: "12.12.12.12",
    ip_four: "13.13.13.13",
  },
});
console.log(response1);
----
