ApmSyntheticClient

class oci.apm_synthetics.ApmSyntheticClient(config, **kwargs)

Use the Application Performance Monitoring Synthetic Monitoring API to query synthetic scripts and monitors.

Methods

__init__(config, **kwargs) Creates a new service client
create_monitor(apm_domain_id, …) Creates a new monitor.
create_script(apm_domain_id, …) Creates a new script.
delete_monitor(apm_domain_id, monitor_id, …) Deletes the specified monitor.
delete_script(apm_domain_id, script_id, **kwargs) Deletes the specified script.
get_monitor(apm_domain_id, monitor_id, **kwargs) Gets the configuration of the monitor identified by the OCID.
get_monitor_result(apm_domain_id, …) Gets the results for a specific execution of a monitor identified by OCID.
get_script(apm_domain_id, script_id, **kwargs) Gets the configuration of the script identified by the OCID.
list_monitors(apm_domain_id, **kwargs) Returns a list of monitors.
list_public_vantage_points(apm_domain_id, …) Returns a list of public vantage points.
list_scripts(apm_domain_id, **kwargs) Returns a list of scripts.
update_monitor(apm_domain_id, monitor_id, …) Updates the monitor.
update_script(apm_domain_id, script_id, …) Updates the script.
__init__(config, **kwargs)

Creates a new service client

Parameters:
  • config (dict) – Configuration keys and values as per SDK and Tool Configuration. The from_file() method can be used to load configuration from a file. Alternatively, a dict can be passed. You can validate_config the dict using validate_config()
  • service_endpoint (str) – (optional) The endpoint of the service to call using this client. For example https://iaas.us-ashburn-1.oraclecloud.com. If this keyword argument is not provided then it will be derived using the region in the config parameter. You should only provide this keyword argument if you have an explicit need to specify a service endpoint.
  • timeout (float or tuple(float, float)) – (optional) The connection and read timeouts for the client. The default values are connection timeout 10 seconds and read timeout 60 seconds. This keyword argument can be provided as a single float, in which case the value provided is used for both the read and connection timeouts, or as a tuple of two floats. If a tuple is provided then the first value is used as the connection timeout and the second value as the read timeout.
  • signer (AbstractBaseSigner) –

    (optional) The signer to use when signing requests made by the service client. The default is to use a Signer based on the values provided in the config parameter.

    One use case for this parameter is for Instance Principals authentication by passing an instance of InstancePrincipalsSecurityTokenSigner as the value for this keyword argument

  • retry_strategy (obj) –

    (optional) A retry strategy to apply to all calls made by this service client (i.e. at the client level). There is no retry strategy applied by default. Retry strategies can also be applied at the operation level by passing a retry_strategy keyword argument as part of calling the operation. Any value provided at the operation level will override whatever is specified at the client level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

create_monitor(apm_domain_id, create_monitor_details, **kwargs)

Creates a new monitor.

Parameters:
  • apm_domain_id (str) – (required) The APM domain ID the request is intended for.
  • create_monitor_details (oci.apm_synthetics.models.CreateMonitorDetails) – (required) The configuration details for creating a monitor.
  • opc_retry_token (str) – (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.
  • opc_request_id (str) – (optional) Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type Monitor

Return type:

Response

Example:

Click here to see an example of how to use create_monitor API.

create_script(apm_domain_id, create_script_details, **kwargs)

Creates a new script.

Parameters:
  • apm_domain_id (str) – (required) The APM domain ID the request is intended for.
  • create_script_details (oci.apm_synthetics.models.CreateScriptDetails) – (required) The configuration details for creating a script.
  • opc_retry_token (str) – (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.
  • opc_request_id (str) – (optional) Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type Script

Return type:

Response

Example:

Click here to see an example of how to use create_script API.

delete_monitor(apm_domain_id, monitor_id, **kwargs)

Deletes the specified monitor.

Parameters:
  • apm_domain_id (str) – (required) The APM domain ID the request is intended for.
  • monitor_id (str) – (required) The OCID of the monitor.
  • if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.
  • opc_request_id (str) – (optional) Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type None

Return type:

Response

Example:

Click here to see an example of how to use delete_monitor API.

delete_script(apm_domain_id, script_id, **kwargs)

Deletes the specified script.

Parameters:
  • apm_domain_id (str) – (required) The APM domain ID the request is intended for.
  • script_id (str) – (required) The OCID of the script.
  • if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.
  • opc_request_id (str) – (optional) Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type None

Return type:

Response

Example:

Click here to see an example of how to use delete_script API.

get_monitor(apm_domain_id, monitor_id, **kwargs)

Gets the configuration of the monitor identified by the OCID.

Parameters:
  • apm_domain_id (str) – (required) The APM domain ID the request is intended for.
  • monitor_id (str) – (required) The OCID of the monitor.
  • opc_request_id (str) – (optional) Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type Monitor

Return type:

Response

Example:

Click here to see an example of how to use get_monitor API.

get_monitor_result(apm_domain_id, monitor_id, vantage_point, result_type, result_content_type, execution_time, **kwargs)

Gets the results for a specific execution of a monitor identified by OCID. The results are in a HAR file, Screenshot, or Console Log.

Parameters:
  • apm_domain_id (str) – (required) The APM domain ID the request is intended for.
  • monitor_id (str) – (required) The OCID of the monitor.
  • vantage_point (str) – (required) The vantagePoint name.
  • result_type (str) – (required) The result type har or screenshot or log.
  • result_content_type (str) – (required) The result content type zip or raw.
  • execution_time (str) – (required) The time the object was posted.
  • opc_request_id (str) – (optional) Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type MonitorResult

Return type:

Response

Example:

Click here to see an example of how to use get_monitor_result API.

get_script(apm_domain_id, script_id, **kwargs)

Gets the configuration of the script identified by the OCID.

Parameters:
  • apm_domain_id (str) – (required) The APM domain ID the request is intended for.
  • script_id (str) – (required) The OCID of the script.
  • opc_request_id (str) – (optional) Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type Script

Return type:

Response

Example:

Click here to see an example of how to use get_script API.

list_monitors(apm_domain_id, **kwargs)

Returns a list of monitors.

Parameters:
  • apm_domain_id (str) – (required) The APM domain ID the request is intended for.
  • display_name (str) – (optional) A filter to return only resources that match the entire display name given.
  • script_id (str) – (optional) A filter to return only monitors using scriptId.
  • monitor_type (str) – (optional) A filter to return only monitors that match the given monitor type. Supported values are SCRIPTED_BROWSER, BROWSER, SCRIPTED_REST and REST.
  • status (str) –

    (optional) A filter to return only monitors that match the status given.

    Allowed values are: “ENABLED”, “DISABLED”, “INVALID”

  • limit (int) – (optional) The maximum number of items to return.
  • page (str) –

    (optional) For list pagination. The maximum number of results per page, or items to return in a paginated “List” call. For important details about how pagination works, see List Pagination.

    Example: 50

  • sort_order (str) –

    (optional) The sort order to use, either ascending (ASC) or descending (DESC). Default sort order is ascending.

    Allowed values are: “ASC”, “DESC”

  • sort_by (str) –

    (optional) The field to sort by. Only one sort order may be provided. Default order of displayName is ascending. Default order of timeCreated and timeUpdated is descending. The displayName sort by is case insensitive.

    Allowed values are: “displayName”, “timeCreated”, “timeUpdated”, “status”, “monitorType”

  • opc_request_id (str) – (optional) Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type MonitorCollection

Return type:

Response

Example:

Click here to see an example of how to use list_monitors API.

list_public_vantage_points(apm_domain_id, **kwargs)

Returns a list of public vantage points.

Parameters:
  • apm_domain_id (str) – (required) The APM domain ID the request is intended for.
  • limit (int) – (optional) The maximum number of items to return.
  • page (str) –

    (optional) For list pagination. The maximum number of results per page, or items to return in a paginated “List” call. For important details about how pagination works, see List Pagination.

    Example: 50

  • sort_order (str) –

    (optional) The sort order to use, either ascending (ASC) or descending (DESC). Default sort order is ascending.

    Allowed values are: “ASC”, “DESC”

  • sort_by (str) –

    (optional) The field to sort by. You can provide one sort by (sortBy). Default order for displayName or name is ascending. The displayName or name sort by is case insensitive.

    Allowed values are: “name”, “displayName”

  • display_name (str) – (optional) A filter to return only resources that match the entire display name given.
  • name (str) – (optional) A filter to return only resources that match the entire name given.
  • opc_request_id (str) – (optional) Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type PublicVantagePointCollection

Return type:

Response

Example:

Click here to see an example of how to use list_public_vantage_points API.

list_scripts(apm_domain_id, **kwargs)

Returns a list of scripts.

Parameters:
  • apm_domain_id (str) – (required) The APM domain ID the request is intended for.
  • opc_request_id (str) – (optional) Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • display_name (str) – (optional) A filter to return only resources that match the entire display name given.
  • content_type (str) – (optional) A filter to return only resources that match the content type given.
  • limit (int) – (optional) The maximum number of items to return.
  • page (str) –

    (optional) For list pagination. The maximum number of results per page, or items to return in a paginated “List” call. For important details about how pagination works, see List Pagination.

    Example: 50

  • sort_order (str) –

    (optional) The sort order to use, either ascending (ASC) or descending (DESC). Default sort order is ascending.

    Allowed values are: “ASC”, “DESC”

  • sort_by (str) –

    (optional) The field to sort by. Only one sort order may be provided. Default order of displayName and contentType is ascending. Default order of timeCreated and timeUpdated is descending. The displayName sort by is case insensitive.

    Allowed values are: “displayName”, “timeCreated”, “timeUpdated”, “contentType”

  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type ScriptCollection

Return type:

Response

Example:

Click here to see an example of how to use list_scripts API.

update_monitor(apm_domain_id, monitor_id, update_monitor_details, **kwargs)

Updates the monitor.

Parameters:
  • apm_domain_id (str) – (required) The APM domain ID the request is intended for.
  • monitor_id (str) – (required) The OCID of the monitor.
  • update_monitor_details (oci.apm_synthetics.models.UpdateMonitorDetails) – (required) The information to be updated.
  • if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.
  • opc_request_id (str) – (optional) Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type Monitor

Return type:

Response

Example:

Click here to see an example of how to use update_monitor API.

update_script(apm_domain_id, script_id, update_script_details, **kwargs)

Updates the script.

Parameters:
  • apm_domain_id (str) – (required) The APM domain ID the request is intended for.
  • script_id (str) – (required) The OCID of the script.
  • update_script_details (oci.apm_synthetics.models.UpdateScriptDetails) – (required) The information to be updated.
  • if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.
  • opc_request_id (str) – (optional) Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type Script

Return type:

Response

Example:

Click here to see an example of how to use update_script API.