ScheduledJob¶
-
class
oci.os_management_hub.models.
ScheduledJob
(**kwargs)¶ Bases:
object
The object that defines a scheduled job. For more information about jobs, see Managing Jobs.
Attributes
LIFECYCLE_STATE_ACTIVE
A constant which can be used with the lifecycle_state property of a ScheduledJob. LIFECYCLE_STATE_CREATING
A constant which can be used with the lifecycle_state property of a ScheduledJob. LIFECYCLE_STATE_DELETED
A constant which can be used with the lifecycle_state property of a ScheduledJob. LIFECYCLE_STATE_DELETING
A constant which can be used with the lifecycle_state property of a ScheduledJob. LIFECYCLE_STATE_FAILED
A constant which can be used with the lifecycle_state property of a ScheduledJob. LIFECYCLE_STATE_INACTIVE
A constant which can be used with the lifecycle_state property of a ScheduledJob. LIFECYCLE_STATE_UPDATING
A constant which can be used with the lifecycle_state property of a ScheduledJob. SCHEDULE_TYPE_ONETIME
A constant which can be used with the schedule_type property of a ScheduledJob. SCHEDULE_TYPE_RECURRING
A constant which can be used with the schedule_type property of a ScheduledJob. compartment_id
[Required] Gets the compartment_id of this ScheduledJob. defined_tags
[Required] Gets the defined_tags of this ScheduledJob. description
Gets the description of this ScheduledJob. display_name
[Required] Gets the display_name of this ScheduledJob. freeform_tags
[Required] Gets the freeform_tags of this ScheduledJob. id
[Required] Gets the id of this ScheduledJob. is_managed_by_autonomous_linux
Gets the is_managed_by_autonomous_linux of this ScheduledJob. is_restricted
Gets the is_restricted of this ScheduledJob. is_subcompartment_included
Gets the is_subcompartment_included of this ScheduledJob. lifecycle_stage_ids
Gets the lifecycle_stage_ids of this ScheduledJob. lifecycle_state
[Required] Gets the lifecycle_state of this ScheduledJob. locations
Gets the locations of this ScheduledJob. managed_compartment_ids
Gets the managed_compartment_ids of this ScheduledJob. managed_instance_group_ids
Gets the managed_instance_group_ids of this ScheduledJob. managed_instance_ids
Gets the managed_instance_ids of this ScheduledJob. operations
[Required] Gets the operations of this ScheduledJob. recurring_rule
Gets the recurring_rule of this ScheduledJob. retry_intervals
Gets the retry_intervals of this ScheduledJob. schedule_type
[Required] Gets the schedule_type of this ScheduledJob. system_tags
Gets the system_tags of this ScheduledJob. time_created
[Required] Gets the time_created of this ScheduledJob. time_last_execution
Gets the time_last_execution of this ScheduledJob. time_next_execution
[Required] Gets the time_next_execution of this ScheduledJob. time_updated
[Required] Gets the time_updated of this ScheduledJob. work_request_ids
Gets the work_request_ids of this ScheduledJob. Methods
__init__
(**kwargs)Initializes a new ScheduledJob object with values from keyword arguments. -
LIFECYCLE_STATE_ACTIVE
= 'ACTIVE'¶ A constant which can be used with the lifecycle_state property of a ScheduledJob. This constant has a value of “ACTIVE”
-
LIFECYCLE_STATE_CREATING
= 'CREATING'¶ A constant which can be used with the lifecycle_state property of a ScheduledJob. This constant has a value of “CREATING”
-
LIFECYCLE_STATE_DELETED
= 'DELETED'¶ A constant which can be used with the lifecycle_state property of a ScheduledJob. This constant has a value of “DELETED”
-
LIFECYCLE_STATE_DELETING
= 'DELETING'¶ A constant which can be used with the lifecycle_state property of a ScheduledJob. This constant has a value of “DELETING”
-
LIFECYCLE_STATE_FAILED
= 'FAILED'¶ A constant which can be used with the lifecycle_state property of a ScheduledJob. This constant has a value of “FAILED”
-
LIFECYCLE_STATE_INACTIVE
= 'INACTIVE'¶ A constant which can be used with the lifecycle_state property of a ScheduledJob. This constant has a value of “INACTIVE”
-
LIFECYCLE_STATE_UPDATING
= 'UPDATING'¶ A constant which can be used with the lifecycle_state property of a ScheduledJob. This constant has a value of “UPDATING”
-
SCHEDULE_TYPE_ONETIME
= 'ONETIME'¶ A constant which can be used with the schedule_type property of a ScheduledJob. This constant has a value of “ONETIME”
-
SCHEDULE_TYPE_RECURRING
= 'RECURRING'¶ A constant which can be used with the schedule_type property of a ScheduledJob. This constant has a value of “RECURRING”
-
__init__
(**kwargs)¶ Initializes a new ScheduledJob 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 ScheduledJob.
- display_name (str) – The value to assign to the display_name property of this ScheduledJob.
- compartment_id (str) – The value to assign to the compartment_id property of this ScheduledJob.
- description (str) – The value to assign to the description property of this ScheduledJob.
- schedule_type (str) – The value to assign to the schedule_type property of this ScheduledJob. Allowed values for this property are: “ONETIME”, “RECURRING”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
- locations (list[oci.os_management_hub.models.ManagedInstanceLocation]) – The value to assign to the locations property of this ScheduledJob.
- time_next_execution (datetime) – The value to assign to the time_next_execution property of this ScheduledJob.
- time_last_execution (datetime) – The value to assign to the time_last_execution property of this ScheduledJob.
- recurring_rule (str) – The value to assign to the recurring_rule property of this ScheduledJob.
- managed_instance_ids (list[str]) – The value to assign to the managed_instance_ids property of this ScheduledJob.
- managed_instance_group_ids (list[str]) – The value to assign to the managed_instance_group_ids property of this ScheduledJob.
- managed_compartment_ids (list[str]) – The value to assign to the managed_compartment_ids property of this ScheduledJob.
- lifecycle_stage_ids (list[str]) – The value to assign to the lifecycle_stage_ids property of this ScheduledJob.
- is_subcompartment_included (bool) – The value to assign to the is_subcompartment_included property of this ScheduledJob.
- operations (list[oci.os_management_hub.models.ScheduledJobOperation]) – The value to assign to the operations property of this ScheduledJob.
- work_request_ids (list[str]) – The value to assign to the work_request_ids property of this ScheduledJob.
- time_created (datetime) – The value to assign to the time_created property of this ScheduledJob.
- time_updated (datetime) – The value to assign to the time_updated property of this ScheduledJob.
- lifecycle_state (str) – The value to assign to the lifecycle_state property of this ScheduledJob. Allowed values for this property are: “CREATING”, “UPDATING”, “ACTIVE”, “INACTIVE”, “DELETING”, “DELETED”, “FAILED”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
- is_managed_by_autonomous_linux (bool) – The value to assign to the is_managed_by_autonomous_linux property of this ScheduledJob.
- freeform_tags (dict(str, str)) – The value to assign to the freeform_tags property of this ScheduledJob.
- defined_tags (dict(str, dict(str, object))) – The value to assign to the defined_tags property of this ScheduledJob.
- system_tags (dict(str, dict(str, object))) – The value to assign to the system_tags property of this ScheduledJob.
- is_restricted (bool) – The value to assign to the is_restricted property of this ScheduledJob.
- retry_intervals (list[int]) – The value to assign to the retry_intervals property of this ScheduledJob.
-
compartment_id
¶ [Required] Gets the compartment_id of this ScheduledJob. The OCID of the compartment that contains the scheduled job.
Returns: The compartment_id of this ScheduledJob. Return type: str
[Required] Gets the defined_tags of this ScheduledJob. 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 ScheduledJob. Return type: dict(str, dict(str, object))
-
description
¶ Gets the description of this ScheduledJob. User-specified description for the scheduled job.
Returns: The description of this ScheduledJob. Return type: str
-
display_name
¶ [Required] Gets the display_name of this ScheduledJob. User-friendly name for the scheduled job.
Returns: The display_name of this ScheduledJob. Return type: str
[Required] Gets the freeform_tags of this ScheduledJob. 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 ScheduledJob. Return type: dict(str, str)
-
id
¶ [Required] Gets the id of this ScheduledJob. The OCID of the scheduled job.
Returns: The id of this ScheduledJob. Return type: str
-
is_managed_by_autonomous_linux
¶ Gets the is_managed_by_autonomous_linux of this ScheduledJob. Indicates whether this scheduled job is managed by the Autonomous Linux service.
Returns: The is_managed_by_autonomous_linux of this ScheduledJob. Return type: bool
-
is_restricted
¶ Gets the is_restricted of this ScheduledJob. Indicates if the schedule job has restricted update and deletion capabilities. For restricted scheduled jobs, you can update only the timeNextExecution, recurringRule, and tags.
Returns: The is_restricted of this ScheduledJob. Return type: bool
-
is_subcompartment_included
¶ Gets the is_subcompartment_included of this ScheduledJob. Indicates whether to apply the scheduled job to all compartments in the tenancy when managedCompartmentIds specifies the tenancy OCID (root compartment).
Returns: The is_subcompartment_included of this ScheduledJob. Return type: bool
-
lifecycle_stage_ids
¶ Gets the lifecycle_stage_ids of this ScheduledJob. The lifecycle stage OCIDs that this scheduled job operates on. A scheduled job can only operate on one type of target, therefore this parameter is mutually exclusive with managedInstanceIds, managedInstanceGroupIds, and managedCompartmentIds.
Returns: The lifecycle_stage_ids of this ScheduledJob. Return type: list[str]
-
lifecycle_state
¶ [Required] Gets the lifecycle_state of this ScheduledJob. The current state of the scheduled job.
Allowed values for this property are: “CREATING”, “UPDATING”, “ACTIVE”, “INACTIVE”, “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 ScheduledJob. Return type: str
-
locations
¶ Gets the locations of this ScheduledJob. The list of locations this scheduled job should operate on for a job targeting on compartments. (Empty list means apply to all locations). This can only be set when managedCompartmentIds is not empty.
Returns: The locations of this ScheduledJob. Return type: list[oci.os_management_hub.models.ManagedInstanceLocation]
-
managed_compartment_ids
¶ Gets the managed_compartment_ids of this ScheduledJob. The compartment OCIDs that this scheduled job operates on. A scheduled job can only operate on one type of target, therefore this parameter is mutually exclusive with managedInstanceIds, managedInstanceGroupIds, and lifecycleStageIds.
Returns: The managed_compartment_ids of this ScheduledJob. Return type: list[str]
-
managed_instance_group_ids
¶ Gets the managed_instance_group_ids of this ScheduledJob. The managed instance group OCIDs that this scheduled job operates on. A scheduled job can only operate on one type of target, therefore this parameter is mutually exclusive with managedInstanceIds, managedCompartmentIds, and lifecycleStageIds.
Returns: The managed_instance_group_ids of this ScheduledJob. Return type: list[str]
-
managed_instance_ids
¶ Gets the managed_instance_ids of this ScheduledJob. The managed instance OCIDs that this scheduled job operates on. A scheduled job can only operate on one type of target, therefore this parameter is mutually exclusive with managedInstanceGroupIds, managedCompartmentIds, and lifecycleStageIds.
Returns: The managed_instance_ids of this ScheduledJob. Return type: list[str]
-
operations
¶ [Required] Gets the operations of this ScheduledJob. The list of operations this scheduled job needs to perform. A scheduled job supports only one operation type, unless it is one of the following: * UPDATE_PACKAGES * UPDATE_ALL * UPDATE_SECURITY * UPDATE_BUGFIX * UPDATE_ENHANCEMENT * UPDATE_OTHER * UPDATE_KSPLICE_USERSPACE * UPDATE_KSPLICE_KERNEL
Returns: The operations of this ScheduledJob. Return type: list[oci.os_management_hub.models.ScheduledJobOperation]
-
recurring_rule
¶ Gets the recurring_rule of this ScheduledJob. The frequency schedule for a recurring scheduled job.
Returns: The recurring_rule of this ScheduledJob. Return type: str
-
retry_intervals
¶ Gets the retry_intervals of this ScheduledJob. The amount of time in minutes to wait until retrying the scheduled job. If set, the service will automatically retry a failed scheduled job after the interval. For example, you could set the interval to [2,5,10]. If the initial execution of the job fails, the service waits 2 minutes and then retries. If that fails, the service waits 5 minutes and then retries. If that fails, the service waits 10 minutes and then retries.
Returns: The retry_intervals of this ScheduledJob. Return type: list[int]
-
schedule_type
¶ [Required] Gets the schedule_type of this ScheduledJob. The type of scheduling frequency for the job.
Allowed values for this property are: “ONETIME”, “RECURRING”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
Returns: The schedule_type of this ScheduledJob. Return type: str
Gets the system_tags of this ScheduledJob. 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 ScheduledJob. Return type: dict(str, dict(str, object))
-
time_created
¶ [Required] Gets the time_created of this ScheduledJob. The time this scheduled job was created (in RFC 3339 format).
Returns: The time_created of this ScheduledJob. Return type: datetime
-
time_last_execution
¶ Gets the time_last_execution of this ScheduledJob. The time of the last execution of this scheduled job (in RFC 3339 format).
Returns: The time_last_execution of this ScheduledJob. Return type: datetime
-
time_next_execution
¶ [Required] Gets the time_next_execution of this ScheduledJob. The time of the next execution of this scheduled job (in RFC 3339 format).
Returns: The time_next_execution of this ScheduledJob. Return type: datetime
-