- defaultTab: nodes
  description: 'PagerDuty IncidentをP2, High-Urgencyに変更し、Noteに理由を追記'
  executionEnabled: true
  group: Imported Jobs
  id: 5bc4d442-b05f-407d-82b7-b7174ef3ce2e
  loglevel: INFO
  name: R2_Escalate_Incidents
  nodeFilterEditable: false
  nodefilters:
    dispatch:
      excludePrecedence: true
      keepgoing: false
      rankOrder: ascending
      successOnEmptyNodeFilter: false
      threadcount: '1'
    filter: mars.*
  nodesSelectedByDefault: true
  options:
  - description: API Key for PagerDuty REST API
    hidden: true
    label: PagerDuty API Token
    name: pd_api_token
    required: true
    secure: true
    storagePath: keys/workshop_api
    valueExposed: true
  - description: Incidentに追記する文字列
    label: Text to be added to Incident Notes
    name: pd_comment
  - description: Used to pass the incident ID that will be updated.
    label: Incident ID
    name: pd_incident_id
    required: true
  - description: Email address of a PagerDuty User
    label: PD User Email
    name: pd_user
    required: true
    value: automation@pagerduty.com
  plugins:
    ExecutionLifecycle: {}
  runnerSelector:
    filter: WORKSHOP
    runnerFilterMode: TAGS
    runnerFilterType: TAG_FILTER_AND
  scheduleEnabled: true
  schedules: []
  sequence:
    commands:
    - configuration:
        authentication: None
        body: |-
          {
            "incident": {
               "type": "incident_reference",
               "urgency": "high",
               "priority": {
                  "id": "Your Priority ID",
                   "type": "priority_reference"
               }
            }
          }
        checkResponseCode: 'false'
        headers: |-
          {
             "Authorization": "Token token=${option.pd_api_token}",
             "Accept": "application/vnd.pagerduty+json;version=2",
             "Content-Type": "application/json",
             "From": "${option.pd_user}",
             "X-Incident-ID": "${option.pd_incident_id}"
          }
        method: PUT
        printResponse: 'true'
        printResponseCode: 'true'
        printResponseToFile: 'false'
        proxySettings: 'false'
        remoteUrl: https://api.pagerduty.com/incidents/${option.pd_incident_id}
        sslVerify: 'true'
        timeout: '3000'
      description: 'Incident Update: Urgency-High'
      nodeStep: false
      type: edu.ohio.ais.rundeck.HttpWorkflowStepPlugin
    - configuration:
        api_token: keys/workshop_api
        email: ${option.pd_user}
        incident_id: ${option.pd_incident_id}
        note: ${option.pd_comment}
      description: Incident Notesにコメントを追記
      nodeStep: false
      type: pd-note-step
    keepgoing: false
    pluginConfig:
      LogFilter:
      - config:
          color: green
          replacement: '[SECURE]'
        type: mask-passwords
    strategy: node-first
  uuid: 5bc4d442-b05f-407d-82b7-b7174ef3ce2e
