psm stack activities

Lists the activities of a stack instance.

Syntax

In the following syntax, line breaks have been added for clarity. Do not include them when entering the command.

psm stack activities -s|--service-name instance-name 
    [-f|--from-start-date date] 
    [-t|--to-start-date date ]
    [-a|--status NEW|RUNNING|SUCCEED|FAILED|WARN ]
    [-o|--operation-type LIST ]
    [-l|--limit-row-count integer ]
    [-e|--offset  ]
    [-d|--order-by fieldName ]
    [-of|--output-format json|html|short]

Parameters

Parameter Description

-s|--service-name instance-name

Specifies the name of the stack instance.

—f|--from-start-date

Retrieve activities performed after this date. Specifies the start of a range. If no end date is defined, the current date is used. Supported formats are ISO date and time formats:

  • yyyy-MM-dd’T’HH:mm:ss

  • yyyy-MM-dd HH:mm:ss

  • yyy-MM-dd

—t|--to-start-date

Specifies the end of a range. Can be used with from-start-range.

—a|—status

Specifies the types of activity required. Valid values are NEW|RUNNING|SUCCEED|FAILED|WARN.

—o|--operation-type

Specifies the types of operation required.

-l|--limit-row-count

Specifies how many rows of results to return. The default is 10.

-e|--offset

Defines the number of activities to display. If the offset is set to 3, and 5 activities are returned, only the last 3 activities are displayed. This can be combined with limit-row-count to further restrict the number of activities in the result set.

-d|--order-by

Filter criteria to sort the result set. Defined as fieldName: asc|desc.

-of|--output-format json|html|short

(Optional) Specifies the output format of the command’s response:

  • json—output is formatted as a JSON array.

  • html—output is formatted as HTML

  • short—output is formatted as a brief summary.

The default output format is the one you specified when using the psm setup command to configure the psm CLI.

Examples

The following example requests the failed activities of the MyStack instance, from 01 September 2016, to 31 October 2016:

$ psm stack activities -s MyStack -f 2016-09-01 -t 2016-10-31 -a FAILED