OptimizerClient

class oci.optimizer.OptimizerClient(config, **kwargs)

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).

Methods

__init__(config, **kwargs) Creates a new service client
bulk_apply_recommendations(…) Applies the specified recommendations to the resources.
create_profile(create_profile_details, **kwargs) Creates a new profile.
delete_profile(profile_id, **kwargs) Deletes the specified profile.
filter_resource_actions(compartment_id, …) Queries the Cloud Advisor resource actions that are supported.
get_category(category_id, **kwargs) Gets the category that corresponds to the specified OCID.
get_enrollment_status(enrollment_status_id, …) Gets the Cloud Advisor enrollment status.
get_profile(profile_id, **kwargs) Gets the specified profile’s information.
get_recommendation(recommendation_id, **kwargs) Gets the recommendation for the specified OCID.
get_resource_action(resource_action_id, **kwargs) Gets the resource action that corresponds to the specified OCID.
get_work_request(work_request_id, **kwargs) Gets the status of the work request associated with the specified ID.
list_categories(compartment_id, …) Lists the supported Cloud Advisor categories.
list_enrollment_statuses(compartment_id, …) Lists the Cloud Advisor enrollment statuses.
list_histories(compartment_id, …) Lists changes to the recommendations based on user activity.
list_profile_levels(compartment_id, …) Lists the existing profile levels.
list_profiles(compartment_id, **kwargs) Lists the existing profiles.
list_recommendation_strategies(…) Lists the existing strategies.
list_recommendations(compartment_id, …) Lists the Cloud Advisor recommendations that are currently supported.
list_resource_action_queryable_fields(…) Lists the fields that are indexed for querying and their associated value types.
list_resource_actions(compartment_id, …) Lists the Cloud Advisor resource actions that are supported.
list_work_request_errors(work_request_id, …) Lists errors associated with the specified work request.
list_work_request_logs(work_request_id, **kwargs) Lists the logs associated with the specified work request.
list_work_requests(compartment_id, **kwargs) Lists the work requests in the tenancy.
update_enrollment_status(…) Updates the enrollment status of the tenancy.
update_profile(profile_id, …) Updates the specified profile.
update_recommendation(recommendation_id, …) Updates the recommendation that corresponds to the specified OCID.
update_resource_action(resource_action_id, …) Updates the resource action that corresponds to the specified OCID.
__init__(config, **kwargs)

Creates a new service client

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

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

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

  • retry_strategy (obj) –

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

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

  • circuit_breaker_strategy (obj) – (optional) A circuit breaker strategy to apply to all calls made by this service client (i.e. at the client level). This client uses DEFAULT_CIRCUIT_BREAKER_STRATEGY as default if no circuit breaker strategy is provided. The specifics of circuit breaker strategy are described here.
  • circuit_breaker_callback (function) – (optional) Callback function to receive any exceptions triggerred by the circuit breaker.
  • client_level_realm_specific_endpoint_template_enabled (bool) – (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.
  • 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.
bulk_apply_recommendations(recommendation_id, bulk_apply_recommendations_details, **kwargs)

Applies the specified recommendations to the resources.

Parameters:
  • recommendation_id (str) – (required) The unique OCID associated with the recommendation.
  • bulk_apply_recommendations_details (oci.optimizer.models.BulkApplyRecommendationsDetails) – (required) Details about bulk recommendation actions.
  • opc_request_id (str) – (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • opc_retry_token (str) – (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).
  • retry_strategy (obj) –

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

    This should be one of the strategies available in the retry module. This operation uses 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 NoneRetryStrategy.

  • allow_control_chars (bool) – (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
Returns:

A Response object with data of type None

Return type:

Response

Example:

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

create_profile(create_profile_details, **kwargs)

Creates a new profile.

Parameters:
  • create_profile_details (oci.optimizer.models.CreateProfileDetails) – (required) Details for creating the profile.
  • opc_request_id (str) – (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • opc_retry_token (str) – (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).
  • retry_strategy (obj) –

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

    This should be one of the strategies available in the retry module. This operation uses 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 NoneRetryStrategy.

  • allow_control_chars (bool) – (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
Returns:

A Response object with data of type Profile

Return type:

Response

Example:

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

delete_profile(profile_id, **kwargs)

Deletes the specified profile. Uses the profile’s OCID to determine which profile to delete.

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

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

    This should be one of the strategies available in the retry module. This operation uses 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 NoneRetryStrategy.

  • allow_control_chars (bool) – (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
Returns:

A Response object with data of type None

Return type:

Response

Example:

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

filter_resource_actions(compartment_id, compartment_id_in_subtree, query_details, **kwargs)

Queries the Cloud Advisor resource actions that are supported.

Parameters:
  • compartment_id (str) – (required) The OCID of the compartment.
  • compartment_id_in_subtree (bool) –

    (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).

  • query_details (oci.optimizer.models.QueryDetails) – (required) The request parameters that describe the query criteria.
  • recommendation_id (str) – (optional) The unique OCID associated with the recommendation.
  • recommendation_name (str) – (optional) Optional. A filter that returns results that match the recommendation name specified.
  • child_tenancy_ids (list[str]) –

    (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.

  • include_organization (bool) –

    (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.

  • include_resource_metadata (bool) – (optional) Supplement additional resource information in extended metadata response.
  • limit (int) – (optional) The maximum number of items to return in a paginated “List” call.
  • page (str) – (optional) The value of the opc-next-page response header from the previous “List” call.
  • opc_request_id (str) – (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) –

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

    This should be one of the strategies available in the retry module. This operation uses 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 NoneRetryStrategy.

  • allow_control_chars (bool) – (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
Returns:

A Response object with data of type ResourceActionCollection

Return type:

Response

Example:

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

get_category(category_id, **kwargs)

Gets the category that corresponds to the specified OCID.

Parameters:
  • category_id (str) – (required) The unique OCID associated with the category.
  • opc_request_id (str) – (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) –

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

    This should be one of the strategies available in the retry module. This operation uses 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 NoneRetryStrategy.

  • allow_control_chars (bool) – (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
Returns:

A Response object with data of type Category

Return type:

Response

Example:

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

get_enrollment_status(enrollment_status_id, **kwargs)

Gets the Cloud Advisor enrollment status.

Parameters:
  • enrollment_status_id (str) – (required) The unique OCID associated with the enrollment status.
  • opc_request_id (str) – (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) –

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

    This should be one of the strategies available in the retry module. This operation uses 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 NoneRetryStrategy.

  • allow_control_chars (bool) – (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
Returns:

A Response object with data of type EnrollmentStatus

Return type:

Response

Example:

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

get_profile(profile_id, **kwargs)

Gets the specified profile’s information. Uses the profile’s OCID to determine which profile to retrieve.

Parameters:
  • profile_id (str) – (required) The unique OCID of the profile.
  • opc_request_id (str) – (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) –

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

    This should be one of the strategies available in the retry module. This operation uses 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 NoneRetryStrategy.

  • allow_control_chars (bool) – (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
Returns:

A Response object with data of type Profile

Return type:

Response

Example:

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

get_recommendation(recommendation_id, **kwargs)

Gets the recommendation for the specified OCID.

Parameters:
  • recommendation_id (str) – (required) The unique OCID associated with the recommendation.
  • opc_request_id (str) – (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) –

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

    This should be one of the strategies available in the retry module. This operation uses 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 NoneRetryStrategy.

  • allow_control_chars (bool) – (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
Returns:

A Response object with data of type Recommendation

Return type:

Response

Example:

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

get_resource_action(resource_action_id, **kwargs)

Gets the resource action that corresponds to the specified OCID.

Parameters:
  • resource_action_id (str) – (required) The unique OCID associated with the resource action.
  • include_resource_metadata (bool) – (optional) Supplement additional resource information in extended metadata response.
  • opc_request_id (str) – (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) –

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

    This should be one of the strategies available in the retry module. This operation uses 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 NoneRetryStrategy.

  • allow_control_chars (bool) – (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
Returns:

A Response object with data of type ResourceAction

Return type:

Response

Example:

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

get_work_request(work_request_id, **kwargs)

Gets the status of the work request associated with the specified ID.

Parameters:
  • work_request_id (str) – (required) The OCID of the work request.
  • opc_request_id (str) – (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) –

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

    This should be one of the strategies available in the retry module. This operation uses 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 NoneRetryStrategy.

  • allow_control_chars (bool) – (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
Returns:

A Response object with data of type WorkRequest

Return type:

Response

Example:

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

list_categories(compartment_id, compartment_id_in_subtree, **kwargs)

Lists the supported Cloud Advisor categories.

Parameters:
  • compartment_id (str) – (required) The OCID of the compartment.
  • compartment_id_in_subtree (bool) –

    (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).

  • child_tenancy_ids (list[str]) –

    (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.

  • include_organization (bool) –

    (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.

  • name (str) – (optional) Optional. A filter that returns results that match the name specified.
  • limit (int) – (optional) The maximum number of items to return in a paginated “List” call.
  • page (str) – (optional) The value of the opc-next-page response header from the previous “List” call.
  • sort_order (str) –

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

    Allowed values are: “ASC”, “DESC”

  • sort_by (str) –

    (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”

  • lifecycle_state (str) –

    (optional) A filter that returns results that match the lifecycle state specified.

    Allowed values are: “ACTIVE”, “FAILED”, “INACTIVE”, “ATTACHING”, “DETACHING”, “DELETING”, “DELETED”, “UPDATING”, “CREATING”

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

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

    This should be one of the strategies available in the retry module. This operation uses 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 NoneRetryStrategy.

  • allow_control_chars (bool) – (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
Returns:

A Response object with data of type CategoryCollection

Return type:

Response

Example:

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

list_enrollment_statuses(compartment_id, **kwargs)

Lists the Cloud Advisor enrollment statuses.

Parameters:
  • compartment_id (str) – (required) The OCID of the compartment.
  • limit (int) – (optional) The maximum number of items to return in a paginated “List” call.
  • page (str) – (optional) The value of the opc-next-page response header from the previous “List” call.
  • sort_order (str) –

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

    Allowed values are: “ASC”, “DESC”

  • sort_by (str) –

    (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”

  • lifecycle_state (str) –

    (optional) A filter that returns results that match the lifecycle state specified.

    Allowed values are: “ACTIVE”, “FAILED”, “INACTIVE”, “ATTACHING”, “DETACHING”, “DELETING”, “DELETED”, “UPDATING”, “CREATING”

  • status (str) –

    (optional) A filter that returns results that match the Cloud Advisor enrollment status specified.

    Allowed values are: “ACTIVE”, “INACTIVE”

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

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

    This should be one of the strategies available in the retry module. This operation uses 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 NoneRetryStrategy.

  • allow_control_chars (bool) – (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
Returns:

A Response object with data of type EnrollmentStatusCollection

Return type:

Response

Example:

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

list_histories(compartment_id, compartment_id_in_subtree, **kwargs)

Lists changes to the recommendations based on user activity. For example, lists when recommendations have been implemented, dismissed, postponed, or reactivated.

Parameters:
  • compartment_id (str) – (required) The OCID of the compartment.
  • compartment_id_in_subtree (bool) –

    (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).

  • name (str) – (optional) Optional. A filter that returns results that match the name specified.
  • recommendation_name (str) – (optional) Optional. A filter that returns results that match the recommendation name specified.
  • recommendation_id (str) – (optional) The unique OCID associated with the recommendation.
  • resource_type (str) – (optional) Optional. A filter that returns results that match the resource type specified.
  • limit (int) – (optional) The maximum number of items to return in a paginated “List” call.
  • page (str) – (optional) The value of the opc-next-page response header from the previous “List” call.
  • sort_order (str) –

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

    Allowed values are: “ASC”, “DESC”

  • sort_by (str) –

    (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”

  • lifecycle_state (str) –

    (optional) A filter that returns results that match the lifecycle state specified.

    Allowed values are: “ACTIVE”, “FAILED”, “INACTIVE”, “ATTACHING”, “DETACHING”, “DELETING”, “DELETED”, “UPDATING”, “CREATING”

  • status (str) –

    (optional) A filter that returns recommendations that match the status specified.

    Allowed values are: “PENDING”, “DISMISSED”, “POSTPONED”, “IMPLEMENTED”

  • include_resource_metadata (bool) – (optional) Supplement additional resource information in extended metadata response.
  • opc_request_id (str) – (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) –

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

    This should be one of the strategies available in the retry module. This operation uses 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 NoneRetryStrategy.

  • allow_control_chars (bool) – (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
Returns:

A Response object with data of type HistoryCollection

Return type:

Response

Example:

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

list_profile_levels(compartment_id, compartment_id_in_subtree, **kwargs)

Lists the existing profile levels.

Parameters:
  • compartment_id (str) – (required) The OCID of the compartment.
  • compartment_id_in_subtree (bool) –

    (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).

  • name (str) – (optional) Optional. A filter that returns results that match the name specified.
  • recommendation_name (str) – (optional) Optional. A filter that returns results that match the recommendation name specified.
  • limit (int) – (optional) The maximum number of items to return in a paginated “List” call.
  • page (str) – (optional) The value of the opc-next-page response header from the previous “List” call.
  • sort_order (str) –

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

    Allowed values are: “ASC”, “DESC”

  • sort_by (str) –

    (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”

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

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

    This should be one of the strategies available in the retry module. This operation uses 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 NoneRetryStrategy.

  • allow_control_chars (bool) – (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
Returns:

A Response object with data of type ProfileLevelCollection

Return type:

Response

Example:

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

list_profiles(compartment_id, **kwargs)

Lists the existing profiles.

Parameters:
  • compartment_id (str) – (required) The OCID of the compartment.
  • name (str) – (optional) Optional. A filter that returns results that match the name specified.
  • limit (int) – (optional) The maximum number of items to return in a paginated “List” call.
  • page (str) – (optional) The value of the opc-next-page response header from the previous “List” call.
  • sort_order (str) –

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

    Allowed values are: “ASC”, “DESC”

  • sort_by (str) –

    (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”

  • lifecycle_state (str) –

    (optional) A filter that returns results that match the lifecycle state specified.

    Allowed values are: “ACTIVE”, “FAILED”, “INACTIVE”, “ATTACHING”, “DETACHING”, “DELETING”, “DELETED”, “UPDATING”, “CREATING”

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

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

    This should be one of the strategies available in the retry module. This operation uses 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 NoneRetryStrategy.

  • allow_control_chars (bool) – (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
Returns:

A Response object with data of type ProfileCollection

Return type:

Response

Example:

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

list_recommendation_strategies(compartment_id, compartment_id_in_subtree, **kwargs)

Lists the existing strategies.

Parameters:
  • compartment_id (str) – (required) The OCID of the compartment.
  • compartment_id_in_subtree (bool) –

    (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).

  • name (str) – (optional) Optional. A filter that returns results that match the name specified.
  • recommendation_name (str) – (optional) Optional. A filter that returns results that match the recommendation name specified.
  • limit (int) – (optional) The maximum number of items to return in a paginated “List” call.
  • page (str) – (optional) The value of the opc-next-page response header from the previous “List” call.
  • sort_order (str) –

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

    Allowed values are: “ASC”, “DESC”

  • sort_by (str) –

    (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”

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

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

    This should be one of the strategies available in the retry module. This operation uses 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 NoneRetryStrategy.

  • allow_control_chars (bool) – (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
Returns:

A Response object with data of type RecommendationStrategyCollection

Return type:

Response

Example:

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

list_recommendations(compartment_id, compartment_id_in_subtree, **kwargs)

Lists the Cloud Advisor recommendations that are currently supported.

Parameters:
  • compartment_id (str) – (required) The OCID of the compartment.
  • compartment_id_in_subtree (bool) –

    (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).

  • category_id (str) – (optional) The unique OCID associated with the category.
  • category_name (str) – (optional) Optional. A filter that returns results that match the category name specified.
  • child_tenancy_ids (list[str]) –

    (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.

  • include_organization (bool) –

    (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.

  • name (str) – (optional) Optional. A filter that returns results that match the name specified.
  • limit (int) – (optional) The maximum number of items to return in a paginated “List” call.
  • page (str) – (optional) The value of the opc-next-page response header from the previous “List” call.
  • sort_order (str) –

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

    Allowed values are: “ASC”, “DESC”

  • sort_by (str) –

    (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”

  • lifecycle_state (str) –

    (optional) A filter that returns results that match the lifecycle state specified.

    Allowed values are: “ACTIVE”, “FAILED”, “INACTIVE”, “ATTACHING”, “DETACHING”, “DELETING”, “DELETED”, “UPDATING”, “CREATING”

  • status (str) –

    (optional) A filter that returns recommendations that match the status specified.

    Allowed values are: “PENDING”, “DISMISSED”, “POSTPONED”, “IMPLEMENTED”

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

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

    This should be one of the strategies available in the retry module. This operation uses 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 NoneRetryStrategy.

  • allow_control_chars (bool) – (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
Returns:

A Response object with data of type RecommendationCollection

Return type:

Response

Example:

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

list_resource_action_queryable_fields(compartment_id, compartment_id_in_subtree, **kwargs)

Lists the fields that are indexed for querying and their associated value types.

Parameters:
  • compartment_id (str) – (required) The OCID of the compartment.
  • compartment_id_in_subtree (bool) –

    (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).

  • limit (int) – (optional) The maximum number of items to return in a paginated “List” call.
  • page (str) – (optional) The value of the opc-next-page response header from the previous “List” call.
  • opc_request_id (str) – (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) –

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

    This should be one of the strategies available in the retry module. This operation uses 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 NoneRetryStrategy.

  • allow_control_chars (bool) – (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
Returns:

A Response object with data of type QueryableFieldCollection

Return type:

Response

Example:

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

list_resource_actions(compartment_id, compartment_id_in_subtree, **kwargs)

Lists the Cloud Advisor resource actions that are supported.

Parameters:
  • compartment_id (str) – (required) The OCID of the compartment.
  • compartment_id_in_subtree (bool) –

    (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).

  • recommendation_id (str) – (optional) The unique OCID associated with the recommendation.
  • recommendation_name (str) – (optional) Optional. A filter that returns results that match the recommendation name specified.
  • child_tenancy_ids (list[str]) –

    (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.

  • include_organization (bool) –

    (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.

  • name (str) – (optional) Optional. A filter that returns results that match the name specified.
  • resource_type (str) – (optional) Optional. A filter that returns results that match the resource type specified.
  • limit (int) – (optional) The maximum number of items to return in a paginated “List” call.
  • page (str) – (optional) The value of the opc-next-page response header from the previous “List” call.
  • sort_order (str) –

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

    Allowed values are: “ASC”, “DESC”

  • sort_by (str) –

    (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”

  • lifecycle_state (str) –

    (optional) A filter that returns results that match the lifecycle state specified.

    Allowed values are: “ACTIVE”, “FAILED”, “INACTIVE”, “ATTACHING”, “DETACHING”, “DELETING”, “DELETED”, “UPDATING”, “CREATING”

  • status (str) –

    (optional) A filter that returns recommendations that match the status specified.

    Allowed values are: “PENDING”, “DISMISSED”, “POSTPONED”, “IMPLEMENTED”

  • include_resource_metadata (bool) – (optional) Supplement additional resource information in extended metadata response.
  • opc_request_id (str) – (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) –

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

    This should be one of the strategies available in the retry module. This operation uses 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 NoneRetryStrategy.

  • allow_control_chars (bool) – (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
Returns:

A Response object with data of type ResourceActionCollection

Return type:

Response

Example:

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

list_work_request_errors(work_request_id, **kwargs)

Lists errors associated with the specified work request.

Parameters:
  • work_request_id (str) – (required) The OCID of the work request.
  • page (str) – (optional) The value of the opc-next-page response header from the previous “List” call.
  • limit (int) – (optional) The maximum number of items to return in a paginated “List” call.
  • opc_request_id (str) – (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) –

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

    This should be one of the strategies available in the retry module. This operation uses 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 NoneRetryStrategy.

  • allow_control_chars (bool) – (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
Returns:

A Response object with data of type WorkRequestErrorCollection

Return type:

Response

Example:

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

list_work_request_logs(work_request_id, **kwargs)

Lists the logs associated with the specified work request.

Parameters:
  • work_request_id (str) – (required) The OCID of the work request.
  • page (str) – (optional) The value of the opc-next-page response header from the previous “List” call.
  • limit (int) – (optional) The maximum number of items to return in a paginated “List” call.
  • opc_request_id (str) – (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) –

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

    This should be one of the strategies available in the retry module. This operation uses 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 NoneRetryStrategy.

  • allow_control_chars (bool) – (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
Returns:

A Response object with data of type WorkRequestLogEntryCollection

Return type:

Response

Example:

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

list_work_requests(compartment_id, **kwargs)

Lists the work requests in the tenancy. The tenancy is the root compartment.

Parameters:
  • compartment_id (str) – (required) The OCID of the compartment.
  • page (str) – (optional) The value of the opc-next-page response header from the previous “List” call.
  • limit (int) – (optional) The maximum number of items to return in a paginated “List” call.
  • opc_request_id (str) – (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) –

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

    This should be one of the strategies available in the retry module. This operation uses 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 NoneRetryStrategy.

  • allow_control_chars (bool) – (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
Returns:

A Response object with data of type WorkRequestCollection

Return type:

Response

Example:

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

update_enrollment_status(enrollment_status_id, update_enrollment_status_details, **kwargs)

Updates the enrollment status of the tenancy.

Parameters:
  • enrollment_status_id (str) – (required) The unique OCID associated with the enrollment status.
  • update_enrollment_status_details (oci.optimizer.models.UpdateEnrollmentStatusDetails) – (required) The request object for updating the enrollment status.
  • opc_request_id (str) – (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.
  • retry_strategy (obj) –

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

    This should be one of the strategies available in the retry module. This operation uses 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 NoneRetryStrategy.

  • allow_control_chars (bool) – (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
Returns:

A Response object with data of type EnrollmentStatus

Return type:

Response

Example:

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

update_profile(profile_id, update_profile_details, **kwargs)

Updates the specified profile. Uses the profile’s OCID to determine which profile to update.

Parameters:
  • profile_id (str) – (required) The unique OCID of the profile.
  • update_profile_details (oci.optimizer.models.UpdateProfileDetails) – (required) The profile information to use for the update.
  • if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.
  • opc_request_id (str) – (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) –

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

    This should be one of the strategies available in the retry module. This operation uses 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 NoneRetryStrategy.

  • allow_control_chars (bool) – (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
Returns:

A Response object with data of type Profile

Return type:

Response

Example:

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

update_recommendation(recommendation_id, update_recommendation_details, **kwargs)

Updates the recommendation that corresponds to the specified OCID. Use this operation to implement the following actions:

  • Postpone recommendation
  • Dismiss recommendation
  • Reactivate recommendation
Parameters:
  • recommendation_id (str) – (required) The unique OCID associated with the recommendation.
  • update_recommendation_details (oci.optimizer.models.UpdateRecommendationDetails) – (required) The request object for updating the recommendation details.
  • opc_request_id (str) – (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.
  • retry_strategy (obj) –

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

    This should be one of the strategies available in the retry module. This operation will not retry by default, users can also use the convenient 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 NoneRetryStrategy.

  • allow_control_chars (bool) – (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
Returns:

A Response object with data of type Recommendation

Return type:

Response

Example:

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

update_resource_action(resource_action_id, update_resource_action_details, **kwargs)

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
Parameters:
  • resource_action_id (str) – (required) The unique OCID associated with the resource action.
  • update_resource_action_details (oci.optimizer.models.UpdateResourceActionDetails) – (required) The resource action information to be updated.
  • opc_request_id (str) – (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.
  • retry_strategy (obj) –

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

    This should be one of the strategies available in the retry module. This operation uses 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 NoneRetryStrategy.

  • allow_control_chars (bool) – (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
Returns:

A Response object with data of type ResourceAction

Return type:

Response

Example:

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