GenerativeAiSandboxClientCompositeOperations

class oci.generative_ai_sandbox.GenerativeAiSandboxClientCompositeOperations(client, **kwargs)

This class provides a wrapper around GenerativeAiSandboxClient 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 GenerativeAiSandboxClientCompositeOperations object
create_sandbox_and_wait_for_state(…[, …]) Calls create_sandbox() and waits for the Sandbox acted upon to enter the given state(s).
create_sandbox_snapshot_and_wait_for_state(…) Calls create_sandbox_snapshot() and waits for the SandboxSnapshot acted upon to enter the given state(s).
delete_sandbox_and_wait_for_state(sandbox_id) Calls delete_sandbox() and waits for the Sandbox acted upon to enter the given state(s).
delete_sandbox_snapshot_and_wait_for_state(…) Calls delete_sandbox_snapshot() and waits for the SandboxSnapshot acted upon to enter the given state(s).
extend_sandbox_and_wait_for_state(…[, …]) Calls extend_sandbox() and waits for the Sandbox acted upon to enter the given state(s).
resume_sandbox_and_wait_for_state(…[, …]) Calls resume_sandbox() and waits for the Sandbox acted upon to enter the given state(s).
stop_sandbox_and_wait_for_state(sandbox_id, …) Calls stop_sandbox() and waits for the Sandbox acted upon to enter the given state(s).
suspend_sandbox_and_wait_for_state(…[, …]) Calls suspend_sandbox() and waits for the Sandbox acted upon to enter the given state(s).
update_sandbox_and_wait_for_state(…[, …]) Calls update_sandbox() and waits for the Sandbox acted upon to enter the given state(s).
__init__(client, **kwargs)

Creates a new GenerativeAiSandboxClientCompositeOperations object

Parameters:client (GenerativeAiSandboxClient) – The service client which will be wrapped by this object
create_sandbox_and_wait_for_state(project_id, create_sandbox_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={})

Calls create_sandbox() and waits for the Sandbox acted upon to enter the given state(s).

Parameters:
  • project_id (str) – (required) Required project identifier used to scope sandbox creation.
  • create_sandbox_details (oci.generative_ai_sandbox.models.CreateSandboxDetails) – (required) Request payload for sandbox creation.
  • 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_sandbox()
  • 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
create_sandbox_snapshot_and_wait_for_state(create_sandbox_snapshot_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={})

Calls create_sandbox_snapshot() and waits for the SandboxSnapshot acted upon to enter the given state(s).

Parameters:
  • create_sandbox_snapshot_details (oci.generative_ai_sandbox.models.CreateSandboxSnapshotDetails) – (required) Request payload for sandbox snapshot creation.
  • 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_sandbox_snapshot()
  • 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_sandbox_and_wait_for_state(sandbox_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={})

Calls delete_sandbox() and waits for the Sandbox acted upon to enter the given state(s).

Parameters:
  • sandbox_id (str) – (required) Sandbox identifier. Newly generated Sandbox IDs use sbx- followed by 16 lowercase base32 characters (a-z2-7); existing legacy IDs remain accepted.
  • 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_sandbox()
  • 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_sandbox_snapshot_and_wait_for_state(snapshot_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={})

Calls delete_sandbox_snapshot() and waits for the SandboxSnapshot acted upon to enter the given state(s).

Parameters:
  • snapshot_id (str) – (required) Sandbox snapshot identifier.
  • 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_sandbox_snapshot()
  • 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
extend_sandbox_and_wait_for_state(sandbox_id, extend_sandbox_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={})

Calls extend_sandbox() and waits for the Sandbox acted upon to enter the given state(s).

Parameters:
  • sandbox_id (str) – (required) Sandbox identifier. Newly generated Sandbox IDs use sbx- followed by 16 lowercase base32 characters (a-z2-7); existing legacy IDs remain accepted.
  • extend_sandbox_details (oci.generative_ai_sandbox.models.ExtendSandboxDetails) – (required) Request payload for extending a sandbox.
  • 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 extend_sandbox()
  • 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
resume_sandbox_and_wait_for_state(sandbox_id, resume_sandbox_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={})

Calls resume_sandbox() and waits for the Sandbox acted upon to enter the given state(s).

Parameters:
  • sandbox_id (str) – (required) Sandbox identifier. Newly generated Sandbox IDs use sbx- followed by 16 lowercase base32 characters (a-z2-7); existing legacy IDs remain accepted.
  • resume_sandbox_details (oci.generative_ai_sandbox.models.ResumeSandboxDetails) – (required) Request payload for resuming a sandbox.
  • 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 resume_sandbox()
  • 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
stop_sandbox_and_wait_for_state(sandbox_id, stop_sandbox_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={})

Calls stop_sandbox() and waits for the Sandbox acted upon to enter the given state(s).

Parameters:
  • sandbox_id (str) – (required) Sandbox identifier. Newly generated Sandbox IDs use sbx- followed by 16 lowercase base32 characters (a-z2-7); existing legacy IDs remain accepted.
  • stop_sandbox_details (oci.generative_ai_sandbox.models.StopSandboxDetails) – (required) Request payload for stopping a sandbox.
  • 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 stop_sandbox()
  • 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
suspend_sandbox_and_wait_for_state(sandbox_id, suspend_sandbox_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={})

Calls suspend_sandbox() and waits for the Sandbox acted upon to enter the given state(s).

Parameters:
  • sandbox_id (str) – (required) Sandbox identifier. Newly generated Sandbox IDs use sbx- followed by 16 lowercase base32 characters (a-z2-7); existing legacy IDs remain accepted.
  • suspend_sandbox_details (oci.generative_ai_sandbox.models.SuspendSandboxDetails) – (required) Request payload for suspending a sandbox.
  • 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 suspend_sandbox()
  • 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_sandbox_and_wait_for_state(sandbox_id, update_sandbox_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={})

Calls update_sandbox() and waits for the Sandbox acted upon to enter the given state(s).

Parameters:
  • sandbox_id (str) – (required) Sandbox identifier. Newly generated Sandbox IDs use sbx- followed by 16 lowercase base32 characters (a-z2-7); existing legacy IDs remain accepted.
  • update_sandbox_details (oci.generative_ai_sandbox.models.UpdateSandboxDetails) – (required) Request payload for sandbox update.
  • 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_sandbox()
  • 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