SqlJob¶
- 
class 
oci.database_management.models.SqlJob(**kwargs)¶ Bases:
oci.database_management.models.job.JobThe details of the SQL job.
Attributes
DATABASE_SUB_TYPE_ACDstr(object=’’) -> str DATABASE_SUB_TYPE_ADBstr(object=’’) -> str DATABASE_SUB_TYPE_CDBstr(object=’’) -> str DATABASE_SUB_TYPE_NON_CDBstr(object=’’) -> str DATABASE_SUB_TYPE_PDBstr(object=’’) -> str JOB_TYPE_SQLstr(object=’’) -> str LIFECYCLE_STATE_ACTIVEstr(object=’’) -> str LIFECYCLE_STATE_INACTIVEstr(object=’’) -> str OPERATION_TYPE_EXECUTE_SQLA constant which can be used with the operation_type property of a SqlJob. ROLE_NORMALA constant which can be used with the role property of a SqlJob. ROLE_SYSDBAA constant which can be used with the role property of a SqlJob. SCHEDULE_TYPE_IMMEDIATEstr(object=’’) -> str SCHEDULE_TYPE_LATERstr(object=’’) -> str SQL_TYPE_DDLA constant which can be used with the sql_type property of a SqlJob. SQL_TYPE_DMLA constant which can be used with the sql_type property of a SqlJob. SQL_TYPE_PLSQLA constant which can be used with the sql_type property of a SqlJob. SQL_TYPE_QUERYA constant which can be used with the sql_type property of a SqlJob. compartment_id[Required] Gets the compartment_id of this Job. database_sub_typeGets the database_sub_type of this Job. defined_tagsGets the defined_tags of this SqlJob. descriptionGets the description of this Job. freeform_tagsGets the freeform_tags of this SqlJob. id[Required] Gets the id of this Job. in_bindsGets the in_binds of this SqlJob. job_type[Required] Gets the job_type of this Job. lifecycle_state[Required] Gets the lifecycle_state of this Job. managed_database_group_idGets the managed_database_group_id of this Job. managed_database_idGets the managed_database_id of this Job. managed_databases_detailsGets the managed_databases_details of this Job. name[Required] Gets the name of this Job. named_credential_idGets the named_credential_id of this SqlJob. operation_type[Required] Gets the operation_type of this SqlJob. out_bindsGets the out_binds of this SqlJob. result_locationGets the result_location of this Job. roleGets the role of this SqlJob. schedule_detailsGets the schedule_details of this Job. schedule_type[Required] Gets the schedule_type of this Job. sql_textGets the sql_text of this SqlJob. sql_typeGets the sql_type of this SqlJob. submission_error_messageGets the submission_error_message of this Job. system_tagsGets the system_tags of this SqlJob. time_created[Required] Gets the time_created of this Job. time_updated[Required] Gets the time_updated of this Job. timeoutGets the timeout of this Job. user_nameGets the user_name of this SqlJob. Methods
__init__(**kwargs)Initializes a new SqlJob 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. - 
DATABASE_SUB_TYPE_ACD= 'ACD'¶ 
- 
DATABASE_SUB_TYPE_ADB= 'ADB'¶ 
- 
DATABASE_SUB_TYPE_CDB= 'CDB'¶ 
- 
DATABASE_SUB_TYPE_NON_CDB= 'NON_CDB'¶ 
- 
DATABASE_SUB_TYPE_PDB= 'PDB'¶ 
- 
JOB_TYPE_SQL= 'SQL'¶ 
- 
LIFECYCLE_STATE_ACTIVE= 'ACTIVE'¶ 
- 
LIFECYCLE_STATE_INACTIVE= 'INACTIVE'¶ 
- 
OPERATION_TYPE_EXECUTE_SQL= 'EXECUTE_SQL'¶ A constant which can be used with the operation_type property of a SqlJob. This constant has a value of “EXECUTE_SQL”
- 
ROLE_NORMAL= 'NORMAL'¶ A constant which can be used with the role property of a SqlJob. This constant has a value of “NORMAL”
- 
ROLE_SYSDBA= 'SYSDBA'¶ A constant which can be used with the role property of a SqlJob. This constant has a value of “SYSDBA”
- 
SCHEDULE_TYPE_IMMEDIATE= 'IMMEDIATE'¶ 
- 
SCHEDULE_TYPE_LATER= 'LATER'¶ 
- 
SQL_TYPE_DDL= 'DDL'¶ A constant which can be used with the sql_type property of a SqlJob. This constant has a value of “DDL”
- 
SQL_TYPE_DML= 'DML'¶ A constant which can be used with the sql_type property of a SqlJob. This constant has a value of “DML”
- 
SQL_TYPE_PLSQL= 'PLSQL'¶ A constant which can be used with the sql_type property of a SqlJob. This constant has a value of “PLSQL”
- 
SQL_TYPE_QUERY= 'QUERY'¶ A constant which can be used with the sql_type property of a SqlJob. This constant has a value of “QUERY”
- 
__init__(**kwargs)¶ Initializes a new SqlJob object with values from keyword arguments. The default value of the
job_typeattribute of this class isSQLand 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 SqlJob.
 - compartment_id (str) – The value to assign to the compartment_id property of this SqlJob.
 - name (str) – The value to assign to the name property of this SqlJob.
 - description (str) – The value to assign to the description property of this SqlJob.
 - managed_database_group_id (str) – The value to assign to the managed_database_group_id property of this SqlJob.
 - managed_database_id (str) – The value to assign to the managed_database_id property of this SqlJob.
 - managed_databases_details (list[oci.database_management.models.JobDatabase]) – The value to assign to the managed_databases_details property of this SqlJob.
 - database_sub_type (str) – The value to assign to the database_sub_type property of this SqlJob. Allowed values for this property are: “CDB”, “PDB”, “NON_CDB”, “ACD”, “ADB”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
 - schedule_type (str) – The value to assign to the schedule_type property of this SqlJob. Allowed values for this property are: “IMMEDIATE”, “LATER”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
 - job_type (str) – The value to assign to the job_type property of this SqlJob. Allowed values for this property are: “SQL”, ‘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 SqlJob. Allowed values for this property are: “ACTIVE”, “INACTIVE”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
 - timeout (str) – The value to assign to the timeout property of this SqlJob.
 - result_location (oci.database_management.models.JobExecutionResultLocation) – The value to assign to the result_location property of this SqlJob.
 - schedule_details (oci.database_management.models.JobScheduleDetails) – The value to assign to the schedule_details property of this SqlJob.
 - submission_error_message (str) – The value to assign to the submission_error_message property of this SqlJob.
 - time_created (datetime) – The value to assign to the time_created property of this SqlJob.
 - time_updated (datetime) – The value to assign to the time_updated property of this SqlJob.
 - sql_type (str) – The value to assign to the sql_type property of this SqlJob. Allowed values for this property are: “QUERY”, “DML”, “DDL”, “PLSQL”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
 - sql_text (str) – The value to assign to the sql_text property of this SqlJob.
 - in_binds (oci.database_management.models.JobInBindsDetails) – The value to assign to the in_binds property of this SqlJob.
 - out_binds (oci.database_management.models.JobOutBindsDetails) – The value to assign to the out_binds property of this SqlJob.
 - operation_type (str) – The value to assign to the operation_type property of this SqlJob. Allowed values for this property are: “EXECUTE_SQL”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
 - user_name (str) – The value to assign to the user_name property of this SqlJob.
 - role (str) – The value to assign to the role property of this SqlJob. Allowed values for this property are: “NORMAL”, “SYSDBA”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
 - named_credential_id (str) – The value to assign to the named_credential_id property of this SqlJob.
 - freeform_tags (dict(str, str)) – The value to assign to the freeform_tags property of this SqlJob.
 - defined_tags (dict(str, dict(str, object))) – The value to assign to the defined_tags property of this SqlJob.
 - system_tags (dict(str, dict(str, object))) – The value to assign to the system_tags property of this SqlJob.
 
- 
compartment_id¶ [Required] Gets the compartment_id of this Job. The OCID of the compartment in which the job resides.
Returns: The compartment_id of this Job. Return type: str 
- 
database_sub_type¶ Gets the database_sub_type of this Job. The subtype of the Oracle Database where the job has to be executed. Applicable only when managedDatabaseGroupId is provided.
Allowed values for this property are: “CDB”, “PDB”, “NON_CDB”, “ACD”, “ADB”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
Returns: The database_sub_type of this Job. Return type: str 
Gets the defined_tags of this SqlJob. 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 SqlJob. Return type: dict(str, dict(str, object)) 
- 
description¶ Gets the description of this Job. The description of the job.
Returns: The description of this Job. Return type: str 
Gets the freeform_tags of this SqlJob. 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 SqlJob. Return type: dict(str, str) 
- 
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.
- 
id¶ [Required] Gets the id of this Job. The OCID of the job.
Returns: The id of this Job. Return type: str 
- 
in_binds¶ Gets the in_binds of this SqlJob.
Returns: The in_binds of this SqlJob. Return type: oci.database_management.models.JobInBindsDetails 
- 
job_type¶ [Required] Gets the job_type of this Job. The type of job.
Allowed values for this property are: “SQL”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
Returns: The job_type of this Job. Return type: str 
- 
lifecycle_state¶ [Required] Gets the lifecycle_state of this Job. The lifecycle state of the job.
Allowed values for this property are: “ACTIVE”, “INACTIVE”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
Returns: The lifecycle_state of this Job. Return type: str 
- 
managed_database_group_id¶ Gets the managed_database_group_id of this Job. The OCID of the Managed Database Group where the job has to be executed.
Returns: The managed_database_group_id of this Job. Return type: str 
- 
managed_database_id¶ Gets the managed_database_id of this Job. The OCID of the Managed Database where the job has to be executed.
Returns: The managed_database_id of this Job. Return type: str 
- 
managed_databases_details¶ Gets the managed_databases_details of this Job. The details of the Managed Databases where the job has to be executed.
Returns: The managed_databases_details of this Job. Return type: list[oci.database_management.models.JobDatabase] 
- 
name¶ [Required] Gets the name of this Job. The display name of the job.
Returns: The name of this Job. Return type: str 
- 
named_credential_id¶ Gets the named_credential_id of this SqlJob. The OCID of the Named Credentials containing password secret.
Returns: The named_credential_id of this SqlJob. Return type: str 
- 
operation_type¶ [Required] Gets the operation_type of this SqlJob. The SQL operation type.
Allowed values for this property are: “EXECUTE_SQL”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
Returns: The operation_type of this SqlJob. Return type: str 
- 
out_binds¶ Gets the out_binds of this SqlJob.
Returns: The out_binds of this SqlJob. Return type: oci.database_management.models.JobOutBindsDetails 
- 
result_location¶ Gets the result_location of this Job.
Returns: The result_location of this Job. Return type: oci.database_management.models.JobExecutionResultLocation 
- 
role¶ Gets the role of this SqlJob. The role of the database user. Indicates whether the database user is a normal user or sysdba.
Allowed values for this property are: “NORMAL”, “SYSDBA”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
Returns: The role of this SqlJob. Return type: str 
- 
schedule_details¶ Gets the schedule_details of this Job.
Returns: The schedule_details of this Job. Return type: oci.database_management.models.JobScheduleDetails 
- 
schedule_type¶ [Required] Gets the schedule_type of this Job. The schedule type of the job.
Allowed values for this property are: “IMMEDIATE”, “LATER”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
Returns: The schedule_type of this Job. Return type: str 
- 
sql_text¶ Gets the sql_text of this SqlJob. The SQL text to be executed in the job. This is a mandatory field for the EXECUTE_SQL operationType.
Returns: The sql_text of this SqlJob. Return type: str 
- 
sql_type¶ Gets the sql_type of this SqlJob. The type of SQL. This is a mandatory field for the EXECUTE_SQL operationType.
Allowed values for this property are: “QUERY”, “DML”, “DDL”, “PLSQL”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
Returns: The sql_type of this SqlJob. Return type: str 
- 
submission_error_message¶ Gets the submission_error_message of this Job. The error message that is returned if the job submission fails. Null is returned in all other scenarios.
Returns: The submission_error_message of this Job. Return type: str 
Gets the system_tags of this SqlJob. System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. System tags can be viewed by users, but can only be created by the system.
Example: {“orcl-cloud”: {“free-tier-retained”: “true”}}
Returns: The system_tags of this SqlJob. Return type: dict(str, dict(str, object)) 
- 
time_created¶ [Required] Gets the time_created of this Job. The date and time when the job was created.
Returns: The time_created of this Job. Return type: datetime 
- 
time_updated¶ [Required] Gets the time_updated of this Job. The date and time when the job was last updated.
Returns: The time_updated of this Job. Return type: datetime 
- 
timeout¶ Gets the timeout of this Job. The job timeout duration, which is expressed like “1h 10m 15s”.
Returns: The timeout of this Job. Return type: str 
- 
user_name¶ Gets the user_name of this SqlJob. The database user name used to execute the SQL job. If the job is being executed on a Managed Database Group, then the user name should exist on all the databases in the group with the same password.
Returns: The user_name of this SqlJob. Return type: str 
-