Skip to main content

scheduled_actions

Creates, updates, deletes, gets or lists a scheduled_actions resource.

Overview​

Namescheduled_actions
TypeResource
Idoci.database.scheduled_actions

Fields​

The following fields are returned by SELECT queries:

The Scheduled Action details.

NameDatatypeDescription
idstringThe [OCID](/Content/General/Concepts/identifiers.htm) of the Scheduled Action.
actionMembersarrayThe list of action members in a scheduled action.
actionOrderintegerThe order of the scheduled action.
actionParamsobjectMap<ParamName, ParamValue> where a key value pair describes the specific action parameter. Example: &#123;"count": "3"&#125;
actionTypestringThe type of the scheduled action being performed (DB_SERVER_FULL_SOFTWARE_UPDATE, STORAGE_SERVER_FULL_SOFTWARE_UPDATE, NETWORK_SWITCH_FULL_SOFTWARE_UPDATE, DB_SERVER_ONLINE_SOFTWARE_UPDATE) (default: DB_SERVER_FULL_SOFTWARE_UPDATE)
compartmentIdstringThe [OCID](/Content/General/Concepts/identifiers.htm) of the compartment.
definedTagsobjectDefined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm).
displayNamestringThe display name of the Scheduled Action.
estimatedTimeInMinsintegerThe estimated patching time for the scheduled action.
freeformTagsobjectFree-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](/Content/General/Concepts/resourcetags.htm). Example: &#123;"Department": "Finance"&#125;
lifecycleStatestringThe current state of the Scheduled Action. Valid states are CREATING, NEEDS_ATTENTION, AVAILABLE, UPDATING, FAILED, DELETING and DELETED. (CREATING, NEEDS_ATTENTION, AVAILABLE, UPDATING, FAILED, DELETING, DELETED)
schedulingPlanIdstringThe [OCID](/Content/General/Concepts/identifiers.htm) of the Scheduling Plan.
schedulingWindowIdstringThe [OCID](/Content/General/Concepts/identifiers.htm) of the Scheduling Window.
systemTagsobjectSystem tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm).
timeCreatedstring (date-time)The date and time the Scheduled Action Resource was created.
timeUpdatedstring (date-time)The date and time the Scheduled Action Resource was updated.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectscheduledActionId, regionopc-request-idGets information about the specified Scheduled Action.<br />
listselectcompartmentId, regionlimit, page, opc-request-id, sortOrder, serviceType, schedulingPlanId, displayName, sortBy, id, lifecycleStateLists the Scheduled Action resources in the specified compartment.<br />
createinsertregion, actionOrder, actionType, schedulingWindowId, schedulingPlanId, compartmentIdopc-retry-token, opc-request-idCreates a Scheduled Action resource.<br />
updateupdatescheduledActionId, regionif-match, opc-request-idUpdates the Scheduled Action resource.<br />
deletedeletescheduledActionId, regionif-match, opc-request-idDeletes the scheduled action.<br />

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
compartmentIdstringThe compartment [OCID](/Content/General/Concepts/identifiers.htm).
regionstringOCI region identifier (e.g. us-ashburn-1, ap-sydney-1); resolves from OCI_REGION when not supplied in the query. (default: us-ashburn-1, x-stackQL-envVar: OCI_REGION)
scheduledActionIdstringThe Scheduled Action [OCID](/Content/General/Concepts/identifiers.htm).
displayNamestringA filter to return only resources that match the entire display name given. The match is not case sensitive.
idstringA filter to return only resources that match the given Scheduled Action id exactly.
if-matchstringFor 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.
lifecycleStatestringA filter to return only resources that match the given lifecycle state exactly.
limitintegerThe maximum number of items to return per page.
opc-request-idstringUnique identifier for the request.
opc-retry-tokenstringA token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing 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 purged from the system, then a retry of the original creation request may be rejected).
pagestringThe pagination token to continue listing from.
schedulingPlanIdstringA filter to return only resources that match the given scheduling policy id exactly.
serviceTypestringA filter to return only resources that match the given service type exactly.
sortBystringThe field to sort by. You can provide one sort order (sortOrder). Default order for TIMECREATED is descending.
sortOrderstringThe sort order to use, either ascending (ASC) or descending (DESC).

SELECT examples​

Gets information about the specified Scheduled Action.<br />

SELECT
id,
actionMembers,
actionOrder,
actionParams,
actionType,
compartmentId,
definedTags,
displayName,
estimatedTimeInMins,
freeformTags,
lifecycleState,
schedulingPlanId,
schedulingWindowId,
systemTags,
timeCreated,
timeUpdated
FROM oci.database.scheduled_actions
WHERE scheduledActionId = '{{ scheduledActionId }}' -- required
AND region = '{{ region }}' -- required
AND opc-request-id = '{{ opc-request-id }}'
;

INSERT examples​

Creates a Scheduled Action resource.<br />

INSERT INTO oci.database.scheduled_actions (
actionMembers,
actionOrder,
actionParams,
actionType,
compartmentId,
definedTags,
freeformTags,
schedulingPlanId,
schedulingWindowId,
region,
opc-retry-token,
opc-request-id
)
SELECT
'{{ actionMembers }}',
'{{ actionOrder }}' /* required */,
'{{ actionParams }}',
'{{ actionType }}' /* required */,
'{{ compartmentId }}' /* required */,
'{{ definedTags }}',
'{{ freeformTags }}',
'{{ schedulingPlanId }}' /* required */,
'{{ schedulingWindowId }}' /* required */,
'{{ region }}',
'{{ opc-retry-token }}',
'{{ opc-request-id }}'
RETURNING
id,
actionMembers,
actionOrder,
actionParams,
actionType,
compartmentId,
definedTags,
displayName,
estimatedTimeInMins,
freeformTags,
lifecycleState,
schedulingPlanId,
schedulingWindowId,
systemTags,
timeCreated,
timeUpdated
;

UPDATE examples​

Updates the Scheduled Action resource.<br />

UPDATE oci.database.scheduled_actions
SET
actionMembers = '{{ actionMembers }}',
actionParams = '{{ actionParams }}'
WHERE
scheduledActionId = '{{ scheduledActionId }}' --required
AND region = '{{ region }}' --required
AND if-match = '{{ if-match}}'
AND opc-request-id = '{{ opc-request-id}}'
RETURNING
id,
actionMembers,
actionOrder,
actionParams,
actionType,
compartmentId,
definedTags,
displayName,
estimatedTimeInMins,
freeformTags,
lifecycleState,
schedulingPlanId,
schedulingWindowId,
systemTags,
timeCreated,
timeUpdated;

DELETE examples​

Deletes the scheduled action.<br />

DELETE FROM oci.database.scheduled_actions
WHERE scheduledActionId = '{{ scheduledActionId }}' --required
AND region = '{{ region }}' --required
AND if-match = '{{ if-match }}'
AND opc-request-id = '{{ opc-request-id }}'
;