scheduling_policies
Creates, updates, deletes, gets or lists a scheduling_policies resource.
Overview​
| Name | scheduling_policies |
| Type | Resource |
| Id | oci.database.scheduling_policies |
Fields​
The following fields are returned by SELECT queries:
- get
- list
The Scheduling Policy details.
| Name | Datatype | Description |
|---|---|---|
id | string | The [OCID](/Content/General/Concepts/identifiers.htm) of the Scheduling Policy. |
cadence | string | The cadence period. (HALFYEARLY, QUARTERLY, MONTHLY) |
cadenceStartMonth | object | Month of the year. |
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 user-friendly name for the Scheduling Policy. The name does not need to be unique. |
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"} |
lifecycleDetails | string | Additional information about the current lifecycle state. |
lifecycleState | string | The current state of the Scheduling Policy. Valid states are CREATING, NEEDS_ATTENTION, ACTIVE, UPDATING, FAILED, DELETING and DELETED. (CREATING, NEEDS_ATTENTION, AVAILABLE, UPDATING, FAILED, DELETING, DELETED) |
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 Scheduling Policy was created. |
timeNextWindowStarts | string (date-time) | The date and time of the next scheduling window associated with the schedulingPolicy is planned to start. |
timeUpdated | string (date-time) | The last date and time that the Scheduling Policy was updated. |
Details of a Scheduling Policy.<br />
| Name | Datatype | Description |
|---|---|---|
id | string | The [OCID](/Content/General/Concepts/identifiers.htm) of the Scheduling Policy. |
cadence | string | The cadence period. (HALFYEARLY, QUARTERLY, MONTHLY) |
cadenceStartMonth | object | Month of the year. |
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 user-friendly name for the Scheduling Policy. The name does not need to be unique. |
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"} |
lifecycleDetails | string | Additional information about the current lifecycle state. |
lifecycleState | string | The current state of the Scheduling Policy. Valid states are CREATING, NEEDS_ATTENTION, ACTIVE, UPDATING, FAILED, DELETING and DELETED. (CREATING, NEEDS_ATTENTION, AVAILABLE, UPDATING, FAILED, DELETING, DELETED) |
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 Scheduling Policy was created. |
timeNextWindowStarts | string (date-time) | The date and time of the next scheduling window associated with the schedulingPolicy is planned to start. |
timeUpdated | string (date-time) | The last date and time that the Scheduling Policy was updated. |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | schedulingPolicyId, region | opc-request-id | Gets information about the specified Scheduling Policy.<br /> |
list | select | compartmentId, region | limit, page, opc-request-id, sortBy, sortOrder, lifecycleState, displayName, cadence | Lists the Scheduling Policy resources in the specified compartment.<br /> |
create | insert | region, compartmentId, displayName, cadence | opc-retry-token, opc-request-id | Creates a Scheduling Policy resource.<br /> |
update | update | schedulingPolicyId, region | if-match, opc-request-id | Updates the Scheduling Policy resource.<br /> |
delete | delete | schedulingPolicyId, region | if-match, opc-request-id | Deletes the scheduling policy.<br /> |
change_compartment | exec | schedulingPolicyId, region, compartmentId | if-match, opc-request-id, opc-retry-token | Moves an scheduling policy resource to another compartment.<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) |
schedulingPolicyId | string | The Scheduling Policy [OCID](/Content/General/Concepts/identifiers.htm). |
cadence | string | A filter to return only resources that match the given cadence period exactly. |
displayName | string | A filter to return only resources that match the entire display name given. The match is not case sensitive. |
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. |
sortBy | string | The field to sort by. You can provide one sort order (sortOrder). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive. |
sortOrder | string | The sort order to use, either ascending (ASC) or descending (DESC). |
SELECT examples​
- get
- list
Gets information about the specified Scheduling Policy.<br />
SELECT
id,
cadence,
cadenceStartMonth,
compartmentId,
definedTags,
displayName,
freeformTags,
lifecycleDetails,
lifecycleState,
systemTags,
timeCreated,
timeNextWindowStarts,
timeUpdated
FROM oci.database.scheduling_policies
WHERE schedulingPolicyId = '{{ schedulingPolicyId }}' -- required
AND region = '{{ region }}' -- required
AND opc-request-id = '{{ opc-request-id }}'
;
Lists the Scheduling Policy resources in the specified compartment.<br />
SELECT
id,
cadence,
cadenceStartMonth,
compartmentId,
definedTags,
displayName,
freeformTags,
lifecycleDetails,
lifecycleState,
systemTags,
timeCreated,
timeNextWindowStarts,
timeUpdated
FROM oci.database.scheduling_policies
WHERE compartmentId = '{{ compartmentId }}' -- required
AND region = '{{ region }}' -- required
AND limit = '{{ limit }}'
AND page = '{{ page }}'
AND opc-request-id = '{{ opc-request-id }}'
AND sortBy = '{{ sortBy }}'
AND sortOrder = '{{ sortOrder }}'
AND lifecycleState = '{{ lifecycleState }}'
AND displayName = '{{ displayName }}'
AND cadence = '{{ cadence }}'
;
INSERT examples​
- create
- Manifest
Creates a Scheduling Policy resource.<br />
INSERT INTO oci.database.scheduling_policies (
cadence,
cadenceStartMonth,
compartmentId,
definedTags,
displayName,
freeformTags,
region,
opc-retry-token,
opc-request-id
)
SELECT
'{{ cadence }}' /* required */,
'{{ cadenceStartMonth }}',
'{{ compartmentId }}' /* required */,
'{{ definedTags }}',
'{{ displayName }}' /* required */,
'{{ freeformTags }}',
'{{ region }}',
'{{ opc-retry-token }}',
'{{ opc-request-id }}'
RETURNING
id,
cadence,
cadenceStartMonth,
compartmentId,
definedTags,
displayName,
freeformTags,
lifecycleDetails,
lifecycleState,
systemTags,
timeCreated,
timeNextWindowStarts,
timeUpdated
;
# Description fields are for documentation purposes
- name: scheduling_policies
props:
- name: region
value: "{{ region }}"
description: Required parameter for the scheduling_policies resource.
- name: cadence
value: "{{ cadence }}"
description: |
The cadence period.
valid_values: ['HALFYEARLY', 'QUARTERLY', 'MONTHLY']
- name: cadenceStartMonth
description: |
Month of the year.
value:
name: "{{ name }}"
- 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: displayName
value: "{{ displayName }}"
description: |
The user-friendly name for the Scheduling Policy. The name does not need to be unique.
- 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: 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 Scheduling Policy resource.<br />
UPDATE oci.database.scheduling_policies
SET
cadence = '{{ cadence }}',
cadenceStartMonth = '{{ cadenceStartMonth }}',
definedTags = '{{ definedTags }}',
displayName = '{{ displayName }}',
freeformTags = '{{ freeformTags }}'
WHERE
schedulingPolicyId = '{{ schedulingPolicyId }}' --required
AND region = '{{ region }}' --required
AND if-match = '{{ if-match}}'
AND opc-request-id = '{{ opc-request-id}}'
RETURNING
id,
cadence,
cadenceStartMonth,
compartmentId,
definedTags,
displayName,
freeformTags,
lifecycleDetails,
lifecycleState,
systemTags,
timeCreated,
timeNextWindowStarts,
timeUpdated;
DELETE examples​
- delete
Deletes the scheduling policy.<br />
DELETE FROM oci.database.scheduling_policies
WHERE schedulingPolicyId = '{{ schedulingPolicyId }}' --required
AND region = '{{ region }}' --required
AND if-match = '{{ if-match }}'
AND opc-request-id = '{{ opc-request-id }}'
;
Lifecycle Methods​
- change_compartment
Moves an scheduling policy resource to another compartment.<br />
EXEC oci.database.scheduling_policies.change_compartment
@schedulingPolicyId='{{ schedulingPolicyId }}' --required,
@region='{{ region }}' --required,
@if-match='{{ if-match }}',
@opc-request-id='{{ opc-request-id }}',
@opc-retry-token='{{ opc-retry-token }}'
@@json=
'{
"compartmentId": "{{ compartmentId }}"
}'
;