[source, ruby]
----
response = client.indices.create(
  index: 'my-index-000001',
  body: {
    mappings: {
      dynamic_templates: [
        {
          strings_as_ip: {
            match_mapping_type: 'string',
            match: 'ip*',
            runtime: {
              type: 'ip'
            }
          }
        }
      ]
    }
  }
)
puts response
----
