[source, ruby]
----
response = client.ilm.put_lifecycle(
  policy: 'my_policy',
  body: {
    policy: {
      phases: {
        hot: {
          actions: {
            rollover: {
              max_age: '7d',
              max_size: '100gb',
              min_docs: 1000
            }
          }
        }
      }
    }
  }
)
puts response
----
