[source, ruby]
----
response = client.ilm.put_lifecycle(
  policy: 'my_policy',
  body: {
    policy: {
      phases: {
        hot: {
          actions: {
            rollover: {
              max_primary_shard_size: '50gb',
              max_age: '30d',
              min_primary_shard_size: '1gb'
            }
          }
        }
      }
    }
  }
)
puts response
----
