Script¶
- class oci.apm_synthetics.models.Script(**kwargs)¶
Bases:
objectThe information about the script.
Attributes:
A constant which can be used with the content_type property of a Script.
A constant which can be used with the content_type property of a Script.
A constant which can be used with the content_type property of a Script.
Gets the content of this Script.
Gets the content_file_name of this Script.
Gets the content_size_in_bytes of this Script.
[Required] Gets the content_type of this Script.
Gets the defined_tags of this Script.
[Required] Gets the display_name of this Script.
Gets the freeform_tags of this Script.
[Required] Gets the id of this Script.
[Required] Gets the monitor_status_count_map of this Script.
Gets the parameters of this Script.
Gets the time_created of this Script.
Gets the time_updated of this Script.
Gets the time_uploaded of this Script.
Methods:
__init__(**kwargs)Initializes a new Script object with values from keyword arguments.
- CONTENT_TYPE_JS = 'JS'¶
A constant which can be used with the content_type property of a Script. This constant has a value of “JS”
- CONTENT_TYPE_PLAYWRIGHT_TS = 'PLAYWRIGHT_TS'¶
A constant which can be used with the content_type property of a Script. This constant has a value of “PLAYWRIGHT_TS”
- CONTENT_TYPE_SIDE = 'SIDE'¶
A constant which can be used with the content_type property of a Script. This constant has a value of “SIDE”
- __init__(**kwargs)¶
Initializes a new Script 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 Script.
display_name (str) – The value to assign to the display_name property of this Script.
content_type (str) – The value to assign to the content_type property of this Script. Allowed values for this property are: “SIDE”, “JS”, “PLAYWRIGHT_TS”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
content (str) – The value to assign to the content property of this Script.
time_uploaded (datetime) – The value to assign to the time_uploaded property of this Script.
content_size_in_bytes (int) – The value to assign to the content_size_in_bytes property of this Script.
content_file_name (str) – The value to assign to the content_file_name property of this Script.
parameters (list[oci.apm_synthetics.models.ScriptParameterInfo]) – The value to assign to the parameters property of this Script.
monitor_status_count_map (oci.apm_synthetics.models.MonitorStatusCountMap) – The value to assign to the monitor_status_count_map property of this Script.
time_created (datetime) – The value to assign to the time_created property of this Script.
time_updated (datetime) – The value to assign to the time_updated property of this Script.
freeform_tags (dict(str, str)) – The value to assign to the freeform_tags property of this Script.
defined_tags (dict(str, dict(str, object))) – The value to assign to the defined_tags property of this Script.
- property content¶
Gets the content of this Script. The content of the script. It may contain custom-defined tags that can be used for setting dynamic parameters. The format to set dynamic parameters is: <ORAP><ON>param name</ON><OV>param value</OV><OS>isParamValueSecret(true/false)</OS></ORAP>. Param value and isParamValueSecret are optional, the default value for isParamValueSecret is false. Examples: With mandatory param name : <ORAP><ON>param name</ON></ORAP> With parameter name and value : <ORAP><ON>param name</ON><OV>param value</OV></ORAP> Note that the content is valid if it matches the given content type. For example, if the content type is SIDE, then the content should be in Side script format. If the content type is JS, then the content should be in JavaScript format. If the content type is PLAYWRIGHT_TS, then the content should be in TypeScript format.
- Returns
The content of this Script.
- Return type
str
- property content_file_name¶
Gets the content_file_name of this Script. File name of the uploaded script content.
- Returns
The content_file_name of this Script.
- Return type
str
- property content_size_in_bytes¶
Gets the content_size_in_bytes of this Script. Size of the script content.
- Returns
The content_size_in_bytes of this Script.
- Return type
int
- property content_type¶
[Required] Gets the content_type of this Script. Content type of the script.
Allowed values for this property are: “SIDE”, “JS”, “PLAYWRIGHT_TS”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
- Returns
The content_type of this Script.
- Return type
str
- property defined_tags¶
Gets the defined_tags of this Script. 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 Script.
- Return type
dict(str, dict(str, object))
- property display_name¶
[Required] Gets the display_name of this Script. Unique name that can be edited. The name should not contain any confidential information.
- Returns
The display_name of this Script.
- Return type
str
- property freeform_tags¶
Gets the freeform_tags of this Script. 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 Script.
- Return type
dict(str, str)
- property id¶
[Required] Gets the id of this Script. 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 id of this Script.
- Return type
str
- property monitor_status_count_map¶
[Required] Gets the monitor_status_count_map of this Script.
- Returns
The monitor_status_count_map of this Script.
- Return type
- property parameters¶
Gets the parameters of this Script. List of script parameters. Example: [{“scriptParameter”: {“paramName”: “userid”, “paramValue”:”testuser”, “isSecret”: false}, “isOverwritten”: false}]
- Returns
The parameters of this Script.
- Return type
- property time_created¶
Gets the time_created of this Script. 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 Script.
- Return type
datetime
- property time_updated¶
Gets the time_updated of this Script. 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 Script.
- Return type
datetime
- property time_uploaded¶
Gets the time_uploaded of this Script. The time the script was uploaded.
- Returns
The time_uploaded of this Script.
- Return type
datetime