[source, ruby]
----
response = client.ilm.put_lifecycle(
  policy: 'my_policy',
  body: {
    policy: {
      phases: {
        warm: {
          actions: {
            forcemerge: {
              max_num_segments: 1
            }
          }
        }
      }
    }
  }
)
puts response
----
