RunLocalScriptUserDefinedStep

class oci.disaster_recovery.models.RunLocalScriptUserDefinedStep(**kwargs)

Bases: oci.disaster_recovery.models.dr_plan_user_defined_step.DrPlanUserDefinedStep

Run Local Script step details.

Attributes

STEP_TYPE_INVOKE_FUNCTION str(object=’’) -> str
STEP_TYPE_INVOKE_FUNCTION_PRECHECK str(object=’’) -> str
STEP_TYPE_RUN_LOCAL_SCRIPT str(object=’’) -> str
STEP_TYPE_RUN_LOCAL_SCRIPT_PRECHECK str(object=’’) -> str
STEP_TYPE_RUN_OBJECTSTORE_SCRIPT str(object=’’) -> str
STEP_TYPE_RUN_OBJECTSTORE_SCRIPT_PRECHECK str(object=’’) -> str
run_as_user Gets the run_as_user of this RunLocalScriptUserDefinedStep.
run_on_instance_id [Required] Gets the run_on_instance_id of this RunLocalScriptUserDefinedStep.
run_on_instance_region [Required] Gets the run_on_instance_region of this RunLocalScriptUserDefinedStep.
script_command [Required] Gets the script_command of this RunLocalScriptUserDefinedStep.
step_type [Required] Gets the step_type of this DrPlanUserDefinedStep.

Methods

__init__(**kwargs) Initializes a new RunLocalScriptUserDefinedStep 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.
STEP_TYPE_INVOKE_FUNCTION = 'INVOKE_FUNCTION'
STEP_TYPE_INVOKE_FUNCTION_PRECHECK = 'INVOKE_FUNCTION_PRECHECK'
STEP_TYPE_RUN_LOCAL_SCRIPT = 'RUN_LOCAL_SCRIPT'
STEP_TYPE_RUN_LOCAL_SCRIPT_PRECHECK = 'RUN_LOCAL_SCRIPT_PRECHECK'
STEP_TYPE_RUN_OBJECTSTORE_SCRIPT = 'RUN_OBJECTSTORE_SCRIPT'
STEP_TYPE_RUN_OBJECTSTORE_SCRIPT_PRECHECK = 'RUN_OBJECTSTORE_SCRIPT_PRECHECK'
__init__(**kwargs)

Initializes a new RunLocalScriptUserDefinedStep object with values from keyword arguments. The default value of the step_type attribute of this class is RUN_LOCAL_SCRIPT and it should not be changed. The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters:
  • step_type (str) – The value to assign to the step_type property of this RunLocalScriptUserDefinedStep. Allowed values for this property are: “RUN_OBJECTSTORE_SCRIPT_PRECHECK”, “RUN_LOCAL_SCRIPT_PRECHECK”, “INVOKE_FUNCTION_PRECHECK”, “RUN_OBJECTSTORE_SCRIPT”, “RUN_LOCAL_SCRIPT”, “INVOKE_FUNCTION”
  • run_on_instance_id (str) – The value to assign to the run_on_instance_id property of this RunLocalScriptUserDefinedStep.
  • run_on_instance_region (str) – The value to assign to the run_on_instance_region property of this RunLocalScriptUserDefinedStep.
  • script_command (str) – The value to assign to the script_command property of this RunLocalScriptUserDefinedStep.
  • run_as_user (str) – The value to assign to the run_as_user property of this RunLocalScriptUserDefinedStep.
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.

run_as_user

Gets the run_as_user of this RunLocalScriptUserDefinedStep. The userid on the instance to be used for executing the script or command.

Example: opc

Returns:The run_as_user of this RunLocalScriptUserDefinedStep.
Return type:str
run_on_instance_id

[Required] Gets the run_on_instance_id of this RunLocalScriptUserDefinedStep. The OCID of the instance on which this script or command should be executed.

For moving instances: runOnInstanceId must be the OCID of the instance in the region where the instance is currently present.

For non-moving instances: runOnInstanceId must be the OCID of the non-moving instance.

Example: ocid1.instance.oc1..uniqueID

Returns:The run_on_instance_id of this RunLocalScriptUserDefinedStep.
Return type:str
run_on_instance_region

[Required] Gets the run_on_instance_region of this RunLocalScriptUserDefinedStep. The region in which the instance is present.

Example: us-ashburn-1

Returns:The run_on_instance_region of this RunLocalScriptUserDefinedStep.
Return type:str
script_command

[Required] Gets the script_command of this RunLocalScriptUserDefinedStep. The script name and arguments.

Example: /usr/bin/python3 /home/opc/scripts/my_app_script.py arg1 arg2 arg3

Returns:The script_command of this RunLocalScriptUserDefinedStep.
Return type:str
step_type

[Required] Gets the step_type of this DrPlanUserDefinedStep. The type of the user-defined step.

RUN_OBJECTSTORE_SCRIPT_PRECHECK - A step which performs a precheck on a script stored
in OCI object storage.
RUN_LOCAL_SCRIPT_PRECHECK - A step which performs a precheck on a script which resides
locally on a compute instance.
INVOKE_FUNCTION_PRECHECK - A step which performs a precheck on an OCI function.
See https://docs.oracle.com/en-us/iaas/Content/Functions/home.htm.

RUN_OBJECTSTORE_SCRIPT - A step which runs a script stored in OCI object storage.

RUN_LOCAL_SCRIPT - A step which runs a script that resides locally on a compute instance.

INVOKE_FUNCTION - A step which invokes an OCI function.
See https://docs.oracle.com/en-us/iaas/Content/Functions/home.htm.

Allowed values for this property are: “RUN_OBJECTSTORE_SCRIPT_PRECHECK”, “RUN_LOCAL_SCRIPT_PRECHECK”, “INVOKE_FUNCTION_PRECHECK”, “RUN_OBJECTSTORE_SCRIPT”, “RUN_LOCAL_SCRIPT”, “INVOKE_FUNCTION”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns:The step_type of this DrPlanUserDefinedStep.
Return type:str