403Webshell
Server IP : 162.144.4.212  /  Your IP : 216.73.216.108
Web Server : Apache
System : Linux gator2125.hostgator.com 5.14.0-162.23.1.9991722448259.nf.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 31 18:11:45 UTC 2024 x86_64
User : cozeellc ( 2980)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /usr/libexec/oracle-cloud-agent/plugins/osms/oci/stack_monitoring/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /usr/libexec/oracle-cloud-agent/plugins/osms/oci/stack_monitoring/stack_monitoring_client.pyc
a

O��f�"�@s�ddlmZddlmZddlmZddlmZmZddlm	Z	ddl
mZmZddl
mZddlmZmZmZd	d
lmZed�ZGdd
�d
e�ZdS)�)�absolute_import)�requests)�six)�retry�circuit_breaker)�
BaseClient)�get_config_value_or_default�validate_config)�Signer)�Sentinel�#get_signer_from_authentication_type�AUTHENTICATION_TYPE_FIELD_NAME�)�stack_monitoring_type_mapping�Missingc@s�eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd(d)�Zd*d+�Zd,d-�Zd.S)/�StackMonitoringClientz
    Stack Monitoring API.
    c	Ks
t||�d�d�d|vr$|d}nDt|vr6t|�}n2t|d|d|d|�d�t|d�|�d�d	�}d
|�d�dd
|�dd�|�dtj�d�}d|vr�|�d�|d<|�d�dur�tj|d<d|vr�|�d�|d<t	d||t
fi|��|_|�d�|_|�d�|_
dS)a�
        Creates a new service client

        :param dict config:
            Configuration keys and values as per `SDK and Tool Configuration <https://docs.cloud.oracle.com/Content/API/Concepts/sdkconfig.htm>`__.
            The :py:meth:`~oci.config.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 :py:meth:`~oci.config.validate_config`

        :param str service_endpoint: (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.

        :param timeout: (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.
        :type timeout: float or tuple(float, float)

        :param signer: (optional)
            The signer to use when signing requests made by the service client. The default is to use a :py:class:`~oci.signer.Signer` based on the values
            provided in the config parameter.

            One use case for this parameter is for `Instance Principals authentication <https://docs.cloud.oracle.com/Content/Identity/Tasks/callingservicesfrominstances.htm>`__
            by passing an instance of :py:class:`~oci.auth.signers.InstancePrincipalsSecurityTokenSigner` as the value for this keyword argument
        :type signer: :py:class:`~oci.signer.AbstractBaseSigner`

        :param obj retry_strategy: (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 :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY`
            is also available. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

        :param obj circuit_breaker_strategy: (optional)
            A circuit breaker strategy to apply to all calls made by this service client (i.e. at the client level).
            This client uses :py:data:`~oci.circuit_breaker.DEFAULT_CIRCUIT_BREAKER_STRATEGY` as default if no circuit breaker strategy is provided.
            The specifics of circuit breaker strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/circuit_breakers.html>`__.

        :param function circuit_breaker_callback: (optional)
            Callback function to receive any exceptions triggerred by the circuit breaker.

        :param allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this client should allow control characters in the response object. By default, the client will not
            allow control characters to be in the response object.
        �signer)r�tenancy�user�fingerprint�key_file�pass_phrase�key_content)rrr�private_key_file_locationr�private_key_contentT�service_endpointz	/20210330z9https://stack-monitoring.{region}.oci.{secondLevelDomain}�skip_deserializationF�circuit_breaker_strategy)�regional_clientr�	base_path�service_endpoint_templaterr�timeoutN�allow_control_chars�stack_monitoring�retry_strategy�circuit_breaker_callback)r	�getr
rr
rr�GLOBAL_CIRCUIT_BREAKER_STRATEGY� DEFAULT_CIRCUIT_BREAKER_STRATEGYrr�base_clientr$r%)�self�config�kwargsr�base_client_init_kwargs�r.��/sparta/input/_build_configuration/image_build+validate/lib/bmcenv/lib64/python3.9/site-packages/oci/stack_monitoring/stack_monitoring_client.py�__init__s:0

�

�
zStackMonitoringClient.__init__c
sd}d}d}d}gd���fdd�t�|�D�}|rBtd�|���d	d	|�d
t�|�dt�|�dt�d
�}dd�t�|�D�}|jj|�d�|j	d�}	|	r�t
|	tj�s�|j�
|�|j�|�|	�|j�|	j|jj||||d|�d�||d�	S|jj||||d|�d�||d�SdS)a�

        Create an association between two monitored resources.


        :param oci.stack_monitoring.models.AssociateMonitoredResourcesDetails associate_monitored_resources_details: (required)
            Associate resources.

        :param str opc_request_id: (optional)
            Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
            particular request, please provide the request ID.

        :param str opc_retry_token: (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.

        :param str if_match: (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.

        :param obj retry_strategy: (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 :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.stack_monitoring.models.MonitoredResourceAssociation`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.90.0/stackmonitoring/associate_monitored_resources.py.html>`__ to see an example of how to use associate_monitored_resources API.
        z7/monitoredResources/actions/associateMonitoredResources�POST�associate_monitored_resourceszmhttps://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/MonitoredResource/AssociateMonitoredResources�r"r$�opc_request_id�opc_retry_token�if_matchcsg|]}|�vr|�qSr.r.��.0�_key��expected_kwargsr.r/�
<listcomp>��zGStackMonitoringClient.associate_monitored_resources.<locals>.<listcomp>z6associate_monitored_resources got unknown kwargs: {!r}�application/jsonr4r5r6��accept�content-type�opc-request-id�opc-retry-token�if-matchcSs&i|]\}}|tur|dur||�qS�N��missing�r8�k�vr.r.r/�
<dictcomp>�r=zGStackMonitoringClient.associate_monitored_resources.<locals>.<dictcomp>r$��operation_retry_strategy�client_retry_strategy�MonitoredResourceAssociationr"��
resource_path�method�
header_params�body�
response_typer"�operation_name�api_reference_linkN�r�iterkeys�
ValueError�formatr&rG�	iteritemsr)�get_preferred_retry_strategyr$�
isinstancer�NoneRetryStrategy�add_opc_retry_token_if_needed�add_opc_client_retries_header�add_circuit_breaker_callbackr%�make_retrying_call�call_api)
r*�%associate_monitored_resources_detailsr,rQrRrVrW�extra_kwargsrSr$r.r:r/r2ks^,�


����z3StackMonitoringClient.associate_monitored_resourcescs|d}d}d}d}gd���fdd�t�|�D�}|rBtd�|���d	|i}	d
d�t�|	�D�}	t�|	�D]:\}
}|dus�t|tj�rht|���d
krhtd�|
���qhdd|�	dt
�|�	dt
�|�	dt
�d�}dd�t�|�D�}|jj|�	d�|j
d�}
|
�rVt|
tj��s0|j�|�|j�|�|
�|j�|
j|jj|||	|||�	d�||d�	S|jj|||	|||�	d�||d�SdS)a�
        Moves a MonitoredResource resource from one compartment identifier to another. When provided, If-Match is checked against ETag values of the resource.


        :param str monitored_resource_id: (required)
            The `OCID`__ of monitored resource.

            __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm

        :param oci.stack_monitoring.models.ChangeMonitoredResourceCompartmentDetails change_monitored_resource_compartment_details: (required)
            The information to be updated.

        :param str if_match: (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.

        :param str opc_request_id: (optional)
            Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
            particular request, please provide the request ID.

        :param str opc_retry_token: (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.

        :param obj retry_strategy: (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 :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type None
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.90.0/stackmonitoring/change_monitored_resource_compartment.py.html>`__ to see an example of how to use change_monitored_resource_compartment API.
        zC/monitoredResources/{monitoredResourceId}/actions/changeCompartmentr1�%change_monitored_resource_compartmentzthttps://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/MonitoredResource/ChangeMonitoredResourceCompartment)r"r$r6r4r5csg|]}|�vr|�qSr.r.r7r:r.r/r<r=zOStackMonitoringClient.change_monitored_resource_compartment.<locals>.<listcomp>z>change_monitored_resource_compartment got unknown kwargs: {!r}�monitoredResourceIdcSsi|]\}}|tur||�qSr.rFrHr.r.r/rKr=zOStackMonitoringClient.change_monitored_resource_compartment.<locals>.<dictcomp>Nr�7Parameter {} cannot be None, whitespace or empty stringr>r6r4r5)r@rArDrBrCcSs&i|]\}}|tur|dur||�qSrErFrHr.r.r/rK%r=r$rLr"�rQrR�path_paramsrSrTr"rVrW�rrYrZr[r\r^�string_types�len�stripr&rGr)r]r$rr_r`rarbr%rcrd)r*�monitored_resource_id�-change_monitored_resource_compartment_detailsr,rQrRrVrWrfrkrIrJrSr$r.r:r/rg�sj1��$


����z;StackMonitoringClient.change_monitored_resource_compartmentc
sd}d}d}d}gd���fdd�t�|�D�}|rBtd�|���d	d	|�d
t�|�dt�d�}d
d�t�|�D�}|jj|�d�|j	d�}	|	r�t
|	tj�s�|j�
|�|j�|�|	�|j�|	j|jj||||d|�d�||d�	S|jj||||d|�d�||d�SdS)aP	
        API to create discovery Job and submit discovery Details to agent.


        :param oci.stack_monitoring.models.CreateDiscoveryJobDetails create_discovery_job_details: (required)
            Summary of source and credential discovery details.

        :param str opc_request_id: (optional)
            Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
            particular request, please provide the request ID.

        :param str opc_retry_token: (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.

        :param obj retry_strategy: (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 :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.stack_monitoring.models.DiscoveryJob`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.90.0/stackmonitoring/create_discovery_job.py.html>`__ to see an example of how to use create_discovery_job API.
        �/discoveryJobsr1�create_discovery_jobz_https://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/DiscoveryJob/CreateDiscoveryJob)r"r$r4r5csg|]}|�vr|�qSr.r.r7r:r.r/r<wr=z>StackMonitoringClient.create_discovery_job.<locals>.<listcomp>z-create_discovery_job got unknown kwargs: {!r}r>r4r5)r@rArBrCcSs&i|]\}}|tur|dur||�qSrErFrHr.r.r/rK�r=z>StackMonitoringClient.create_discovery_job.<locals>.<dictcomp>r$rL�DiscoveryJobr"rPNrX)
r*�create_discovery_job_detailsr,rQrRrVrWrfrSr$r.r:r/rsFs\%�

����z*StackMonitoringClient.create_discovery_jobc
sd}d}d}d}gd���fdd�t�|�D�}|rBtd�|���d	d	|�d
t�|�dt�|�dt�d
�}dd�t�|�D�}|jj|�d�|j	d�}	|	r�t
|	tj�s�|j�
|�|j�|�|	�|j�|	j|jj||||d|�d�||d�	S|jj||||d|�d�||d�SdS)a&
        Creates a new monitored resource for the given resource type


        :param oci.stack_monitoring.models.CreateMonitoredResourceDetails create_monitored_resource_details: (required)
            Details for the new Resource.

        :param str opc_retry_token: (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.

        :param str opc_request_id: (optional)
            Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
            particular request, please provide the request ID.

        :param str external_resource_id: (optional)
            Generally used by DBaaS to send the Database OCID stored on the DBaaS.
            The same will be passed to resource service to enable Stack Monitoring Service on DBM.
            This will be stored in Stack Monitoring Resource Service data store as identifier for monitored resource.
            If this header is not set as part of the request, then an id will be generated and stored for the resource.

        :param obj retry_strategy: (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 :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.stack_monitoring.models.MonitoredResource`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.90.0/stackmonitoring/create_monitored_resource.py.html>`__ to see an example of how to use create_monitored_resource API.
        z/monitoredResourcesr1�create_monitored_resourcezihttps://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/MonitoredResource/CreateMonitoredResource)r"r$r5r4�external_resource_idcsg|]}|�vr|�qSr.r.r7r:r.r/r<�r=zCStackMonitoringClient.create_monitored_resource.<locals>.<listcomp>z2create_monitored_resource got unknown kwargs: {!r}r>r5r4rw)r@rArCrBzexternal-resource-idcSs&i|]\}}|tur|dur||�qSrErFrHr.r.r/rK�r=zCStackMonitoringClient.create_monitored_resource.<locals>.<dictcomp>r$rL�MonitoredResourcer"rPNrX)
r*�!create_monitored_resource_detailsr,rQrRrVrWrfrSr$r.r:r/rv�s^+�


����z/StackMonitoringClient.create_monitored_resourcec

spd}d}d}d}gd���fdd�t�|�D�}|rBtd�|���d	|i}d
d�t�|�D�}t�|�D]:\}	}
|
dus�t|
tj�rht|
���d
krhtd�|	���qhdd|�	dt
�|�	dt
�d�}dd�t�|�D�}|jj|�	d�|j
d�}|dur�tj}|�rLt|tj��s(|j�|�|�|j�|j|jj|||||�	d�||d�S|jj|||||�	d�||d�SdS)a

        Deletes a DiscoveryJob by identifier


        :param str discovery_job_id: (required)
            The Discovery Job ID

        :param str if_match: (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.

        :param str opc_request_id: (optional)
            Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
            particular request, please provide the request ID.

        :param obj retry_strategy: (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 :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type None
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.90.0/stackmonitoring/delete_discovery_job.py.html>`__ to see an example of how to use delete_discovery_job API.
        �/discoveryJobs/{discoveryJobId}�DELETE�delete_discovery_jobz_https://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/DiscoveryJob/DeleteDiscoveryJob�r"r$r6r4csg|]}|�vr|�qSr.r.r7r:r.r/r<9r=z>StackMonitoringClient.delete_discovery_job.<locals>.<listcomp>z-delete_discovery_job got unknown kwargs: {!r}�discoveryJobIdcSsi|]\}}|tur||�qSr.rFrHr.r.r/rKBr=z>StackMonitoringClient.delete_discovery_job.<locals>.<dictcomp>Nrrir>r6r4�r@rArDrBcSs&i|]\}}|tur|dur||�qSrErFrHr.r.r/rKNr=r$rLr"�rQrRrkrSr"rVrW�rrYrZr[r\r^rmrnror&rGr)r]r$r�DEFAULT_RETRY_STRATEGYr_rarbr%rcrd�
r*�discovery_job_idr,rQrRrVrWrfrkrIrJrSr$r.r:r/r|sf%��$

���
�z*StackMonitoringClient.delete_discovery_jobcs�d}d}d}d}gd���fdd�t�|�D�}|rBtd�|���d	|i}d
d�t�|�D�}t�|�D]:\}	}
|
dus�t|
tj�rht|
���d
krhtd�|	���qhd|�	dt
�i}dd�t�|�D�}dd|�	dt
�|�	dt
�d�}dd�t�|�D�}|jj|�	d�|j
d�}
|
�rdt|
tj��s>|j�|�|
�|j�|
j|jj||||||�	d�||d�	S|jj||||||�	d�||d�SdS)aF	
        Deletes a monitored resource by identifier


        :param str monitored_resource_id: (required)
            The `OCID`__ of monitored resource.

            __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm

        :param str if_match: (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.

        :param str opc_request_id: (optional)
            Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
            particular request, please provide the request ID.

        :param bool is_delete_members: (optional)
            A filter to delete the associated children or not for given resource.

        :param obj retry_strategy: (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 :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type None
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.90.0/stackmonitoring/delete_monitored_resource.py.html>`__ to see an example of how to use delete_monitored_resource API.
        �)/monitoredResources/{monitoredResourceId}r{�delete_monitored_resourcezihttps://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/MonitoredResource/DeleteMonitoredResource)r"r$r6r4�is_delete_memberscsg|]}|�vr|�qSr.r.r7r:r.r/r<�r=zCStackMonitoringClient.delete_monitored_resource.<locals>.<listcomp>z2delete_monitored_resource got unknown kwargs: {!r}rhcSsi|]\}}|tur||�qSr.rFrHr.r.r/rK�r=zCStackMonitoringClient.delete_monitored_resource.<locals>.<dictcomp>Nrri�isDeleteMembersr�cSs&i|]\}}|tur|dur||�qSrErFrHr.r.r/rK�r=r>r6r4rcSs&i|]\}}|tur|dur||�qSrErFrHr.r.r/rK�r=r$rLr")rQrRrk�query_paramsrSr"rVrW�rrYrZr[r\r^rmrnror&rGr)r]r$rr_rarbr%rcrd)r*rpr,rQrRrVrWrfrkrIrJr�rSr$r.r:r/r�nsl*��$�

����z/StackMonitoringClient.delete_monitored_resourcec

sxd}d}d}d}gd���fdd�t�|�D�}|rBtd�|���d	|i}d
d�t�|�D�}t�|�D]:\}	}
|
dus�t|
tj�rht|
���d
krhtd�|	���qhdd|�	dt
�|�	dt
�|�	dt
�d�}dd�t�|�D�}|jj|�	d�|j
d�}|�rTt|tj��s0|j�|�|j�|�|�|j�|j|jj|||||�	d�||d�S|jj|||||�	d�||d�SdS)a�

        Disable external database resource monitoring.


        :param str monitored_resource_id: (required)
            The `OCID`__ of monitored resource.

            __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm

        :param str opc_retry_token: (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.

        :param str opc_request_id: (optional)
            Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
            particular request, please provide the request ID.

        :param str if_match: (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.

        :param obj retry_strategy: (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 :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type None
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.90.0/stackmonitoring/disable_external_database.py.html>`__ to see an example of how to use disable_external_database API.
        zI/monitoredResources/{monitoredResourceId}/actions/disableExternalDatabaser1�disable_external_databasezihttps://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/MonitoredResource/DisableExternalDatabase)r"r$r5r4r6csg|]}|�vr|�qSr.r.r7r:r.r/r<r=zCStackMonitoringClient.disable_external_database.<locals>.<listcomp>z2disable_external_database got unknown kwargs: {!r}rhcSsi|]\}}|tur||�qSr.rFrHr.r.r/rK#r=zCStackMonitoringClient.disable_external_database.<locals>.<dictcomp>Nrrir>r5r4r6�r@rArCrBrDcSs&i|]\}}|tur|dur||�qSrErFrHr.r.r/rK0r=r$rLr"r�rl�
r*rpr,rQrRrVrWrfrkrIrJrSr$r.r:r/r��sf.��$


���
�z/StackMonitoringClient.disable_external_databasec

sd}d}d}d}gd���fdd�t�|�D�}|rBtd�|���d	d	|�d
t�|�dt�|�dt�d
�}dd�t�|�D�}|jj|�d�|j	d�}	|	r�t
|	tj�s�|j�
|�|j�|�|	�|j�|	j|jj|||||�d�||d�S|jj|||||�d�||d�SdS)a�

        Removes associations between two monitored resources.


        :param oci.stack_monitoring.models.DisassociateMonitoredResourcesDetails disassociate_monitored_resources_details: (required)
            Disassociate resources.

        :param str opc_request_id: (optional)
            Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
            particular request, please provide the request ID.

        :param str opc_retry_token: (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.

        :param str if_match: (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.

        :param obj retry_strategy: (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 :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type None
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.90.0/stackmonitoring/disassociate_monitored_resources.py.html>`__ to see an example of how to use disassociate_monitored_resources API.
        z:/monitoredResources/actions/disassociateMonitoredResourcesr1� disassociate_monitored_resourceszphttps://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/MonitoredResource/DisassociateMonitoredResourcesr3csg|]}|�vr|�qSr.r.r7r:r.r/r<�r=zJStackMonitoringClient.disassociate_monitored_resources.<locals>.<listcomp>z9disassociate_monitored_resources got unknown kwargs: {!r}r>r4r5r6r?cSs&i|]\}}|tur|dur||�qSrErFrHr.r.r/rK�r=zJStackMonitoringClient.disassociate_monitored_resources.<locals>.<dictcomp>r$rLr")rQrRrSrTr"rVrWNrX)
r*�(disassociate_monitored_resources_detailsr,rQrRrVrWrfrSr$r.r:r/r�OsZ,�


���
�z6StackMonitoringClient.disassociate_monitored_resourcesc
sjd}d}d}d}gd���fdd�t�|�D�}|rBtd�|���d	|i}d
d�t�|�D�}t�|�D]:\}	}
|
dus�t|
tj�rht|
���d
krhtd�|	���qhdd|�	dt
�d�}dd�t�|�D�}|jj|�	d�|j
d�}|dur�tj}|�rDt|tj��s|j�|�|�|j�|j|jj||||d|�	d�||d�	S|jj||||d|�	d�||d�SdS)a�
        API to get the details of discovery Job by identifier.


        :param str discovery_job_id: (required)
            The Discovery Job ID

        :param str opc_request_id: (optional)
            Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
            particular request, please provide the request ID.

        :param obj retry_strategy: (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 :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.stack_monitoring.models.DiscoveryJob`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.90.0/stackmonitoring/get_discovery_job.py.html>`__ to see an example of how to use get_discovery_job API.
        rz�GET�get_discovery_jobz\https://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/DiscoveryJob/GetDiscoveryJob�r"r$r4csg|]}|�vr|�qSr.r.r7r:r.r/r<�r=z;StackMonitoringClient.get_discovery_job.<locals>.<listcomp>z*get_discovery_job got unknown kwargs: {!r}r~cSsi|]\}}|tur||�qSr.rFrHr.r.r/rK�r=z;StackMonitoringClient.get_discovery_job.<locals>.<dictcomp>Nrrir>r4�r@rArBcSs&i|]\}}|tur|dur||�qSrErFrHr.r.r/rK�r=r$rLrtr"�rQrRrkrSrUr"rVrWr�r�r.r:r/r��sh��$
����z'StackMonitoringClient.get_discovery_jobc
sjd}d}d}d}gd���fdd�t�|�D�}|rBtd�|���d	|i}d
d�t�|�D�}t�|�D]:\}	}
|
dus�t|
tj�rht|
���d
krhtd�|	���qhdd|�	dt
�d�}dd�t�|�D�}|jj|�	d�|j
d�}|dur�tj}|�rDt|tj��s|j�|�|�|j�|j|jj||||d|�	d�||d�	S|jj||||d|�	d�||d�SdS)a!
        Gets a monitored resource by identifier


        :param str monitored_resource_id: (required)
            The `OCID`__ of monitored resource.

            __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm

        :param str opc_request_id: (optional)
            Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
            particular request, please provide the request ID.

        :param obj retry_strategy: (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 :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.stack_monitoring.models.MonitoredResource`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.90.0/stackmonitoring/get_monitored_resource.py.html>`__ to see an example of how to use get_monitored_resource API.
        r�r��get_monitored_resourcezfhttps://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/MonitoredResource/GetMonitoredResourcer�csg|]}|�vr|�qSr.r.r7r:r.r/r<=r=z@StackMonitoringClient.get_monitored_resource.<locals>.<listcomp>z/get_monitored_resource got unknown kwargs: {!r}rhcSsi|]\}}|tur||�qSr.rFrHr.r.r/rKFr=z@StackMonitoringClient.get_monitored_resource.<locals>.<dictcomp>Nrrir>r4r�cSs&i|]\}}|tur|dur||�qSrErFrHr.r.r/rKQr=r$rLrxr"r�r�r�r.r:r/r�sh ��$
����z,StackMonitoringClient.get_monitored_resourcec
sjd}d}d}d}gd���fdd�t�|�D�}|rBtd�|���d	|i}d
d�t�|�D�}t�|�D]:\}	}
|
dus�t|
tj�rht|
���d
krhtd�|	���qhdd|�	dt
�d�}dd�t�|�D�}|jj|�	d�|j
d�}|dur�tj}|�rDt|tj��s|j�|�|�|j�|j|jj||||d|�	d�||d�	S|jj||||d|�	d�||d�SdS)a
        Gets the status of the work request with the given ID.


        :param str work_request_id: (required)
            The `OCID`__ of the work request.

            __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm

        :param str opc_request_id: (optional)
            Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
            particular request, please provide the request ID.

        :param obj retry_strategy: (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 :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.stack_monitoring.models.WorkRequest`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.90.0/stackmonitoring/get_work_request.py.html>`__ to see an example of how to use get_work_request API.
        z/workRequests/{workRequestId}r��get_work_requestzZhttps://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/WorkRequest/GetWorkRequestr�csg|]}|�vr|�qSr.r.r7r:r.r/r<�r=z:StackMonitoringClient.get_work_request.<locals>.<listcomp>z)get_work_request got unknown kwargs: {!r}�
workRequestIdcSsi|]\}}|tur||�qSr.rFrHr.r.r/rK�r=z:StackMonitoringClient.get_work_request.<locals>.<dictcomp>Nrrir>r4r�cSs&i|]\}}|tur|dur||�qSrErFrHr.r.r/rK�r=r$rL�WorkRequestr"r�r�)
r*�work_request_idr,rQrRrVrWrfrkrIrJrSr$r.r:r/r�ssh ��$
����z&StackMonitoringClient.get_work_requestcs>d}d}d}d}gd���fdd�t�|�D�}|rBtd�|���d	|i}d
d�t�|�D�}t�|�D]:\}	}
|
dus�t|
tj�rht|
���d
krhtd�|	���qhd|vr�gd�}|d|vr�td�|���d|vr�ddg}|d|vr�td�|���d|v�r&ddg}
|d|
v�r&td�|
���|�	dt
�|�	dt
�|�	dt
�|�	dt
�|�	dt
�d�}dd�t�|�D�}dd|�	dt
�d �}d!d�t�|�D�}|jj|�	d"�|j
d#�}|du�r�tj}|�rt|tj��s�|j�|�|�|j�|j|jj|||||d$|�	d%�||d&�
S|jj|||||d$|�	d%�||d&�	SdS)'a�
        API to get all the logs of a Discovery Job.


        :param str discovery_job_id: (required)
            The Discovery Job ID

        :param str log_type: (optional)
            The log type like INFO, WARNING, ERROR, SUCCESS

            Allowed values are: "INFO", "WARNING", "ERROR", "SUCCESS"

        :param int limit: (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`__.

            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine

        :param str page: (optional)
            For list pagination. The value of the `opc-next-page` response header from the
            previous "List" call. For important details about how pagination works, see
            `List Pagination`__.

            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine

        :param str sort_order: (optional)
            The sort order to use, either ascending (`ASC`) or descending (`DESC`).

            Allowed values are: "ASC", "DESC"

        :param str sort_by: (optional)
            The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for logType is ascending.

            Allowed values are: "timeCreated", "logType"

        :param str opc_request_id: (optional)
            Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
            particular request, please provide the request ID.

        :param obj retry_strategy: (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 :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.stack_monitoring.models.DiscoveryJobLogCollection`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.90.0/stackmonitoring/list_discovery_job_logs.py.html>`__ to see an example of how to use list_discovery_job_logs API.
        z$/discoveryJobs/{discoveryJobId}/logsr��list_discovery_job_logsznhttps://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/DiscoveryJobLogCollection/ListDiscoveryJobLogs)r"r$�log_type�limit�page�
sort_order�sort_byr4csg|]}|�vr|�qSr.r.r7r:r.r/r<r=zAStackMonitoringClient.list_discovery_job_logs.<locals>.<listcomp>z0list_discovery_job_logs got unknown kwargs: {!r}r~cSsi|]\}}|tur||�qSr.rFrHr.r.r/rK(r=zAStackMonitoringClient.list_discovery_job_logs.<locals>.<dictcomp>Nrrir�)�INFO�WARNING�ERROR�SUCCESSz0Invalid value for `log_type`, must be one of {0}r��ASC�DESC�2Invalid value for `sort_order`, must be one of {0}r��timeCreated�logType�/Invalid value for `sort_by`, must be one of {0}r�r�)r�r�r��	sortOrder�sortBycSs&i|]\}}|tur|dur||�qSrErFrHr.r.r/rKJr=r>r4r�cSs&i|]\}}|tur|dur||�qSrErFrHr.r.r/rKQr=r$rL�DiscoveryJobLogCollectionr"�	rQrRrkr�rSrUr"rVrWr�)r*r�r,rQrRrVrWrfrkrIrJ�log_type_allowed_values�sort_order_allowed_values�sort_by_allowed_valuesr�rSr$r.r:r/r��s�;
��$��
�




�
��
��z-StackMonitoringClient.list_discovery_job_logsc
s�d}d}d}d}gd���fdd�t�|�D�}|rBtd�|���d	|vrld
dg}|d	|vrltd�|���d
|vr�ddg}	|d
|	vr�td�|	���||�dt�|�dt�|�dt�|�d	t�|�d
t�d�}
dd�t�|
�D�}
dd|�dt�d�}dd�t�|�D�}|jj|�d�|j	d�}|du�r4t
j}|�r�t|t
j
��s`|j�|�|�|j�|j|jj|||
|d|�d�||d �	S|jj|||
|d|�d�||d �SdS)!a�
        API to get the details of all Discovery Jobs.


        :param str compartment_id: (required)
            The ID of the compartment in which data is listed.

        :param str name: (optional)
            A filter to return only discovery jobs that match the entire resource name given.

        :param int limit: (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`__.

            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine

        :param str page: (optional)
            For list pagination. The value of the `opc-next-page` response header from the
            previous "List" call. For important details about how pagination works, see
            `List Pagination`__.

            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine

        :param str sort_order: (optional)
            The sort order to use, either ascending (`ASC`) or descending (`DESC`).

            Allowed values are: "ASC", "DESC"

        :param str sort_by: (optional)
            The field to sort by. Only one sort order may be provided. Default order for timeUpdated is descending. Default order for resourceName is ascending.

            Allowed values are: "timeUpdated", "resourceName"

        :param str opc_request_id: (optional)
            Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
            particular request, please provide the request ID.

        :param obj retry_strategy: (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 :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.stack_monitoring.models.DiscoveryJobCollection`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.90.0/stackmonitoring/list_discovery_jobs.py.html>`__ to see an example of how to use list_discovery_jobs API.
        rrr��list_discovery_jobszhhttps://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/DiscoveryJobCollection/ListDiscoveryJobs)r"r$�namer�r�r�r�r4csg|]}|�vr|�qSr.r.r7r:r.r/r<�r=z=StackMonitoringClient.list_discovery_jobs.<locals>.<listcomp>z,list_discovery_jobs got unknown kwargs: {!r}r�r�r�r�r��timeUpdated�resourceNamer�r�r�r�)�
compartmentIdr�r�r�r�r�cSs&i|]\}}|tur|dur||�qSrErFrHr.r.r/rK�r=z=StackMonitoringClient.list_discovery_jobs.<locals>.<dictcomp>r>r4r�cSs&i|]\}}|tur|dur||�qSrErFrHr.r.r/rK�r=r$rLN�DiscoveryJobCollectionr"�rQrRr�rSrUr"rVrW�rrYrZr[r&rGr\r)r]r$rr�r^r_rarbr%rcrd)
r*�compartment_idr,rQrRrVrWrfr�r�r�rSr$r.r:r/r�us�9
���




�
��
��z)StackMonitoringClient.list_discovery_jobscsd}d}d}d}gd���fdd�t�|�D�}|rBtd�|���d	|i}d
d�t�|�D�}t�|�D]:\}	}
|
dus�t|
tj�rht|
���d
krhtd�|	���qhd|vr�ddg}|d|vr�td�|���d|vr�dg}|d|vr�td�|���|�	dt
�|�	dt
�|�	dt
�|�	dt
�d�}
dd�t�|
�D�}
dd|�	dt
�d�}dd�t�|�D�}|jj|�	d�|j
d�}|du�r�tj}|�r�t|tj��s�|j�|�|�|j�|j|jj||||
|d |�	d!�||d"�
S|jj||||
|d |�	d!�||d"�	SdS)#a�
        Return a (paginated) list of errors for a given work request.


        :param str work_request_id: (required)
            The `OCID`__ of the work request.

            __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm

        :param str opc_request_id: (optional)
            Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
            particular request, please provide the request ID.

        :param str page: (optional)
            For list pagination. The value of the `opc-next-page` response header from the
            previous "List" call. For important details about how pagination works, see
            `List Pagination`__.

            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine

        :param int limit: (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`__.

            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine

        :param str sort_order: (optional)
            The sort order to use, either ascending (`ASC`) or descending (`DESC`).

            Allowed values are: "ASC", "DESC"

        :param str sort_by: (optional)
            The field to sort by. Only one sort order may be provided. Default order for timestamp is descending. If no value is specified timestamp is default.

            Allowed values are: "timestamp"

        :param obj retry_strategy: (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 :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.stack_monitoring.models.WorkRequestErrorCollection`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.90.0/stackmonitoring/list_work_request_errors.py.html>`__ to see an example of how to use list_work_request_errors API.
        z$/workRequests/{workRequestId}/errorsr��list_work_request_errorszphttps://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/WorkRequestErrorCollection/ListWorkRequestErrors�r"r$r4r�r�r�r�csg|]}|�vr|�qSr.r.r7r:r.r/r<Ir=zBStackMonitoringClient.list_work_request_errors.<locals>.<listcomp>z1list_work_request_errors got unknown kwargs: {!r}r�cSsi|]\}}|tur||�qSr.rFrHr.r.r/rKRr=zBStackMonitoringClient.list_work_request_errors.<locals>.<dictcomp>Nrrir�r�r�r�r��	timestampr�r�r��r�r�r�r�cSs&i|]\}}|tur|dur||�qSrErFrHr.r.r/rKlr=r>r4r�cSs&i|]\}}|tur|dur||�qSrErFrHr.r.r/rKsr=r$rL�WorkRequestErrorCollectionr"r�r��r*r�r,rQrRrVrWrfrkrIrJr�r�r�rSr$r.r:r/r�s�8	��$��



�
��
��z.StackMonitoringClient.list_work_request_errorscsd}d}d}d}gd���fdd�t�|�D�}|rBtd�|���d	|i}d
d�t�|�D�}t�|�D]:\}	}
|
dus�t|
tj�rht|
���d
krhtd�|	���qhd|vr�ddg}|d|vr�td�|���d|vr�dg}|d|vr�td�|���|�	dt
�|�	dt
�|�	dt
�|�	dt
�d�}
dd�t�|
�D�}
dd|�	dt
�d�}dd�t�|�D�}|jj|�	d�|j
d�}|du�r�tj}|�r�t|tj��s�|j�|�|�|j�|j|jj||||
|d |�	d!�||d"�
S|jj||||
|d |�	d!�||d"�	SdS)#a�
        Return a (paginated) list of logs for a given work request.


        :param str work_request_id: (required)
            The `OCID`__ of the work request.

            __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm

        :param str opc_request_id: (optional)
            Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
            particular request, please provide the request ID.

        :param str page: (optional)
            For list pagination. The value of the `opc-next-page` response header from the
            previous "List" call. For important details about how pagination works, see
            `List Pagination`__.

            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine

        :param int limit: (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`__.

            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine

        :param str sort_order: (optional)
            The sort order to use, either ascending (`ASC`) or descending (`DESC`).

            Allowed values are: "ASC", "DESC"

        :param str sort_by: (optional)
            The field to sort by. Only one sort order may be provided. Default order for timestamp is descending. If no value is specified timestamp is default.

            Allowed values are: "timestamp"

        :param obj retry_strategy: (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 :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.stack_monitoring.models.WorkRequestLogEntryCollection`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.90.0/stackmonitoring/list_work_request_logs.py.html>`__ to see an example of how to use list_work_request_logs API.
        z"/workRequests/{workRequestId}/logsr��list_work_request_logszqhttps://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/WorkRequestLogEntryCollection/ListWorkRequestLogsr�csg|]}|�vr|�qSr.r.r7r:r.r/r<�r=z@StackMonitoringClient.list_work_request_logs.<locals>.<listcomp>z/list_work_request_logs got unknown kwargs: {!r}r�cSsi|]\}}|tur||�qSr.rFrHr.r.r/rK�r=z@StackMonitoringClient.list_work_request_logs.<locals>.<dictcomp>Nrrir�r�r�r�r�r�r�r�r�r�cSs&i|]\}}|tur|dur||�qSrErFrHr.r.r/rKr=r>r4r�cSs&i|]\}}|tur|dur||�qSrErFrHr.r.r/rKr=r$rL�WorkRequestLogEntryCollectionr"r�r�r�r.r:r/r��s�8	��$��



�
��
��z,StackMonitoringClient.list_work_request_logscs�d}d}d}d}gd���fdd�t�|�D�}|rBtd�|���d	|vrlgd
�}|d	|vrltd�|���d|vr�d
dg}	|d|	vr�td�|	���d|vr�dg}
|d|
vr�td�|
���||�dt�|�d	t�|�dt�|�dt�|�dt�|�dt�|�dt�d�}dd�t�|�D�}dd|�dt�d�}dd�t�|�D�}|jj|�d�|j	d�}
|
d u�rpt
j}
|
�r�t|
t
j
��s�|j�|�|
�|j�|
j|jj||||d!|�d"�||d#�	S|jj||||d!|�d"�||d#�Sd S)$a

        Lists the work requests in a compartment.


        :param str compartment_id: (required)
            The ID of the compartment in which data is listed.

        :param str work_request_id: (optional)
            The ID of the asynchronous work request.

        :param str status: (optional)
            A filter to return only resources their lifecycleState matches the given OperationStatus.

            Allowed values are: "ACCEPTED", "IN_PROGRESS", "WAITING", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"

        :param str resource_id: (optional)
            The ID of the resource affected by the work request.

        :param str opc_request_id: (optional)
            Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
            particular request, please provide the request ID.

        :param str page: (optional)
            For list pagination. The value of the `opc-next-page` response header from the
            previous "List" call. For important details about how pagination works, see
            `List Pagination`__.

            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine

        :param int limit: (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`__.

            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine

        :param str sort_order: (optional)
            The sort order to use, either ascending (`ASC`) or descending (`DESC`).

            Allowed values are: "ASC", "DESC"

        :param str sort_by: (optional)
            The field to sort by. Only one sort order may be provided. Default order for timeAccepted is descending. If no value is specified timeAccepted is default.

            Allowed values are: "timeAccepted"

        :param obj retry_strategy: (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 :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.stack_monitoring.models.WorkRequestSummaryCollection`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.90.0/stackmonitoring/list_work_requests.py.html>`__ to see an example of how to use list_work_requests API.
        z
/workRequestsr��list_work_requestszmhttps://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/WorkRequestSummaryCollection/ListWorkRequests)
r"r$r��status�resource_idr4r�r�r�r�csg|]}|�vr|�qSr.r.r7r:r.r/r<r=z<StackMonitoringClient.list_work_requests.<locals>.<listcomp>z+list_work_requests got unknown kwargs: {!r}r�)�ACCEPTED�IN_PROGRESS�WAITING�FAILED�	SUCCEEDED�	CANCELING�CANCELEDz.Invalid value for `status`, must be one of {0}r�r�r�r�r��timeAcceptedr�r�r�r�r�)r�r�r��
resourceIdr�r�r�r�cSs&i|]\}}|tur|dur||�qSrErFrHr.r.r/rK�r=z<StackMonitoringClient.list_work_requests.<locals>.<dictcomp>r>r4r�cSs&i|]\}}|tur|dur||�qSrErFrHr.r.r/rK�r=r$rLN�WorkRequestSummaryCollectionr"r�r�)r*r�r,rQrRrVrWrf�status_allowed_valuesr�r�r�rSr$r.r:r/r�,s�A����






�

��
��z(StackMonitoringClient.list_work_requestscs�d}d}d}d}gd���fdd�t�|�D�}|rBtd�|���|j�|�d	t�d
�|j�|�dt�d
�|�dt�|�d
t�d�}dd�t�|�D�}dd|�dt�|�dt�|�dt�d�}	dd�t�|	�D�}	|jj	|�d�|j
d�}
|
dur�tj}
|
�rZt
|
tj��s2|j�|	�|j�|	�|
�|j�|
j|jj||||	|d|�d�||d�
S|jj||||	|d|�d�||d�	SdS)ae
        List associated monitored resources.


        :param oci.stack_monitoring.models.SearchAssociatedResourcesDetails search_associated_resources_details: (required)
            Search Criteria for the listing the monitored resources for given type and compartmentId.

        :param list[str] fields: (optional)
            Partial response refers to an optimization technique offered
            by the RESTful web APIs, to return only the information
            (fields) required by the client. In this mechanism, the client
            sends the required field names as the query parameters for
            an API to the server, and the server trims down the default
            response content by removing the fields that are not required
            by the client. The parameter controls which fields to
            return and should be a query string parameter called "fields" of
            an array type, provide the values as enums, and use collectionFormat.

        :param list[str] exclude_fields: (optional)
            Partial response refers to an optimization technique offered
            by the RESTful web APIs, to return all the information except
            the fields requested to be excluded (excludeFields) by the client.
            In this mechanism, the client
            sends the exclude field names as the query parameters for
            an API to the server, and the server trims down the default
            response content by removing the fields that are not required
            by the client. The parameter controls which fields to
            exlude and to return and should be a query string parameter
            called "excludeFields" of an array type, provide the values
            as enums, and use collectionFormat.

        :param str opc_request_id: (optional)
            Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
            particular request, please provide the request ID.

        :param str opc_retry_token: (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.

        :param str if_match: (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.

        :param int limit: (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`__.

            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine

        :param str page: (optional)
            For list pagination. The value of the `opc-next-page` response header from the
            previous "List" call. For important details about how pagination works, see
            `List Pagination`__.

            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine

        :param obj retry_strategy: (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 :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.stack_monitoring.models.AssociatedResourcesCollection`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.90.0/stackmonitoring/search_associated_resources.py.html>`__ to see an example of how to use search_associated_resources API.
        z5/monitoredResources/actions/searchAssociatedResourcesr1�search_associated_resourceszkhttps://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/MonitoredResource/SearchAssociatedResources)	r"r$�fields�exclude_fieldsr4r5r6r�r�csg|]}|�vr|�qSr.r.r7r:r.r/r</r=zEStackMonitoringClient.search_associated_resources.<locals>.<listcomp>z4search_associated_resources got unknown kwargs: {!r}r��multir�r�r�)r��
excludeFieldsr�r�cSs&i|]\}}|tur|dur||�qSrErFrHr.r.r/rK:r=zEStackMonitoringClient.search_associated_resources.<locals>.<dictcomp>r>r4r5r6r?cSs&i|]\}}|tur|dur||�qSrErFrHr.r.r/rKCr=r$rLN�AssociatedResourcesCollectionr"�	rQrRr�rSrTrUr"rVrW)rrYrZr[r)� generate_collection_format_paramr&rGr\r]r$rr�r^r_r`rarbr%rcrd)r*�#search_associated_resources_detailsr,rQrRrVrWrfr�rSr$r.r:r/r��srR�

�


����z1StackMonitoringClient.search_associated_resourcescsZd}d}d}d}gd���fdd�t�|�D�}|rBtd�|���|�d	t�|�d
t�d�}dd
�t�|�D�}dd|�dt�|�dt�|�dt�d�}	dd
�t�|	�D�}	|jj|�d�|j	d�}
|
dur�t
j}
|
�r2t|
t
j
��s
|j�|	�|j�|	�|
�|j�|
j|jj||||	|d|�d�||d�
S|jj||||	|d|�d�||d�	SdS)a�

        Returns a list of monitored resource associations.


        :param oci.stack_monitoring.models.SearchMonitoredResourceAssociationsDetails search_monitored_resource_associations_details: (required)
            Search Criteria for the listing the monitored resource associations.

        :param int limit: (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`__.

            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine

        :param str page: (optional)
            For list pagination. The value of the `opc-next-page` response header from the
            previous "List" call. For important details about how pagination works, see
            `List Pagination`__.

            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine

        :param str opc_request_id: (optional)
            Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
            particular request, please provide the request ID.

        :param str opc_retry_token: (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.

        :param str if_match: (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.

        :param obj retry_strategy: (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 :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.stack_monitoring.models.MonitoredResourceAssociationsCollection`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.90.0/stackmonitoring/search_monitored_resource_associations.py.html>`__ to see an example of how to use search_monitored_resource_associations API.
        z./monitoredResources/actions/searchAssociationsr1�&search_monitored_resource_associationszuhttps://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/MonitoredResource/SearchMonitoredResourceAssociations)r"r$r�r�r4r5r6csg|]}|�vr|�qSr.r.r7r:r.r/r<�r=zPStackMonitoringClient.search_monitored_resource_associations.<locals>.<listcomp>z?search_monitored_resource_associations got unknown kwargs: {!r}r�r�)r�r�cSs&i|]\}}|tur|dur||�qSrErFrHr.r.r/rK�r=zPStackMonitoringClient.search_monitored_resource_associations.<locals>.<dictcomp>r>r4r5r6r?cSs&i|]\}}|tur|dur||�qSrErFrHr.r.r/rK�r=r$rLN�'MonitoredResourceAssociationsCollectionr"r�)rrYrZr[r&rGr\r)r]r$rr�r^r_r`rarbr%rcrd)r*�.search_monitored_resource_associations_detailsr,rQrRrVrWrfr�rSr$r.r:r/r�hsn:	�

�


����z<StackMonitoringClient.search_monitored_resource_associationsc
s*d}d}d}d}gd���fdd�t�|�D�}|rBtd�|���d	|i}	d
d�t�|	�D�}	t�|	�D]:\}
}|dus�t|tj�rht|���d
krhtd�|
���qhd|vr�gd�}|d|vr�td�|���d|vr�ddg}
|d|
vr�td�|
���|�	dt
�|�	dt
�|�	dt
�|�	dt
�d�}dd�t�|�D�}dd|�	dt
�|�	dt
�|�	dt
�d�}dd�t�|�D�}|jj|�	d �|j
d!�}|du�r�tj}|�rt|tj��s�|j�|�|j�|�|�|j�|j|jj|||	|||d"|�	d#�||d$�S|jj|||	|||d"|�	d#�||d$�
SdS)%a�
        List resources which are members of the given monitored resource


        :param str monitored_resource_id: (required)
            The `OCID`__ of monitored resource.

            __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm

        :param oci.stack_monitoring.models.SearchMonitoredResourceMembersDetails search_monitored_resource_members_details: (required)
            Search criteria for the listing the member monitored resources.

        :param str sort_by: (optional)
            If this query parameter is specified, the result is sorted by this query parameter value.

            Allowed values are: "resourceName", "resourceType", "sourceResourceType"

        :param str sort_order: (optional)
            The sort order to use, either ascending (`ASC`) or descending (`DESC`).

            Allowed values are: "ASC", "DESC"

        :param str page: (optional)
            For list pagination. The value of the `opc-next-page` response header from the
            previous "List" call. For important details about how pagination works, see
            `List Pagination`__.

            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine

        :param int limit: (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`__.

            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine

        :param str opc_retry_token: (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.

        :param str opc_request_id: (optional)
            Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
            particular request, please provide the request ID.

        :param str if_match: (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.

        :param obj retry_strategy: (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 :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.stack_monitoring.models.MonitoredResourceMembersCollection`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.90.0/stackmonitoring/search_monitored_resource_members.py.html>`__ to see an example of how to use search_monitored_resource_members API.
        z=/monitoredResources/{monitoredResourceId}/actions/listMembersr1�!search_monitored_resource_memberszphttps://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/MonitoredResource/SearchMonitoredResourceMembers)	r"r$r�r�r�r�r5r4r6csg|]}|�vr|�qSr.r.r7r:r.r/r<B	r=zKStackMonitoringClient.search_monitored_resource_members.<locals>.<listcomp>z:search_monitored_resource_members got unknown kwargs: {!r}rhcSsi|]\}}|tur||�qSr.rFrHr.r.r/rKK	r=zKStackMonitoringClient.search_monitored_resource_members.<locals>.<dictcomp>Nrrir�)r��resourceType�sourceResourceTyper�r�r�r�r�r�r�)r�r�r�r�cSs&i|]\}}|tur|dur||�qSrErFrHr.r.r/rKe	r=r>r5r4r6r�cSs&i|]\}}|tur|dur||�qSrErFrHr.r.r/rKn	r=r$rL�"MonitoredResourceMembersCollectionr")
rQrRrkr�rSrTrUr"rVrW)rrYrZr[r\r^rmrnror&rGr)r]r$rr�r_r`rarbr%rcrd)r*rp�)search_monitored_resource_members_detailsr,rQrRrVrWrfrkrIrJr�r�r�rSr$r.r:r/r��s�I��$��



�


��
�
�z7StackMonitoringClient.search_monitored_resource_memberscs�d}d}d}d}gd���fdd�t�|�D�}|rBtd�|���|�d	t�|�d
t�|j�|�dt�d�|j�|�d
t�d�d�}dd�t�|�D�}dd|�dt�|�dt�|�dt�d�}	dd�t�|	�D�}	|jj	|�d�|j
d�}
|
dur�tj}
|
�rZt
|
tj��s2|j�|	�|j�|	�|
�|j�|
j|jj||||	|d|�d�||d�
S|jj||||	|d|�d�||d�	SdS)aI
        Returns a list of monitored resources.


        :param oci.stack_monitoring.models.SearchMonitoredResourcesDetails search_monitored_resources_details: (required)
            Property Search Criteria for the listing the monitored resources.

        :param int limit: (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`__.

            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine

        :param str page: (optional)
            For list pagination. The value of the `opc-next-page` response header from the
            previous "List" call. For important details about how pagination works, see
            `List Pagination`__.

            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine

        :param list[str] fields: (optional)
            Partial response refers to an optimization technique offered
            by the RESTful web APIs, to return only the information
            (fields) required by the client. In this mechanism, the client
            sends the required field names as the query parameters for
            an API to the server, and the server trims down the default
            response content by removing the fields that are not required
            by the client. The parameter controls which fields to
            return and should be a query string parameter called "fields" of
            an array type, provide the values as enums, and use collectionFormat.

        :param list[str] exclude_fields: (optional)
            Partial response refers to an optimization technique offered
            by the RESTful web APIs, to return all the information except
            the fields requested to be excluded (excludeFields) by the client.
            In this mechanism, the client
            sends the exclude field names as the query parameters for
            an API to the server, and the server trims down the default
            response content by removing the fields that are not required
            by the client. The parameter controls which fields to
            exlude and to return and should be a query string parameter
            called "excludeFields" of an array type, provide the values
            as enums, and use collectionFormat.

        :param str opc_request_id: (optional)
            Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
            particular request, please provide the request ID.

        :param str opc_retry_token: (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.

        :param str if_match: (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.

        :param obj retry_strategy: (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 :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.stack_monitoring.models.MonitoredResourceCollection`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.90.0/stackmonitoring/search_monitored_resources.py.html>`__ to see an example of how to use search_monitored_resources API.
        z"/monitoredResources/actions/searchr1�search_monitored_resourceszjhttps://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/MonitoredResource/SearchMonitoredResources)	r"r$r�r�r�r�r4r5r6csg|]}|�vr|�qSr.r.r7r:r.r/r<�	r=zDStackMonitoringClient.search_monitored_resources.<locals>.<listcomp>z3search_monitored_resources got unknown kwargs: {!r}r�r�r�r�r�)r�r�r�r�cSs&i|]\}}|tur|dur||�qSrErFrHr.r.r/rK
r=zDStackMonitoringClient.search_monitored_resources.<locals>.<dictcomp>r>r4r5r6r?cSs&i|]\}}|tur|dur||�qSrErFrHr.r.r/rK
r=r$rLN�MonitoredResourceCollectionr"r�)rrYrZr[r&rGr)r�r\r]r$rr�r^r_r`rarbr%rcrd)r*�"search_monitored_resources_detailsr,rQrRrVrWrfr�rSr$r.r:r/r��	srR�

�


����z0StackMonitoringClient.search_monitored_resourcescsfd}d}d}d}gd���fdd�t�|�D�}|rBtd�|���d	|i}	d
d�t�|	�D�}	t�|	�D]:\}
}|dus�t|tj�rht|���d
krhtd�|
���qhdd|�	dt
�|�	dt
�d�}dd�t�|�D�}|jj|�	d�|j
d�}
|
�r@t|
tj��s|j�|�|
�|j�|
j|jj|||	|||�	d�||d�	S|jj|||	|||�	d�||d�SdS)aY	
        Updates the Monitored Resource


        :param str monitored_resource_id: (required)
            The `OCID`__ of monitored resource.

            __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm

        :param oci.stack_monitoring.models.UpdateMonitoredResourceDetails update_monitored_resource_details: (required)
            The information to be updated.

        :param str if_match: (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.

        :param str opc_request_id: (optional)
            Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
            particular request, please provide the request ID.

        :param obj retry_strategy: (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 :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type None
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.90.0/stackmonitoring/update_monitored_resource.py.html>`__ to see an example of how to use update_monitored_resource API.
        r��PUT�update_monitored_resourcezihttps://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/MonitoredResource/UpdateMonitoredResourcer}csg|]}|�vr|�qSr.r.r7r:r.r/r<g
r=zCStackMonitoringClient.update_monitored_resource.<locals>.<listcomp>z2update_monitored_resource got unknown kwargs: {!r}rhcSsi|]\}}|tur||�qSr.rFrHr.r.r/rKp
r=zCStackMonitoringClient.update_monitored_resource.<locals>.<dictcomp>Nrrir>r6r4rcSs&i|]\}}|tur|dur||�qSrErFrHr.r.r/rK|
r=r$rLr"rjr�)r*rp�!update_monitored_resource_detailsr,rQrRrVrWrfrkrIrJrSr$r.r:r/r�1
sf*��$

����z/StackMonitoringClient.update_monitored_resourceN)�__name__�
__module__�__qualname__�__doc__r0r2rgrsrvr|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r.r.r.r/rs@Sfu]efqpd_aa"!.rN)�
__future__r�oci._vendorrr�ocirr�oci.base_clientr�
oci.configrr	�
oci.signerr
�oci.utilrrr
�modelsrrG�objectrr.r.r.r/�<module>s

Youez - 2016 - github.com/yon3zu
LinuXploit