- help_text:
    brief: |
      List Memorystore Redis operations.
    description: |
      List all Redis operations under the specified project and region.

      To specify the maximum number of operations to list, use the --limit flag.
    examples: |
      To list up to five operations, run:

          $ {command} --limit=5

  arguments:
    resource:
      spec: !REF googlecloudsdk.command_lib.redis.resources:region
      help_text: |
        The region of the operations to display.

  request:
    api_version: v1
    collection: redis.projects.locations.operations

  response:
    id_field: name
    modify_response_hooks:
    - googlecloudsdk.command_lib.redis.operations_util:FilterListResponse

  output:
    format: |
      table(
         name.basename():label=OPERATION_NAME,
         name.segment(3):label=REGION,
         metadata.verb:label=TYPE,
         metadata.target.basename(),
         done,
         metadata.createTime.date():sort=1,
         duration(start=metadata.createTime,end=metadata.endTime,precision=0,calendar=false).slice(2:).join("").yesno(no="<1S"):label=DURATION
       )
