[source, ruby]
----
response = client.indices.rollover(
  alias: 'my-data-stream',
  body: {
    conditions: {
      max_age: '7d',
      max_docs: 1000,
      max_primary_shard_size: '50gb',
      max_primary_shard_docs: '2000'
    }
  }
)
puts response
----
