salt.states.pagerduty_service

Manage PagerDuty services

Escalation policies can be referenced by pagerduty ID or by namea.

For example:

ensure test service
    pagerduty_service.present:
        - name: 'my service'
        - escalation_policy_id: 'my escalation policy'
        - type: nagios

salt.states.pagerduty_service.absent(profile='pagerduty', subdomain=None, api_key=None, **kwargs)

Ensure a pagerduty service does not exist. Name can be the service name or pagerduty service id.

salt.states.pagerduty_service.present(profile='pagerduty', subdomain=None, api_key=None, **kwargs)

Ensure pagerduty service exists. This method accepts as arguments everything defined in https://developer.pagerduty.com/documentation/rest/services/create

Note that many arguments are mutually exclusive, depending on the "type" argument.

Examples:

# create a PagerDuty email service at [email protected]
ensure generic email service exists:
    pagerduty_service.present:
        - name: my email service
        - service:
            description: "email service controlled by salt"
            escalation_policy_id: "my escalation policy"
            type: "generic_email"
            service_key: "test-email"
# create a pagerduty service using cloudwatch integration
ensure my cloudwatch service exists:
    pagerduty_service.present:
        - name: my cloudwatch service
        - service:
            escalation_policy_id: "my escalation policy"
            type: aws_cloudwatch
            description: "my cloudwatch service controlled by salt"

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