openapi: 3.2.0 info: description: Use the Resource scheduler API to manage schedules, to perform actions on a collection of resources. title: Resource Scheduler Schedule API version: '20240430' x-provenance: method: harvested first_party: true publisher: Oracle source: https://docs.oracle.com/en-us/iaas/api/specs/71e79eba4d71a59cedcf88657dc2ff4974315bef5510d6434ac7ab41b72c6c12.yaml harvested: '2026-08-04' note: Published by Oracle as the contract for the Resource Scheduler API OCI service and stored verbatim; API Evangelist added only this provenance block. x-evidence: - url: https://docs.oracle.com/en-us/iaas/api/specs/index.json what: Oracle's own index of every OCI service specification - url: https://docs.oracle.com/en-us/iaas/api/specs/71e79eba4d71a59cedcf88657dc2ff4974315bef5510d6434ac7ab41b72c6c12.yaml what: the harvested document for Resource Scheduler API servers: - url: http://127.0.0.1/20240430 - url: https://127.0.0.1/20240430 tags: - name: schedule paths: /schedules: get: description: 'This API gets a list of schedules. You must provide either a compartmentId or a scheduleId or both. You can list resources in this compartment [OCID](/iaas/Content/General/Concepts/identifiers.htm). This is required unless a specific schedule ID is passed. ' operationId: ListSchedules parameters: - $ref: '#/components/parameters/CompartmentIdQueryParam' - $ref: '#/components/parameters/LifecycleStateQueryParam' - $ref: '#/components/parameters/DisplayNameQueryParam' - $ref: '#/components/parameters/ScheduleIdentifierQueryParam' - $ref: '#/components/parameters/PaginationLimitQueryParam' - $ref: '#/components/parameters/PaginationTokenQueryParam' - $ref: '#/components/parameters/SortByQueryParam' - $ref: '#/components/parameters/SortOrderQueryParam' - $ref: '#/components/parameters/RequestIdHeader' - $ref: '#/components/parameters/ResourceIdentifierQueryParam' responses: 200: description: This API displays a page of schedule summary objects headers: opc-next-page: description: 'When this header appears in the list pagination response, there are additional results pages to view. For important details about how pagination works, see [List Pagination](/iaas/Content/API/Concepts/usingapi.htm#nine). ' schema: type: string opc-request-id: description: 'This is a unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. ' schema: type: string content: application/json: schema: $ref: '#/components/schemas/ScheduleCollection' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 404: $ref: '#/components/responses/404' 429: $ref: '#/components/responses/429' 500: $ref: '#/components/responses/500' default: $ref: '#/components/responses/default' summary: Gets a list of schedules tags: - schedule x-related-resource: '#/definitions/Schedule' post: description: 'This API creates a schedule. You must provide either resources or resourceFilters. ' operationId: CreateSchedule parameters: - $ref: '#/components/parameters/RetryTokenHeader' - $ref: '#/components/parameters/RequestIdHeader' responses: 201: description: Accepted the request. The Schedule will be created. headers: content-location: description: This is the same as location schema: type: string format: uri-reference etag: description: 'For optimistic concurrency control. See `if-match`. ' schema: type: string location: description: This is the URL for the created schedule. The schedule OCID is generated after this request is sent. schema: type: string format: uri-reference opc-request-id: description: 'This is a unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. ' schema: type: string opc-work-request-id: description: 'The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. Use GetWorkRequest with this ID to track the status of the request. ' schema: type: string content: application/json: schema: $ref: '#/components/schemas/Schedule' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 429: $ref: '#/components/responses/429' 500: $ref: '#/components/responses/500' default: $ref: '#/components/responses/default' summary: This API creates a schedule tags: - schedule x-related-resource: '#/definitions/Schedule' requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateScheduleDetails' description: This API shows the details of the new schedule required: true /schedules/resourceTypes: get: description: 'This API gets a list of schedule resource types. ' operationId: ListResourceTypes parameters: - $ref: '#/components/parameters/CompartmentIdQueryParam' - $ref: '#/components/parameters/PaginationLimitQueryParam' - $ref: '#/components/parameters/PaginationTokenQueryParam' - $ref: '#/components/parameters/RequestIdHeader' responses: 200: description: This API displays a page of schedule resource type summary objects. headers: opc-next-page: description: 'When this header appears in the list pagination response, there are additional results pages to view. For important details about how pagination works, see [List Pagination](/iaas/Content/API/Concepts/usingapi.htm#nine). ' schema: type: string opc-request-id: description: 'This is a unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. ' schema: type: string content: application/json: schema: $ref: '#/components/schemas/ResourceTypeCollection' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 404: $ref: '#/components/responses/404' 429: $ref: '#/components/responses/429' 500: $ref: '#/components/responses/500' default: $ref: '#/components/responses/default' summary: Gets a list of schedule resource types. tags: - schedule /schedules/{scheduleId}: delete: description: This API deletes a schedule. operationId: DeleteSchedule parameters: - $ref: '#/components/parameters/ScheduleIdentifierPathParam' - $ref: '#/components/parameters/IfMatchHeader' - $ref: '#/components/parameters/RequestIdHeader' responses: 204: description: The schedule has been deleted. headers: opc-request-id: description: 'This is a unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. ' schema: type: string 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 404: $ref: '#/components/responses/404' 412: $ref: '#/components/responses/412' 429: $ref: '#/components/responses/429' 500: $ref: '#/components/responses/500' default: $ref: '#/components/responses/default' summary: Deletes a schedule tags: - schedule x-related-resource: '#/definitions/Schedule' get: description: This API gets information about a schedule. operationId: GetSchedule parameters: - $ref: '#/components/parameters/ScheduleIdentifierPathParam' - $ref: '#/components/parameters/RequestIdHeader' responses: 200: description: The schedule was retrieved. headers: etag: description: 'For optimistic concurrency control. See `if-match`. ' schema: type: string opc-request-id: description: 'This is a unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. ' schema: type: string content: application/json: schema: $ref: '#/components/schemas/Schedule' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 404: $ref: '#/components/responses/404' 429: $ref: '#/components/responses/429' 500: $ref: '#/components/responses/500' default: $ref: '#/components/responses/default' summary: Get Schedule tags: - schedule put: description: The API updates a schedule operationId: UpdateSchedule parameters: - $ref: '#/components/parameters/ScheduleIdentifierPathParam' - $ref: '#/components/parameters/IfMatchHeader' - $ref: '#/components/parameters/RequestIdHeader' responses: 202: description: Accepted the request. The Schedule will be updated. headers: opc-request-id: description: 'This is a unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. ' schema: type: string opc-work-request-id: description: 'The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. Use GetWorkRequest with this ID to track the status of the request. ' schema: type: string 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 404: $ref: '#/components/responses/404' 405: $ref: '#/components/responses/405' 412: $ref: '#/components/responses/412' 429: $ref: '#/components/responses/429' 500: $ref: '#/components/responses/500' default: $ref: '#/components/responses/default' summary: Updates a schedule tags: - schedule x-related-resource: '#/definitions/Schedule' requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateScheduleDetails' description: The information about a schedule that will be updated. required: true /schedules/{scheduleId}/actions/activateSchedule: post: description: This API activates a schedule. operationId: ActivateSchedule parameters: - $ref: '#/components/parameters/ScheduleIdentifierPathParam' - $ref: '#/components/parameters/IfMatchHeader' - $ref: '#/components/parameters/RequestIdHeader' - $ref: '#/components/parameters/RetryTokenHeader' responses: 200: description: The schedule has been activated. headers: etag: description: 'For optimistic concurrency control. See `if-match`. ' schema: type: string opc-request-id: description: 'This is a unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. ' schema: type: string content: application/json: schema: $ref: '#/components/schemas/Schedule' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 412: $ref: '#/components/responses/412' 429: $ref: '#/components/responses/429' 500: $ref: '#/components/responses/500' default: $ref: '#/components/responses/default' summary: Activates a schedule tags: - schedule x-obmcs-terraform: actionType: START x-related-resource: '#/definitions/Schedule' /schedules/{scheduleId}/actions/changeCompartment: post: description: 'This API moves a schedule into a different compartment within the same tenancy. For information about moving resources between compartments, see [Moving Resources to a Different Compartment](/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). ' operationId: ChangeScheduleCompartment parameters: - $ref: '#/components/parameters/ScheduleIdentifierPathParam' - $ref: '#/components/parameters/IfMatchHeader' - $ref: '#/components/parameters/RequestIdHeader' - $ref: '#/components/parameters/RetryTokenHeader' responses: 202: description: Accepted the request. The schedule will be moved into a different compartment. headers: opc-request-id: description: 'This is a unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. ' schema: type: string opc-work-request-id: description: 'The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. Use GetWorkRequest with this ID to track the status of the request. ' schema: type: string 401: $ref: '#/components/responses/401' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 412: $ref: '#/components/responses/412' 429: $ref: '#/components/responses/429' 500: $ref: '#/components/responses/500' summary: Moves a schedule into a different compartment. tags: - schedule x-related-resource: '#/definitions/Schedule' requestBody: content: application/json: schema: $ref: '#/components/schemas/ChangeScheduleCompartmentDetails' description: These are the change schedule compartment details that will be updated. required: true /schedules/{scheduleId}/actions/deactivateSchedule: post: description: This API deactivates a schedule. operationId: DeactivateSchedule parameters: - $ref: '#/components/parameters/ScheduleIdentifierPathParam' - $ref: '#/components/parameters/IfMatchHeader' - $ref: '#/components/parameters/RequestIdHeader' - $ref: '#/components/parameters/RetryTokenHeader' responses: 200: description: The schedule has been deactivated. headers: etag: description: 'For optimistic concurrency control. See `if-match`. ' schema: type: string opc-request-id: description: 'This is a unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. ' schema: type: string content: application/json: schema: $ref: '#/components/schemas/Schedule' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 412: $ref: '#/components/responses/412' 429: $ref: '#/components/responses/429' 500: $ref: '#/components/responses/500' default: $ref: '#/components/responses/default' summary: Deactivates a schedule tags: - schedule x-obmcs-terraform: actionType: STOP x-related-resource: '#/definitions/Schedule' /workRequests: get: description: This API gets a list of work requests. You must provide either a compartmentId or a workRequestId or both. You can list work requests in this compartment [OCID](/iaas/Content/General/Concepts/identifiers.htm). This is required unless a specific workRequestId is passed. operationId: ListWorkRequests parameters: - $ref: '#/components/parameters/CompartmentIdQueryParam' - $ref: '#/components/parameters/WorkRequestIdQueryParam' - $ref: '#/components/parameters/WorkRequestStatusQueryParam' - $ref: '#/components/parameters/ResourceIdentifierQueryParam' - $ref: '#/components/parameters/PaginationTokenQueryParam' - $ref: '#/components/parameters/PaginationLimitQueryParam' - $ref: '#/components/parameters/SortOrderQueryParam' - $ref: '#/components/parameters/WorkRequestSortByQueryParam' - $ref: '#/components/parameters/ScheduleIdentifierQueryParam' - $ref: '#/components/parameters/RequestIdHeader' responses: 200: description: The list of work requests was retrieved. headers: opc-next-page: description: 'When this header appears in the list pagination response, there are additional results pages to view. For important details about how pagination works, see [List Pagination](/iaas/Content/API/Concepts/usingapi.htm#nine). ' schema: type: string opc-request-id: description: 'This is a unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. ' schema: type: string content: application/json: schema: $ref: '#/components/schemas/WorkRequestSummaryCollection' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 404: $ref: '#/components/responses/404' 429: $ref: '#/components/responses/429' 500: $ref: '#/components/responses/500' default: $ref: '#/components/responses/default' summary: List Work Requests tags: - schedule x-related-resource: '#/definitions/WorkRequest' /workRequests/{workRequestId}: delete: description: This API cancels a work request. operationId: CancelWorkRequest parameters: - $ref: '#/components/parameters/WorkRequestIdPathParam' - $ref: '#/components/parameters/IfMatchHeader' - $ref: '#/components/parameters/RequestIdHeader' responses: 202: description: The work request will be canceled. headers: opc-request-id: description: 'This is a unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. ' schema: type: string 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 404: $ref: '#/components/responses/404' 429: $ref: '#/components/responses/429' 409: $ref: '#/components/responses/409' 412: $ref: '#/components/responses/412' 500: $ref: '#/components/responses/500' default: $ref: '#/components/responses/default' summary: Cancel work request tags: - schedule x-related-resource: '#/definitions/WorkRequest' get: description: This API gets the details of a work request. operationId: GetWorkRequest parameters: - $ref: '#/components/parameters/WorkRequestIdPathParam' - $ref: '#/components/parameters/RequestIdHeader' responses: 200: description: The work request was retrieved. headers: etag: description: 'For optimistic concurrency control. See `if-match`. ' schema: type: string opc-request-id: description: 'This is a unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. ' schema: type: string retry-after: description: This is a decimal number representing the number of seconds the client should wait before polling this endpoint again. schema: type: integer content: application/json: schema: $ref: '#/components/schemas/WorkRequest' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 404: $ref: '#/components/responses/404' 429: $ref: '#/components/responses/429' 500: $ref: '#/components/responses/500' default: $ref: '#/components/responses/default' summary: Get work request status tags: - schedule x-related-resource: '#/definitions/WorkRequest' /workRequests/{workRequestId}/errors: get: description: 'This API lists the errors for a work request. ' operationId: ListWorkRequestErrors parameters: - $ref: '#/components/parameters/WorkRequestIdPathParam' - $ref: '#/components/parameters/RequestIdHeader' - $ref: '#/components/parameters/PaginationTokenQueryParam' - $ref: '#/components/parameters/PaginationLimitQueryParam' - $ref: '#/components/parameters/WorkRequestLogAndErrorSortByQueryParam' - $ref: '#/components/parameters/SortOrderQueryParam' responses: 200: description: The list of work request errors was retrieved. headers: opc-next-page: description: 'When this header appears in the list pagination response, there are additional results pages to view. For important details about how pagination works, see [List Pagination](/iaas/Content/API/Concepts/usingapi.htm#nine). ' schema: type: string opc-request-id: description: 'This is a unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. ' schema: type: string content: application/json: schema: $ref: '#/components/schemas/WorkRequestErrorCollection' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 404: $ref: '#/components/responses/404' 429: $ref: '#/components/responses/429' 500: $ref: '#/components/responses/500' default: $ref: '#/components/responses/default' summary: List work request errors tags: - schedule x-related-resource: '#/definitions/WorkRequestError' /workRequests/{workRequestId}/logs: get: description: 'Lists the logs for a work request. ' operationId: ListWorkRequestLogs parameters: - $ref: '#/components/parameters/WorkRequestIdPathParam' - $ref: '#/components/parameters/RequestIdHeader' - $ref: '#/components/parameters/PaginationTokenQueryParam' - $ref: '#/components/parameters/PaginationLimitQueryParam' - $ref: '#/components/parameters/WorkRequestLogAndErrorSortByQueryParam' - $ref: '#/components/parameters/SortOrderQueryParam' responses: 200: description: This API displays the list of work request logs. headers: opc-next-page: description: 'When this header appears in the list pagination response, there are additional results pages to view. For important details about how pagination works, see [List Pagination](/iaas/Content/API/Concepts/usingapi.htm#nine). ' schema: type: string opc-request-id: description: 'This is a unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. ' schema: type: string content: application/json: schema: $ref: '#/components/schemas/WorkRequestLogEntryCollection' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 404: $ref: '#/components/responses/404' 429: $ref: '#/components/responses/429' 500: $ref: '#/components/responses/500' default: $ref: '#/components/responses/default' summary: List work request logs tags: - schedule x-related-resource: '#/definitions/WorkRequestLogEntry' components: schemas: ScheduleSummary: description: This is the summary information about a schedule. properties: action: description: This is the action that will be executed by the schedule. enum: - START_RESOURCE - STOP_RESOURCE type: string compartmentId: description: The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which the schedule is created maxLength: 255 minLength: 1 type: string definedTags: additionalProperties: additionalProperties: description: 'The value of the tag. Only the String type is supported. ' type: object description: 'This is a key-value pair representing a defined tag key and value, scoped to a namespace. Example: `{"CostCenter": "42"}` ' type: object description: 'These are defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations": {"CostCenter": "42"}}` ' type: object description: description: This is the description of the schedule. type: string displayName: description: This is a user-friendly name for the schedule. It does not have to be unique, and it's changeable. type: string freeformTags: additionalProperties: type: string description: 'These are free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` ' type: object id: description: The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the schedule type: string lastRunStatus: description: This is the status of the last work request. enum: - ACCEPTED - IN_PROGRESS - WAITING - NEEDS_ATTENTION - FAILED - SUCCEEDED - CANCELING - CANCELED type: string x-obmcs-top-level-enum: '#/definitions/OperationStatus' lifecycleState: description: This is the current state of the schedule. type: string x-obmcs-enumref: '#/definitions/Schedule/lifecycleState' recurrenceDetails: description: 'This is the frequency of recurrence of a schedule. The frequency field can either conform to RFC-5545 formatting or UNIX cron formatting for recurrences, based on the value specified by the recurrenceType field. ' example: FREQ=WEEKLY;BYDAY=MO,TU,WE,TH;BYHOUR=10;INTERVAL=1 type: string recurrenceType: description: Type of recurrence of a schedule enum: - CRON - ICAL type: string resourceFilters: description: This is a list of resources filters. The schedule will be applied to resources matching all of them. items: $ref: '#/components/schemas/ResourceFilter' maxItems: 5 type: array resources: description: This is the list of resources to which the scheduled operation is applied. items: $ref: '#/components/schemas/Resource' type: array systemTags: additionalProperties: additionalProperties: description: 'This is the value of the tag. Only the String type is supported. ' type: object description: 'This is a key-value pair representing a system tag key and value, scoped to a namespace. Example: `{"free-tier-retained": "true"}` ' type: object description: 'These are system tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` ' type: object timeCreated: description: 'This is the date and time the schedule was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). Example: `2016-08-25T21:10:29.600Z` ' format: date-time type: string timeEnds: description: 'This is the date and time the schedule ends, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339) Example: `2016-08-25T21:10:29.600Z` ' format: date-time type: string timeLastRun: description: 'This is the date and time the schedule runs last time, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). Example: `2016-08-25T21:10:29.600Z` ' format: date-time type: string timeNextRun: description: 'This is the date and time the schedule run the next time, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). Example: `2016-08-25T21:10:29.600Z` ' format: date-time type: string timeStarts: description: 'This is the date and time the schedule starts, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339) Example: `2016-08-25T21:10:29.600Z` ' format: date-time type: string timeUpdated: description: 'This is the date and time the schedule was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). Example: `2016-08-25T21:10:29.600Z` ' format: date-time type: string required: - id - compartmentId - recurrenceDetails - recurrenceType - lifecycleState - displayName - action type: object Error: description: Error information properties: code: description: This is a short error code that defines the error, meant for programmatic parsing. type: string message: description: A message is a human-readable error message. type: string required: - code - message Resource: description: 'This is the schedule resource entity. ' properties: id: description: This is the resource OCID. type: string metadata: additionalProperties: type: string description: "This is additional information that helps to identity the resource for the schedule.\n\n {\n \"id\": \"\"\n \"metadata\":\n {\n \"namespaceName\": \"sampleNamespace\",\n \"bucketName\": \"sampleBucket\"\n }\n }\n" type: object parameters: description: "This is the user input parameters to use when acting on the resource.\n\n{\n \"parameters\": [\n {\n \"parameterType\": \"BODY\",\n \"value\": {\n \"ip\": \"192.168.44.44\",\n \"memory\": \"1024\",\n \"synced_folders\": [\n {\n \"host_path\": \"data/\",\n \"guest_path\": \"/var/www\",\n \"type\": \"default\"\n }\n ],\n \"forwarded_ports\": []\n }\n },\n {\n \"parameterType\": \"PATH\",\n \"value\": {\n \"compartmentId\": \"ocid1.compartment.oc1..xxxxx\",\n \"instanceId\": \"ocid1.vcn.oc1..yyyy\"\n }\n },\n {\n \"parameterType\": \"QUERY\",\n \"value\": {\n \"limit\": \"10\",\n \"tenantId\": \"ocid1.tenant.oc1..zzzz\"\n }\n },\n {\n \"parameterType\": \"HEADER\",\n \"value\": {\n \"token\": \"xxxx\"\n }\n }\n ]\n}\n" items: $ref: '#/components/schemas/Parameter' maxItems: 4 type: array required: - id Parameter: description: 'This is a generic input parameter to use when acting on the resource. ' discriminator: propertyName: parameterType properties: parameterType: description: This is the parameter type on which the input parameter is defined enum: - HEADER - BODY - PATH - QUERY type: string required: - parameterType type: object WorkRequestResource: description: This is a resource created or operated on by a work request. properties: actionType: description: 'The way in which this resource is affected by the operation tracked in the work request. A resource being created, updated, or deleted remains in the IN_PROGRESS state until work is complete for that resource, at which point it transitions to CREATED, UPDATED, or DELETED, respectively. ' enum: - CREATED - UPDATED - DELETED - IN_PROGRESS - RELATED - FAILED type: string x-obmcs-top-level-enum: '#/definitions/ActionType' entityType: description: This is the resource type that the work request affects. type: string entityUri: description: This is the URI path that you can use for a GET request to access the resource metadata. type: string identifier: description: This is an [OCID](/iaas/Content/General/Concepts/identifiers.htm) or other unique identifier for the resource. type: string required: - actionType - entityType - identifier WorkRequestSummaryCollection: description: This is a list of work requests. Can contain both work requests and other information, such as metadata. properties: items: description: This is a list of work requests. items: $ref: '#/components/schemas/WorkRequestSummary' type: array required: - items type: object ResourceFilter: description: This is a generic filter used to decide which resources that the schedule be applied to. discriminator: propertyName: attribute properties: attribute: description: This is the resource attribute on which the threshold is defined. enum: - COMPARTMENT_ID - RESOURCE_TYPE - DEFINED_TAGS - TIME_CREATED - LIFECYCLE_STATE type: string required: - attribute type: object ResourceTypeCollection: description: 'This is the collection of resource types supported by resource scheduler. ' properties: items: description: This is the collection of resource types supported by resource scheduler. items: $ref: '#/components/schemas/ResourceType' type: array required: - items type: object WorkRequestErrorCollection: description: This is a list of work request errors. Can contain both errors and other information, such as metadata. properties: items: description: This is a list of work request errors. items: $ref: '#/components/schemas/WorkRequestError' type: array required: - items type: object ResourceType: description: 'This is a resource type supported by resource scheduler. ' properties: name: description: 'This is a resource type supported by resource scheduler. ' maxLength: 255 minLength: 1 type: string required: - name type: object CreateScheduleDetails: description: This is the data to create a schedule. properties: action: description: This is the action that will be executed by the schedule. enum: - START_RESOURCE - STOP_RESOURCE type: string compartmentId: description: The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which the schedule is created maxLength: 255 minLength: 1 type: string definedTags: additionalProperties: additionalProperties: description: 'The value of the tag. Only the String type is supported. ' type: object description: 'This is a key-value pair representing a defined tag key and value, scoped to a namespace. Example: `{"CostCenter": "42"}` ' type: object description: 'These are defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations": {"CostCenter": "42"}}` ' type: object description: description: This is the description of the schedule. type: string displayName: description: This is a user-friendly name for the schedule. It does not have to be unique, and it's changeable. type: string freeformTags: additionalProperties: type: string description: 'These are free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` ' type: object recurrenceDetails: description: 'This is the frequency of recurrence of a schedule. The frequency field can either conform to RFC-5545 formatting or UNIX cron formatting for recurrences, based on the value specified by the recurrenceType field. ' example: FREQ=WEEKLY;BYDAY=MO,TU,WE,TH;BYHOUR=10;INTERVAL=1 type: string recurrenceType: description: Type of recurrence of a schedule enum: - CRON - ICAL type: string resourceFilters: description: This is a list of resources filters. The schedule will be applied to resources matching all of them. items: $ref: '#/components/schemas/ResourceFilter' maxItems: 5 type: array resources: description: This is the list of resources to which the scheduled operation is applied. items: $ref: '#/components/schemas/Resource' type: array timeEnds: description: 'This is the date and time the schedule ends, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339) Example: `2016-08-25T21:10:29.600Z` ' format: date-time type: string timeStarts: description: 'This is the date and time the schedule starts, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339) Example: `2016-08-25T21:10:29.600Z` ' format: date-time type: string required: - compartmentId - action - recurrenceDetails - recurrenceType type: object WorkRequestSummary: description: This is the summary information about an asynchronous work request. properties: compartmentId: description: 'The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the work request. ' type: string id: description: The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the work request. type: string operationType: description: This is the asynchronous operation tracked by this work request. enum: - START_RESOURCE - STOP_RESOURCE - CHANGE_SCHEDULE_COMPARTMENT - CREATE_SCHEDULE - UPDATE_SCHEDULE type: string x-obmcs-top-level-enum: '#/definitions/OperationType' percentComplete: description: 'Shows the progress of the operation tracked by the work request, as a percentage of the total work that must be performed. ' format: float type: number resources: description: The resources that are affected by this work request. items: $ref: '#/components/schemas/WorkRequestResource' type: array status: description: This is the status of the work request. enum: - ACCEPTED - IN_PROGRESS - WAITING - NEEDS_ATTENTION - FAILED - SUCCEEDED - CANCELING - CANCELED type: string x-obmcs-top-level-enum: '#/definitions/OperationStatus' timeAccepted: description: 'This is the date and time the work request was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). ' format: date-time type: string timeFinished: description: 'This is the date and time the work request was finished, in the format defined by [RFC 3339](https://tools.ietf.org/rfc/rfc3339). ' format: date-time type: string timeStarted: description: 'This is the date and time the work request was started, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). ' format: date-time type: string timeUpdated: description: 'This is the date and time the work request was updated, in the format defined by [RFC 3339](https://tools.ietf.org/rfc/rfc3339). ' format: date-time type: string required: - status - id - compartmentId - resources - percentComplete - timeAccepted WorkRequestError: description: This is an error encountered while performing an operation that is tracked by a work request. properties: code: description: 'A machine-usable code for the error that occurred. For a list of error codes, see [API Errors](/iaas/Content/API/References/apierrors.htm). ' type: string message: description: This is a human-readable error message. type: string timestamp: description: 'This is the date and time the error occurred, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). ' format: date-time type: string required: - code - message - timestamp ChangeScheduleCompartmentDetails: description: This is the configuration details for the move operation. properties: compartmentId: description: 'The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the schedule to. ' maxLength: 255 minLength: 1 type: string required: - compartmentId type: object UpdateScheduleDetails: description: This is the data to update a schedule. properties: action: description: This is the action that will be executed by the schedule. enum: - START_RESOURCE - STOP_RESOURCE type: string definedTags: additionalProperties: additionalProperties: description: 'The value of the tag. Only the String type is supported. ' type: object description: 'This is a key-value pair representing a defined tag key and value, scoped to a namespace. Example: `{"CostCenter": "42"}` ' type: object description: 'These are defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations": {"CostCenter": "42"}}` ' type: object description: description: This is the description of the schedule. type: string displayName: description: This is a user-friendly name for the schedule. It does not have to be unique, and it's changeable. type: string freeformTags: additionalProperties: type: string description: 'These are free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` ' type: object recurrenceDetails: description: 'This is the frequency of recurrence of a schedule. The frequency field can either conform to RFC-5545 formatting or UNIX cron formatting for recurrences, based on the value specified by the recurrenceType field. ' example: FREQ=WEEKLY;BYDAY=MO,TU,WE,TH;BYHOUR=10;INTERVAL=1 type: string recurrenceType: description: Type of recurrence of a schedule enum: - CRON - ICAL type: string resourceFilters: description: This is a list of resources filters. The schedule will be applied to resources matching all of them. items: $ref: '#/components/schemas/ResourceFilter' maxItems: 5 type: array resources: description: This is the list of resources to which the scheduled operation is applied. items: $ref: '#/components/schemas/Resource' type: array timeEnds: description: 'This is the date and time the schedule ends, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339) Example: `2016-08-25T21:10:29.600Z` ' format: date-time type: string timeStarts: description: 'This is the date and time the schedule starts, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339) Example: `2016-08-25T21:10:29.600Z` ' format: date-time type: string type: object ScheduleCollection: description: This is the list of schedule items. properties: items: description: This is the list of schedule items. items: $ref: '#/components/schemas/ScheduleSummary' type: array required: - items type: object Schedule: description: "A Schedule describes the date and time when an operation will be or has been applied to a set of resources. You must specify either \nthe resources directly or provide a set of resource filters to select the resources.\n\nTo use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, contact your\nadministrator. If you're an administrator who needs to write policies to give users access, see\n[Getting Started with Policies](/iaas/Content/Identity/policiesgs/get-started-with-policies.htm).\n" properties: action: description: This is the action that will be executed by the schedule. enum: - START_RESOURCE - STOP_RESOURCE type: string compartmentId: description: The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which the schedule is created maxLength: 255 minLength: 1 type: string definedTags: additionalProperties: additionalProperties: description: 'The value of the tag. Only the String type is supported. ' type: object description: 'This is a key-value pair representing a defined tag key and value, scoped to a namespace. Example: `{"CostCenter": "42"}` ' type: object description: 'These are defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations": {"CostCenter": "42"}}` ' type: object description: description: This is the description of the schedule. type: string displayName: description: This is a user-friendly name for the schedule. It does not have to be unique, and it's changeable. type: string freeformTags: additionalProperties: type: string description: 'These are free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` ' type: object id: description: The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the schedule type: string lastRunStatus: description: This is the status of the last work request. enum: - ACCEPTED - IN_PROGRESS - WAITING - NEEDS_ATTENTION - FAILED - SUCCEEDED - CANCELING - CANCELED type: string x-obmcs-top-level-enum: '#/definitions/OperationStatus' lifecycleState: description: This is the current state of a schedule. enum: - ACTIVE - INACTIVE - CREATING - UPDATING - DELETING - DELETED - FAILED type: string recurrenceDetails: description: 'This is the frequency of recurrence of a schedule. The frequency field can either conform to RFC-5545 formatting or UNIX cron formatting for recurrences, based on the value specified by the recurrenceType field. ' example: FREQ=WEEKLY;BYDAY=MO,TU,WE,TH;BYHOUR=10;INTERVAL=1 type: string recurrenceType: description: Type of recurrence of a schedule enum: - CRON - ICAL type: string resourceFilters: description: This is a list of resources filters. The schedule will be applied to resources matching all of them. items: $ref: '#/components/schemas/ResourceFilter' maxItems: 5 type: array resources: description: This is the list of resources to which the scheduled operation is applied. items: $ref: '#/components/schemas/Resource' type: array systemTags: additionalProperties: additionalProperties: description: 'This is the value of the tag. Only the String type is supported. ' type: object description: 'This is a key-value pair representing a system tag key and value, scoped to a namespace. Example: `{"free-tier-retained": "true"}` ' type: object description: 'These are system tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` ' type: object timeCreated: description: 'This is the date and time the schedule was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). Example: `2016-08-25T21:10:29.600Z` ' format: date-time type: string timeEnds: description: 'This is the date and time the schedule ends, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339) Example: `2016-08-25T21:10:29.600Z` ' format: date-time type: string timeLastRun: description: 'This is the date and time the schedule runs last time, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). Example: `2016-08-25T21:10:29.600Z` ' format: date-time type: string timeNextRun: description: 'This is the date and time the schedule run the next time, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). Example: `2016-08-25T21:10:29.600Z` ' format: date-time type: string timeStarts: description: 'This is the date and time the schedule starts, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339) Example: `2016-08-25T21:10:29.600Z` ' format: date-time type: string timeUpdated: description: 'This is the date and time the schedule was updated, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). Example: `2016-08-25T21:10:29.600Z` ' format: date-time type: string required: - id - compartmentId - lifecycleState - action - timeCreated - recurrenceDetails - recurrenceType - displayName - freeformTags - definedTags type: object WorkRequestLogEntry: description: This is a log message from performing an operation that is tracked by a work request. properties: message: description: This is a human-readable log message. type: string timestamp: description: 'This is the date and time the log message was written, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). ' format: date-time type: string required: - message - timestamp WorkRequestLogEntryCollection: description: This is a list of work request logs. Can contain both logs and other information, such as metadata. properties: items: description: This is a list of work request log entries. items: $ref: '#/components/schemas/WorkRequestLogEntry' type: array required: - items type: object WorkRequest: description: 'This is an asynchronous work request. Work requests help you monitor long-running operations. When you start a long-running operation, the service creates a work request. A work request is an activity log that lets you track each step in the operation''s progress. Each work request has an OCID that lets you interact with it programmatically and use it for automation. ' properties: compartmentId: description: 'The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the work request. ' type: string id: description: The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the work request. type: string operationType: description: The asynchronous operation tracked by this work request. enum: - START_RESOURCE - STOP_RESOURCE - CHANGE_SCHEDULE_COMPARTMENT - CREATE_SCHEDULE - UPDATE_SCHEDULE type: string x-obmcs-top-level-enum: '#/definitions/OperationType' percentComplete: description: 'Shows the progress of the operation tracked by the work request, as a percentage of the total work that must be performed. ' format: float type: number resources: description: This is the resources that are affected by the work request. items: $ref: '#/components/schemas/WorkRequestResource' type: array status: description: This is the status of the work request. enum: - ACCEPTED - IN_PROGRESS - WAITING - NEEDS_ATTENTION - FAILED - SUCCEEDED - CANCELING - CANCELED type: string x-obmcs-top-level-enum: '#/definitions/OperationStatus' timeAccepted: description: 'This is the date and time the work request was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). ' format: date-time type: string timeFinished: description: 'This is the date and time the work request was finished, in the format defined by [RFC 3339](https://tools.ietf.org/rfc/rfc3339). ' format: date-time type: string timeStarted: description: 'This is the date and time the work request was started, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). ' format: date-time type: string timeUpdated: description: 'This is the date and time the work request was updated, in the format defined by [RFC 3339](https://tools.ietf.org/rfc/rfc3339). ' format: date-time type: string required: - operationType - status - id - compartmentId - resources - percentComplete - timeAccepted parameters: PaginationTokenQueryParam: description: 'This used for list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see [List Pagination](/iaas/Content/API/Concepts/usingapi.htm#nine). ' in: query name: page schema: type: string minLength: 1 SortByQueryParam: description: 'This is the field to sort by. You can provide only one sort order. The default order for `timeCreated` is descending. The default order for `displayName` is ascending. ' in: query name: sortBy schema: type: string enum: - timeCreated - displayName - lifecycleState - state default: timeCreated ScheduleIdentifierQueryParam: description: This is the [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the schedule. in: query name: scheduleId x-default-description: 'null' schema: type: string ScheduleIdentifierPathParam: description: This is the [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the schedule. in: path name: scheduleId required: true schema: type: string ResourceIdentifierQueryParam: description: This is the [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the resource affected by the work request. in: query name: resourceId x-default-description: 'null' schema: type: string CompartmentIdQueryParam: description: This is the [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. in: query name: compartmentId x-default-description: 'null' schema: type: string IfMatchHeader: description: 'This is used for optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource''s current etag value. ' in: header name: if-match required: false schema: type: string WorkRequestStatusQueryParam: description: This is a filter to return only the resources that match the given lifecycle state. in: query name: status required: false x-default-description: 'null' x-obmcs-top-level-enum: '#/definitions/OperationStatus' schema: type: string enum: - ACCEPTED - IN_PROGRESS - WAITING - NEEDS_ATTENTION - FAILED - SUCCEEDED - CANCELING - CANCELED PaginationLimitQueryParam: description: 'For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see [List Pagination](/iaas/Content/API/Concepts/usingapi.htm#nine). ' in: query name: limit schema: type: integer default: 10 maximum: 1000 minimum: 1 LifecycleStateQueryParam: description: 'This is a filter to return only resources that match the given lifecycle state. The state value is case-insensitive. ' in: query name: lifecycleState required: false x-default-description: 'null' x-obmcs-enumref: '#/definitions/Schedule/lifecycleState' schema: type: string WorkRequestIdPathParam: description: This is the [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. in: path name: workRequestId required: true schema: type: string SortOrderQueryParam: description: This is the sort order to use, either ascending (`ASC`) or descending (`DESC`). in: query name: sortOrder x-default-description: 'This is the default value depends upon `sortBy`, and in general is `DESC` when sorting by time and `ASC` otherwise. ' x-obmcs-top-level-enum: '#/definitions/SortOrder' schema: type: string enum: - ASC - DESC WorkRequestIdQueryParam: description: This is the [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. in: query name: workRequestId x-default-description: 'null' schema: type: string WorkRequestLogAndErrorSortByQueryParam: description: 'This is the field to sort by. Only one sort order may be provided. Default order for `timestamp` is descending. ' in: query name: sortBy schema: type: string enum: - timestamp default: timestamp RetryTokenHeader: description: 'This is a token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of running that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and removed from the system, then a retry of the original creation request might be rejected. ' in: header name: opc-retry-token required: false schema: type: string maxLength: 64 minLength: 1 DisplayNameQueryParam: description: This is a filter to return only resources that match the given display name exactly. in: query name: displayName x-default-description: 'null' schema: type: string maxLength: 255 minLength: 1 WorkRequestSortByQueryParam: description: 'This is the field to sort by. Only one sort order may be provided. Default order for `timeAccepted` is descending. ' in: query name: sortBy schema: type: string enum: - timeAccepted default: timeAccepted RequestIdHeader: description: 'This is a unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. The only valid characters for request IDs are letters, numbers, underscore, and dash. ' in: header name: opc-request-id schema: type: string responses: default: description: Unknown Error headers: opc-request-id: description: 'This is a unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. ' schema: type: string content: application/json: schema: $ref: '#/components/schemas/Error' x-anchors: x-headers: etag: description: 'For optimistic concurrency control. See `if-match`. ' type: string opc-next-page: description: 'When this header appears in the list pagination response, there are additional results pages to view. For important details about how pagination works, see [List Pagination](/iaas/Content/API/Concepts/usingapi.htm#nine). ' type: string opc-request-id: description: 'This is a unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. ' type: string opc-work-request-id: description: 'The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. Use GetWorkRequest with this ID to track the status of the request. ' type: string retry-after: description: This is a decimal number representing the number of seconds the client should wait before polling this endpoint again. type: integer x-properties: definedTags: additionalProperties: additionalProperties: description: 'The value of the tag. Only the String type is supported. ' type: object description: 'This is a key-value pair representing a defined tag key and value, scoped to a namespace. Example: `{"CostCenter": "42"}` ' type: object description: 'These are defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations": {"CostCenter": "42"}}` ' type: object freeformTags: additionalProperties: type: string description: 'These are free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` ' type: object systemTags: additionalProperties: additionalProperties: description: 'This is the value of the tag. Only the String type is supported. ' type: object description: 'This is a key-value pair representing a system tag key and value, scoped to a namespace. Example: `{"free-tier-retained": "true"}` ' type: object description: 'These are system tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` ' type: object x-service-name: resource-scheduler x-splat-groovy-expressions: get-schedule-compartment-id: downstream.invoke('resource-scheduler', 'GetSchedule', request.resourceId).compartmentId get-schedule-display-name: downstream.invoke('resource-scheduler', 'GetSchedule', request.resourceId).displayName get-workrequest-compartment-id: downstream.invoke('resource-scheduler', 'GetWorkRequest', request.resourceId).compartmentId x-obmcs-client-retries-enabled: true x-oracle-package: com.oracle.pic.resourcescheduler