UsageapiClientCompositeOperations

class oci.usage_api.UsageapiClientCompositeOperations(client, **kwargs)

This class provides a wrapper around UsageapiClient and offers convenience methods for operations that would otherwise need to be chained together. For example, instead of performing an action on a resource (e.g. launching an instance, creating a load balancer) and then using a waiter to wait for the resource to enter a given state, you can call a single method in this class to accomplish the same functionality

Methods

__init__(client, **kwargs) Creates a new UsageapiClientCompositeOperations object
create_schedule_and_wait_for_state(…[, …]) Calls create_schedule() and waits for the Schedule acted upon to enter the given state(s).
delete_schedule_and_wait_for_state(schedule_id) Calls delete_schedule() and waits for the Schedule acted upon to enter the given state(s).
update_schedule_and_wait_for_state(…[, …]) Calls update_schedule() and waits for the Schedule acted upon to enter the given state(s).
__init__(client, **kwargs)

Creates a new UsageapiClientCompositeOperations object

Parameters:client (UsageapiClient) – The service client which will be wrapped by this object
create_schedule_and_wait_for_state(create_schedule_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={})

Calls create_schedule() and waits for the Schedule acted upon to enter the given state(s).

Parameters:
  • create_schedule_details (oci.usage_api.models.CreateScheduleDetails) – (required) New schedule details.
  • wait_for_states (list[str]) – An array of states to wait on. These should be valid values for lifecycle_state
  • operation_kwargs (dict) – A dictionary of keyword arguments to pass to create_schedule()
  • waiter_kwargs (dict) – A dictionary of keyword arguments to pass to the oci.wait_until() function. For example, you could pass max_interval_seconds or max_interval_seconds as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
delete_schedule_and_wait_for_state(schedule_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={})

Calls delete_schedule() and waits for the Schedule acted upon to enter the given state(s).

Parameters:
  • schedule_id (str) – (required) The schedule unique OCID.
  • wait_for_states (list[str]) – An array of states to wait on. These should be valid values for lifecycle_state
  • operation_kwargs (dict) – A dictionary of keyword arguments to pass to delete_schedule()
  • waiter_kwargs (dict) – A dictionary of keyword arguments to pass to the oci.wait_until() function. For example, you could pass max_interval_seconds or max_interval_seconds as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
update_schedule_and_wait_for_state(update_schedule_details, schedule_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={})

Calls update_schedule() and waits for the Schedule acted upon to enter the given state(s).

Parameters:
  • update_schedule_details (oci.usage_api.models.UpdateScheduleDetails) – (required) The information to be updated. Currently supports only tags
  • schedule_id (str) – (required) The schedule unique OCID.
  • wait_for_states (list[str]) – An array of states to wait on. These should be valid values for lifecycle_state
  • operation_kwargs (dict) – A dictionary of keyword arguments to pass to update_schedule()
  • waiter_kwargs (dict) – A dictionary of keyword arguments to pass to the oci.wait_until() function. For example, you could pass max_interval_seconds or max_interval_seconds as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait