[source, ruby]
----
response = client.ilm.put_lifecycle(
  policy: 'datastream_policy',
  body: {
    policy: {
      phases: {
        hot: {
          actions: {
            rollover: {
              max_age: '5m'
            },
            downsample: {
              fixed_interval: '1h'
            }
          }
        }
      }
    }
  }
)
puts response
----
