Oracle Enterprise Manager · Arazzo Workflow

Oracle Enterprise Manager Schedule Blackout

Version 1.0.0

Ensure a blackout reason exists, then create and verify a maintenance window.

1 workflow 1 source API 1 provider
View Spec View on GitHub Cloud ManagementDatabase ManagementEnterprise ManagementInfrastructure ManagementMonitoringOracleArazzoWorkflows

Provider

oracle-enterprise-manager

Workflows

schedule-blackout
Create a blackout for a target after ensuring its reason exists, then verify it.
Lists blackout reasons, optionally creates the requested reason, creates the blackout, reads it back, and lists its covered targets.
5 steps inputs: blackoutName, description, duration, endTime, includeMembers, reason, startTime, targetName, targetType, timezone outputs: blackoutId, coveredTargets, status
1
listReasons
listBlackoutReasons
List the predefined blackout reasons to decide whether to create one.
2
createReason
createBlackoutReason
Create the requested blackout reason when no reasons are yet defined.
3
createTheBlackout
createBlackout
Create the blackout for the supplied target using the requested reason and schedule.
4
confirmBlackout
getBlackout
Read the created blackout back to confirm its scheduled status.
5
listBlackoutTargets
getBlackoutTargets
Enumerate the targets the blackout actually covers, including any group-expanded members.

Source API Descriptions

Arazzo Workflow Specification

oracle-enterprise-manager-schedule-blackout-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Oracle Enterprise Manager Schedule Blackout
  summary: Ensure a blackout reason exists, then create and verify a maintenance window.
  description: >-
    Schedules a maintenance window for one or more targets. The workflow first
    lists the predefined blackout reasons and branches: when the requested
    reason is not already defined it creates it, otherwise it proceeds directly.
    It then creates the blackout with a schedule and target list, reads the
    created blackout back to confirm its status, and enumerates the targets the
    blackout actually covers (including group-expanded members). Four real
    operations are chained with a conditional reason-creation branch.
  version: 1.0.0
sourceDescriptions:
- name: emCloudControl
  url: ../openapi/oracle-enterprise-manager-cloud-control-openapi.yml
  type: openapi
workflows:
- workflowId: schedule-blackout
  summary: Create a blackout for a target after ensuring its reason exists, then verify it.
  description: >-
    Lists blackout reasons, optionally creates the requested reason, creates the
    blackout, reads it back, and lists its covered targets.
  inputs:
    type: object
    required:
    - blackoutName
    - reason
    - targetName
    - targetType
    - startTime
    - duration
    properties:
      blackoutName:
        type: string
        description: Name for the new blackout.
      description:
        type: string
        description: Human-readable description of the maintenance window.
      reason:
        type: string
        description: Blackout reason label to associate with the blackout.
      targetName:
        type: string
        description: Name of the target to place into blackout.
      targetType:
        type: string
        description: Type of the target to place into blackout.
      includeMembers:
        type: boolean
        description: Whether to include member targets of a group target.
        default: false
      startTime:
        type: string
        description: Blackout start time in ISO 8601 format.
      endTime:
        type: string
        description: Optional blackout end time in ISO 8601 format.
      duration:
        type: integer
        description: Blackout duration in minutes.
      timezone:
        type: string
        description: Timezone for the schedule.
  steps:
  - stepId: listReasons
    description: List the predefined blackout reasons to decide whether to create one.
    operationId: listBlackoutReasons
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      reasons: $response.body#/items
    onSuccess:
    - name: reasonsEmpty
      type: goto
      stepId: createReason
      criteria:
      - context: $response.body
        condition: $.items.length == 0
        type: jsonpath
    - name: reasonsExist
      type: goto
      stepId: createTheBlackout
      criteria:
      - context: $response.body
        condition: $.items.length > 0
        type: jsonpath
  - stepId: createReason
    description: >-
      Create the requested blackout reason when no reasons are yet defined.
    operationId: createBlackoutReason
    requestBody:
      contentType: application/json
      payload:
        reason: $inputs.reason
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      reasonId: $response.body#/reasonId
      createdReason: $response.body#/reason
  - stepId: createTheBlackout
    description: >-
      Create the blackout for the supplied target using the requested reason
      and schedule.
    operationId: createBlackout
    requestBody:
      contentType: application/json
      payload:
        blackoutName: $inputs.blackoutName
        description: $inputs.description
        reason: $inputs.reason
        schedule:
          startTime: $inputs.startTime
          endTime: $inputs.endTime
          duration: $inputs.duration
          timezone: $inputs.timezone
          frequency: ONCE
        targets:
        - targetName: $inputs.targetName
          targetType: $inputs.targetType
          includeMembers: $inputs.includeMembers
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      blackoutId: $response.body#/blackoutId
      status: $response.body#/status
  - stepId: confirmBlackout
    description: Read the created blackout back to confirm its scheduled status.
    operationId: getBlackout
    parameters:
    - name: blackoutId
      in: path
      value: $steps.createTheBlackout.outputs.blackoutId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      blackoutId: $response.body#/blackoutId
      status: $response.body#/status
  - stepId: listBlackoutTargets
    description: >-
      Enumerate the targets the blackout actually covers, including any
      group-expanded members.
    operationId: getBlackoutTargets
    parameters:
    - name: blackoutId
      in: path
      value: $steps.confirmBlackout.outputs.blackoutId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      coveredTargets: $response.body#/items
  outputs:
    blackoutId: $steps.confirmBlackout.outputs.blackoutId
    status: $steps.confirmBlackout.outputs.status
    coveredTargets: $steps.listBlackoutTargets.outputs.coveredTargets