ComputeTask

class oci.batch.models.ComputeTask(**kwargs)

Bases: BatchTask

compute task represents a single executable command together with its dependencies and resources.

Attributes:

LIFECYCLE_STATE_ACCEPTED

A constant which can be used with the lifecycle_state property of a BatchTask.

LIFECYCLE_STATE_CANCELED

A constant which can be used with the lifecycle_state property of a BatchTask.

LIFECYCLE_STATE_CANCELING

A constant which can be used with the lifecycle_state property of a BatchTask.

LIFECYCLE_STATE_FAILED

A constant which can be used with the lifecycle_state property of a BatchTask.

LIFECYCLE_STATE_IN_PROGRESS

A constant which can be used with the lifecycle_state property of a BatchTask.

LIFECYCLE_STATE_SUCCEEDED

A constant which can be used with the lifecycle_state property of a BatchTask.

LIFECYCLE_STATE_WAITING

A constant which can be used with the lifecycle_state property of a BatchTask.

TYPE_COMPUTE

A constant which can be used with the type property of a BatchTask.

TYPE_GROUP

A constant which can be used with the type property of a BatchTask.

arguments

Gets the arguments of this ComputeTask.

batch_task_environment_id

[Required] Gets the batch_task_environment_id of this ComputeTask.

batch_task_profile_id

Gets the batch_task_profile_id of this ComputeTask.

command

Gets the command of this ComputeTask.

dependencies

[Required] Gets the dependencies of this BatchTask.

description

Gets the description of this BatchTask.

entitlement_claims

[Required] Gets the entitlement_claims of this BatchTask.

environment_variables

[Required] Gets the environment_variables of this BatchTask.

fleet_assignment_policy

Gets the fleet_assignment_policy of this ComputeTask.

group_task_name

Gets the group_task_name of this BatchTask.

hierarchical_name

Gets the hierarchical_name of this BatchTask.

id

[Required] Gets the id of this BatchTask.

lifecycle_details

Gets the lifecycle_details of this BatchTask.

lifecycle_state

Gets the lifecycle_state of this BatchTask.

most_recent_execution_history

Gets the most_recent_execution_history of this ComputeTask.

name

[Required] Gets the name of this BatchTask.

type

[Required] Gets the type of this BatchTask.

Methods:

__init__(**kwargs)

Initializes a new ComputeTask object with values from keyword arguments.

get_subtype(object_dictionary)

Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.

LIFECYCLE_STATE_ACCEPTED = 'ACCEPTED'

A constant which can be used with the lifecycle_state property of a BatchTask. This constant has a value of “ACCEPTED”

LIFECYCLE_STATE_CANCELED = 'CANCELED'

A constant which can be used with the lifecycle_state property of a BatchTask. This constant has a value of “CANCELED”

LIFECYCLE_STATE_CANCELING = 'CANCELING'

A constant which can be used with the lifecycle_state property of a BatchTask. This constant has a value of “CANCELING”

LIFECYCLE_STATE_FAILED = 'FAILED'

A constant which can be used with the lifecycle_state property of a BatchTask. This constant has a value of “FAILED”

LIFECYCLE_STATE_IN_PROGRESS = 'IN_PROGRESS'

A constant which can be used with the lifecycle_state property of a BatchTask. This constant has a value of “IN_PROGRESS”

LIFECYCLE_STATE_SUCCEEDED = 'SUCCEEDED'

A constant which can be used with the lifecycle_state property of a BatchTask. This constant has a value of “SUCCEEDED”

LIFECYCLE_STATE_WAITING = 'WAITING'

A constant which can be used with the lifecycle_state property of a BatchTask. This constant has a value of “WAITING”

TYPE_COMPUTE = 'COMPUTE'

A constant which can be used with the type property of a BatchTask. This constant has a value of “COMPUTE”

TYPE_GROUP = 'GROUP'

A constant which can be used with the type property of a BatchTask. This constant has a value of “GROUP”

__init__(**kwargs)

Initializes a new ComputeTask object with values from keyword arguments. The default value of the type attribute of this class is COMPUTE and it should not be changed. 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 ComputeTask.

  • name (str) – The value to assign to the name property of this ComputeTask.

  • hierarchical_name (str) – The value to assign to the hierarchical_name property of this ComputeTask.

  • group_task_name (str) – The value to assign to the group_task_name property of this ComputeTask.

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

  • type (str) – The value to assign to the type property of this ComputeTask. Allowed values for this property are: “COMPUTE”, “GROUP”

  • lifecycle_state (str) – The value to assign to the lifecycle_state property of this ComputeTask. Allowed values for this property are: “ACCEPTED”, “WAITING”, “IN_PROGRESS”, “SUCCEEDED”, “FAILED”, “CANCELING”, “CANCELED”

  • lifecycle_details (str) – The value to assign to the lifecycle_details property of this ComputeTask.

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

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

  • environment_variables (list[oci.batch.models.EnvironmentVariable]) – The value to assign to the environment_variables property of this ComputeTask.

  • batch_task_profile_id (str) – The value to assign to the batch_task_profile_id property of this ComputeTask.

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

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

  • fleet_assignment_policy (oci.batch.models.FleetAssignmentPolicy) – The value to assign to the fleet_assignment_policy property of this ComputeTask.

  • batch_task_environment_id (str) – The value to assign to the batch_task_environment_id property of this ComputeTask.

  • most_recent_execution_history (list[oci.batch.models.BatchTaskExecutionDetails]) – The value to assign to the most_recent_execution_history property of this ComputeTask.

property arguments

Gets the arguments of this ComputeTask. Task arguments.

Returns

The arguments of this ComputeTask.

Return type

list[str]

property batch_task_environment_id

[Required] Gets the batch_task_environment_id of this ComputeTask. The OCID of the BatchTaskEnvironment.

Returns

The batch_task_environment_id of this ComputeTask.

Return type

str

property batch_task_profile_id

Gets the batch_task_profile_id of this ComputeTask. The OCID of the batch task profile used for this task.

Returns

The batch_task_profile_id of this ComputeTask.

Return type

str

property command

Gets the command of this ComputeTask. An executable command to start the processing of this task.

Returns

The command of this ComputeTask.

Return type

list[str]

property dependencies

[Required] Gets the dependencies of this BatchTask. A list of tasks on which this tasks depends, referenced by name. Dependencies must be within the same parent (job or group task). For tasks within a group task, all dependencies must also be within that same group task.

Returns

The dependencies of this BatchTask.

Return type

list[str]

property description

Gets the description of this BatchTask. An optional description that provides additional context next to the displayName.

Returns

The description of this BatchTask.

Return type

str

property entitlement_claims

[Required] Gets the entitlement_claims of this BatchTask. A list of resources (for example licences) this task needs for its execution.

Returns

The entitlement_claims of this BatchTask.

Return type

list[str]

property environment_variables

[Required] Gets the environment_variables of this BatchTask. Environment variables to use for the task execution.

Returns

The environment_variables of this BatchTask.

Return type

list[oci.batch.models.EnvironmentVariable]

property fleet_assignment_policy

Gets the fleet_assignment_policy of this ComputeTask.

Returns

The fleet_assignment_policy of this ComputeTask.

Return type

oci.batch.models.FleetAssignmentPolicy

static get_subtype(object_dictionary)

Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.

property group_task_name

Gets the group_task_name of this BatchTask. The hierarchical name of the group task. Null for top-level tasks.

Returns

The group_task_name of this BatchTask.

Return type

str

property hierarchical_name

Gets the hierarchical_name of this BatchTask. The hierarchical name of the task, which incorporates names of all parent group tasks, separated by “.” (dot symbol). Maximum nesting depth is 4 levels. Example: groupTaskA.nestedGroupTaskB.thisTaskName

Returns

The hierarchical_name of this BatchTask.

Return type

str

property id

[Required] Gets the id of this BatchTask. The UUID of batch task.

Returns

The id of this BatchTask.

Return type

str

property lifecycle_details

Gets the lifecycle_details of this BatchTask. A message that describes the current state of the batch task in more detail. For example, can be used to provide actionable information for a resource in the Failed state.

Returns

The lifecycle_details of this BatchTask.

Return type

str

property lifecycle_state

Gets the lifecycle_state of this BatchTask. The current state of the batch task.

Allowed values for this property are: “ACCEPTED”, “WAITING”, “IN_PROGRESS”, “SUCCEEDED”, “FAILED”, “CANCELING”, “CANCELED”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns

The lifecycle_state of this BatchTask.

Return type

str

property most_recent_execution_history

Gets the most_recent_execution_history of this ComputeTask. List of up to 30 most recent execution history entries, from newest to oldest. Be aware that the maximum number of items returned may change in the future.

Returns

The most_recent_execution_history of this ComputeTask.

Return type

list[oci.batch.models.BatchTaskExecutionDetails]

property name

[Required] Gets the name of this BatchTask. The name of the batch task. It must be unique within its parent batch job.

Returns

The name of this BatchTask.

Return type

str

property type

[Required] Gets the type of this BatchTask. Type of the batch task. Also serves as a discriminator for sub-entities.

Allowed values for this property are: “COMPUTE”, “GROUP”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns

The type of this BatchTask.

Return type

str