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