ComputeClient

class oci.core.ComputeClient(config, **kwargs)

API covering the [Networking](/iaas/Content/Network/Concepts/overview.htm), [Compute](/iaas/Content/Compute/Concepts/computeoverview.htm), and [Block Volume](/iaas/Content/Block/Concepts/overview.htm) services. Use this API to manage resources such as virtual cloud networks (VCNs), compute instances, and block storage volumes.

__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 is that the client never times out. 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.

attach_boot_volume(attach_boot_volume_details, **kwargs)

AttachBootVolume Attaches the specified boot volume to the specified instance.

Parameters:
  • attach_boot_volume_details (AttachBootVolumeDetails) -- (required) Attach boot volume request
  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type BootVolumeAttachment

Return type:

Response

attach_vnic(attach_vnic_details, **kwargs)

AttachVnic Creates a secondary VNIC and attaches it to the specified instance. For more information about secondary VNICs, see Virtual Network Interface Cards (VNICs).

Parameters:
  • attach_vnic_details (AttachVnicDetails) -- (required) Attach VNIC details.
  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type VnicAttachment

Return type:

Response

attach_volume(attach_volume_details, **kwargs)

AttachVolume Attaches the specified storage volume to the specified instance.

Parameters:
  • attach_volume_details (AttachVolumeDetails) -- (required) Attach volume request
  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type VolumeAttachment

Return type:

Response

capture_console_history(capture_console_history_details, **kwargs)

CaptureConsoleHistory Captures the most recent serial console data (up to a megabyte) for the specified instance.

The CaptureConsoleHistory operation works with the other console history operations as described below.

1. Use CaptureConsoleHistory to request the capture of up to a megabyte of the most recent console history. This call returns a ConsoleHistory object. The object will have a state of REQUESTED. 2. Wait for the capture operation to succeed by polling GetConsoleHistory with the identifier of the console history metadata. The state of the ConsoleHistory object will go from REQUESTED to GETTING-HISTORY and then SUCCEEDED (or FAILED). 3. Use GetConsoleHistoryContent to get the actual console history data (not the metadata). 4. Optionally, use DeleteConsoleHistory to delete the console history metadata and the console history data.

Parameters:
  • capture_console_history_details (CaptureConsoleHistoryDetails) -- (required) Console history details
  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type ConsoleHistory

Return type:

Response

change_dedicated_vm_host_compartment(dedicated_vm_host_id, change_dedicated_vm_host_compartment_details, **kwargs)

ChangeDedicatedVmHostCompartment Moves a dedicated virtual machine host from one compartment to another.

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.
  • 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 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type None

Return type:

Response

change_image_compartment(image_id, change_image_compartment_details, **kwargs)

ChangeImageCompartment Moves an image into a different compartment within the same tenancy. For information about moving resources between compartments, see Moving Resources to a Different Compartment.

Parameters:
  • image_id (str) --

    (required) The OCID of the image.

  • change_image_compartment_details (ChangeImageCompartmentDetails) -- (required) Request to change the compartment of a given image.
  • 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 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type None

Return type:

Response

change_instance_compartment(instance_id, change_instance_compartment_details, **kwargs)

ChangeInstanceCompartment Moves an instance into a different compartment within the same tenancy. For information about moving resources between compartments, see Moving Resources to a Different Compartment.

When you move an instance to a different compartment, associated resources such as boot volumes and VNICs are not moved.

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.
  • 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 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type None

Return type:

Response

create_app_catalog_subscription(create_app_catalog_subscription_details, **kwargs)

CreateAppCatalogSubscription Create a subscription for listing resource version for a compartment. It will take some time to propagate to all regions.

Parameters:
  • create_app_catalog_subscription_details (CreateAppCatalogSubscriptionDetails) -- (required) Request for the creation of a subscription for listing resource version for a compartment.
  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type AppCatalogSubscription

Return type:

Response

create_dedicated_vm_host(create_dedicated_vm_host_details, **kwargs)

CreateDedicatedVmHost Creates a new dedicated virtual machine host in the specified compartment and the specified availability domain. Dedicated virtual machine hosts enable you to run your Compute virtual machine (VM) instances on dedicated servers that are a single tenant and not shared with other customers. For more information, see Dedicated Virtual Machine Hosts.

Parameters:
  • create_dedicated_vm_host_details (CreateDedicatedVmHostDetails) -- (required) The details for creating a new dedicated virtual machine host.
  • opc_request_id (str) -- (optional) Unique 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type DedicatedVmHost

Return type:

Response

create_image(create_image_details, **kwargs)

CreateImage Creates a boot disk image for the specified instance or imports an exported image from the Oracle Cloud Infrastructure Object Storage service.

When creating a new image, you must provide the OCID of the instance you want to use as the basis for the image, and the OCID of the compartment containing that instance. For more information about images, see Managing Custom Images.

When importing an exported image from Object Storage, you specify the source information in image_source_details().

When importing an image based on the namespace, bucket name, and object name, use image_source_via_object_storage_tuple_details().

When importing an image based on the Object Storage URL, use image_source_via_object_storage_uri_details(). See Object Storage URLs and Using Pre-Authenticated Requests for constructing URLs for image import/export.

For more information about importing exported images, see Image Import/Export.

You may optionally specify a display name for the image, which is simply a friendly name or description. It does not have to be unique, and you can change it. See update_image(). Avoid entering confidential information.

Parameters:
  • create_image_details (CreateImageDetails) -- (required) Image creation details
  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type Image

Return type:

Response

create_instance_console_connection(create_instance_console_connection_details, **kwargs)

CreateInstanceConsoleConnection Creates a new console connection to the specified instance. Once the console connection has been created and is available, you connect to the console using SSH.

For more information about console access, see Accessing the Console.

Parameters:
  • create_instance_console_connection_details (CreateInstanceConsoleConnectionDetails) -- (required) Request object for creating an InstanceConsoleConnection
  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type InstanceConsoleConnection

Return type:

Response

delete_app_catalog_subscription(listing_id, compartment_id, resource_version, **kwargs)

DeleteAppCatalogSubscription Delete a subscription for a listing resource version for a compartment.

Parameters:
  • listing_id (str) -- (required) The OCID of the listing.
  • compartment_id (str) --

    (required) The OCID of the compartment.

  • resource_version (str) -- (required) Listing Resource Version.
  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type None

Return type:

Response

delete_console_history(instance_console_history_id, **kwargs)

DeleteConsoleHistory Deletes the specified console history metadata and the console history data.

Parameters:
  • instance_console_history_id (str) -- (required) The OCID of the console history.
  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type None

Return type:

Response

delete_dedicated_vm_host(dedicated_vm_host_id, **kwargs)

DeleteDedicatedVmHost Deletes the specified dedicated virtual machine host.

If any VM instances are assigned to the dedicated virtual machine host, the delete operation will fail and the service will return a 409 response code.

Parameters:
  • dedicated_vm_host_id (str) -- (required) The OCID of the dedicated VM host.
  • opc_request_id (str) -- (optional) Unique 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type None

Return type:

Response

delete_image(image_id, **kwargs)

DeleteImage Deletes an image.

Parameters:
  • image_id (str) --

    (required) The OCID of the image.

  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type None

Return type:

Response

delete_instance_console_connection(instance_console_connection_id, **kwargs)

DeleteInstanceConsoleConnection Deletes the specified instance console connection.

Parameters:
  • instance_console_connection_id (str) -- (required) The OCID of the instance console connection.
  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type None

Return type:

Response

detach_boot_volume(boot_volume_attachment_id, **kwargs)

DetachBootVolume Detaches a boot volume from an instance. You must specify the OCID of the boot volume attachment.

This is an asynchronous operation. The attachment's lifecycleState will change to DETACHING temporarily until the attachment is completely removed.

Parameters:
  • boot_volume_attachment_id (str) -- (required) The OCID of the boot volume attachment.
  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type None

Return type:

Response

detach_vnic(vnic_attachment_id, **kwargs)

DetachVnic Detaches and deletes the specified secondary VNIC. This operation cannot be used on the instance's primary VNIC. When you terminate an instance, all attached VNICs (primary and secondary) are automatically detached and deleted.

Important: If the VNIC has a PrivateIp that is the target of a route rule, deleting the VNIC causes that route rule to blackhole and the traffic will be dropped.

Parameters:
  • vnic_attachment_id (str) -- (required) The OCID of the VNIC attachment.
  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type None

Return type:

Response

detach_volume(volume_attachment_id, **kwargs)

DetachVolume Detaches a storage volume from an instance. You must specify the OCID of the volume attachment.

This is an asynchronous operation. The attachment's lifecycleState will change to DETACHING temporarily until the attachment is completely removed.

Parameters:
  • volume_attachment_id (str) -- (required) The OCID of the volume attachment.
  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type None

Return type:

Response

export_image(image_id, export_image_details, **kwargs)

ExportImage Exports the specified image to the Oracle Cloud Infrastructure Object Storage service. You can use the Object Storage URL, or the namespace, bucket name, and object name when specifying the location to export to.

For more information about exporting images, see Image Import/Export.

To perform an image export, you need write access to the Object Storage bucket for the image, see Let Users Write Objects to Object Storage Buckets.

See Object Storage URLs and Using Pre-Authenticated Requests for constructing URLs for image import/export.

Parameters:
  • image_id (str) --

    (required) The OCID of the image.

  • export_image_details (ExportImageDetails) -- (required) Details for the image export.
  • 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).
  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type Image

Return type:

Response

get_app_catalog_listing(listing_id, **kwargs)

GetAppCatalogListing Gets the specified listing.

Parameters:
  • listing_id (str) -- (required) The OCID of the listing.
  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type AppCatalogListing

Return type:

Response

get_app_catalog_listing_agreements(listing_id, resource_version, **kwargs)

GetAppCatalogListingAgreements Retrieves the agreements for a particular resource version of a listing.

Parameters:
  • listing_id (str) -- (required) The OCID of the listing.
  • resource_version (str) -- (required) Listing Resource Version.
  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type AppCatalogListingResourceVersionAgreements

Return type:

Response

get_app_catalog_listing_resource_version(listing_id, resource_version, **kwargs)

GetAppCatalogListingResourceVersion Gets the specified listing resource version.

Parameters:
  • listing_id (str) -- (required) The OCID of the listing.
  • resource_version (str) -- (required) Listing Resource Version.
  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type AppCatalogListingResourceVersion

Return type:

Response

get_boot_volume_attachment(boot_volume_attachment_id, **kwargs)

GetBootVolumeAttachment Gets information about the specified boot volume attachment.

Parameters:
  • boot_volume_attachment_id (str) -- (required) The OCID of the boot volume attachment.
  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type BootVolumeAttachment

Return type:

Response

get_console_history(instance_console_history_id, **kwargs)

GetConsoleHistory Shows the metadata for the specified console history. See capture_console_history() for details about using the console history operations.

Parameters:
  • instance_console_history_id (str) -- (required) The OCID of the console history.
  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type ConsoleHistory

Return type:

Response

get_console_history_content(instance_console_history_id, **kwargs)

GetConsoleHistoryContent Gets the actual console history data (not the metadata). See capture_console_history() for details about using the console history operations.

Parameters:
  • instance_console_history_id (str) -- (required) The OCID of the console history.
  • offset (int) -- (optional) Offset of the snapshot data to retrieve.
  • length (int) -- (optional) Length of the snapshot data to retrieve.
  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type bytes

Return type:

Response

get_dedicated_vm_host(dedicated_vm_host_id, **kwargs)

GetDedicatedVmHost Gets information about the specified dedicated virtual machine host.

Parameters:
  • dedicated_vm_host_id (str) -- (required) The OCID of the dedicated VM host.
  • opc_request_id (str) -- (optional) Unique 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type DedicatedVmHost

Return type:

Response

get_image(image_id, **kwargs)

GetImage Gets the specified image.

Parameters:
  • image_id (str) --

    (required) The OCID of the image.

  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type Image

Return type:

Response

get_instance(instance_id, **kwargs)

GetInstance Gets information about the specified instance.

Parameters:
  • instance_id (str) -- (required) The OCID of the instance.
  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type Instance

Return type:

Response

get_instance_console_connection(instance_console_connection_id, **kwargs)

GetInstanceConsoleConnection Gets the specified instance console connection's information.

Parameters:
  • instance_console_connection_id (str) -- (required) The OCID of the instance console connection.
  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type InstanceConsoleConnection

Return type:

Response

get_vnic_attachment(vnic_attachment_id, **kwargs)

GetVnicAttachment Gets the information for the specified VNIC attachment.

Parameters:
  • vnic_attachment_id (str) -- (required) The OCID of the VNIC attachment.
  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type VnicAttachment

Return type:

Response

get_volume_attachment(volume_attachment_id, **kwargs)

GetVolumeAttachment Gets information about the specified volume attachment.

Parameters:
  • volume_attachment_id (str) -- (required) The OCID of the volume attachment.
  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type VolumeAttachment

Return type:

Response

get_windows_instance_initial_credentials(instance_id, **kwargs)

GetWindowsInstanceInitialCredentials Gets the generated credentials for the instance. Only works for instances that require password to log in (E.g. Windows). For certain OS'es, users will be forced to change the initial credentials.

Parameters:
  • instance_id (str) -- (required) The OCID of the instance.
  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type InstanceCredentials

Return type:

Response

instance_action(instance_id, action, **kwargs)

InstanceAction Performs one of the following power actions on the specified instance:

  • START - Powers on the instance.
  • STOP - Powers off the instance.
  • SOFTRESET - Gracefully reboots instance by sending a shutdown command to the operating system and then powers the instance back on.
  • SOFTSTOP - Gracefully shuts down instance by sending a shutdown command to the operating system.
  • RESET - Powers off the instance and then powers it back on.

For more information see Stopping and Starting an Instance.

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"

  • 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).
  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type Instance

Return type:

Response

launch_instance(launch_instance_details, **kwargs)

LaunchInstance Creates a new instance in the specified compartment and the specified availability domain. For general information about instances, see Overview of the Compute Service.

For information about access control and compartments, see Overview of the IAM Service.

For information about availability domains, see Regions and Availability Domains. To get a list of availability domains, use the ListAvailabilityDomains operation in the Identity and Access Management Service API.

All Oracle Cloud Infrastructure resources, including instances, get an Oracle-assigned, unique ID called an Oracle Cloud Identifier (OCID). When you create a resource, you can find its OCID in the response. You can also retrieve a resource's OCID by using a List API operation on that resource type, or by viewing the resource in the Console.

To launch an instance using an image or a boot volume use the sourceDetails parameter in LaunchInstanceDetails.

When you launch an instance, it is automatically attached to a virtual network interface card (VNIC), called the primary VNIC. The VNIC has a private IP address from the subnet's CIDR. You can either assign a private IP address of your choice or let Oracle automatically assign one. You can choose whether the instance has a public IP address. To retrieve the addresses, use the list_vnic_attachments() operation to get the VNIC ID for the instance, and then call get_vnic() with the VNIC ID.

You can later add secondary VNICs to an instance. For more information, see Virtual Network Interface Cards (VNICs).

Parameters:
  • launch_instance_details (LaunchInstanceDetails) -- (required) Instance details
  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type Instance

Return type:

Response

list_app_catalog_listing_resource_versions(listing_id, **kwargs)

ListAppCatalogListingResourceVersions Gets all resource versions for a particular listing.

Parameters:
  • listing_id (str) -- (required) The OCID of the listing.
  • limit (int) --

    (optional) For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination.

    Example: 50

  • page (str) --

    (optional) For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see List Pagination.

  • sort_order (str) --

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

    Allowed values are: "ASC", "DESC"

  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type list of AppCatalogListingResourceVersionSummary

Return type:

Response

list_app_catalog_listings(**kwargs)

ListAppCatalogListings Lists the published listings.

Parameters:
  • limit (int) --

    (optional) For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination.

    Example: 50

  • page (str) --

    (optional) For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see List Pagination.

  • sort_order (str) --

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

    Allowed values are: "ASC", "DESC"

  • publisher_name (str) -- (optional) A filter to return only the publisher that matches the given publisher name exactly.
  • publisher_type (str) -- (optional) A filter to return only publishers that match the given publisher type exactly. Valid types are OCI, ORACLE, TRUSTED, STANDARD.
  • display_name (str) -- (optional) A filter to return only resources that match the given display name exactly.
  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type list of AppCatalogListingSummary

Return type:

Response

list_app_catalog_subscriptions(compartment_id, **kwargs)

ListAppCatalogSubscriptions Lists subscriptions for a compartment.

Parameters:
  • compartment_id (str) --

    (required) The OCID of the compartment.

  • limit (int) --

    (optional) For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination.

    Example: 50

  • page (str) --

    (optional) For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see List Pagination.

  • 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 DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive.

    Note: In general, some "List" operations (for example, ListInstances) let you optionally filter by availability domain if the scope of the resource type is within a single availability domain. If you call one of these "List" operations without specifying an availability domain, the resources are grouped by availability domain, then sorted.

    Allowed values are: "TIMECREATED", "DISPLAYNAME"

  • sort_order (str) --

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

    Allowed values are: "ASC", "DESC"

  • listing_id (str) -- (optional) A filter to return only the listings that matches the given listing 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type list of AppCatalogSubscriptionSummary

Return type:

Response

list_boot_volume_attachments(availability_domain, compartment_id, **kwargs)

ListBootVolumeAttachments Lists the boot volume attachments in the specified compartment. You can filter the list by specifying an instance OCID, boot volume OCID, or both.

Parameters:
  • availability_domain (str) --

    (required) The name of the availability domain.

    Example: Uocm:PHX-AD-1

  • compartment_id (str) --

    (required) The OCID of the compartment.

  • limit (int) --

    (optional) For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination.

    Example: 50

  • page (str) --

    (optional) For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see List Pagination.

  • instance_id (str) -- (optional) The OCID of the instance.
  • boot_volume_id (str) -- (optional) The OCID of the boot volume.
  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type list of BootVolumeAttachment

Return type:

Response

list_console_histories(compartment_id, **kwargs)

ListConsoleHistories Lists the console history metadata for the specified compartment or instance.

Parameters:
  • compartment_id (str) --

    (required) The OCID of the compartment.

  • availability_domain (str) --

    (optional) The name of the availability domain.

    Example: Uocm:PHX-AD-1

  • limit (int) --

    (optional) For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination.

    Example: 50

  • page (str) --

    (optional) For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see List Pagination.

  • instance_id (str) -- (optional) The OCID of the instance.
  • 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 DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive.

    Note: In general, some "List" operations (for example, ListInstances) let you optionally filter by availability domain if the scope of the resource type is within a single availability domain. If you call one of these "List" operations without specifying an availability domain, the resources are grouped by availability domain, then sorted.

    Allowed values are: "TIMECREATED", "DISPLAYNAME"

  • sort_order (str) --

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

    Allowed values are: "ASC", "DESC"

  • lifecycle_state (str) --

    (optional) A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

    Allowed values are: "REQUESTED", "GETTING-HISTORY", "SUCCEEDED", "FAILED"

  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type list of ConsoleHistory

Return type:

Response

list_dedicated_vm_host_instance_shapes(compartment_id, **kwargs)

ListDedicatedVmHostInstanceShapes Lists the shapes that can be used to launch a virtual machine instance on a dedicated virtual machine host within the specified compartment. You can filter the list by compatibility with a specific dedicated virtual machine host shape.

Parameters:
  • compartment_id (str) --

    (required) The OCID of the compartment.

  • availability_domain (str) --

    (optional) The name of the availability domain.

    Example: Uocm:PHX-AD-1

  • dedicated_vm_host_shape (str) -- (optional) Dedicated VM host shape name
  • limit (int) --

    (optional) For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination.

    Example: 50

  • page (str) --

    (optional) For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see List Pagination.

  • opc_request_id (str) -- (optional) Unique 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type list of DedicatedVmHostInstanceShapeSummary

Return type:

Response

list_dedicated_vm_host_instances(compartment_id, dedicated_vm_host_id, **kwargs)

ListDedicatedVmHostInstances Returns the list of instances on the dedicated virtual machine hosts that match the specified criteria.

Parameters:
  • compartment_id (str) --

    (required) The OCID of the compartment.

  • dedicated_vm_host_id (str) -- (required) The OCID of the dedicated VM host.
  • availability_domain (str) --

    (optional) The name of the availability domain.

    Example: Uocm:PHX-AD-1

  • limit (int) --

    (optional) For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination.

    Example: 50

  • page (str) --

    (optional) For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see List Pagination.

  • opc_request_id (str) -- (optional) Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • 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 DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive.

    Note: In general, some "List" operations (for example, ListInstances) let you optionally filter by availability domain if the scope of the resource type is within a single availability domain. If you call one of these "List" operations without specifying an availability domain, the resources are grouped by availability domain, then sorted.

    Allowed values are: "TIMECREATED", "DISPLAYNAME"

  • sort_order (str) --

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

    Allowed values are: "ASC", "DESC"

  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type list of DedicatedVmHostInstanceSummary

Return type:

Response

list_dedicated_vm_host_shapes(compartment_id, **kwargs)

ListDedicatedVmHostShapes Lists the shapes that can be used to launch a dedicated virtual machine host within the specified compartment.

Parameters:
  • compartment_id (str) --

    (required) The OCID of the compartment.

  • availability_domain (str) --

    (optional) The name of the availability domain.

    Example: Uocm:PHX-AD-1

  • instance_shape_name (str) -- (optional) The name for the instance's shape.
  • limit (int) --

    (optional) For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination.

    Example: 50

  • page (str) --

    (optional) For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see List Pagination.

  • opc_request_id (str) -- (optional) Unique 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type list of DedicatedVmHostShapeSummary

Return type:

Response

list_dedicated_vm_hosts(compartment_id, **kwargs)

ListDedicatedVmHosts Returns the list of dedicated virtual machine hosts that match the specified criteria in the specified compartment.

You can limit the list by specifying a dedicated virtual machine host display name. The list will include all the identically-named dedicated virtual machine hosts in the compartment.

Parameters:
  • compartment_id (str) --

    (required) The OCID of the compartment.

  • availability_domain (str) --

    (optional) The name of the availability domain.

    Example: Uocm:PHX-AD-1

  • lifecycle_state (str) --

    (optional) A filter to only return resources that match the given lifecycle state.

    Allowed values are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"

  • display_name (str) -- (optional) A filter to return only resources that match the given display name exactly.
  • instance_shape_name (str) -- (optional) The name for the instance's shape.
  • limit (int) --

    (optional) For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination.

    Example: 50

  • page (str) --

    (optional) For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see List Pagination.

  • opc_request_id (str) -- (optional) Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • 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 DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive.

    Note: In general, some "List" operations (for example, ListInstances) let you optionally filter by availability domain if the scope of the resource type is within a single availability domain. If you call one of these "List" operations without specifying an availability domain, the resources are grouped by availability domain, then sorted.

    Allowed values are: "TIMECREATED", "DISPLAYNAME"

  • sort_order (str) --

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

    Allowed values are: "ASC", "DESC"

  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type list of DedicatedVmHostSummary

Return type:

Response

list_images(compartment_id, **kwargs)

ListImages Lists the available images in the specified compartment, including both Oracle-provided images and custom images that have been created. The list of images returned is ordered to first show all Oracle-provided images, then all custom images.

The order of images returned may change when new images are released.

Parameters:
  • compartment_id (str) --

    (required) The OCID of the compartment.

  • display_name (str) -- (optional) A filter to return only resources that match the given display name exactly.
  • operating_system (str) --

    (optional) The image's operating system.

    Example: Oracle Linux

  • operating_system_version (str) --

    (optional) The image's operating system version.

    Example: 7.2

  • shape (str) -- (optional) Shape name.
  • limit (int) --

    (optional) For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination.

    Example: 50

  • page (str) --

    (optional) For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see List Pagination.

  • 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 DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive.

    Note: In general, some "List" operations (for example, ListInstances) let you optionally filter by availability domain if the scope of the resource type is within a single availability domain. If you call one of these "List" operations without specifying an availability domain, the resources are grouped by availability domain, then sorted.

    Allowed values are: "TIMECREATED", "DISPLAYNAME"

  • sort_order (str) --

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

    Allowed values are: "ASC", "DESC"

  • lifecycle_state (str) --

    (optional) A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

    Allowed values are: "PROVISIONING", "IMPORTING", "AVAILABLE", "EXPORTING", "DISABLED", "DELETED"

  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type list of Image

Return type:

Response

list_instance_console_connections(compartment_id, **kwargs)

ListInstanceConsoleConnections Lists the console connections for the specified compartment or instance.

For more information about console access, see Accessing the Console.

Parameters:
  • compartment_id (str) --

    (required) The OCID of the compartment.

  • instance_id (str) -- (optional) The OCID of the instance.
  • limit (int) --

    (optional) For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination.

    Example: 50

  • page (str) --

    (optional) For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see List Pagination.

  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type list of InstanceConsoleConnection

Return type:

Response

list_instance_devices(instance_id, **kwargs)

ListInstanceDevices Gets a list of all the devices for given instance. You can optionally filter results by device availability.

Parameters:
  • instance_id (str) -- (required) The OCID of the instance.
  • is_available (bool) -- (optional) A filter to return only available devices or only used devices.
  • name (str) -- (optional) A filter to return only devices that match the given name exactly.
  • limit (int) --

    (optional) For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination.

    Example: 50

  • page (str) --

    (optional) For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see List Pagination.

  • opc_request_id (str) -- (optional) Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • 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 DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive.

    Note: In general, some "List" operations (for example, ListInstances) let you optionally filter by availability domain if the scope of the resource type is within a single availability domain. If you call one of these "List" operations without specifying an availability domain, the resources are grouped by availability domain, then sorted.

    Allowed values are: "TIMECREATED", "DISPLAYNAME"

  • sort_order (str) --

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

    Allowed values are: "ASC", "DESC"

  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type list of Device

Return type:

Response

list_instances(compartment_id, **kwargs)

ListInstances Lists the instances in the specified compartment and the specified availability domain. You can filter the results by specifying an instance name (the list will include all the identically-named instances in the compartment).

Parameters:
  • compartment_id (str) --

    (required) The OCID of the compartment.

  • availability_domain (str) --

    (optional) The name of the availability domain.

    Example: Uocm:PHX-AD-1

  • display_name (str) -- (optional) A filter to return only resources that match the given display name exactly.
  • limit (int) --

    (optional) For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination.

    Example: 50

  • page (str) --

    (optional) For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see List Pagination.

  • 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 DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive.

    Note: In general, some "List" operations (for example, ListInstances) let you optionally filter by availability domain if the scope of the resource type is within a single availability domain. If you call one of these "List" operations without specifying an availability domain, the resources are grouped by availability domain, then sorted.

    Allowed values are: "TIMECREATED", "DISPLAYNAME"

  • sort_order (str) --

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

    Allowed values are: "ASC", "DESC"

  • lifecycle_state (str) --

    (optional) A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

    Allowed values are: "MOVING", "PROVISIONING", "RUNNING", "STARTING", "STOPPING", "STOPPED", "CREATING_IMAGE", "TERMINATING", "TERMINATED"

  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type list of Instance

Return type:

Response

list_shapes(compartment_id, **kwargs)

ListShapes Lists the shapes that can be used to launch an instance within the specified compartment. You can filter the list by compatibility with a specific image.

Parameters:
  • compartment_id (str) --

    (required) The OCID of the compartment.

  • availability_domain (str) --

    (optional) The name of the availability domain.

    Example: Uocm:PHX-AD-1

  • limit (int) --

    (optional) For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination.

    Example: 50

  • page (str) --

    (optional) For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see List Pagination.

  • image_id (str) --

    (optional) The OCID of an image.

  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type list of Shape

Return type:

Response

list_vnic_attachments(compartment_id, **kwargs)

ListVnicAttachments Lists the VNIC attachments in the specified compartment. A VNIC attachment resides in the same compartment as the attached instance. The list can be filtered by instance, VNIC, or availability domain.

Parameters:
  • compartment_id (str) --

    (required) The OCID of the compartment.

  • availability_domain (str) --

    (optional) The name of the availability domain.

    Example: Uocm:PHX-AD-1

  • instance_id (str) -- (optional) The OCID of the instance.
  • limit (int) --

    (optional) For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination.

    Example: 50

  • page (str) --

    (optional) For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see List Pagination.

  • vnic_id (str) -- (optional) The OCID of the VNIC.
  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type list of VnicAttachment

Return type:

Response

list_volume_attachments(compartment_id, **kwargs)

ListVolumeAttachments Lists the volume attachments in the specified compartment. You can filter the list by specifying an instance OCID, volume OCID, or both.

Currently, the only supported volume attachment type are IScsiVolumeAttachment and ParavirtualizedVolumeAttachment.

Parameters:
  • compartment_id (str) --

    (required) The OCID of the compartment.

  • availability_domain (str) --

    (optional) The name of the availability domain.

    Example: Uocm:PHX-AD-1

  • limit (int) --

    (optional) For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination.

    Example: 50

  • page (str) --

    (optional) For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see List Pagination.

  • instance_id (str) -- (optional) The OCID of the instance.
  • volume_id (str) -- (optional) The OCID of the volume.
  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type list of VolumeAttachment

Return type:

Response

terminate_instance(instance_id, **kwargs)

TerminateInstance Terminates the specified instance. Any attached VNICs and volumes are automatically detached when the instance terminates.

To preserve the boot volume associated with the instance, specify true for PreserveBootVolumeQueryParam. To delete the boot volume when the instance is deleted, specify false or do not specify a value for PreserveBootVolumeQueryParam.

This is an asynchronous operation. The instance's lifecycleState will change to TERMINATING temporarily until the instance is completely removed.

Parameters:
  • instance_id (str) -- (required) The OCID of the instance.
  • 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.
  • preserve_boot_volume (bool) -- (optional) Specifies whether to delete or preserve the boot volume when terminating an instance. The default value is false.
  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type None

Return type:

Response

update_console_history(instance_console_history_id, update_console_history_details, **kwargs)

UpdateConsoleHistory Updates the specified console history metadata.

Parameters:
  • instance_console_history_id (str) -- (required) The OCID of the console history.
  • update_console_history_details (UpdateConsoleHistoryDetails) -- (required) Update instance fields
  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type ConsoleHistory

Return type:

Response

update_dedicated_vm_host(dedicated_vm_host_id, update_dedicated_vm_host_details, **kwargs)

UpdateDedicatedVmHost Updates the displayName, freeformTags, and definedTags attributes for the specified dedicated virtual machine host. If an attribute value is not included, it will not be updated.

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
  • 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 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type DedicatedVmHost

Return type:

Response

update_image(image_id, update_image_details, **kwargs)

UpdateImage Updates the display name of the image. Avoid entering confidential information.

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.
  • 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).
  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type Image

Return type:

Response

update_instance(instance_id, update_instance_details, **kwargs)

UpdateInstance Updates certain fields on the specified instance. Fields that are not provided in the request will not be updated. Avoid entering confidential information.

Changes to metadata fields will be reflected in the instance metadata service (this may take up to a minute).

The OCID of the instance remains the same.

Parameters:
  • instance_id (str) -- (required) The OCID of the instance.
  • update_instance_details (UpdateInstanceDetails) -- (required) Update instance fields
  • 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).
  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type Instance

Return type:

Response