a f@sddlmZddlmZddlmZddlmZmZddlm Z ddl m Z m Z ddl mZddlmZmZmZdd lmZdd lmZd d lmZed ZGdddeZdS))absolute_import)requests)six)retrycircuit_breaker) BaseClient)get_config_value_or_defaultvalidate_config)Signer)Sentinel#get_signer_from_authentication_typeAUTHENTICATION_TYPE_FIELD_NAME)InvalidAlloyConfig)OCI_SDK_ENABLED_SERVICES_SET)optimizer_type_mappingZMissingc@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.d/Zd0d1Zd2d3Zd4d5Zd6d7Zd8S)9OptimizerClientaB Use the Cloud Advisor API to find potential inefficiencies in your tenancy and address them. Cloud Advisor can help you save money, improve performance, strengthen system resilience, and improve security. For more information, see [Cloud Advisor](/Content/CloudAdvisor/Concepts/cloudadvisoroverview.htm). c Ks&tdstdt||ddd|vr6|d}nDt|vrHt|}n2t|d|d|d|dt|d |d d }d |d ddi|dd|dt j |dd}d|vr|d|d<|ddurt j |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 bool client_level_realm_specific_endpoint_template_enabled: (optional) A boolean flag to indicate whether or not this client should be created with realm specific endpoint template enabled or disable. By default, this will be set as None. :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. Z optimizeraThe Alloy configuration has disabled this service, this behavior is controlled by OCI_SDK_ENABLED_SERVICES_SET variable. Please check if your local alloy-config file configured the service you're targeting or contact the cloud provider on the availability of this servicesigner)rtenancyuser fingerprintZkey_file pass_phraseZ key_content)rrrZprivate_key_file_locationrZprivate_key_contentTservice_endpointz /20200606z2https://optimizer.{region}.oci.{secondLevelDomain}skip_deserializationFcircuit_breaker_strategy5client_level_realm_specific_endpoint_template_enabled)Zregional_clientr base_pathZservice_endpoint_templateZ#service_endpoint_template_per_realmrrrtimeoutNallow_control_charsretry_strategycircuit_breaker_callback)rZis_service_enabledrr getr r r rrZGLOBAL_CIRCUIT_BREAKER_STRATEGYZ DEFAULT_CIRCUIT_BREAKER_STRATEGYrr base_clientrr )selfZconfigkwargsrZbase_client_init_kwargsr%B/usr/lib/python3.9/site-packages/oci/optimizer/optimizer_client.py__init__sB3         zOptimizerClient.__init__c sdg}d}d}d}d}gdfddt|D} | rHtd | d|i} d d t| D} t| D]<\} } | d ust| tjrnt| d krntd| dqndd|dt |dt d} dd t| D} |j j |d|j d}|d urt j}|rft|t js>|j | |j | ||j|j|j j||| | ||d|||d S|j j||| | ||d|||d Sd S)aQ Applies the specified recommendations to the resources. :param str recommendation_id: (required) The unique OCID associated with the recommendation. :param oci.optimizer.models.BulkApplyRecommendationsDetails bulk_apply_recommendations_details: (required) Details about bulk recommendation actions. :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 may 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 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 bulk_apply_recommendations API. recommendationIdzD/recommendations/{recommendationId}/actions/bulkApplyRecommendationsPOSTbulk_apply_recommendationsz^https://docs.oracle.com/iaas/api/#/en/advisor/20200606/Recommendation/BulkApplyRecommendationsrropc_request_idopc_retry_tokencsg|]}|vr|qSr%r%.0Z_keyZexpected_kwargsr%r& z>OptimizerClient.bulk_apply_recommendations..z/bulk_apply_recommendations got unknown kwargs: cSsi|]\}}|tur||qSr%missingr/kvr%r%r& r2z>OptimizerClient.bulk_apply_recommendations..Nr Parameter + cannot be None, whitespace or empty stringapplication/jsonr,r-accept content-typeopc-request-idzopc-retry-tokencSs&i|]\}}|tur|dur||qSNr3r5r%r%r&r8r2rZoperation_retry_strategyZclient_retry_strategyr) resource_pathmethod path_params header_paramsbodyroperation_nameapi_reference_linkrequired_arguments)riterkeys ValueError iteritems isinstance string_typeslenstripr!r4r"get_preferred_retry_strategyrrDEFAULT_RETRY_STRATEGYNoneRetryStrategyadd_opc_retry_token_if_neededadd_opc_client_retries_headeradd_circuit_breaker_callbackr make_retrying_callcall_api)r#recommendation_idZ"bulk_apply_recommendations_detailsr$rIrBrCrGrH extra_kwargsrDr6r7rErr%r0r&r*ysr)$       z*OptimizerClient.bulk_apply_recommendationsc s"g}d}d}d}d}gdfddt|D}|rFtd|d d |d t|d td } d dt| D} |jj|d|jd} | durt j } | rt | t j s|j | |j| | |j| j|jj||| |d|d|||d S|jj||| |d|d|||d SdS)a Creates a new profile. :param oci.optimizer.models.CreateProfileDetails create_profile_details: (required) Details for creating the profile. :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 may 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 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.optimizer.models.Profile` :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use create_profile API. /profilesr)create_profilezLhttps://docs.oracle.com/iaas/api/#/en/advisor/20200606/Profile/CreateProfiler+csg|]}|vr|qSr%r%r.r0r%r&r1r2z2OptimizerClient.create_profile..z#create_profile got unknown kwargs: r;r,r-r<cSs&i|]\}}|tur|dur||qSr@r3r5r%r%r&r8'r2z2OptimizerClient.create_profile..rrANProfiler) rBrCrErF response_typerrGrHrI)rrJrKr!r4rLr"rQrrrRrMrSrTrUrVr rWrX) r#Zcreate_profile_detailsr$rIrBrCrGrHrZrErr%r0r&r\sf&       zOptimizerClient.create_profilec s~dg}d}d}d}d}gdfddt|D}|rHtd |d|i} d d t| D} t| D]<\} } | d ust| tjrnt| d krntd| dqndd|dt |dt d} dd t| D} |j j |d|j d} | d urt j} | rXt| t js2|j | | |j| j|j j||| | |d|||d S|j j||| | |d|||dSd S)a8 Deletes the specified profile. Uses the profile's OCID to determine which profile to delete. :param str profile_id: (required) The unique OCID of the profile. :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_profile API. profileId/profiles/{profileId}ZDELETEdelete_profilezLhttps://docs.oracle.com/iaas/api/#/en/advisor/20200606/Profile/DeleteProfilerrif_matchr,csg|]}|vr|qSr%r%r.r0r%r&r1r2z2OptimizerClient.delete_profile..z#delete_profile got unknown kwargs: cSsi|]\}}|tur||qSr%r3r5r%r%r&r8r2z2OptimizerClient.delete_profile..Nrr9r:r;rcr,r=r>if-matchr?cSs&i|]\}}|tur|dur||qSr@r3r5r%r%r&r8r2rrAr)rBrCrDrErrGrHrIrrJrKrLrMrNrOrPr!r4r"rQrrrRrSrUrVr rWrXr# profile_idr$rIrBrCrGrHrZrDr6r7rErr%r0r&raLsl&$      zOptimizerClient.delete_profilec sddg}d}d}d}d} gdfdd t|D} | rJtd | |||d t|d t|j|d td|dt|dt|dt|dtd } ddt| D} dd|dtd} ddt| D} |jj|d|j d} | durt j } | r^t | t j s4|j| | |j| j|jj||| | |d|d|| |d S|jj||| | |d|d|| |d SdS) a Queries the Cloud Advisor resource actions that are supported. :param str compartment_id: (required) The OCID of the compartment. :param bool compartment_id_in_subtree: (required) When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned depending on the the setting of `accessLevel`. Can only be set to true when performing ListCompartments on the tenancy (root compartment). :param oci.optimizer.models.QueryDetails query_details: (required) The request parameters that describe the query criteria. :param str recommendation_id: (optional) The unique OCID associated with the recommendation. :param str recommendation_name: (optional) Optional. A filter that returns results that match the recommendation name specified. :param list[str] child_tenancy_ids: (optional) A list of child tenancies for which the respective data will be returned. Please note that the parent tenancy id can also be included in this list. For example, if there is a parent P with two children A and B, to return results of only parent P and child A, this list should be populated with tenancy id of parent P and child A. If this list contains a tenancy id that isn't part of the organization of parent P, the request will fail. That is, let's say there is an organization with parent P with children A and B, and also one other tenant T that isn't part of the organization. If T is included in the list of childTenancyIds, the request will fail. It is important to note that if you are setting the includeOrganization parameter value as true and also populating the childTenancyIds parameter with a list of child tenancies, the request will fail. The childTenancyIds and includeOrganization should be used exclusively. When using this parameter, please make sure to set the compartmentId with the parent tenancy ID. :param bool include_organization: (optional) When set to true, the data for all child tenancies including the parent is returned. That is, if there is an organization with parent P and children A and B, to return the data for the parent P, child A and child B, this parameter value should be set to true. Please note that this parameter shouldn't be used along with childTenancyIds parameter. If you would like to get results specifically for parent P and only child A, use the childTenancyIds parameter and populate the list with tenancy id of P and A. When using this parameter, please make sure to set the compartmentId with the parent tenancy ID. :param bool include_resource_metadata: (optional) Supplement additional resource information in extended metadata response. :param int limit: (optional) The maximum number of items to return in a paginated "List" call. :param str page: (optional) The value of the `opc-next-page` response header from the previous "List" call. :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.optimizer.models.ResourceActionCollection` :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use filter_resource_actions API. compartmentIdcompartmentIdInSubtreez/actions/filterResourceActionsr)filter_resource_actionszbhttps://docs.oracle.com/iaas/api/#/en/advisor/20200606/ResourceActionSummary/FilterResourceActions) rrrYrecommendation_namechild_tenancy_idsinclude_organizationinclude_resource_metadatalimitpager,csg|]}|vr|qSr%r%r.r0r%r&r1r2z;OptimizerClient.filter_resource_actions..z,filter_resource_actions got unknown kwargs: rYrlrmmultirnrorprq) rirjr(recommendationNamechildTenancyIdsincludeOrganizationincludeResourceMetadatarprqcSs&i|]\}}|tur|dur||qSr@r3r5r%r%r&r8+r2z;OptimizerClient.filter_resource_actions..r;r,r=r>r?cSs&i|]\}}|tur|dur||qSr@r3r5r%r%r&r82r2rrANResourceActionCollectionr) rBrC query_paramsrErFr^rrGrHrIrrJrKr!r4r" generate_collection_format_paramrLrQrrrRrMrSrUrVr rWrX)r#compartment_idcompartment_id_in_subtreeZ query_detailsr$rIrBrCrGrHrZryrErr%r0r&rks|R             z'OptimizerClient.filter_resource_actionsc svdg}d}d}d}d}gdfddt|D}|rHtd |d|i} d d t| D} t| D]<\} } | d ust| tjrnt| d krntd| dqndd|dt d} dd t| D} |j j |d|j d} | d urt j} | rNt| t js&|j | | |j| j|j j||| | d|d|||d S|j j||| | d|d|||d Sd S)a Gets the category that corresponds to the specified OCID. :param str category_id: (required) The unique OCID associated with the category. :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.optimizer.models.Category` :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use get_category API. categoryIdz/categories/{categoryId}GET get_categoryzKhttps://docs.oracle.com/iaas/api/#/en/advisor/20200606/Category/GetCategoryrrr,csg|]}|vr|qSr%r%r.r0r%r&r1r2z0OptimizerClient.get_category..z!get_category got unknown kwargs: cSsi|]\}}|tur||qSr%r3r5r%r%r&r8r2z0OptimizerClient.get_category..Nrr9r:r;r,rwcSs&i|]\}}|tur|dur||qSr@r3r5r%r%r&r8r2rrAZCategoryr rBrCrDrEr^rrGrHrIrf)r# category_idr$rIrBrCrGrHrZrDr6r7rErr%r0r&rXsn$    zOptimizerClient.get_categoryc svdg}d}d}d}d}gdfddt|D}|rHtd |d|i} d d t| D} t| D]<\} } | d ust| tjrnt| d krntd| dqndd|dt d} dd t| D} |j j |d|j d} | d urt j} | rNt| t js&|j | | |j| j|j j||| | d|d|||d S|j j||| | d|d|||d Sd S)a Gets the Cloud Advisor enrollment status. :param str enrollment_status_id: (required) The unique OCID associated with the enrollment status. :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.optimizer.models.EnrollmentStatus` :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use get_enrollment_status API. enrollmentStatusId&/enrollmentStatus/{enrollmentStatusId}rget_enrollment_statusz[https://docs.oracle.com/iaas/api/#/en/advisor/20200606/EnrollmentStatus/GetEnrollmentStatusrcsg|]}|vr|qSr%r%r.r0r%r&r1r2z9OptimizerClient.get_enrollment_status..z*get_enrollment_status got unknown kwargs: cSsi|]\}}|tur||qSr%r3r5r%r%r&r8r2z9OptimizerClient.get_enrollment_status..Nrr9r:r;r,rwcSs&i|]\}}|tur|dur||qSr@r3r5r%r%r&r8r2rrAEnrollmentStatusrrrf)r#enrollment_status_idr$rIrBrCrGrHrZrDr6r7rErr%r0r&rsn$    z%OptimizerClient.get_enrollment_statusc svdg}d}d}d}d}gdfddt|D}|rHtd |d|i} d d t| D} t| D]<\} } | d ust| tjrnt| d krntd| dqndd|dt d} dd t| D} |j j |d|j d} | d urt j} | rNt| t js&|j | | |j| j|j j||| | d|d|||d S|j j||| | d|d|||d Sd S)a Gets the specified profile's information. Uses the profile's OCID to determine which profile to retrieve. :param str profile_id: (required) The unique OCID of the profile. :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.optimizer.models.Profile` :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use get_profile API. r_r`r get_profilezIhttps://docs.oracle.com/iaas/api/#/en/advisor/20200606/Profile/GetProfilercsg|]}|vr|qSr%r%r.r0r%r&r1Ir2z/OptimizerClient.get_profile..z get_profile got unknown kwargs: cSsi|]\}}|tur||qSr%r3r5r%r%r&r8Rr2z/OptimizerClient.get_profile..Nrr9r:r;r,rwcSs&i|]\}}|tur|dur||qSr@r3r5r%r%r&r8]r2rrAr]rrrfrgr%r0r&rsn$    zOptimizerClient.get_profilec svdg}d}d}d}d}gdfddt|D}|rHtd |d|i} d d t| D} t| D]<\} } | d ust| tjrnt| d krntd| dqndd|dt d} dd t| D} |j j |d|j d} | d urt j} | rNt| t js&|j | | |j| j|j j||| | d|d|||d S|j j||| | d|d|||d Sd S)a Gets the recommendation for the specified OCID. :param str recommendation_id: (required) The unique OCID associated with the recommendation. :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.optimizer.models.Recommendation` :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use get_recommendation API. r(#/recommendations/{recommendationId}rget_recommendationzWhttps://docs.oracle.com/iaas/api/#/en/advisor/20200606/Recommendation/GetRecommendationrcsg|]}|vr|qSr%r%r.r0r%r&r1r2z6OptimizerClient.get_recommendation..z'get_recommendation got unknown kwargs: cSsi|]\}}|tur||qSr%r3r5r%r%r&r8r2z6OptimizerClient.get_recommendation..Nrr9r:r;r,rwcSs&i|]\}}|tur|dur||qSr@r3r5r%r%r&r8r2rrARecommendationrrrf)r#rYr$rIrBrCrGrHrZrDr6r7rErr%r0r&rsn$    z"OptimizerClient.get_recommendationc sdg}d}d}d}d}gdfddt|D}|rHtd |d|i} d d t| D} t| D]<\} } | d ust| tjrnt| d krntd| dqnd|dt i} dd t| D} dd|dt d} dd t| D} |j j |d|j d}|d ur t j}|rvt|t jsL|j | ||j|j|j j||| | | d|d|||d S|j j||| | | d|d|||d Sd S)al Gets the resource action that corresponds to the specified OCID. :param str resource_action_id: (required) The unique OCID associated with the resource action. :param bool include_resource_metadata: (optional) Supplement additional resource information in extended metadata response. :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.optimizer.models.ResourceAction` :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use get_resource_action API. resourceActionId#/resourceActions/{resourceActionId}rget_resource_actionzWhttps://docs.oracle.com/iaas/api/#/en/advisor/20200606/ResourceAction/GetResourceAction)rrror,csg|]}|vr|qSr%r%r.r0r%r&r1r2z7OptimizerClient.get_resource_action..z(get_resource_action got unknown kwargs: cSsi|]\}}|tur||qSr%r3r5r%r%r&r8r2z7OptimizerClient.get_resource_action..Nrr9r:rvrocSs&i|]\}}|tur|dur||qSr@r3r5r%r%r&r8%r2r;r,rwcSs&i|]\}}|tur|dur||qSr@r3r5r%r%r&r8,r2rrAResourceActionr rBrCrDryrEr^rrGrHrIrf)r#resource_action_idr$rIrBrCrGrHrZrDr6r7ryrErr%r0r&rsx"$      z#OptimizerClient.get_resource_actionc svdg}d}d}d}d}gdfddt|D}|rHtd |d|i} d d t| D} t| D]<\} } | d ust| tjrnt| d krntd| dqndd|dt d} dd t| D} |j j |d|j d} | d urt j} | rNt| t js&|j | | |j| j|j j||| | d|d|||d S|j j||| | d|d|||d Sd S)a Gets the status of the work request associated with the specified ID. :param str work_request_id: (required) The OCID of 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 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.optimizer.models.WorkRequest` :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use get_work_request API. workRequestIdz/workRequests/{workRequestId}rget_work_requestzQhttps://docs.oracle.com/iaas/api/#/en/advisor/20200606/WorkRequest/GetWorkRequestrcsg|]}|vr|qSr%r%r.r0r%r&r1}r2z4OptimizerClient.get_work_request..z%get_work_request got unknown kwargs: cSsi|]\}}|tur||qSr%r3r5r%r%r&r8r2z4OptimizerClient.get_work_request..Nrr9r:r;r,rwcSs&i|]\}}|tur|dur||qSr@r3r5r%r%r&r8r2rrAZ WorkRequestrrrf)r#work_request_idr$rIrBrCrGrHrZrDr6r7rErr%r0r&rRsn$    z OptimizerClient.get_work_requestc s ddg}d}d}d}d}gdfdd t|D} | rJtd | d |vrtd d g} |d | vrttd| d|vrddg} |d| vrtd| d|vrgd} |d| vrtd| |||j|dtd|dt|dt|dt|dt|d t|dt|dtd } ddt| D} dd|d td!}d"dt|D}|jj|d#|j d$}|d%urt j }|rt |t j s|j|||j|j|jj||| |d&|d'|||d( S|jj||| |d&|d'|||d( Sd%S))a Lists the supported Cloud Advisor categories. :param str compartment_id: (required) The OCID of the compartment. :param bool compartment_id_in_subtree: (required) When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned depending on the the setting of `accessLevel`. Can only be set to true when performing ListCompartments on the tenancy (root compartment). :param list[str] child_tenancy_ids: (optional) A list of child tenancies for which the respective data will be returned. Please note that the parent tenancy id can also be included in this list. For example, if there is a parent P with two children A and B, to return results of only parent P and child A, this list should be populated with tenancy id of parent P and child A. If this list contains a tenancy id that isn't part of the organization of parent P, the request will fail. That is, let's say there is an organization with parent P with children A and B, and also one other tenant T that isn't part of the organization. If T is included in the list of childTenancyIds, the request will fail. It is important to note that if you are setting the includeOrganization parameter value as true and also populating the childTenancyIds parameter with a list of child tenancies, the request will fail. The childTenancyIds and includeOrganization should be used exclusively. When using this parameter, please make sure to set the compartmentId with the parent tenancy ID. :param bool include_organization: (optional) When set to true, the data for all child tenancies including the parent is returned. That is, if there is an organization with parent P and children A and B, to return the data for the parent P, child A and child B, this parameter value should be set to true. Please note that this parameter shouldn't be used along with childTenancyIds parameter. If you would like to get results specifically for parent P and only child A, use the childTenancyIds parameter and populate the list with tenancy id of P and A. When using this parameter, please make sure to set the compartmentId with the parent tenancy ID. :param str name: (optional) Optional. A filter that returns results that match the name specified. :param int limit: (optional) The maximum number of items to return in a paginated "List" call. :param str page: (optional) The value of the `opc-next-page` response header from the previous "List" call. :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. You can provide one sort order (`sortOrder`). Default order for TIMECREATED is descending. Default order for NAME is ascending. The NAME sort order is case sensitive. Allowed values are: "NAME", "TIMECREATED" :param str lifecycle_state: (optional) A filter that returns results that match the lifecycle state specified. Allowed values are: "ACTIVE", "FAILED", "INACTIVE", "ATTACHING", "DETACHING", "DELETING", "DELETED", "UPDATING", "CREATING" :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.optimizer.models.CategoryCollection` :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use list_categories API. rirjz /categoriesrlist_categorieszUhttps://docs.oracle.com/iaas/api/#/en/advisor/20200606/CategorySummary/ListCategories) rrrmrnnamerprq sort_ordersort_bylifecycle_stater,csg|]}|vr|qSr%r%r.r0r%r&r1!r2z3OptimizerClient.list_categories..z$list_categories got unknown kwargs: rASCDESC/Invalid value for `sort_order`, must be one of rNAME TIMECREATED,Invalid value for `sort_by`, must be one of r ACTIVEZFAILEDINACTIVEZ ATTACHINGZ DETACHINGZDELETINGZDELETEDZUPDATINGZCREATING4Invalid value for `lifecycle_state`, must be one of rmrrrnrrprq) rirjrtrurrprq sortOrdersortBylifecycleStatecSs&i|]\}}|tur|dur||qSr@r3r5r%r%r&r8Gr2z3OptimizerClient.list_categories..r;r,rwcSs&i|]\}}|tur|dur||qSr@r3r5r%r%r&r8Nr2rrANZCategoryCollectionr rBrCryrEr^rrGrHrI)rrJrKr"r{r!r4rLrQrrrRrMrSrUrVr rWrX)r#r|r}r$rIrBrCrGrHrZsort_order_allowed_valuessort_by_allowed_valueslifecycle_state_allowed_valuesryrErr%r0r&rsX                 zOptimizerClient.list_categoriesc sdg}d}d}d}d}gdfddt|D}|rHtd |d |vrrd d g} |d | vrrtd | d|vrddg} |d| vrtd| d|vrgd} |d| vrtd| d|vrddg} |d| vrtd| ||dt|dt|d t|dt|dt|dtd} ddt| D} dd|dtd }d!dt|D}|jj|d"|jd#}|d$urt j }|rt |t j s|j |||j|j|jj||| |d%|d&|||d' S|jj||| |d%|d&|||d' Sd$S)(aZ Lists the Cloud Advisor enrollment statuses. :param str compartment_id: (required) The OCID of the compartment. :param int limit: (optional) The maximum number of items to return in a paginated "List" call. :param str page: (optional) The value of the `opc-next-page` response header from the previous "List" call. :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. You can provide one sort order (`sortOrder`). Default order for TIMECREATED is descending. Default order for NAME is ascending. The NAME sort order is case sensitive. Allowed values are: "NAME", "TIMECREATED" :param str lifecycle_state: (optional) A filter that returns results that match the lifecycle state specified. Allowed values are: "ACTIVE", "FAILED", "INACTIVE", "ATTACHING", "DETACHING", "DELETING", "DELETED", "UPDATING", "CREATING" :param str status: (optional) A filter that returns results that match the Cloud Advisor enrollment status specified. Allowed values are: "ACTIVE", "INACTIVE" :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.optimizer.models.EnrollmentStatusCollection` :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use list_enrollment_statuses API. riz/enrollmentStatusrlist_enrollment_statuseszehttps://docs.oracle.com/iaas/api/#/en/advisor/20200606/EnrollmentStatusSummary/ListEnrollmentStatuses) rrrprqrrrstatusr,csg|]}|vr|qSr%r%r.r0r%r&r1r2z.z-list_enrollment_statuses got unknown kwargs: rrrrrrrrrrrrrr+Invalid value for `status`, must be one of rprq)rirprqrrrrcSs&i|]\}}|tur|dur||qSr@r3r5r%r%r&r8r2z.r;r,rwcSs&i|]\}}|tur|dur||qSr@r3r5r%r%r&r8r2rrANZEnrollmentStatusCollectionrrrrJrKr!r4rLr"rQrrrRrMrSrUrVr rWrX)r#r|r$rIrBrCrGrHrZrrrstatus_allowed_valuesryrErr%r0r&rrs9                 z(OptimizerClient.list_enrollment_statusesc sJddg}d}d}d}d}gdfdd t|D} | rJtd | d |vrtd d g} |d | vrttd| d|vrddg} |d| vrtd| d|vrgd} |d| vrtd| d|vrgd} |d| vrtd| |||dt|dt|dt|dt|dt|dt|d t|dt|dt|dt|dtd }d!d"t|D}d#d#|d$td%}d&d"t|D}|jj|d'|jd(}|d)urt j }|r"t |t j s|j |||j|j|jj||||d*|d+|||d, S|jj||||d*|d+|||d, Sd)S)-a Lists changes to the recommendations based on user activity. For example, lists when recommendations have been implemented, dismissed, postponed, or reactivated. :param str compartment_id: (required) The OCID of the compartment. :param bool compartment_id_in_subtree: (required) When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned depending on the the setting of `accessLevel`. Can only be set to true when performing ListCompartments on the tenancy (root compartment). :param str name: (optional) Optional. A filter that returns results that match the name specified. :param str recommendation_name: (optional) Optional. A filter that returns results that match the recommendation name specified. :param str recommendation_id: (optional) The unique OCID associated with the recommendation. :param str resource_type: (optional) Optional. A filter that returns results that match the resource type specified. :param int limit: (optional) The maximum number of items to return in a paginated "List" call. :param str page: (optional) The value of the `opc-next-page` response header from the previous "List" call. :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. You can provide one sort order (`sortOrder`). Default order for TIMECREATED is descending. Default order for NAME is ascending. The NAME sort order is case sensitive. Allowed values are: "NAME", "TIMECREATED" :param str lifecycle_state: (optional) A filter that returns results that match the lifecycle state specified. Allowed values are: "ACTIVE", "FAILED", "INACTIVE", "ATTACHING", "DETACHING", "DELETING", "DELETED", "UPDATING", "CREATING" :param str status: (optional) A filter that returns recommendations that match the status specified. Allowed values are: "PENDING", "DISMISSED", "POSTPONED", "IMPLEMENTED" :param bool include_resource_metadata: (optional) Supplement additional resource information in extended metadata response. :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.optimizer.models.HistoryCollection` :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use list_histories API. rirjz /historiesrlist_historieszShttps://docs.oracle.com/iaas/api/#/en/advisor/20200606/HistorySummary/ListHistories)rrrrlrY resource_typerprqrrrrror,csg|]}|vr|qSr%r%r.r0r%r&r1wr2z2OptimizerClient.list_histories..z#list_histories got unknown kwargs: rrrrrrrrrrrrZPENDINGZ DISMISSEDZ POSTPONEDZ IMPLEMENTEDrrrlrYrrprqro) rirjrrsr( resourceTyperprqrrrrrvcSs&i|]\}}|tur|dur||qSr@r3r5r%r%r&r8r2z2OptimizerClient.list_histories..r;r,rwcSs&i|]\}}|tur|dur||qSr@r3r5r%r%r&r8r2rrANZHistoryCollectionrrrr#r|r}r$rIrBrCrGrHrZrrrrryrErr%r0r&rsN                    zOptimizerClient.list_historiesc sddg}d}d}d}d}gdfdd t|D} | rJtd | d |vrtd d g} |d | vrttd| d|vrddg} |d| vrtd| |||dt|dt|dt|dt|d t|dtd} ddt| D} dd|dtd} ddt| D} |jj|d|jd}|d urHt j }|rt |t j st|j | ||j|j|jj||| | d!|d"|||d# S|jj||| | d!|d"|||d# Sd S)$a Lists the existing profile levels. :param str compartment_id: (required) The OCID of the compartment. :param bool compartment_id_in_subtree: (required) When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned depending on the the setting of `accessLevel`. Can only be set to true when performing ListCompartments on the tenancy (root compartment). :param str name: (optional) Optional. A filter that returns results that match the name specified. :param str recommendation_name: (optional) Optional. A filter that returns results that match the recommendation name specified. :param int limit: (optional) The maximum number of items to return in a paginated "List" call. :param str page: (optional) The value of the `opc-next-page` response header from the previous "List" call. :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. You can provide one sort order (`sortOrder`). Default order for TIMECREATED is descending. Default order for NAME is ascending. The NAME sort order is case sensitive. Allowed values are: "NAME", "TIMECREATED" :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.optimizer.models.ProfileLevelCollection` :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use list_profile_levels API. rirjz/profileLevelsrlist_profile_levelsz\https://docs.oracle.com/iaas/api/#/en/advisor/20200606/ProfileLevelSummary/ListProfileLevels rrrrlrprqrrr,csg|]}|vr|qSr%r%r.r0r%r&r1r2z7OptimizerClient.list_profile_levels..z(list_profile_levels got unknown kwargs: rrrrrrrrrrlrprqrirjrrsrprqrrcSs&i|]\}}|tur|dur||qSr@r3r5r%r%r&r8;r2z7OptimizerClient.list_profile_levels..r;r,rwcSs&i|]\}}|tur|dur||qSr@r3r5r%r%r&r8Br2rrANZProfileLevelCollectionrrrr#r|r}r$rIrBrCrGrHrZrrryrErr%r0r&rs:               z#OptimizerClient.list_profile_levelsc sdg}d}d}d}d}gdfddt|D}|rHtd |d |vrrd d g} |d | vrrtd | d|vrddg} |d| vrtd| d|vrgd} |d| vrtd| ||dt|dt|dt|d t|dt|dtd} ddt| D} dd|dtd} ddt| D} |jj|d|jd }|d!urnt j }|rt |t j s|j | ||j|j|jj||| | d"|d#|||d$ S|jj||| | d"|d#|||d$ Sd!S)%a Lists the existing profiles. :param str compartment_id: (required) The OCID of the compartment. :param str name: (optional) Optional. A filter that returns results that match the name specified. :param int limit: (optional) The maximum number of items to return in a paginated "List" call. :param str page: (optional) The value of the `opc-next-page` response header from the previous "List" call. :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. You can provide one sort order (`sortOrder`). Default order for TIMECREATED is descending. Default order for NAME is ascending. The NAME sort order is case sensitive. Allowed values are: "NAME", "TIMECREATED" :param str lifecycle_state: (optional) A filter that returns results that match the lifecycle state specified. Allowed values are: "ACTIVE", "FAILED", "INACTIVE", "ATTACHING", "DETACHING", "DELETING", "DELETED", "UPDATING", "CREATING" :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.optimizer.models.ProfileCollection` :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use list_profiles API. rir[r list_profileszRhttps://docs.oracle.com/iaas/api/#/en/advisor/20200606/ProfileSummary/ListProfiles) rrrrprqrrrr,csg|]}|vr|qSr%r%r.r0r%r&r1r2z1OptimizerClient.list_profiles..z"list_profiles got unknown kwargs: rrrrrrrrrrrrrprq)rirrprqrrrcSs&i|]\}}|tur|dur||qSr@r3r5r%r%r&r8r2z1OptimizerClient.list_profiles..r;r,rwcSs&i|]\}}|tur|dur||qSr@r3r5r%r%r&r8r2rrANZProfileCollectionrrr)r#r|r$rIrBrCrGrHrZrrrryrErr%r0r&rfs7                zOptimizerClient.list_profilesc sddg}d}d}d}d}gdfdd t|D} | rJtd | d |vrtd d g} |d | vrttd| d|vrddg} |d| vrtd| |||dt|dt|dt|dt|d t|dtd} ddt| D} dd|dtd} ddt| D} |jj|d|jd}|d urHt j }|rt |t j st|j | ||j|j|jj||| | d!|d"|||d# S|jj||| | d!|d"|||d# Sd S)$a Lists the existing strategies. :param str compartment_id: (required) The OCID of the compartment. :param bool compartment_id_in_subtree: (required) When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned depending on the the setting of `accessLevel`. Can only be set to true when performing ListCompartments on the tenancy (root compartment). :param str name: (optional) Optional. A filter that returns results that match the name specified. :param str recommendation_name: (optional) Optional. A filter that returns results that match the recommendation name specified. :param int limit: (optional) The maximum number of items to return in a paginated "List" call. :param str page: (optional) The value of the `opc-next-page` response header from the previous "List" call. :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. You can provide one sort order (`sortOrder`). Default order for TIMECREATED is descending. Default order for NAME is ascending. The NAME sort order is case sensitive. Allowed values are: "NAME", "TIMECREATED" :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.optimizer.models.RecommendationStrategyCollection` :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use list_recommendation_strategies API. rirjz/recommendationStrategiesrlist_recommendation_strategieszqhttps://docs.oracle.com/iaas/api/#/en/advisor/20200606/RecommendationStrategySummary/ListRecommendationStrategiesrcsg|]}|vr|qSr%r%r.r0r%r&r1Ir2zBOptimizerClient.list_recommendation_strategies..z3list_recommendation_strategies got unknown kwargs: rrrrrrrrrrlrprqrcSs&i|]\}}|tur|dur||qSr@r3r5r%r%r&r8fr2zBOptimizerClient.list_recommendation_strategies..r;r,rwcSs&i|]\}}|tur|dur||qSr@r3r5r%r%r&r8mr2rrANZ RecommendationStrategyCollectionrrrrr%r0r&rs:               z.OptimizerClient.list_recommendation_strategiesc sTddg}d}d}d}d}gdfdd t|D} | rJtd | d |vrtd d g} |d | vrttd| d|vrddg} |d| vrtd| d|vrgd} |d| vrtd| d|vrgd} |d| vrtd| |||dt|dt|j|dtd|dt|dt|dt|d t|d t|dt|dt|dtd! }d"d#t|D}d$d$|d%td&}d'd#t|D}|jj|d(|j d)}|d*urt j }|r,t |t j s|j|||j|j|jj||||d+|d,|||d- S|jj||||d+|d,|||d- Sd*S).a Lists the Cloud Advisor recommendations that are currently supported. :param str compartment_id: (required) The OCID of the compartment. :param bool compartment_id_in_subtree: (required) When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned depending on the the setting of `accessLevel`. Can only be set to true when performing ListCompartments on the tenancy (root compartment). :param str category_id: (optional) The unique OCID associated with the category. :param str category_name: (optional) Optional. A filter that returns results that match the category name specified. :param list[str] child_tenancy_ids: (optional) A list of child tenancies for which the respective data will be returned. Please note that the parent tenancy id can also be included in this list. For example, if there is a parent P with two children A and B, to return results of only parent P and child A, this list should be populated with tenancy id of parent P and child A. If this list contains a tenancy id that isn't part of the organization of parent P, the request will fail. That is, let's say there is an organization with parent P with children A and B, and also one other tenant T that isn't part of the organization. If T is included in the list of childTenancyIds, the request will fail. It is important to note that if you are setting the includeOrganization parameter value as true and also populating the childTenancyIds parameter with a list of child tenancies, the request will fail. The childTenancyIds and includeOrganization should be used exclusively. When using this parameter, please make sure to set the compartmentId with the parent tenancy ID. :param bool include_organization: (optional) When set to true, the data for all child tenancies including the parent is returned. That is, if there is an organization with parent P and children A and B, to return the data for the parent P, child A and child B, this parameter value should be set to true. Please note that this parameter shouldn't be used along with childTenancyIds parameter. If you would like to get results specifically for parent P and only child A, use the childTenancyIds parameter and populate the list with tenancy id of P and A. When using this parameter, please make sure to set the compartmentId with the parent tenancy ID. :param str name: (optional) Optional. A filter that returns results that match the name specified. :param int limit: (optional) The maximum number of items to return in a paginated "List" call. :param str page: (optional) The value of the `opc-next-page` response header from the previous "List" call. :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. You can provide one sort order (`sortOrder`). Default order for TIMECREATED is descending. Default order for NAME is ascending. The NAME sort order is case sensitive. Allowed values are: "NAME", "TIMECREATED" :param str lifecycle_state: (optional) A filter that returns results that match the lifecycle state specified. Allowed values are: "ACTIVE", "FAILED", "INACTIVE", "ATTACHING", "DETACHING", "DELETING", "DELETED", "UPDATING", "CREATING" :param str status: (optional) A filter that returns recommendations that match the status specified. Allowed values are: "PENDING", "DISMISSED", "POSTPONED", "IMPLEMENTED" :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.optimizer.models.RecommendationCollection` :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use list_recommendations API. rirjz/recommendationsrlist_recommendationsz`https://docs.oracle.com/iaas/api/#/en/advisor/20200606/RecommendationSummary/ListRecommendations)rrr category_namermrnrrprqrrrrr,csg|]}|vr|qSr%r%r.r0r%r&r1 r2z8OptimizerClient.list_recommendations..z)list_recommendations got unknown kwargs: rrrrrrrrrrrrrrrrrmrrrnrrprq) rirjr~Z categoryNamertrurrprqrrrrcSs&i|]\}}|tur|dur||qSr@r3r5r%r%r&r8; r2z8OptimizerClient.list_recommendations..r;r,rwcSs&i|]\}}|tur|dur||qSr@r3r5r%r%r&r8B r2rrANZRecommendationCollectionrrrzrr%r0r&rsc                   z$OptimizerClient.list_recommendationsc sDddg}d}d}d}d}gdfdd t|D} | rJtd | |||d t|d td } ddt| D} dd|dtd} ddt| D} |jj|d|jd} | durt j } | rt | t j s|j | | |j| j|jj||| | d|d|||d S|jj||| | d|d|||d SdS)aS Lists the fields that are indexed for querying and their associated value types. :param str compartment_id: (required) The OCID of the compartment. :param bool compartment_id_in_subtree: (required) When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned depending on the the setting of `accessLevel`. Can only be set to true when performing ListCompartments on the tenancy (root compartment). :param int limit: (optional) The maximum number of items to return in a paginated "List" call. :param str page: (optional) The value of the `opc-next-page` response header from the previous "List" call. :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.optimizer.models.QueryableFieldCollection` :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use list_resource_action_queryable_fields API. rirjz+/resourceActions/actions/getQueryableFieldsr%list_resource_action_queryable_fieldsznhttps://docs.oracle.com/iaas/api/#/en/advisor/20200606/QueryableFieldSummary/ListResourceActionQueryableFields)rrrprqr,csg|]}|vr|qSr%r%r.r0r%r&r1 r2zIOptimizerClient.list_resource_action_queryable_fields..z:list_resource_action_queryable_fields got unknown kwargs: rprq)rirjrprqcSs&i|]\}}|tur|dur||qSr@r3r5r%r%r&r8 r2zIOptimizerClient.list_resource_action_queryable_fields..r;r,rwcSs&i|]\}}|tur|dur||qSr@r3r5r%r%r&r8 r2rrANZQueryableFieldCollectionrrr) r#r|r}r$rIrBrCrGrHrZryrErr%r0r&rf sn*       z5OptimizerClient.list_resource_action_queryable_fieldsc shddg}d}d}d}d}gdfdd t|D} | rJtd | d |vrtd d g} |d | vrttd| d|vrddg} |d| vrtd| d|vrgd} |d| vrtd| d|vrgd} |d| vrtd| |||dt|dt|j|dtd|dt|dt|dt|d t|d!t|d t|dt|dt|dt|d"td#}d$d%t|D}d&d&|d'td(}d)d%t|D}|jj|d*|j d+}|d,urt j }|r@t |t j s|j|||j|j|jj||||d-|d.|||d/ S|jj||||d-|d.|||d/ Sd,S)0a! Lists the Cloud Advisor resource actions that are supported. :param str compartment_id: (required) The OCID of the compartment. :param bool compartment_id_in_subtree: (required) When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned depending on the the setting of `accessLevel`. Can only be set to true when performing ListCompartments on the tenancy (root compartment). :param str recommendation_id: (optional) The unique OCID associated with the recommendation. :param str recommendation_name: (optional) Optional. A filter that returns results that match the recommendation name specified. :param list[str] child_tenancy_ids: (optional) A list of child tenancies for which the respective data will be returned. Please note that the parent tenancy id can also be included in this list. For example, if there is a parent P with two children A and B, to return results of only parent P and child A, this list should be populated with tenancy id of parent P and child A. If this list contains a tenancy id that isn't part of the organization of parent P, the request will fail. That is, let's say there is an organization with parent P with children A and B, and also one other tenant T that isn't part of the organization. If T is included in the list of childTenancyIds, the request will fail. It is important to note that if you are setting the includeOrganization parameter value as true and also populating the childTenancyIds parameter with a list of child tenancies, the request will fail. The childTenancyIds and includeOrganization should be used exclusively. When using this parameter, please make sure to set the compartmentId with the parent tenancy ID. :param bool include_organization: (optional) When set to true, the data for all child tenancies including the parent is returned. That is, if there is an organization with parent P and children A and B, to return the data for the parent P, child A and child B, this parameter value should be set to true. Please note that this parameter shouldn't be used along with childTenancyIds parameter. If you would like to get results specifically for parent P and only child A, use the childTenancyIds parameter and populate the list with tenancy id of P and A. When using this parameter, please make sure to set the compartmentId with the parent tenancy ID. :param str name: (optional) Optional. A filter that returns results that match the name specified. :param str resource_type: (optional) Optional. A filter that returns results that match the resource type specified. :param int limit: (optional) The maximum number of items to return in a paginated "List" call. :param str page: (optional) The value of the `opc-next-page` response header from the previous "List" call. :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. You can provide one sort order (`sortOrder`). Default order for TIMECREATED is descending. Default order for NAME is ascending. The NAME sort order is case sensitive. Allowed values are: "NAME", "TIMECREATED" :param str lifecycle_state: (optional) A filter that returns results that match the lifecycle state specified. Allowed values are: "ACTIVE", "FAILED", "INACTIVE", "ATTACHING", "DETACHING", "DELETING", "DELETED", "UPDATING", "CREATING" :param str status: (optional) A filter that returns recommendations that match the status specified. Allowed values are: "PENDING", "DISMISSED", "POSTPONED", "IMPLEMENTED" :param bool include_resource_metadata: (optional) Supplement additional resource information in extended metadata response. :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.optimizer.models.ResourceActionCollection` :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use list_resource_actions API. rirjz/resourceActionsrlist_resource_actionsz`https://docs.oracle.com/iaas/api/#/en/advisor/20200606/ResourceActionSummary/ListResourceActions)rrrYrlrmrnrrrprqrrrrror,csg|]}|vr|qSr%r%r.r0r%r&r1V r2z9OptimizerClient.list_resource_actions..z*list_resource_actions got unknown kwargs: rrrrrrrrrrrrrrrYrlrmrrrnrrrprqro)rirjr(rsrtrurrrprqrrrrrvcSs&i|]\}}|tur|dur||qSr@r3r5r%r%r&r8 r2z9OptimizerClient.list_resource_actions..r;r,rwcSs&i|]\}}|tur|dur||qSr@r3r5r%r%r&r8 r2rrANrxrrrzrr%r0r&r si                     z%OptimizerClient.list_resource_actionsc sdg}d}d}d}d}gdfddt|D}|rHtd |d|i} d d t| D} t| D]<\} } | d ust| tjrnt| d krntd| dqn|dt |dt d} dd t| D} dd|dt d} dd t| D} |j j |d|j d}|d ur*t j}|rt|t jsV|j | ||j|j|j j||| | | d|d|||d S|j j||| | | d|d|||d Sd S)a Lists errors associated with the specified work request. :param str work_request_id: (required) The OCID of the work request. :param str page: (optional) The value of the `opc-next-page` response header from the previous "List" call. :param int limit: (optional) The maximum number of items to return in a paginated "List" call. :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.optimizer.models.WorkRequestErrorCollection` :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use list_work_request_errors API. rz$/workRequests/{workRequestId}/errorsrlist_work_request_errorsz]https://docs.oracle.com/iaas/api/#/en/advisor/20200606/WorkRequestError/ListWorkRequestErrorsrrrqrpr,csg|]}|vr|qSr%r%r.r0r%r&r1 r2z.z-list_work_request_errors got unknown kwargs: cSsi|]\}}|tur||qSr%r3r5r%r%r&r8 r2z.Nrr9r:rqrprqrpcSs&i|]\}}|tur|dur||qSr@r3r5r%r%r&r8 r2r;r,rwcSs&i|]\}}|tur|dur||qSr@r3r5r%r%r&r8 r2rrAZWorkRequestErrorCollectionrrrfr#rr$rIrBrCrGrHrZrDr6r7ryrErr%r0r&r sz%$       z(OptimizerClient.list_work_request_errorsc sdg}d}d}d}d}gdfddt|D}|rHtd |d|i} d d t| D} t| D]<\} } | d ust| tjrnt| d krntd| dqn|dt |dt d} dd t| D} dd|dt d} dd t| D} |j j |d|j d}|d ur*t j}|rt|t jsV|j | ||j|j|j j||| | | d|d|||d S|j j||| | | d|d|||d Sd S)a Lists the logs associated with the specified work request. :param str work_request_id: (required) The OCID of the work request. :param str page: (optional) The value of the `opc-next-page` response header from the previous "List" call. :param int limit: (optional) The maximum number of items to return in a paginated "List" call. :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.optimizer.models.WorkRequestLogEntryCollection` :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use list_work_request_logs API. rz"/workRequests/{workRequestId}/logsrlist_work_request_logsz^https://docs.oracle.com/iaas/api/#/en/advisor/20200606/WorkRequestLogEntry/ListWorkRequestLogsrcsg|]}|vr|qSr%r%r.r0r%r&r1Y r2z:OptimizerClient.list_work_request_logs..z+list_work_request_logs got unknown kwargs: cSsi|]\}}|tur||qSr%r3r5r%r%r&r8b r2z:OptimizerClient.list_work_request_logs..Nrr9r:rqrprcSs&i|]\}}|tur|dur||qSr@r3r5r%r%r&r8l r2r;r,rwcSs&i|]\}}|tur|dur||qSr@r3r5r%r%r&r8s r2rrAZWorkRequestLogEntryCollectionrrrfrr%r0r&r& sz%$       z&OptimizerClient.list_work_request_logsc s@dg}d}d}d}d}gdfddt|D}|rHtd |||d t|d td } d dt| D} dd|dtd} ddt| D} |jj|d|jd} | durt j } | rt | t j s|j | | |j| j|jj||| | d|d|||d S|jj||| | d|d|||d SdS)a Lists the work requests in the tenancy. The tenancy is the root compartment. :param str compartment_id: (required) The OCID of the compartment. :param str page: (optional) The value of the `opc-next-page` response header from the previous "List" call. :param int limit: (optional) The maximum number of items to return in a paginated "List" call. :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.optimizer.models.WorkRequestCollection` :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use list_work_requests API. riz /workRequestsrlist_work_requestszShttps://docs.oracle.com/iaas/api/#/en/advisor/20200606/WorkRequest/ListWorkRequestsrcsg|]}|vr|qSr%r%r.r0r%r&r1 r2z6OptimizerClient.list_work_requests..z'list_work_requests got unknown kwargs: rqrp)rirqrpcSs&i|]\}}|tur|dur||qSr@r3r5r%r%r&r8 r2z6OptimizerClient.list_work_requests..r;r,rwcSs&i|]\}}|tur|dur||qSr@r3r5r%r%r&r8 r2rrANZWorkRequestCollectionrrr) r#r|r$rIrBrCrGrHrZryrErr%r0r&r sl%       z"OptimizerClient.list_work_requestsc sdg}d}d}d}d}gdfddt|D} | rHtd | d|i} d d t| D} t| D]<\} } | d ust| tjrnt| d krntd| dqndd|dt |dt d} dd t| D} |j j |d|j d}|d urt j}|r\t|t js2|j | ||j|j|j j||| | |d|d|||d S|j j||| | |d|d|||d Sd S)a Updates the enrollment status of the tenancy. :param str enrollment_status_id: (required) The unique OCID associated with the enrollment status. :param oci.optimizer.models.UpdateEnrollmentStatusDetails update_enrollment_status_details: (required) The request object for updating the enrollment status. :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 `__. 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.optimizer.models.EnrollmentStatus` :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use update_enrollment_status API. rrPUTupdate_enrollment_statusz^https://docs.oracle.com/iaas/api/#/en/advisor/20200606/EnrollmentStatus/UpdateEnrollmentStatusrrr,rccsg|]}|vr|qSr%r%r.r0r%r&r17 r2z.z-update_enrollment_status got unknown kwargs: cSsi|]\}}|tur||qSr%r3r5r%r%r&r8@ r2z.Nrr9r:r;r,rcr=r>r?recSs&i|]\}}|tur|dur||qSr@r3r5r%r%r&r8L r2rrArr rBrCrDrErFr^rrGrHrIrf)r#rZ update_enrollment_status_detailsr$rIrBrCrGrHrZrDr6r7rErr%r0r&r st)$      z(OptimizerClient.update_enrollment_statusc sdg}d}d}d}d}gdfddt|D} | rHtd | d|i} d d t| D} t| D]<\} } | d ust| tjrnt| d krntd| dqndd|dt |dt d} dd t| D} |j j |d|j d}|d urt j}|r\t|t js2|j | ||j|j|j j||| | |d|d|||d S|j j||| | |d|d|||d Sd S)a Updates the specified profile. Uses the profile's OCID to determine which profile to update. :param str profile_id: (required) The unique OCID of the profile. :param oci.optimizer.models.UpdateProfileDetails update_profile_details: (required) The profile information to use for the update. :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 :class:`~oci.optimizer.models.Profile` :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use update_profile API. r_r`rupdate_profilezLhttps://docs.oracle.com/iaas/api/#/en/advisor/20200606/Profile/UpdateProfilerbcsg|]}|vr|qSr%r%r.r0r%r&r1 r2z2OptimizerClient.update_profile..z#update_profile got unknown kwargs: cSsi|]\}}|tur||qSr%r3r5r%r%r&r8 r2z2OptimizerClient.update_profile..Nrr9r:r;rcr,rdcSs&i|]\}}|tur|dur||qSr@r3r5r%r%r&r8 r2rrAr]rrrf)r#rhZupdate_profile_detailsr$rIrBrCrGrHrZrDr6r7rErr%r0r&rr st)$      zOptimizerClient.update_profilec svdg}d}d}d}d}gdfddt|D} | rHtd | d|i} d d t| D} t| D]<\} } | d ust| tjrnt| d krntd| dqndd|dt |dt d} dd t| D} |j j |d|j d}|rLt|t js"|j | ||j|j|j j||| | |d|d|||d S|j j||| | |d|d|||d Sd S)a Updates the recommendation that corresponds to the specified OCID. Use this operation to implement the following actions: * Postpone recommendation * Dismiss recommendation * Reactivate recommendation :param str recommendation_id: (required) The unique OCID associated with the recommendation. :param oci.optimizer.models.UpdateRecommendationDetails update_recommendation_details: (required) The request object for updating the recommendation 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 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.optimizer.models.Recommendation` :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use update_recommendation API. r(rrupdate_recommendationzZhttps://docs.oracle.com/iaas/api/#/en/advisor/20200606/Recommendation/UpdateRecommendationrcsg|]}|vr|qSr%r%r.r0r%r&r1 r2z9OptimizerClient.update_recommendation..z*update_recommendation got unknown kwargs: cSsi|]\}}|tur||qSr%r3r5r%r%r&r8' r2z9OptimizerClient.update_recommendation..Nrr9r:r;r,rcrcSs&i|]\}}|tur|dur||qSr@r3r5r%r%r&r83 r2rrArrr)rrJrKrLrMrNrOrPr!r4r"rQrrrSrUrVr rWrX)r#rYZupdate_recommendation_detailsr$rIrBrCrGrHrZrDr6r7rErr%r0r&r sp.$     z%OptimizerClient.update_recommendationc sdg}d}d}d}d}gdfddt|D} | rHtd | d|i} d d t| D} t| D]<\} } | d ust| tjrnt| d krntd| dqndd|dt |dt d} dd t| D} |j j |d|j d}|d urt j}|r\t|t js2|j | ||j|j|j j||| | |d|d|||d S|j j||| | |d|d|||d Sd S)a Updates the resource action that corresponds to the specified OCID. Use this operation to implement the following actions: * Postpone resource action * Ignore resource action * Reactivate resource action :param str resource_action_id: (required) The unique OCID associated with the resource action. :param oci.optimizer.models.UpdateResourceActionDetails update_resource_action_details: (required) The resource action information to be updated. :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 `__. 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.optimizer.models.ResourceAction` :rtype: :class:`~oci.response.Response` :example: Click `here `__ to see an example of how to use update_resource_action API. rrrupdate_resource_actionzZhttps://docs.oracle.com/iaas/api/#/en/advisor/20200606/ResourceAction/UpdateResourceActionrcsg|]}|vr|qSr%r%r.r0r%r&r1 r2z:OptimizerClient.update_resource_action..z+update_resource_action got unknown kwargs: cSsi|]\}}|tur||qSr%r3r5r%r%r&r8 r2z:OptimizerClient.update_resource_action..Nrr9r:r;r,rcrcSs&i|]\}}|tur|dur||qSr@r3r5r%r%r&r8 r2rrArrrrf)r#rZupdate_resource_action_detailsr$rIrBrCrGrHrZrDr6r7rErr%r0r&rW st.$      z&OptimizerClient.update_resource_actionN)__name__ __module__ __qualname____doc__r'r*r\rarkrrrrrrrrrrrrrrrrrrrrrrr%r%r%r&rsJ[pcj#ccccnc>!AVn`sshqqtrN)Z __future__rZ oci._vendorrrZocirrZoci.base_clientrZ oci.configrr Z oci.signerr Zoci.utilr r r Zoci.exceptionsrZ oci.alloyrZmodelsrr4objectrr%r%r%r&s