<a id="alarm"></a>

# alarm

## alarm \_internal_type_create

**Usage**

```none
  usage: symp alarm _internal_type_create
[-f {adaptive_table,json,shell,table,value,yaml}]
                                          [-c COLUMN] [--max-width <integer>]
                                          [--fit-width] [--print-empty]
                                          [--noindent] [--prefix PREFIX]
                                          [-m [NAME=VALUE [NAME=VALUE ...]]]
                                          [--description DESCRIPTION]
                                          alarm_type_id name entity_type
                                          --transitions [--transitions ...]
```

**Description**

Register new alarm type for system services. If the alarm type already exists with exactly the same parameters,
nothing should happen.

**Mandatory**

```none
positional arguments:
  alarm_type_id         Unique service alarm identifier according to convention
  name                  Alarm name to be displayed to user
  entity_type           Alarm entity_type, the entity the alarm is about
  --transitions         A transition is a dict that describes event that will cause an alarm in one state to
                        move to another state.  The 'none' state is used to describe how an alarm come to be. There is always an implicit
                        transition from any state to the closed state that happens when a user of the API turn off an alarm
                        [{'from_state': 's1',
                        'to_state': 's2',
                        'event_type': 'eid'}, ...]
                        Special states:
                        Alarm doesn't exist yet: 'none'
                        Alarm is closed: 'closed'
```

**Optional**

```none
optional arguments:
  -h, --help            show this help message and exit
  --description DESCRIPTION
                        Alarm description
```

## alarm alarms action

**Usage**

```none
  usage: symp alarm alarms action
[-f {adaptive_table,json,shell,table,value,yaml}]
                                  [-c COLUMN] [--max-width <integer>]
                                  [--fit-width] [--print-empty] [--noindent]
                                  [--prefix PREFIX]
                                  [-m [NAME=VALUE [NAME=VALUE ...]]]
                                  alarm_id action
```

**Description**

Perform action on alarm.

**Mandatory**

```none
positional arguments:
  alarm_id              Alarm's id
  action                Supported actions: [close]
```

**Optional**

```none
optional arguments:
  -h, --help            show this help message and exit
```

## alarm alarms get

**Usage**

```none
  usage: symp alarm alarms get
[-f {adaptive_table,json,shell,table,value,yaml}]
                               [-c COLUMN] [--max-width <integer>] [--fit-width]
                               [--print-empty] [--noindent] [--prefix PREFIX]
                               [-m [NAME=VALUE [NAME=VALUE ...]]]
                               alarm_id
```

**Description**

Return the alarm if it belongs to the project of the request or the request is issued by cloud_admin.

**Returns**

Returns dict: Alarm

**Mandatory**

```none
positional arguments:
  alarm_id              Alarm type id
```

**Optional**

```none
optional arguments:
  -h, --help            show this help message and exit
```

## alarm list

**Usage**

```none
usage: symp alarm list

                       [-h] [-f {adaptive_table,json,shell,table,value,yaml}]
                       [-c COLUMN] [--max-width <integer>] [--fit-width]
                       [--print-empty] [--noindent] [--prefix PREFIX]
                       [-m [NAME=VALUE [NAME=VALUE ...]]]
                       [--type-ids [TYPE_IDS [TYPE_IDS ...]]]
                       [--type-names [TYPE_NAMES [TYPE_NAMES ...]]]
                       [--entity-ids [ENTITY_IDS [ENTITY_IDS ...]]]
                       [--project-ids [PROJECT_IDS [PROJECT_IDS ...]]]
                       [--in-states [IN_STATES [IN_STATES ...]]]
                       [--not-in-states [NOT_IN_STATES [NOT_IN_STATES ...]]]
                       [--after AFTER] [--before BEFORE] [--order ORDER]
                       [--sort-by SORT_BY] [--marker MARKER] [--limit LIMIT]
```

**Description**

Get a list of alarms filtered by given params. If param value is None or [] it will not be used for filtering.

**Returns**

Returns dict: A dict of a form {‘alarms’: [], marker: int}

**Optional**

```none
optional arguments:
  -h, --help            show this help message and exit
  --type-ids [TYPE_IDS [TYPE_IDS ...]]
                        Filter by. alarm type ids, default=no filter
  --type-names [TYPE_NAMES [TYPE_NAMES ...]]
                        Filter by alarm type names, default=no filter
  --entity-ids [ENTITY_IDS [ENTITY_IDS ...]]
                        Filter by entities ids, default=no filter
  --project-ids [PROJECT_IDS [PROJECT_IDS ...]]
                        System admin can filter by project ids, other users will get only results in their
                        project. System admin default=no filter, User default=only users project. Forbidden will be thrown on illegal
                        access
  --in-states [IN_STATES [IN_STATES ...]]
                        Filter by event state, default=no filter
  --not-in-states [NOT_IN_STATES [NOT_IN_STATES ...]]
                        Filter by event state. Use not_in_states=['closed'] to filter closed events.
                        default=no filter
  --after AFTER         Date in isoformat ('2017-01-29T04:09:01Z').
                        Start of query period (milliseconds since epoch)
  --before BEFORE       Date in isoformat ('2017-01-29T04:09:01Z').
                        End of query period (milliseconds since epoch), by default - now
  --order ORDER         The sorting order of response (ascending|descending). default=descending
  --sort-by SORT_BY     An alarm type field to sort by, default=updated_at
  --marker MARKER       Offset of the first entity relative to the specified order to be retrieved, default=0
  --limit LIMIT         Limit the number of results, default=100
```

## alarm type create

**Usage**

```none
  usage: symp alarm type create
[-f {adaptive_table,json,shell,table,value,yaml}]
                                [-c COLUMN] [--max-width <integer>]
                                [--fit-width] [--print-empty] [--noindent]
                                [--prefix PREFIX]
                                [-m [NAME=VALUE [NAME=VALUE ...]]]
                                [--description DESCRIPTION]
                                [--project-id PROJECT_ID]
                                name entity_type --transitions
                                [--transitions ...]
```

**Description**

Register new alarm type.

**Returns**

Returns dict: Id of the created alarm type

**Mandatory**

```none
positional arguments:
  name                  Alarm name to be displayed to user
  entity_type           Alarm entity_type, the entity the alarm is about
  --transitions         A transition is a dict that describes event that will cause an alarm in one state to
                        move to another state.  The 'none' state is used to describe how an alarm come to be. There is always an implicit
                        transition from any state to the closed state that happens when a user of the API turn off an alarm
                        [{'from_state': 's1',
                        'to_state': 's2',
                        'event_type': 'eid'}, ...]
                        Special states:
                        Alarm doesn't exist yet: 'none'
                        Alarm is closed: 'closed'
```

**Optional**

```none
optional arguments:
  -h, --help            show this help message and exit
  --description DESCRIPTION
                        Alarm description
  --project-id PROJECT_ID
                        Can be used by system_admin to override the project for which the alarm will be defined.
                        If the parameter is None and the user is system admin, the alarm will be defined on system level
```

## alarm types get

**Usage**

```none
  usage: symp alarm types get
[-f {adaptive_table,json,shell,table,value,yaml}]
                              [-c COLUMN] [--max-width <integer>] [--fit-width]
                              [--print-empty] [--noindent] [--prefix PREFIX]
                              [-m [NAME=VALUE [NAME=VALUE ...]]]
                              type_id
```

**Description**

Return the alarm type if its project matches the request project, or the user is cloud_admin.

**Returns**

Returns dict: Alarm type

**Mandatory**

```none
positional arguments:
  type_id               Alarm type id
```

**Optional**

```none
optional arguments:
  -h, --help            show this help message and exit
```

## alarm types list

**Usage**

```none
  usage: symp alarm types list
[-f {adaptive_table,json,shell,table,value,yaml}]
                               [-c COLUMN] [--max-width <integer>] [--fit-width]
                               [--print-empty] [--noindent] [--prefix PREFIX]
                               [-m [NAME=VALUE [NAME=VALUE ...]]]
                               [--names [NAMES [NAMES ...]]]
                               [--entity-types [ENTITY_TYPES [ENTITY_TYPES ...]]]
                               [--project-ids [PROJECT_IDS [PROJECT_IDS ...]]]
                               [--order ORDER] [--sort-by SORT_BY]
                               [--marker MARKER] [--limit LIMIT]
```

**Description**

Get a list alarm types. If param value is None it will not be used for filtering.

**Returns**

Returns dict: A dict of a form {‘alarm_types’: [], marker: int}

**Optional**

```none
optional arguments:
  -h, --help            show this help message and exit
  --names [NAMES [NAMES ...]]
                        Filter by alarm type names, default=no filter
  --entity-types [ENTITY_TYPES [ENTITY_TYPES ...]]
                        Filter by entity types, default= no filter
  --project-ids [PROJECT_IDS [PROJECT_IDS ...]]
                        System admin can filter by project ids, other users will get only results in their
                        project. System admin default=no filter, User default=only users project. Forbidden will be thrown on illegal
                        access
  --order ORDER         The sorting order of response (ascending|descending). default=ascending
  --sort-by SORT_BY     An alarm type field to sort by, default=name
  --marker MARKER       Offset of the first entity relative to the specified order to be retrieved, default=0
  --limit LIMIT         Limit the number of results, default=100
```
