a Of"@sddlmZddlmZddlmZddlmZmZddlm Z ddl m Z m Z ddl mZddlmZmZmZd d lmZed ZGd d d eZdS))absolute_import)requests)six)retrycircuit_breaker) BaseClient)get_config_value_or_defaultvalidate_config)Signer)Sentinel#get_signer_from_authentication_typeAUTHENTICATION_TYPE_FIELD_NAME)stack_monitoring_type_mappingMissingc@seZdZdZddZddZddZdd Zd d Zd d Z ddZ ddZ ddZ ddZ ddZddZddZddZddZd d!Zd"d#Zd$d%Zd&d'Zd(d)Zd*d+Zd,d-Zd.S)/StackMonitoringClientz Stack Monitoring API. c Ks t||ddd|vr$|d}nDt|vr6t|}n2t|d|d|d|dt|d|dd }d |d d d |dd|dtjd}d|vr|d|d<|ddurtj|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 `__. 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 `__ 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 `__. :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 `__. :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)rtenancyuser fingerprintkey_file pass_phrase key_content)rrrprivate_key_file_locationrprivate_key_contentTservice_endpointz /20210330z9https://stack-monitoring.{region}.oci.{secondLevelDomain}skip_deserializationFcircuit_breaker_strategy)regional_clientr base_pathservice_endpoint_templaterrtimeoutNallow_control_charsstack_monitoringretry_strategycircuit_breaker_callback)r getr r r rrGLOBAL_CIRCUIT_BREAKER_STRATEGY DEFAULT_CIRCUIT_BREAKER_STRATEGYrr base_clientr$r%)selfconfigkwargsrbase_client_init_kwargsr./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}gdfddt|D}|rBtd|d d |d t|d t|d td }ddt|D}|jj|d|j d} | rt | t j s|j ||j|| |j| j|jj||||d|d||d S|jj||||d|d||dSdS)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 `__. 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 `__ to see an example of how to use associate_monitored_resources API. z7/monitoredResources/actions/associateMonitoredResourcesPOSTassociate_monitored_resourceszmhttps://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/MonitoredResource/AssociateMonitoredResourcesr"r$opc_request_idopc_retry_tokenif_matchcsg|]}|vr|qSr.r..0_keyexpected_kwargsr.r/ zGStackMonitoringClient.associate_monitored_resources..z6associate_monitored_resources got unknown kwargs: {!r}application/jsonr4r5r6accept content-typeopc-request-idopc-retry-tokenif-matchcSs&i|]\}}|tur|dur||qSNmissingr8kvr.r.r/ r=zGStackMonitoringClient.associate_monitored_resources..r$operation_retry_strategyclient_retry_strategyMonitoredResourceAssociationr" resource_pathmethod header_paramsbody response_typer"operation_nameapi_reference_linkNriterkeys ValueErrorformatr&rG iteritemsr)get_preferred_retry_strategyr$ isinstancerNoneRetryStrategyadd_opc_retry_token_if_neededadd_opc_client_retries_headeradd_circuit_breaker_callbackr%make_retrying_callcall_api) r*%associate_monitored_resources_detailsr,rQrRrVrW extra_kwargsrSr$r.r:r/r2ks^,        z3StackMonitoringClient.associate_monitored_resourcesc s|d}d}d}d}gdfddt|D}|rBtd|d |i} d d t| D} t| D]:\} } | d ust| tjrht| d krhtd| qhdd| dt | dt | dt d} dd t| D} |j j | d|j d} | rVt| tjs0|j | |j | | |j| j|j j||| | || d||d S|j j||| | || d||dSd 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 `__. 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 `__ 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..z>change_monitored_resource_compartment got unknown kwargs: {!r}monitoredResourceIdcSsi|]\}}|tur||qSr.rFrHr.r.r/rKr=zOStackMonitoringClient.change_monitored_resource_compartment..Nr7Parameter {} cannot be None, whitespace or empty stringr>r6r4r5)r@rArDrBrCcSs&i|]\}}|tur|dur||qSrErFrHr.r.r/rK%r=r$rLr"rQrR path_paramsrSrTr"rVrWrrYrZr[r\r^ string_typeslenstripr&rGr)r]r$rr_r`rarbr%rcrd)r*monitored_resource_id-change_monitored_resource_compartment_detailsr,rQrRrVrWrfrkrIrJrSr$r.r:r/rgsj1$       z;StackMonitoringClient.change_monitored_resource_compartmentc s d}d}d}d}gdfddt|D}|rBtd|d d |d t|d td }d dt|D}|jj|d|j d} | rt | t j s|j ||j|| |j| j|jj||||d|d||d S|jj||||d|d||dSdS)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 `__. 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 `__ to see an example of how to use create_discovery_job API. /discoveryJobsr1create_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..z-create_discovery_job got unknown kwargs: {!r}r>r4r5)r@rArBrCcSs&i|]\}}|tur|dur||qSrErFrHr.r.r/rKr=z>StackMonitoringClient.create_discovery_job..r$rL DiscoveryJobr"rPNrX) r*create_discovery_job_detailsr,rQrRrVrWrfrSr$r.r:r/rsFs\%       z*StackMonitoringClient.create_discovery_jobc sd}d}d}d}gdfddt|D}|rBtd|d d |d t|d t|d td }ddt|D}|jj|d|j d} | rt | t j s|j ||j|| |j| j|jj||||d|d||d S|jj||||d|d||dSdS)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 `__. 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 `__ to see an example of how to use create_monitored_resource API. z/monitoredResourcesr1create_monitored_resourcezihttps://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/MonitoredResource/CreateMonitoredResource)r"r$r5r4external_resource_idcsg|]}|vr|qSr.r.r7r:r.r/r<r=zCStackMonitoringClient.create_monitored_resource..z2create_monitored_resource got unknown kwargs: {!r}r>r5r4rw)r@rArCrBzexternal-resource-idcSs&i|]\}}|tur|dur||qSrErFrHr.r.r/rKr=zCStackMonitoringClient.create_monitored_resource..r$rLMonitoredResourcer"rPNrX) r*!create_monitored_resource_detailsr,rQrRrVrWrfrSr$r.r:r/rvs^+        z/StackMonitoringClient.create_monitored_resourcec spd}d}d}d}gdfddt|D}|rBtd|d |i}d d t|D}t|D]:\} } | d ust| tjrht| d krhtd| qhdd| dt | dt d} dd t| D} |j j | d|j d} | d urtj} | rLt| tjs(|j | | |j| j|j j|||| | d||dS|j j|||| | d||dSd 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 `__. 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 `__ to see an example of how to use delete_discovery_job API. /discoveryJobs/{discoveryJobId}DELETEdelete_discovery_jobz_https://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/DiscoveryJob/DeleteDiscoveryJobr"r$r6r4csg|]}|vr|qSr.r.r7r:r.r/r<9r=z>StackMonitoringClient.delete_discovery_job..z-delete_discovery_job got unknown kwargs: {!r}discoveryJobIdcSsi|]\}}|tur||qSr.rFrHr.r.r/rKBr=z>StackMonitoringClient.delete_discovery_job..Nrrir>r6r4r@rArDrBcSs&i|]\}}|tur|dur||qSrErFrHr.r.r/rKNr=r$rLr"rQrRrkrSr"rVrWrrYrZr[r\r^rmrnror&rGr)r]r$rDEFAULT_RETRY_STRATEGYr_rarbr%rcrd r*discovery_job_idr,rQrRrVrWrfrkrIrJrSr$r.r:r/r|sf%$     z*StackMonitoringClient.delete_discovery_jobc sd}d}d}d}gdfddt|D}|rBtd|d |i}d d t|D}t|D]:\} } | d ust| tjrht| d krhtd| qhd| dt i} dd t| D} dd| dt | dt d} dd t| D} |j j | d|j d} | rdt| tjs>|j | | |j| j|j j|||| | | d||d S|j j|||| | | d||dSd 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 `__. 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 `__ 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$r6r4is_delete_memberscsg|]}|vr|qSr.r.r7r:r.r/r<r=zCStackMonitoringClient.delete_monitored_resource..z2delete_monitored_resource got unknown kwargs: {!r}rhcSsi|]\}}|tur||qSr.rFrHr.r.r/rKr=zCStackMonitoringClient.delete_monitored_resource..NrriisDeleteMembersrcSs&i|]\}}|tur|dur||qSrErFrHr.r.r/rKr=r>r6r4rcSs&i|]\}}|tur|dur||qSrErFrHr.r.r/rKr=r$rLr")rQrRrk query_paramsrSr"rVrWrrYrZr[r\r^rmrnror&rGr)r]r$rr_rarbr%rcrd)r*rpr,rQrRrVrWrfrkrIrJrrSr$r.r:r/rnsl*$      z/StackMonitoringClient.delete_monitored_resourcec sxd}d}d}d}gdfddt|D}|rBtd|d |i}d d t|D}t|D]:\} } | d ust| tjrht| d krhtd| qhdd| dt | dt | dt d} dd t| D} |j j | d|j d} | rTt| tjs0|j | |j | | |j| j|j j|||| | d||dS|j j|||| | d||dSd 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 `__. 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 `__ to see an example of how to use disable_external_database API. zI/monitoredResources/{monitoredResourceId}/actions/disableExternalDatabaser1disable_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..z2disable_external_database got unknown kwargs: {!r}rhcSsi|]\}}|tur||qSr.rFrHr.r.r/rK#r=zCStackMonitoringClient.disable_external_database..Nrrir>r5r4r6r@rArCrBrDcSs&i|]\}}|tur|dur||qSrErFrHr.r.r/rK0r=r$rLr"rrl r*rpr,rQrRrVrWrfrkrIrJrSr$r.r:r/rsf.$       z/StackMonitoringClient.disable_external_databasec sd}d}d}d}gdfddt|D}|rBtd|d d |d t|d t|d td }ddt|D}|jj|d|j d} | rt | t j s|j ||j|| |j| j|jj|||||d||dS|jj|||||d||dSdS)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 `__. 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 `__ 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..z9disassociate_monitored_resources got unknown kwargs: {!r}r>r4r5r6r?cSs&i|]\}}|tur|dur||qSrErFrHr.r.r/rKr=zJStackMonitoringClient.disassociate_monitored_resources..r$rLr")rQrRrSrTr"rVrWNrX) r*(disassociate_monitored_resources_detailsr,rQrRrVrWrfrSr$r.r:r/rOsZ,        z6StackMonitoringClient.disassociate_monitored_resourcesc sjd}d}d}d}gdfddt|D}|rBtd|d |i}d d t|D}t|D]:\} } | d ust| tjrht| d krhtd| qhdd| dt d} dd t| D} |j j | d|j d} | d urtj} | rDt| tjs|j | | |j| j|j j|||| d| d||d S|j j|||| d| d||dSd 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 `__. 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 `__ to see an example of how to use get_discovery_job API. rzGETget_discovery_jobz\https://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/DiscoveryJob/GetDiscoveryJobr"r$r4csg|]}|vr|qSr.r.r7r:r.r/r<r=z;StackMonitoringClient.get_discovery_job..z*get_discovery_job got unknown kwargs: {!r}r~cSsi|]\}}|tur||qSr.rFrHr.r.r/rKr=z;StackMonitoringClient.get_discovery_job..Nrrir>r4r@rArBcSs&i|]\}}|tur|dur||qSrErFrHr.r.r/rKr=r$rLrtr"rQrRrkrSrUr"rVrWrrr.r:r/rsh$    z'StackMonitoringClient.get_discovery_jobc sjd}d}d}d}gdfddt|D}|rBtd|d |i}d d t|D}t|D]:\} } | d ust| tjrht| d krhtd| qhdd| dt d} dd t| D} |j j | d|j d} | d urtj} | rDt| tjs|j | | |j| j|j j|||| d| d||d S|j j|||| d| d||dSd 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 `__. 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 `__ to see an example of how to use get_monitored_resource API. rrget_monitored_resourcezfhttps://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/MonitoredResource/GetMonitoredResourcercsg|]}|vr|qSr.r.r7r:r.r/r<=r=z@StackMonitoringClient.get_monitored_resource..z/get_monitored_resource got unknown kwargs: {!r}rhcSsi|]\}}|tur||qSr.rFrHr.r.r/rKFr=z@StackMonitoringClient.get_monitored_resource..Nrrir>r4rcSs&i|]\}}|tur|dur||qSrErFrHr.r.r/rKQr=r$rLrxr"rrrr.r:r/rsh $    z,StackMonitoringClient.get_monitored_resourcec sjd}d}d}d}gdfddt|D}|rBtd|d |i}d d t|D}t|D]:\} } | d ust| tjrht| d krhtd| qhdd| dt d} dd t| D} |j j | d|j d} | d urtj} | rDt| tjs|j | | |j| j|j j|||| d| d||d S|j j|||| d| d||dSd 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 `__. 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 `__ to see an example of how to use get_work_request API. z/workRequests/{workRequestId}rget_work_requestzZhttps://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/WorkRequest/GetWorkRequestrcsg|]}|vr|qSr.r.r7r:r.r/r<r=z:StackMonitoringClient.get_work_request..z)get_work_request got unknown kwargs: {!r} workRequestIdcSsi|]\}}|tur||qSr.rFrHr.r.r/rKr=z:StackMonitoringClient.get_work_request..Nrrir>r4rcSs&i|]\}}|tur|dur||qSrErFrHr.r.r/rKr=r$rL WorkRequestr"rr) r*work_request_idr,rQrRrVrWrfrkrIrJrSr$r.r:r/rssh $    z&StackMonitoringClient.get_work_requestc s>d}d}d}d}gdfddt|D}|rBtd|d |i}d d t|D}t|D]:\} } | d ust| tjrht| d krhtd| qhd|vrgd} |d| vrtd| d|vrddg} |d| vrtd| d|vr&ddg} |d| vr&td| | dt | dt | dt | dt | dt d}dd t|D}dd| dt d }d!d t|D}|j j | d"|j d#}|d urtj}|rt|tjs|j |||j|j|j j|||||d$| d%||d& S|j j|||||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 `__. 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 `__ to see an example of how to use list_discovery_job_logs API. z$/discoveryJobs/{discoveryJobId}/logsrlist_discovery_job_logsznhttps://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/DiscoveryJobLogCollection/ListDiscoveryJobLogs)r"r$log_typelimitpage sort_ordersort_byr4csg|]}|vr|qSr.r.r7r:r.r/r<r=zAStackMonitoringClient.list_discovery_job_logs..z0list_discovery_job_logs got unknown kwargs: {!r}r~cSsi|]\}}|tur||qSr.rFrHr.r.r/rK(r=zAStackMonitoringClient.list_discovery_job_logs..Nrrir)INFOWARNINGERRORSUCCESSz0Invalid value for `log_type`, must be one of {0}rASCDESC2Invalid value for `sort_order`, must be one of {0}r timeCreatedlogType/Invalid value for `sort_by`, must be one of {0}rr)rrr sortOrdersortBycSs&i|]\}}|tur|dur||qSrErFrHr.r.r/rKJr=r>r4rcSs&i|]\}}|tur|dur||qSrErFrHr.r.r/rKQr=r$rLDiscoveryJobLogCollectionr" rQrRrkrrSrUr"rVrWr)r*rr,rQrRrVrWrfrkrIrJlog_type_allowed_valuessort_order_allowed_valuessort_by_allowed_valuesrrSr$r.r:r/rs; $             z-StackMonitoringClient.list_discovery_job_logsc sd}d}d}d}gdfddt|D}|rBtd|d |vrld d g}|d |vrltd |d |vrddg} |d | vrtd| ||dt|dt|dt|d t|d td} ddt| D} dd|dtd} ddt| D} |jj|d|j d} | dur4t j } | rt | 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 `__. 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 `__ to see an example of how to use list_discovery_jobs API. rrrlist_discovery_jobszhhttps://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/DiscoveryJobCollection/ListDiscoveryJobs)r"r$namerrrrr4csg|]}|vr|qSr.r.r7r:r.r/r<r=z=StackMonitoringClient.list_discovery_jobs..z,list_discovery_jobs got unknown kwargs: {!r}rrrrr timeUpdated resourceNamerrrr) compartmentIdrrrrrcSs&i|]\}}|tur|dur||qSrErFrHr.r.r/rKr=z=StackMonitoringClient.list_discovery_jobs..r>r4rcSs&i|]\}}|tur|dur||qSrErFrHr.r.r/rKr=r$rLNDiscoveryJobCollectionr"rQrRrrSrUr"rVrWrrYrZr[r&rGr\r)r]r$rrr^r_rarbr%rcrd) r*compartment_idr,rQrRrVrWrfrrrrSr$r.r:r/rus9             z)StackMonitoringClient.list_discovery_jobsc sd}d}d}d}gdfddt|D}|rBtd|d |i}d d t|D}t|D]:\} } | d ust| tjrht| d krhtd| qhd|vrddg} |d| vrtd| d|vrdg} |d| vrtd| | dt | dt | dt | dt d} dd t| D} dd| dt d}dd t|D}|j j | d|j d}|d urtj}|rt|tjs|j |||j|j|j j|||| |d | d!||d" S|j j|||| |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 `__. 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 `__ to see an example of how to use list_work_request_errors API. z$/workRequests/{workRequestId}/errorsrlist_work_request_errorszphttps://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/WorkRequestErrorCollection/ListWorkRequestErrorsr"r$r4rrrrcsg|]}|vr|qSr.r.r7r:r.r/r<Ir=zBStackMonitoringClient.list_work_request_errors..z1list_work_request_errors got unknown kwargs: {!r}rcSsi|]\}}|tur||qSr.rFrHr.r.r/rKRr=zBStackMonitoringClient.list_work_request_errors..Nrrirrrrr timestamprrrrrrrcSs&i|]\}}|tur|dur||qSrErFrHr.r.r/rKlr=r>r4rcSs&i|]\}}|tur|dur||qSrErFrHr.r.r/rKsr=r$rLWorkRequestErrorCollectionr"rrr*rr,rQrRrVrWrfrkrIrJrrrrSr$r.r:r/rs8 $           z.StackMonitoringClient.list_work_request_errorsc sd}d}d}d}gdfddt|D}|rBtd|d |i}d d t|D}t|D]:\} } | d ust| tjrht| d krhtd| qhd|vrddg} |d| vrtd| d|vrdg} |d| vrtd| | dt | dt | dt | dt d} dd t| D} dd| dt d}dd t|D}|j j | d|j d}|d urtj}|rt|tjs|j |||j|j|j j|||| |d | d!||d" S|j j|||| |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 `__. 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 `__ to see an example of how to use list_work_request_logs API. z"/workRequests/{workRequestId}/logsrlist_work_request_logszqhttps://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/WorkRequestLogEntryCollection/ListWorkRequestLogsrcsg|]}|vr|qSr.r.r7r:r.r/r<r=z@StackMonitoringClient.list_work_request_logs..z/list_work_request_logs got unknown kwargs: {!r}rcSsi|]\}}|tur||qSr.rFrHr.r.r/rKr=z@StackMonitoringClient.list_work_request_logs..NrrirrrrrrrrrrcSs&i|]\}}|tur|dur||qSrErFrHr.r.r/rKr=r>r4rcSs&i|]\}}|tur|dur||qSrErFrHr.r.r/rKr=r$rLWorkRequestLogEntryCollectionr"rrrr.r:r/rs8 $           z,StackMonitoringClient.list_work_request_logsc sd}d}d}d}gdfddt|D}|rBtd|d |vrlgd }|d |vrltd |d |vrd dg} |d | vrtd| d|vrdg} |d| vrtd| ||dt|d t|dt|dt|dt|d t|dtd} ddt| D} dd|dtd} ddt| D} |jj|d|j d} | d urpt j } | rt | 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 `__. 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 `__ to see an example of how to use list_work_requests API. z /workRequestsrlist_work_requestszmhttps://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/WorkRequestSummaryCollection/ListWorkRequests) r"r$rstatus resource_idr4rrrrcsg|]}|vr|qSr.r.r7r:r.r/r<r=z.z+list_work_requests got unknown kwargs: {!r}r)ACCEPTED IN_PROGRESSWAITINGFAILED SUCCEEDED CANCELINGCANCELEDz.Invalid value for `status`, must be one of {0}rrrrr timeAcceptedrrrrr)rrr resourceIdrrrrcSs&i|]\}}|tur|dur||qSrErFrHr.r.r/rKr=z.r>r4rcSs&i|]\}}|tur|dur||qSrErFrHr.r.r/rKr=r$rLNWorkRequestSummaryCollectionr"rr)r*rr,rQrRrVrWrfstatus_allowed_valuesrrrrSr$r.r:r/r,sA                 z(StackMonitoringClient.list_work_requestsc sd}d}d}d}gdfddt|D}|rBtd||j|d td |j|d td |d t|d td}ddt|D}dd|dt|dt|dtd} ddt| D} |jj |d|j d} | durt j } | rZt | t js2|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 `__. 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 `__ to see an example of how to use search_associated_resources API. z5/monitoredResources/actions/searchAssociatedResourcesr1search_associated_resourceszkhttps://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/MonitoredResource/SearchAssociatedResources) r"r$fieldsexclude_fieldsr4r5r6rrcsg|]}|vr|qSr.r.r7r:r.r/r</r=zEStackMonitoringClient.search_associated_resources..z4search_associated_resources got unknown kwargs: {!r}rmultirrr)r excludeFieldsrrcSs&i|]\}}|tur|dur||qSrErFrHr.r.r/rK:r=zEStackMonitoringClient.search_associated_resources..r>r4r5r6r?cSs&i|]\}}|tur|dur||qSrErFrHr.r.r/rKCr=r$rLNAssociatedResourcesCollectionr" rQrRrrSrTrUr"rVrW)rrYrZr[r) generate_collection_format_paramr&rGr\r]r$rrr^r_r`rarbr%rcrd) r*#search_associated_resources_detailsr,rQrRrVrWrfrrSr$r.r:r/rsrR          z1StackMonitoringClient.search_associated_resourcesc sZd}d}d}d}gdfddt|D}|rBtd||d t|d td }d d t|D}dd|dt|dt|dtd} dd t| D} |jj|d|j d} | durt 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 `__. 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 `__ 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$rrr4r5r6csg|]}|vr|qSr.r.r7r:r.r/r<r=zPStackMonitoringClient.search_monitored_resource_associations..z?search_monitored_resource_associations got unknown kwargs: {!r}rr)rrcSs&i|]\}}|tur|dur||qSrErFrHr.r.r/rKr=zPStackMonitoringClient.search_monitored_resource_associations..r>r4r5r6r?cSs&i|]\}}|tur|dur||qSrErFrHr.r.r/rKr=r$rLN'MonitoredResourceAssociationsCollectionr"r)rrYrZr[r&rGr\r)r]r$rrr^r_r`rarbr%rcrd) r*.search_monitored_resource_associations_detailsr,rQrRrVrWrfrrSr$r.r:r/rhsn:          z`__. 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 `__ 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$rrrrr5r4r6csg|]}|vr|qSr.r.r7r:r.r/r<B r=zKStackMonitoringClient.search_monitored_resource_members..z:search_monitored_resource_members got unknown kwargs: {!r}rhcSsi|]\}}|tur||qSr.rFrHr.r.r/rKK r=zKStackMonitoringClient.search_monitored_resource_members..Nrrir)r resourceTypesourceResourceTyperrrrrrr)rrrrcSs&i|]\}}|tur|dur||qSrErFrHr.r.r/rKe r=r>r5r4r6rcSs&i|]\}}|tur|dur||qSrErFrHr.r.r/rKn r=r$rL"MonitoredResourceMembersCollectionr") rQrRrkrrSrTrUr"rVrW)rrYrZr[r\r^rmrnror&rGr)r]r$rrr_r`rarbr%rcrd)r*rp)search_monitored_resource_members_detailsr,rQrRrVrWrfrkrIrJrrrrSr$r.r:r/rsI $              z7StackMonitoringClient.search_monitored_resource_membersc sd}d}d}d}gdfddt|D}|rBtd||d t|d t|j|d td |j|d td d}ddt|D}dd|dt|dt|dtd} ddt| D} |jj |d|j d} | durt j } | rZt | t js2|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 `__. 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 `__ to see an example of how to use search_monitored_resources API. z"/monitoredResources/actions/searchr1search_monitored_resourceszjhttps://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/MonitoredResource/SearchMonitoredResources) r"r$rrrrr4r5r6csg|]}|vr|qSr.r.r7r:r.r/r< r=zDStackMonitoringClient.search_monitored_resources..z3search_monitored_resources got unknown kwargs: {!r}rrrrr)rrrrcSs&i|]\}}|tur|dur||qSrErFrHr.r.r/rK r=zDStackMonitoringClient.search_monitored_resources..r>r4r5r6r?cSs&i|]\}}|tur|dur||qSrErFrHr.r.r/rK r=r$rLNMonitoredResourceCollectionr"r)rrYrZr[r&rGr)rr\r]r$rrr^r_r`rarbr%rcrd) r*"search_monitored_resources_detailsr,rQrRrVrWrfrrSr$r.r:r/r srR          z0StackMonitoringClient.search_monitored_resourcesc sfd}d}d}d}gdfddt|D}|rBtd|d |i} d d t| D} t| D]:\} } | d ust| tjrht| d krhtd| qhdd| dt | dt d} dd t| D} |j j | d|j d} | r@t| tjs|j | | |j| j|j j||| | || d||d S|j j||| | || d||dSd 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 `__. 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 `__ to see an example of how to use update_monitored_resource API. rPUTupdate_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..z2update_monitored_resource got unknown kwargs: {!r}rhcSsi|]\}}|tur||qSr.rFrHr.r.r/rKp r=zCStackMonitoringClient.update_monitored_resource..Nrrir>r6r4rcSs&i|]\}}|tur|dur||qSrErFrHr.r.r/rK| r=r$rLr"rjr)r*rp!update_monitored_resource_detailsr,rQrRrVrWrfrkrIrJrSr$r.r:r/r1 sf*$     z/StackMonitoringClient.update_monitored_resourceN)__name__ __module__ __qualname____doc__r0r2rgrsrvr|rrrrrrrrrrrrrrrrr.r.r.r/rs@Sfu]efqpd_aa"!.rN) __future__r oci._vendorrrocirroci.base_clientr oci.configrr oci.signerr oci.utilr r r modelsrrGobjectrr.r.r.r/s