Monitor

class oci.apm_synthetics.models.Monitor(**kwargs)

Bases: object

The information about a monitor.

Attributes

MONITOR_TYPE_BROWSER A constant which can be used with the monitor_type property of a Monitor.
MONITOR_TYPE_REST A constant which can be used with the monitor_type property of a Monitor.
MONITOR_TYPE_SCRIPTED_BROWSER A constant which can be used with the monitor_type property of a Monitor.
MONITOR_TYPE_SCRIPTED_REST A constant which can be used with the monitor_type property of a Monitor.
STATUS_DISABLED A constant which can be used with the status property of a Monitor.
STATUS_ENABLED A constant which can be used with the status property of a Monitor.
STATUS_INVALID A constant which can be used with the status property of a Monitor.
configuration Gets the configuration of this Monitor.
defined_tags Gets the defined_tags of this Monitor.
display_name [Required] Gets the display_name of this Monitor.
freeform_tags Gets the freeform_tags of this Monitor.
id [Required] Gets the id of this Monitor.
is_run_once [Required] Gets the is_run_once of this Monitor.
monitor_type [Required] Gets the monitor_type of this Monitor.
repeat_interval_in_seconds [Required] Gets the repeat_interval_in_seconds of this Monitor.
script_id [Required] Gets the script_id of this Monitor.
script_name [Required] Gets the script_name of this Monitor.
script_parameters Gets the script_parameters of this Monitor.
status [Required] Gets the status of this Monitor.
target Gets the target of this Monitor.
time_created Gets the time_created of this Monitor.
time_updated Gets the time_updated of this Monitor.
timeout_in_seconds [Required] Gets the timeout_in_seconds of this Monitor.
vantage_point_count [Required] Gets the vantage_point_count of this Monitor.
vantage_points [Required] Gets the vantage_points of this Monitor.

Methods

__init__(**kwargs) Initializes a new Monitor object with values from keyword arguments.
MONITOR_TYPE_BROWSER = 'BROWSER'

A constant which can be used with the monitor_type property of a Monitor. This constant has a value of “BROWSER”

MONITOR_TYPE_REST = 'REST'

A constant which can be used with the monitor_type property of a Monitor. This constant has a value of “REST”

MONITOR_TYPE_SCRIPTED_BROWSER = 'SCRIPTED_BROWSER'

A constant which can be used with the monitor_type property of a Monitor. This constant has a value of “SCRIPTED_BROWSER”

MONITOR_TYPE_SCRIPTED_REST = 'SCRIPTED_REST'

A constant which can be used with the monitor_type property of a Monitor. This constant has a value of “SCRIPTED_REST”

STATUS_DISABLED = 'DISABLED'

A constant which can be used with the status property of a Monitor. This constant has a value of “DISABLED”

STATUS_ENABLED = 'ENABLED'

A constant which can be used with the status property of a Monitor. This constant has a value of “ENABLED”

STATUS_INVALID = 'INVALID'

A constant which can be used with the status property of a Monitor. This constant has a value of “INVALID”

__init__(**kwargs)

Initializes a new Monitor 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 Monitor.
  • display_name (str) – The value to assign to the display_name property of this Monitor.
  • monitor_type (str) – The value to assign to the monitor_type property of this Monitor. Allowed values for this property are: “SCRIPTED_BROWSER”, “BROWSER”, “SCRIPTED_REST”, “REST”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
  • vantage_points (list[oci.apm_synthetics.models.VantagePointInfo]) – The value to assign to the vantage_points property of this Monitor.
  • vantage_point_count (int) – The value to assign to the vantage_point_count property of this Monitor.
  • script_id (str) – The value to assign to the script_id property of this Monitor.
  • script_name (str) – The value to assign to the script_name property of this Monitor.
  • status (str) – The value to assign to the status property of this Monitor. Allowed values for this property are: “ENABLED”, “DISABLED”, “INVALID”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
  • repeat_interval_in_seconds (int) – The value to assign to the repeat_interval_in_seconds property of this Monitor.
  • is_run_once (bool) – The value to assign to the is_run_once property of this Monitor.
  • timeout_in_seconds (int) – The value to assign to the timeout_in_seconds property of this Monitor.
  • target (str) – The value to assign to the target property of this Monitor.
  • script_parameters (list[oci.apm_synthetics.models.MonitorScriptParameterInfo]) – The value to assign to the script_parameters property of this Monitor.
  • configuration (oci.apm_synthetics.models.MonitorConfiguration) – The value to assign to the configuration property of this Monitor.
  • time_created (datetime) – The value to assign to the time_created property of this Monitor.
  • time_updated (datetime) – The value to assign to the time_updated property of this Monitor.
  • freeform_tags (dict(str, str)) – The value to assign to the freeform_tags property of this Monitor.
  • defined_tags (dict(str, dict(str, object))) – The value to assign to the defined_tags property of this Monitor.
configuration

Gets the configuration of this Monitor.

Returns:The configuration of this Monitor.
Return type:oci.apm_synthetics.models.MonitorConfiguration
defined_tags

Gets the defined_tags of this Monitor. Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {“foo-namespace”: {“bar-key”: “value”}}

Returns:The defined_tags of this Monitor.
Return type:dict(str, dict(str, object))
display_name

[Required] Gets the display_name of this Monitor. Unique name that can be edited. The name should not contain any confidential information.

Returns:The display_name of this Monitor.
Return type:str
freeform_tags

Gets the freeform_tags of this Monitor. Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {“bar-key”: “value”}

Returns:The freeform_tags of this Monitor.
Return type:dict(str, str)
id

[Required] Gets the id of this Monitor. The OCID of the monitor.

Returns:The id of this Monitor.
Return type:str
is_run_once

[Required] Gets the is_run_once of this Monitor. If runOnce is enabled, then the monitor will run once.

Returns:The is_run_once of this Monitor.
Return type:bool
monitor_type

[Required] Gets the monitor_type of this Monitor. Type of the monitor.

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

Returns:The monitor_type of this Monitor.
Return type:str
repeat_interval_in_seconds

[Required] Gets the repeat_interval_in_seconds of this Monitor. Interval in seconds after the start time when the job should be repeated. Minimum repeatIntervalInSeconds should be 300 seconds.

Returns:The repeat_interval_in_seconds of this Monitor.
Return type:int
script_id

[Required] Gets the script_id of this Monitor. The OCID of the script. scriptId is mandatory for creation of SCRIPTED_BROWSER and SCRIPTED_REST monitor types. For other monitor types, it should be set to null.

Returns:The script_id of this Monitor.
Return type:str
script_name

[Required] Gets the script_name of this Monitor. Name of the script.

Returns:The script_name of this Monitor.
Return type:str
script_parameters

Gets the script_parameters of this Monitor. List of script parameters. Example: [{“monitorScriptParameter”: {“paramName”: “userid”, “paramValue”:”testuser”}, “isSecret”: false, “isOverwritten”: false}]

Returns:The script_parameters of this Monitor.
Return type:list[oci.apm_synthetics.models.MonitorScriptParameterInfo]
status

[Required] Gets the status of this Monitor. Enables or disables the monitor.

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

Returns:The status of this Monitor.
Return type:str
target

Gets the target of this Monitor. Specify the endpoint on which to run the monitor. For BROWSER and REST monitor types, target is mandatory. If target is specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script (specified by scriptId in monitor) against the specified target endpoint. If target is not specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script as it is.

Returns:The target of this Monitor.
Return type:str
time_created

Gets the time_created of this Monitor. The time the resource was created, expressed in RFC 3339 timestamp format. Example: 2020-02-12T22:47:12.613Z

Returns:The time_created of this Monitor.
Return type:datetime
time_updated

Gets the time_updated of this Monitor. The time the resource was updated, expressed in RFC 3339 timestamp format. Example: 2020-02-13T22:47:12.613Z

Returns:The time_updated of this Monitor.
Return type:datetime
timeout_in_seconds

[Required] Gets the timeout_in_seconds of this Monitor. Timeout in seconds. Timeout cannot be more than 30% of repeatIntervalInSeconds time for monitors. Also, timeoutInSeconds should be a multiple of 60. Monitor will be allowed to run only for timeoutInSeconds time. It would be terminated after that.

Returns:The timeout_in_seconds of this Monitor.
Return type:int
vantage_point_count

[Required] Gets the vantage_point_count of this Monitor. Number of vantage points where monitor is running.

Returns:The vantage_point_count of this Monitor.
Return type:int
vantage_points

[Required] Gets the vantage_points of this Monitor. List of vantage points from where monitor is running.

Returns:The vantage_points of this Monitor.
Return type:list[oci.apm_synthetics.models.VantagePointInfo]