salt.states.statuspage

StatusPage

Manage the StatusPage configuration.

In the minion configuration file, the following block is required:

statuspage:
  api_key: <API_KEY>
  page_id: <PAGE_ID>

New in version 2017.7.0.

salt.states.statuspage.create(name, endpoint='incidents', api_url=None, page_id=None, api_key=None, api_version=None, **kwargs)

Insert a new entry under a specific endpoint.

endpoint: incidents

Insert under this specific endpoint.

page_id

Page ID. Can also be specified in the config file.

api_key

API key. Can also be specified in the config file.

api_version: 1

API version. Can also be specified in the config file.

api_url

Custom API URL in case the user has a StatusPage service running in a custom environment.

kwargs

Other params.

SLS Example:

create-my-component:
    statuspage.create:
        - endpoint: components
        - name: my component
        - group_id: 993vgplshj12

salt.states.statuspage.delete(name, endpoint='incidents', id=None, api_url=None, page_id=None, api_key=None, api_version=None)

Remove an entry from an endpoint.

endpoint: incidents

Request a specific endpoint.

page_id

Page ID. Can also be specified in the config file.

api_key

API key. Can also be specified in the config file.

api_version: 1

API version. Can also be specified in the config file.

api_url

Custom API URL in case the user has a StatusPage service running in a custom environment.

SLS Example:

delete-my-component:
    statuspage.delete:
        - endpoint: components
        - id: ftgks51sfs2d

salt.states.statuspage.managed(name, config, api_url=None, page_id=None, api_key=None, api_version=None, pace=1, allow_empty=False)

Manage the StatusPage configuration.

config

Dictionary with the expected configuration of the StatusPage. The main level keys of this dictionary represent the endpoint name. If a certain endpoint does not exist in this structure, it will be ignored / not configured.

page_id

Page ID. Can also be specified in the config file.

api_key

API key. Can also be specified in the config file.

api_version: 1

API version. Can also be specified in the config file.

api_url

Custom API URL in case the user has a StatusPage service running in a custom environment.

pace: 1

Max requests per second allowed by the API.

allow_empty: False

Allow empty config.

SLS example:

my-statuspage-config:
    statuspage.managed:
        - config:
            components:
                - name: component1
                  group_id: uy4g37rf
                - name: component2
                  group_id: 3n4uyu4gf
            incidents:
                - name: incident1
                  status: resolved
                  impact: major
                  backfilled: false
                - name: incident2
                  status: investigating
                  impact: minor

salt.states.statuspage.update(name, endpoint='incidents', id=None, api_url=None, page_id=None, api_key=None, api_version=None, **kwargs)

Update attribute(s) of a specific endpoint.

id

The unique ID of the endpoint entry.

endpoint: incidents

Endpoint name.

page_id

Page ID. Can also be specified in the config file.

api_key

API key. Can also be specified in the config file.

api_version: 1

API version. Can also be specified in the config file.

api_url

Custom API URL in case the user has a StatusPage service running in a custom environment.

SLS Example:

update-my-incident:
    statuspage.update:
        - id: dz959yz2nd4l
        - status: resolved

© 2021 SaltStack.
Licensed under the Apache License, Version 2.0.
https://docs.saltproject.io/en/latest/ref/states/all/salt.states.statuspage.html