ComputeClientCompositeOperations

class oci.core.ComputeClientCompositeOperations(client, work_request_client=None, **kwargs)

This class provides a wrapper around ComputeClient 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

__init__(client, work_request_client=None, **kwargs)

Creates a new ComputeClientCompositeOperations object

Parameters:
  • client (ComputeClient) -- The service client which will be wrapped by this object
  • work_request_client (oci.work_requests.WorkRequestClient) -- (optional) The work request service client which will be used to wait for work request states. Default is None.
attach_boot_volume_and_wait_for_state(attach_boot_volume_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={})

Calls attach_boot_volume() and waits for the BootVolumeAttachment acted upon to enter the given state(s).

Parameters:
  • attach_boot_volume_details (AttachBootVolumeDetails) -- (required) Attach boot volume request
  • 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 attach_boot_volume()
  • 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
attach_vnic_and_wait_for_state(attach_vnic_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={})

Calls attach_vnic() and waits for the VnicAttachment acted upon to enter the given state(s).

Parameters:
  • attach_vnic_details (AttachVnicDetails) -- (required) Attach VNIC 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 attach_vnic()
  • 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
attach_volume_and_wait_for_state(attach_volume_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={})

Calls attach_volume() and waits for the VolumeAttachment acted upon to enter the given state(s).

Parameters:
  • attach_volume_details (AttachVolumeDetails) -- (required) Attach volume request
  • 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 attach_volume()
  • 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
capture_console_history_and_wait_for_state(capture_console_history_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={})

Calls capture_console_history() and waits for the ConsoleHistory acted upon to enter the given state(s).

Parameters:
  • capture_console_history_details (CaptureConsoleHistoryDetails) -- (required) Console history 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 capture_console_history()
  • 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
change_dedicated_vm_host_compartment_and_wait_for_work_request(dedicated_vm_host_id, change_dedicated_vm_host_compartment_details, work_request_states=[], operation_kwargs={}, waiter_kwargs={})

Calls change_dedicated_vm_host_compartment() and waits for the oci.work_requests.models.WorkRequest to enter the given state(s).

Parameters:
  • dedicated_vm_host_id (str) -- (required) The OCID of the dedicated VM host.
  • change_dedicated_vm_host_compartment_details (ChangeDedicatedVmHostCompartmentDetails) -- (required) The request to move the dedicated virtual machine host to a different compartment.
  • work_request_states (list[str]) -- (optional) An array of work requests states to wait on. These should be valid values for status Default values are termination states: [STATUS_SUCCEEDED, STATUS_FAILED, STATUS_CANCELED]
  • operation_kwargs (dict) -- A dictionary of keyword arguments to pass to change_dedicated_vm_host_compartment()
  • 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
change_instance_compartment_and_wait_for_work_request(instance_id, change_instance_compartment_details, work_request_states=[], operation_kwargs={}, waiter_kwargs={})

Calls change_instance_compartment() and waits for the oci.work_requests.models.WorkRequest to enter the given state(s).

Parameters:
  • instance_id (str) -- (required) The OCID of the instance.
  • change_instance_compartment_details (ChangeInstanceCompartmentDetails) -- (required) Request to change the compartment of a given instance.
  • work_request_states (list[str]) -- (optional) An array of work requests states to wait on. These should be valid values for status Default values are termination states: [STATUS_SUCCEEDED, STATUS_FAILED, STATUS_CANCELED]
  • operation_kwargs (dict) -- A dictionary of keyword arguments to pass to change_instance_compartment()
  • 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_dedicated_vm_host_and_wait_for_state(create_dedicated_vm_host_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={})

Calls create_dedicated_vm_host() and waits for the DedicatedVmHost acted upon to enter the given state(s).

Parameters:
  • create_dedicated_vm_host_details (CreateDedicatedVmHostDetails) -- (required) The details for creating a new dedicated virtual machine host.
  • 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_dedicated_vm_host()
  • 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_dedicated_vm_host_and_wait_for_work_request(create_dedicated_vm_host_details, work_request_states=[], operation_kwargs={}, waiter_kwargs={})

Calls create_dedicated_vm_host() and waits for the oci.work_requests.models.WorkRequest to enter the given state(s).

Parameters:
  • create_dedicated_vm_host_details (CreateDedicatedVmHostDetails) -- (required) The details for creating a new dedicated virtual machine host.
  • work_request_states (list[str]) -- (optional) An array of work requests states to wait on. These should be valid values for status Default values are termination states: [STATUS_SUCCEEDED, STATUS_FAILED, STATUS_CANCELED]
  • operation_kwargs (dict) -- A dictionary of keyword arguments to pass to create_dedicated_vm_host()
  • 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_image_and_wait_for_state(create_image_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={})

Calls create_image() and waits for the Image acted upon to enter the given state(s).

Parameters:
  • create_image_details (CreateImageDetails) -- (required) Image creation 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_image()
  • 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_image_and_wait_for_work_request(create_image_details, work_request_states=[], operation_kwargs={}, waiter_kwargs={})

Calls create_image() and waits for the oci.work_requests.models.WorkRequest to enter the given state(s).

Parameters:
  • create_image_details (CreateImageDetails) -- (required) Image creation details
  • work_request_states (list[str]) -- (optional) An array of work requests states to wait on. These should be valid values for status Default values are termination states: [STATUS_SUCCEEDED, STATUS_FAILED, STATUS_CANCELED]
  • operation_kwargs (dict) -- A dictionary of keyword arguments to pass to create_image()
  • 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_instance_console_connection_and_wait_for_state(create_instance_console_connection_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={})

Calls create_instance_console_connection() and waits for the InstanceConsoleConnection acted upon to enter the given state(s).

Parameters:
  • create_instance_console_connection_details (CreateInstanceConsoleConnectionDetails) -- (required) Request object for creating an InstanceConsoleConnection
  • 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_instance_console_connection()
  • 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_console_history_and_wait_for_state(instance_console_history_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={})

Calls delete_console_history() and waits for the ConsoleHistory acted upon to enter the given state(s).

Parameters:
  • instance_console_history_id (str) -- (required) The OCID of the console history.
  • 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_console_history()
  • 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_dedicated_vm_host_and_wait_for_work_request(dedicated_vm_host_id, work_request_states=[], operation_kwargs={}, waiter_kwargs={})

Calls delete_dedicated_vm_host() and waits for the oci.work_requests.models.WorkRequest to enter the given state(s).

Parameters:
  • dedicated_vm_host_id (str) -- (required) The OCID of the dedicated VM host.
  • work_request_states (list[str]) -- (optional) An array of work requests states to wait on. These should be valid values for status Default values are termination states: [STATUS_SUCCEEDED, STATUS_FAILED, STATUS_CANCELED]
  • operation_kwargs (dict) -- A dictionary of keyword arguments to pass to delete_dedicated_vm_host()
  • 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_image_and_wait_for_state(image_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={})

Calls delete_image() and waits for the Image acted upon to enter the given state(s).

Parameters:
  • image_id (str) --

    (required) The OCID of the image.

  • 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_image()
  • 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_instance_console_connection_and_wait_for_state(instance_console_connection_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={})

Calls delete_instance_console_connection() and waits for the InstanceConsoleConnection acted upon to enter the given state(s).

Parameters:
  • instance_console_connection_id (str) -- (required) The OCID of the instance console connection.
  • 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_instance_console_connection()
  • 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
detach_boot_volume_and_wait_for_state(boot_volume_attachment_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={})

Calls detach_boot_volume() and waits for the BootVolumeAttachment acted upon to enter the given state(s).

Parameters:
  • boot_volume_attachment_id (str) -- (required) The OCID of the boot volume attachment.
  • 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 detach_boot_volume()
  • 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
detach_vnic_and_wait_for_state(vnic_attachment_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={})

Calls detach_vnic() and waits for the VnicAttachment acted upon to enter the given state(s).

Parameters:
  • vnic_attachment_id (str) -- (required) The OCID of the VNIC attachment.
  • 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 detach_vnic()
  • 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
detach_volume_and_wait_for_state(volume_attachment_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={})

Calls detach_volume() and waits for the VolumeAttachment acted upon to enter the given state(s).

Parameters:
  • volume_attachment_id (str) -- (required) The OCID of the volume attachment.
  • 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 detach_volume()
  • 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
export_image_and_wait_for_state(image_id, export_image_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={})

Calls export_image() and waits for the Image acted upon to enter the given state(s).

Parameters:
  • image_id (str) --

    (required) The OCID of the image.

  • export_image_details (ExportImageDetails) -- (required) Details for the image export.
  • 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 export_image()
  • 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
export_image_and_wait_for_work_request(image_id, export_image_details, work_request_states=[], operation_kwargs={}, waiter_kwargs={})

Calls export_image() and waits for the oci.work_requests.models.WorkRequest to enter the given state(s).

Parameters:
  • image_id (str) --

    (required) The OCID of the image.

  • export_image_details (ExportImageDetails) -- (required) Details for the image export.
  • work_request_states (list[str]) -- (optional) An array of work requests states to wait on. These should be valid values for status Default values are termination states: [STATUS_SUCCEEDED, STATUS_FAILED, STATUS_CANCELED]
  • operation_kwargs (dict) -- A dictionary of keyword arguments to pass to export_image()
  • 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
instance_action_and_wait_for_state(instance_id, action, wait_for_states=[], operation_kwargs={}, waiter_kwargs={})

Calls instance_action() and waits for the Instance acted upon to enter the given state(s).

Parameters:
  • instance_id (str) -- (required) The OCID of the instance.
  • action (str) --

    (required) The action to perform on the instance.

    Allowed values are: "STOP", "START", "SOFTRESET", "RESET", "SOFTSTOP"

  • 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 instance_action()
  • 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
launch_instance_and_wait_for_state(launch_instance_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={})

Calls launch_instance() and waits for the Instance acted upon to enter the given state(s).

Parameters:
  • launch_instance_details (LaunchInstanceDetails) -- (required) Instance 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 launch_instance()
  • 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
launch_instance_and_wait_for_work_request(launch_instance_details, work_request_states=[], operation_kwargs={}, waiter_kwargs={})

Calls launch_instance() and waits for the oci.work_requests.models.WorkRequest to enter the given state(s).

Parameters:
  • launch_instance_details (LaunchInstanceDetails) -- (required) Instance details
  • work_request_states (list[str]) -- (optional) An array of work requests states to wait on. These should be valid values for status Default values are termination states: [STATUS_SUCCEEDED, STATUS_FAILED, STATUS_CANCELED]
  • operation_kwargs (dict) -- A dictionary of keyword arguments to pass to launch_instance()
  • 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
terminate_instance_and_wait_for_state(instance_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={})

Calls terminate_instance() and waits for the Instance acted upon to enter the given state(s).

Parameters:
  • instance_id (str) -- (required) The OCID of the instance.
  • 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 terminate_instance()
  • 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_console_history_and_wait_for_state(instance_console_history_id, update_console_history_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={})

Calls update_console_history() and waits for the ConsoleHistory acted upon to enter the given state(s).

Parameters:
  • instance_console_history_id (str) -- (required) The OCID of the console history.
  • update_console_history_details (UpdateConsoleHistoryDetails) -- (required) Update instance fields
  • 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_console_history()
  • 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_dedicated_vm_host_and_wait_for_state(dedicated_vm_host_id, update_dedicated_vm_host_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={})

Calls update_dedicated_vm_host() and waits for the DedicatedVmHost acted upon to enter the given state(s).

Parameters:
  • dedicated_vm_host_id (str) -- (required) The OCID of the dedicated VM host.
  • update_dedicated_vm_host_details (UpdateDedicatedVmHostDetails) -- (required) Update dedicated VM host 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 update_dedicated_vm_host()
  • 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_image_and_wait_for_state(image_id, update_image_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={})

Calls update_image() and waits for the Image acted upon to enter the given state(s).

Parameters:
  • image_id (str) --

    (required) The OCID of the image.

  • update_image_details (UpdateImageDetails) -- (required) Updates the image display name field. Avoid entering confidential information.
  • 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_image()
  • 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_instance_and_wait_for_state(instance_id, update_instance_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={})

Calls update_instance() and waits for the Instance acted upon to enter the given state(s).

Parameters:
  • instance_id (str) -- (required) The OCID of the instance.
  • update_instance_details (UpdateInstanceDetails) -- (required) Update instance fields
  • 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_instance()
  • 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