Schedule¶
- class oci.resource_scheduler.models.Schedule(**kwargs)¶
Bases:
objectA Schedule describes the date and time when an operation will be or has been applied to a set of resources. You must specify either the resources directly or provide a set of resource filters to select the resources.
To use any of the API operations, you must be authorized in an IAM policy. If you’re not authorized, contact your administrator. If you’re an administrator who needs to write policies to give users access, see Getting Started with Policies.
Attributes:
A constant which can be used with the action property of a Schedule.
A constant which can be used with the action property of a Schedule.
A constant which can be used with the action property of a Schedule.
A constant which can be used with the last_run_status property of a Schedule.
A constant which can be used with the last_run_status property of a Schedule.
A constant which can be used with the last_run_status property of a Schedule.
A constant which can be used with the last_run_status property of a Schedule.
A constant which can be used with the last_run_status property of a Schedule.
A constant which can be used with the last_run_status property of a Schedule.
A constant which can be used with the last_run_status property of a Schedule.
A constant which can be used with the last_run_status property of a Schedule.
A constant which can be used with the lifecycle_state property of a Schedule.
A constant which can be used with the lifecycle_state property of a Schedule.
A constant which can be used with the lifecycle_state property of a Schedule.
A constant which can be used with the lifecycle_state property of a Schedule.
A constant which can be used with the lifecycle_state property of a Schedule.
A constant which can be used with the lifecycle_state property of a Schedule.
A constant which can be used with the lifecycle_state property of a Schedule.
A constant which can be used with the recurrence_type property of a Schedule.
A constant which can be used with the recurrence_type property of a Schedule.
[Required] Gets the action of this Schedule.
[Required] Gets the compartment_id of this Schedule.
[Required] Gets the defined_tags of this Schedule.
Gets the description of this Schedule.
[Required] Gets the display_name of this Schedule.
[Required] Gets the freeform_tags of this Schedule.
[Required] Gets the id of this Schedule.
Gets the last_run_status of this Schedule.
[Required] Gets the lifecycle_state of this Schedule.
Gets the local_time_zone of this Schedule.
[Required] Gets the recurrence_details of this Schedule.
[Required] Gets the recurrence_type of this Schedule.
Gets the resource_filters of this Schedule.
Gets the resources of this Schedule.
Gets the system_tags of this Schedule.
[Required] Gets the time_created of this Schedule.
Gets the time_ends of this Schedule.
Gets the time_last_run of this Schedule.
Gets the time_next_run of this Schedule.
Gets the time_starts of this Schedule.
Gets the time_updated of this Schedule.
Methods:
__init__(**kwargs)Initializes a new Schedule object with values from keyword arguments.
- ACTION_BACKUP_RESOURCE = 'BACKUP_RESOURCE'¶
A constant which can be used with the action property of a Schedule. This constant has a value of “BACKUP_RESOURCE”
- ACTION_START_RESOURCE = 'START_RESOURCE'¶
A constant which can be used with the action property of a Schedule. This constant has a value of “START_RESOURCE”
- ACTION_STOP_RESOURCE = 'STOP_RESOURCE'¶
A constant which can be used with the action property of a Schedule. This constant has a value of “STOP_RESOURCE”
- LAST_RUN_STATUS_ACCEPTED = 'ACCEPTED'¶
A constant which can be used with the last_run_status property of a Schedule. This constant has a value of “ACCEPTED”
- LAST_RUN_STATUS_CANCELED = 'CANCELED'¶
A constant which can be used with the last_run_status property of a Schedule. This constant has a value of “CANCELED”
- LAST_RUN_STATUS_CANCELING = 'CANCELING'¶
A constant which can be used with the last_run_status property of a Schedule. This constant has a value of “CANCELING”
- LAST_RUN_STATUS_FAILED = 'FAILED'¶
A constant which can be used with the last_run_status property of a Schedule. This constant has a value of “FAILED”
- LAST_RUN_STATUS_IN_PROGRESS = 'IN_PROGRESS'¶
A constant which can be used with the last_run_status property of a Schedule. This constant has a value of “IN_PROGRESS”
- LAST_RUN_STATUS_NEEDS_ATTENTION = 'NEEDS_ATTENTION'¶
A constant which can be used with the last_run_status property of a Schedule. This constant has a value of “NEEDS_ATTENTION”
- LAST_RUN_STATUS_SUCCEEDED = 'SUCCEEDED'¶
A constant which can be used with the last_run_status property of a Schedule. This constant has a value of “SUCCEEDED”
- LAST_RUN_STATUS_WAITING = 'WAITING'¶
A constant which can be used with the last_run_status property of a Schedule. This constant has a value of “WAITING”
- LIFECYCLE_STATE_ACTIVE = 'ACTIVE'¶
A constant which can be used with the lifecycle_state property of a Schedule. This constant has a value of “ACTIVE”
- LIFECYCLE_STATE_CREATING = 'CREATING'¶
A constant which can be used with the lifecycle_state property of a Schedule. This constant has a value of “CREATING”
- LIFECYCLE_STATE_DELETED = 'DELETED'¶
A constant which can be used with the lifecycle_state property of a Schedule. This constant has a value of “DELETED”
- LIFECYCLE_STATE_DELETING = 'DELETING'¶
A constant which can be used with the lifecycle_state property of a Schedule. This constant has a value of “DELETING”
- LIFECYCLE_STATE_FAILED = 'FAILED'¶
A constant which can be used with the lifecycle_state property of a Schedule. This constant has a value of “FAILED”
- LIFECYCLE_STATE_INACTIVE = 'INACTIVE'¶
A constant which can be used with the lifecycle_state property of a Schedule. This constant has a value of “INACTIVE”
- LIFECYCLE_STATE_UPDATING = 'UPDATING'¶
A constant which can be used with the lifecycle_state property of a Schedule. This constant has a value of “UPDATING”
- RECURRENCE_TYPE_CRON = 'CRON'¶
A constant which can be used with the recurrence_type property of a Schedule. This constant has a value of “CRON”
- RECURRENCE_TYPE_ICAL = 'ICAL'¶
A constant which can be used with the recurrence_type property of a Schedule. This constant has a value of “ICAL”
- __init__(**kwargs)¶
Initializes a new Schedule object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):
- Parameters
id (str) – The value to assign to the id property of this Schedule.
compartment_id (str) – The value to assign to the compartment_id property of this Schedule.
display_name (str) – The value to assign to the display_name property of this Schedule.
description (str) – The value to assign to the description property of this Schedule.
action (str) – The value to assign to the action property of this Schedule. Allowed values for this property are: “START_RESOURCE”, “STOP_RESOURCE”, “BACKUP_RESOURCE”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
recurrence_details (str) – The value to assign to the recurrence_details property of this Schedule.
recurrence_type (str) – The value to assign to the recurrence_type property of this Schedule. Allowed values for this property are: “CRON”, “ICAL”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
resource_filters (list[oci.resource_scheduler.models.ResourceFilter]) – The value to assign to the resource_filters property of this Schedule.
resources (list[oci.resource_scheduler.models.Resource]) – The value to assign to the resources property of this Schedule.
time_starts (datetime) – The value to assign to the time_starts property of this Schedule.
time_ends (datetime) – The value to assign to the time_ends property of this Schedule.
local_time_zone (str) – The value to assign to the local_time_zone property of this Schedule.
time_created (datetime) – The value to assign to the time_created property of this Schedule.
time_updated (datetime) – The value to assign to the time_updated property of this Schedule.
time_last_run (datetime) – The value to assign to the time_last_run property of this Schedule.
time_next_run (datetime) – The value to assign to the time_next_run property of this Schedule.
last_run_status (str) – The value to assign to the last_run_status property of this Schedule. Allowed values for this property are: “ACCEPTED”, “IN_PROGRESS”, “WAITING”, “NEEDS_ATTENTION”, “FAILED”, “SUCCEEDED”, “CANCELING”, “CANCELED”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
lifecycle_state (str) – The value to assign to the lifecycle_state property of this Schedule. Allowed values for this property are: “ACTIVE”, “INACTIVE”, “CREATING”, “UPDATING”, “DELETING”, “DELETED”, “FAILED”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
freeform_tags (dict(str, str)) – The value to assign to the freeform_tags property of this Schedule.
defined_tags (dict(str, dict(str, object))) – The value to assign to the defined_tags property of this Schedule.
system_tags (dict(str, dict(str, object))) – The value to assign to the system_tags property of this Schedule.
- property action¶
[Required] Gets the action of this Schedule. This is the action that will be executed by the schedule.
Allowed values for this property are: “START_RESOURCE”, “STOP_RESOURCE”, “BACKUP_RESOURCE”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
- Returns
The action of this Schedule.
- Return type
str
- property compartment_id¶
[Required] Gets the compartment_id of this Schedule. The OCID of the compartment in which the schedule is created
- Returns
The compartment_id of this Schedule.
- Return type
str
- property defined_tags¶
[Required] Gets the defined_tags of this Schedule. These are defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
Example: {“Operations”: {“CostCenter”: “42”}}
- Returns
The defined_tags of this Schedule.
- Return type
dict(str, dict(str, object))
- property description¶
Gets the description of this Schedule. This is the description of the schedule.
- Returns
The description of this Schedule.
- Return type
str
- property display_name¶
[Required] Gets the display_name of this Schedule. This is a user-friendly name for the schedule. It does not have to be unique, and it’s changeable.
- Returns
The display_name of this Schedule.
- Return type
str
- property freeform_tags¶
[Required] Gets the freeform_tags of this Schedule. 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.
Example: {“Department”: “Finance”}
- Returns
The freeform_tags of this Schedule.
- Return type
dict(str, str)
- property id¶
[Required] Gets the id of this Schedule. The OCID of the schedule
- Returns
The id of this Schedule.
- Return type
str
- property last_run_status¶
Gets the last_run_status of this Schedule. This is the status of the last work request.
Allowed values for this property are: “ACCEPTED”, “IN_PROGRESS”, “WAITING”, “NEEDS_ATTENTION”, “FAILED”, “SUCCEEDED”, “CANCELING”, “CANCELED”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
- Returns
The last_run_status of this Schedule.
- Return type
str
- property lifecycle_state¶
[Required] Gets the lifecycle_state of this Schedule. This is the current state of a schedule.
Allowed values for this property are: “ACTIVE”, “INACTIVE”, “CREATING”, “UPDATING”, “DELETING”, “DELETED”, “FAILED”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
- Returns
The lifecycle_state of this Schedule.
- Return type
str
- property local_time_zone¶
Gets the local_time_zone of this Schedule. IANA timezone identifier (e.g., ‘America/New_York’, ‘UTC’, ‘Europe/London’). This determines the timezone context for evaluating the recurrence expression.
- Returns
The local_time_zone of this Schedule.
- Return type
str
- property recurrence_details¶
[Required] Gets the recurrence_details of this Schedule. 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.
- Returns
The recurrence_details of this Schedule.
- Return type
str
- property recurrence_type¶
[Required] Gets the recurrence_type of this Schedule. Type of recurrence of a schedule
Allowed values for this property are: “CRON”, “ICAL”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
- Returns
The recurrence_type of this Schedule.
- Return type
str
- property resource_filters¶
Gets the resource_filters of this Schedule. This is a list of resources filters. The schedule will be applied to resources matching all of them.
- Returns
The resource_filters of this Schedule.
- Return type
- property resources¶
Gets the resources of this Schedule. This is the list of resources to which the scheduled operation is applied.
- Returns
The resources of this Schedule.
- Return type
- property system_tags¶
Gets the system_tags of this Schedule. These are system tags for this resource. Each key is predefined and scoped to a namespace.
Example: {“orcl-cloud”: {“free-tier-retained”: “true”}}
- Returns
The system_tags of this Schedule.
- Return type
dict(str, dict(str, object))
- property time_created¶
[Required] Gets the time_created of this Schedule. This is the date and time the schedule was created, in the format defined by RFC 3339.
Example: 2016-08-25T21:10:29.600Z
- Returns
The time_created of this Schedule.
- Return type
datetime
- property time_ends¶
Gets the time_ends of this Schedule. This is the date and time the schedule ends, in the format defined by RFC 3339
Example: 2016-08-25T21:10:29.600Z
- Returns
The time_ends of this Schedule.
- Return type
datetime
- property time_last_run¶
Gets the time_last_run of this Schedule. This is the date and time the schedule runs last time, in the format defined by RFC 3339.
Example: 2016-08-25T21:10:29.600Z
- Returns
The time_last_run of this Schedule.
- Return type
datetime
- property time_next_run¶
Gets the time_next_run of this Schedule. This is the date and time the schedule run the next time, in the format defined by RFC 3339.
Example: 2016-08-25T21:10:29.600Z
- Returns
The time_next_run of this Schedule.
- Return type
datetime