CreateScheduledJobDetails

class oci.os_management_hub.models.CreateScheduledJobDetails(**kwargs)

Bases: object

Provides the information used to create a scheduled job.

Attributes:

SCHEDULE_TYPE_ONETIME

A constant which can be used with the schedule_type property of a CreateScheduledJobDetails.

SCHEDULE_TYPE_RECURRING

A constant which can be used with the schedule_type property of a CreateScheduledJobDetails.

compartment_id

[Required] Gets the compartment_id of this CreateScheduledJobDetails.

defined_tags

Gets the defined_tags of this CreateScheduledJobDetails.

description

Gets the description of this CreateScheduledJobDetails.

display_name

Gets the display_name of this CreateScheduledJobDetails.

dynamic_set_ids

Gets the dynamic_set_ids of this CreateScheduledJobDetails.

freeform_tags

Gets the freeform_tags of this CreateScheduledJobDetails.

is_managed_by_autonomous_linux

Gets the is_managed_by_autonomous_linux of this CreateScheduledJobDetails.

is_subcompartment_included

Gets the is_subcompartment_included of this CreateScheduledJobDetails.

lifecycle_stage_ids

Gets the lifecycle_stage_ids of this CreateScheduledJobDetails.

locations

Gets the locations of this CreateScheduledJobDetails.

managed_compartment_ids

Gets the managed_compartment_ids of this CreateScheduledJobDetails.

managed_instance_group_ids

Gets the managed_instance_group_ids of this CreateScheduledJobDetails.

managed_instance_ids

Gets the managed_instance_ids of this CreateScheduledJobDetails.

operations

[Required] Gets the operations of this CreateScheduledJobDetails.

recurring_rule

Gets the recurring_rule of this CreateScheduledJobDetails.

retry_intervals

Gets the retry_intervals of this CreateScheduledJobDetails.

schedule_type

[Required] Gets the schedule_type of this CreateScheduledJobDetails.

time_next_execution

[Required] Gets the time_next_execution of this CreateScheduledJobDetails.

work_request_id

Gets the work_request_id of this CreateScheduledJobDetails.

Methods:

__init__(**kwargs)

Initializes a new CreateScheduledJobDetails object with values from keyword arguments.

SCHEDULE_TYPE_ONETIME = 'ONETIME'

A constant which can be used with the schedule_type property of a CreateScheduledJobDetails. This constant has a value of “ONETIME”

SCHEDULE_TYPE_RECURRING = 'RECURRING'

A constant which can be used with the schedule_type property of a CreateScheduledJobDetails. This constant has a value of “RECURRING”

__init__(**kwargs)

Initializes a new CreateScheduledJobDetails object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters
  • compartment_id (str) – The value to assign to the compartment_id property of this CreateScheduledJobDetails.

  • display_name (str) – The value to assign to the display_name property of this CreateScheduledJobDetails.

  • description (str) – The value to assign to the description property of this CreateScheduledJobDetails.

  • schedule_type (str) – The value to assign to the schedule_type property of this CreateScheduledJobDetails. Allowed values for this property are: “ONETIME”, “RECURRING”

  • locations (list[oci.os_management_hub.models.ManagedInstanceLocation]) – The value to assign to the locations property of this CreateScheduledJobDetails.

  • time_next_execution (datetime) – The value to assign to the time_next_execution property of this CreateScheduledJobDetails.

  • recurring_rule (str) – The value to assign to the recurring_rule property of this CreateScheduledJobDetails.

  • managed_instance_ids (list[str]) – The value to assign to the managed_instance_ids property of this CreateScheduledJobDetails.

  • managed_instance_group_ids (list[str]) – The value to assign to the managed_instance_group_ids property of this CreateScheduledJobDetails.

  • managed_compartment_ids (list[str]) – The value to assign to the managed_compartment_ids property of this CreateScheduledJobDetails.

  • lifecycle_stage_ids (list[str]) – The value to assign to the lifecycle_stage_ids property of this CreateScheduledJobDetails.

  • dynamic_set_ids (list[str]) – The value to assign to the dynamic_set_ids property of this CreateScheduledJobDetails.

  • is_subcompartment_included (bool) – The value to assign to the is_subcompartment_included property of this CreateScheduledJobDetails.

  • operations (list[oci.os_management_hub.models.ScheduledJobOperation]) – The value to assign to the operations property of this CreateScheduledJobDetails.

  • freeform_tags (dict(str, str)) – The value to assign to the freeform_tags property of this CreateScheduledJobDetails.

  • defined_tags (dict(str, dict(str, object))) – The value to assign to the defined_tags property of this CreateScheduledJobDetails.

  • retry_intervals (list[int]) – The value to assign to the retry_intervals property of this CreateScheduledJobDetails.

  • is_managed_by_autonomous_linux (bool) – The value to assign to the is_managed_by_autonomous_linux property of this CreateScheduledJobDetails.

  • work_request_id (str) – The value to assign to the work_request_id property of this CreateScheduledJobDetails.

property compartment_id

[Required] Gets the compartment_id of this CreateScheduledJobDetails. The OCID of the compartment that contains the scheduled job.

Returns

The compartment_id of this CreateScheduledJobDetails.

Return type

str

property defined_tags

Gets the defined_tags of this CreateScheduledJobDetails. 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 CreateScheduledJobDetails.

Return type

dict(str, dict(str, object))

property description

Gets the description of this CreateScheduledJobDetails. User-specified description of the scheduled job. Avoid entering confidential information.

Returns

The description of this CreateScheduledJobDetails.

Return type

str

property display_name

Gets the display_name of this CreateScheduledJobDetails. User-friendly name for the scheduled job. Does not have to be unique and you can change the name later. Avoid entering confidential information.

Returns

The display_name of this CreateScheduledJobDetails.

Return type

str

property dynamic_set_ids

Gets the dynamic_set_ids of this CreateScheduledJobDetails. The dynamic set 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, lifecycleStageIds, managedCompartmentIds.

Returns

The dynamic_set_ids of this CreateScheduledJobDetails.

Return type

list[str]

property freeform_tags

Gets the freeform_tags of this CreateScheduledJobDetails. 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 CreateScheduledJobDetails.

Return type

dict(str, str)

property is_managed_by_autonomous_linux

Gets the is_managed_by_autonomous_linux of this CreateScheduledJobDetails. Indicates whether this scheduled job is managed by the Autonomous Linux service.

Returns

The is_managed_by_autonomous_linux of this CreateScheduledJobDetails.

Return type

bool

property is_subcompartment_included

Gets the is_subcompartment_included of this CreateScheduledJobDetails. 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 CreateScheduledJobDetails.

Return type

bool

property lifecycle_stage_ids

Gets the lifecycle_stage_ids of this CreateScheduledJobDetails. The lifecycle stage OCIDs that this scheduled job operates on. A scheduled job can only operate on one type of target, therefore you must supply either this or managedInstanceIds, or managedInstanceGroupIds, or managedCompartmentIds, or dynamicSetIds.

Returns

The lifecycle_stage_ids of this CreateScheduledJobDetails.

Return type

list[str]

property locations

Gets the locations of this CreateScheduledJobDetails. 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 CreateScheduledJobDetails.

Return type

list[oci.os_management_hub.models.ManagedInstanceLocation]

property managed_compartment_ids

Gets the managed_compartment_ids of this CreateScheduledJobDetails. The compartment OCIDs that this scheduled job operates on. To apply the job to all compartments in the tenancy, set this to the tenancy OCID (root compartment) and set isSubcompartmentIncluded to true. A scheduled job can only operate on one type of target, therefore you must supply either this or managedInstanceIds, or managedInstanceGroupIds, or lifecycleStageIds, or dynamicSetIds.

Returns

The managed_compartment_ids of this CreateScheduledJobDetails.

Return type

list[str]

property managed_instance_group_ids

Gets the managed_instance_group_ids of this CreateScheduledJobDetails. The managed instance group OCIDs that this scheduled job operates on. A scheduled job can only operate on one type of target, therefore you must supply either this or managedInstanceIds, or managedCompartmentIds, or lifecycleStageIds, or dynamicSetIds.

Returns

The managed_instance_group_ids of this CreateScheduledJobDetails.

Return type

list[str]

property managed_instance_ids

Gets the managed_instance_ids of this CreateScheduledJobDetails. The managed instance OCIDs that this scheduled job operates on. A scheduled job can only operate on one type of target, therefore you must supply either this or managedInstanceGroupIds, or managedCompartmentIds, or lifecycleStageIds, or dynamicSetIds.

Returns

The managed_instance_ids of this CreateScheduledJobDetails.

Return type

list[str]

property operations

[Required] Gets the operations of this CreateScheduledJobDetails. 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 CreateScheduledJobDetails.

Return type

list[oci.os_management_hub.models.ScheduledJobOperation]

property recurring_rule

Gets the recurring_rule of this CreateScheduledJobDetails. The frequency schedule for a recurring scheduled job in the RFC5535 format. Note: Currently, only FREQ/INTERVAL/BYMONTHDAY/BYDAY/BYSETPOS/BYMONTH/BYHOUR/BYMINUTE/BYSECOND rules are supported. In FREQ, only YEARLY, MONTHLY, WEEKLY, DAILY”, HOURLY are supported.

Returns

The recurring_rule of this CreateScheduledJobDetails.

Return type

str

property retry_intervals

Gets the retry_intervals of this CreateScheduledJobDetails. 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 CreateScheduledJobDetails.

Return type

list[int]

property schedule_type

[Required] Gets the schedule_type of this CreateScheduledJobDetails. The type of scheduling frequency for the scheduled job.

Allowed values for this property are: “ONETIME”, “RECURRING”

Returns

The schedule_type of this CreateScheduledJobDetails.

Return type

str

property time_next_execution

[Required] Gets the time_next_execution of this CreateScheduledJobDetails. The desired time of the next execution of this scheduled job (in RFC 3339 format).

Returns

The time_next_execution of this CreateScheduledJobDetails.

Return type

datetime

property work_request_id

Gets the work_request_id of this CreateScheduledJobDetails. The OCID for the work request that will be rerun.

Returns

The work_request_id of this CreateScheduledJobDetails.

Return type

str