scheduled_actions
Creates, updates, deletes, gets or lists a scheduled_actions resource.
Overview​
| Name | scheduled_actions |
| Type | Resource |
| Id | oci.database.scheduled_actions |
Fields​
The following fields are returned by SELECT queries:
- get
- list
The Scheduled Action details.
| Name | Datatype | Description |
|---|---|---|
id | string | The [OCID](/Content/General/Concepts/identifiers.htm) of the Scheduled Action. |
actionMembers | array | The list of action members in a scheduled action. |
actionOrder | integer | The order of the scheduled action. |
actionParams | object | Map<ParamName, ParamValue> where a key value pair describes the specific action parameter. Example: {"count": "3"} |
actionType | string | The 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) |
compartmentId | string | The [OCID](/Content/General/Concepts/identifiers.htm) of the compartment. |
definedTags | object | Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm). |
displayName | string | The display name of the Scheduled Action. |
estimatedTimeInMins | integer | The estimated patching time for the scheduled action. |
freeformTags | object | 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](/Content/General/Concepts/resourcetags.htm). Example: {"Department": "Finance"} |
lifecycleState | string | The 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) |
schedulingPlanId | string | The [OCID](/Content/General/Concepts/identifiers.htm) of the Scheduling Plan. |
schedulingWindowId | string | The [OCID](/Content/General/Concepts/identifiers.htm) of the Scheduling Window. |
systemTags | object | System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm). |
timeCreated | string (date-time) | The date and time the Scheduled Action Resource was created. |
timeUpdated | string (date-time) | The date and time the Scheduled Action Resource was updated. |
A list of the Scheduled Action resources in the specified compartment.<br />
| Name | Datatype | Description |
|---|---|---|
id | string | The [OCID](/Content/General/Concepts/identifiers.htm) of the Scheduled Action. |
actionMembers | array | The list of action members in a scheduled action. |
actionOrder | integer | The order of the scheduled action. |
actionParams | object | Map<ParamName, ParamValue> where a key value pair describes the specific action parameter. Example: {"count": "3"} |
actionType | string | The 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) |
compartmentId | string | The [OCID](/Content/General/Concepts/identifiers.htm) of the compartment. |
definedTags | object | Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm). |
displayName | string | The display name of the Scheduled Action. |
estimatedTimeInMins | integer | The estimated patching time for the scheduled action. |
freeformTags | object | 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](/Content/General/Concepts/resourcetags.htm). Example: {"Department": "Finance"} |
lifecycleState | string | The 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) |
schedulingPlanId | string | The [OCID](/Content/General/Concepts/identifiers.htm) of the Scheduling Plan. |
schedulingWindowId | string | The [OCID](/Content/General/Concepts/identifiers.htm) of the Scheduling Window. |
systemTags | object | System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm). |
timeCreated | string (date-time) | The date and time the Scheduled Action Resource was created. |
timeUpdated | string (date-time) | The date and time the Scheduled Action Resource was updated. |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | scheduledActionId, region | opc-request-id | Gets information about the specified Scheduled Action.<br /> |
list | select | compartmentId, region | limit, page, opc-request-id, sortOrder, serviceType, schedulingPlanId, displayName, sortBy, id, lifecycleState | Lists the Scheduled Action resources in the specified compartment.<br /> |
create | insert | region, actionOrder, actionType, schedulingWindowId, schedulingPlanId, compartmentId | opc-retry-token, opc-request-id | Creates a Scheduled Action resource.<br /> |
update | update | scheduledActionId, region | if-match, opc-request-id | Updates the Scheduled Action resource.<br /> |
delete | delete | scheduledActionId, region | if-match, opc-request-id | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
compartmentId | string | The compartment [OCID](/Content/General/Concepts/identifiers.htm). |
region | string | OCI 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) |
scheduledActionId | string | The Scheduled Action [OCID](/Content/General/Concepts/identifiers.htm). |
displayName | string | A filter to return only resources that match the entire display name given. The match is not case sensitive. |
id | string | A filter to return only resources that match the given Scheduled Action id exactly. |
if-match | string | 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. |
lifecycleState | string | A filter to return only resources that match the given lifecycle state exactly. |
limit | integer | The maximum number of items to return per page. |
opc-request-id | string | Unique identifier for the request. |
opc-retry-token | string | A 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). |
page | string | The pagination token to continue listing from. |
schedulingPlanId | string | A filter to return only resources that match the given scheduling policy id exactly. |
serviceType | string | A filter to return only resources that match the given service type exactly. |
sortBy | string | The field to sort by. You can provide one sort order (sortOrder). Default order for TIMECREATED is descending. |
sortOrder | string | The sort order to use, either ascending (ASC) or descending (DESC). |
SELECT examples​
- get
- list
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 }}'
;
Lists the Scheduled Action resources in the specified compartment.<br />
SELECT
id,
actionMembers,
actionOrder,
actionParams,
actionType,
compartmentId,
definedTags,
displayName,
estimatedTimeInMins,
freeformTags,
lifecycleState,
schedulingPlanId,
schedulingWindowId,
systemTags,
timeCreated,
timeUpdated
FROM oci.database.scheduled_actions
WHERE compartmentId = '{{ compartmentId }}' -- required
AND region = '{{ region }}' -- required
AND limit = '{{ limit }}'
AND page = '{{ page }}'
AND opc-request-id = '{{ opc-request-id }}'
AND sortOrder = '{{ sortOrder }}'
AND serviceType = '{{ serviceType }}'
AND schedulingPlanId = '{{ schedulingPlanId }}'
AND displayName = '{{ displayName }}'
AND sortBy = '{{ sortBy }}'
AND id = '{{ id }}'
AND lifecycleState = '{{ lifecycleState }}'
;
INSERT examples​
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: scheduled_actions
props:
- name: region
value: "{{ region }}"
description: Required parameter for the scheduled_actions resource.
- name: actionMembers
description: |
The list of action members in a scheduled action.
value:
- estimatedTimeInMins: {{ estimatedTimeInMins }}
memberId: "{{ memberId }}"
memberOrder: {{ memberOrder }}
- name: actionOrder
value:
- "{{ actionOrder }}"
description: |
The array of [OCID](/Content/General/Concepts/identifiers.htm) of the Scheduled Action and order paris.
- name: actionParams
value: "{{ actionParams }}"
description: |
Map<ParamName, ParamValue> where a key value pair describes the specific action parameter.
Example: `{"count": "3"}`
- name: actionType
value: "{{ actionType }}"
description: |
The type of the scheduled action being performed
valid_values: ['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
- name: compartmentId
value: "{{ compartmentId }}"
description: |
The [OCID](/Content/General/Concepts/identifiers.htm) of the compartment.
- name: definedTags
value: "{{ definedTags }}"
description: |
Defined tags for this resource. Each key is predefined and scoped to a namespace.
For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm).
- name: freeformTags
value: "{{ freeformTags }}"
description: |
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](/Content/General/Concepts/resourcetags.htm).
Example: `{"Department": "Finance"}`
- name: schedulingPlanId
value: "{{ schedulingPlanId }}"
description: |
The [OCID](/Content/General/Concepts/identifiers.htm) of the Scheduling Plan.
- name: schedulingWindowId
value: "{{ schedulingWindowId }}"
description: |
The [OCID](/Content/General/Concepts/identifiers.htm) of the Scheduling Window.
- name: opc-retry-token
value: "{{ opc-retry-token }}"
description: A 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).
description: A 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).
- name: opc-request-id
value: "{{ opc-request-id }}"
description: Unique identifier for the request.
description: Unique identifier for the request.
UPDATE examples​
- update
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​
- delete
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 }}'
;