ApplicationMigrationClient

class oci.application_migration.ApplicationMigrationClient(config, **kwargs)

Application Migration simplifies the migration of applications from Oracle Cloud Infrastructure Classic to Oracle Cloud Infrastructure. You can use Application Migration API to migrate applications, such as Oracle Java Cloud Service, SOA Cloud Service, and Integration Classic instances, to Oracle Cloud Infrastructure. For more information, see [Overview of Application Migration](/iaas/application-migration/appmigrationoverview.htm).

Methods

__init__(config, **kwargs) Creates a new service client
cancel_work_request(work_request_id, **kwargs) Cancels the specified work request.
change_migration_compartment(migration_id, …) Moves the specified migration into a different compartment within the same tenancy.
change_source_compartment(source_id, …) Moves the specified source into a different compartment within the same tenancy.
create_migration(create_migration_details, …) Creates a migration.
create_source(create_source_details, **kwargs) Creates a source in the specified compartment.
delete_migration(migration_id, **kwargs) Deletes the specified migration.
delete_source(source_id, **kwargs) Deletes the specified source.
get_migration(migration_id, **kwargs) Retrieves details of the specified migration.
get_source(source_id, **kwargs) Retrieves details of the specified source.
get_work_request(work_request_id, **kwargs) Gets the details of the specified work request.
list_migrations(compartment_id, **kwargs) Retrieves details of all the migrations that are available in the specified compartment.
list_source_applications(source_id, …) Retrieves details of all the applications associated with the specified source.
list_sources(compartment_id, **kwargs) Retrieves details of all the sources that are available in the specified compartment and match the specified query criteria.
list_work_request_errors(work_request_id, …) Retrieves details of the errors encountered while executing an operation that is tracked by the specified work request.
list_work_request_logs(work_request_id, **kwargs) Retrieves logs for the specified work request.
list_work_requests(compartment_id, **kwargs) Retrieves details of all the work requests and match the specified query criteria.
migrate_application(migration_id, **kwargs) Starts migrating the specified application to Oracle Cloud Infrastructure.
update_migration(migration_id, …) Updates the configuration details for the specified migration.
update_source(source_id, …) You can update the authorization details to access the source environment from which you want to migrate applications to Oracle Cloud Infrastructure.
__init__(config, **kwargs)

Creates a new service client

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

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

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

  • retry_strategy (obj) –

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

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

  • circuit_breaker_strategy (obj) – (optional) A circuit breaker strategy to apply to all calls made by this service client (i.e. at the client level). This client uses DEFAULT_CIRCUIT_BREAKER_STRATEGY as default if no circuit breaker strategy is provided. The specifics of circuit breaker strategy are described here.
  • circuit_breaker_callback (function) – (optional) Callback function to receive any exceptions triggerred by the circuit breaker.
  • allow_control_chars – (optional) allow_control_chars is a boolean to indicate whether or not this client should allow control characters in the response object. By default, the client will not allow control characters to be in the response object.
cancel_work_request(work_request_id, **kwargs)

Cancels the specified work request. When you cancel a work request, it causes the in-progress task to be canceled. For example, if the create migration work request is in the accepted or in progress state for a long time, you can cancel the work request.

When you cancel a work request, the state of the work request changes to cancelling, and then to the cancelled state.

Parameters:
  • work_request_id (str) –

    (required) The OCID of the work request.

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

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

    This should be one of the strategies available in the retry module. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

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

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type None

Return type:

Response

Example:

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

change_migration_compartment(migration_id, change_migration_compartment_details, **kwargs)

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

Parameters:
  • migration_id (str) –

    (required) The OCID of the migration.

  • change_migration_compartment_details (oci.application_migration.models.ChangeCompartmentDetails) – (required) The updated compartment 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 Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • opc_retry_token (str) – (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of retrying the same action. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected.
  • retry_strategy (obj) –

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

    This should be one of the strategies available in the retry module. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

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

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type None

Return type:

Response

Example:

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

change_source_compartment(source_id, change_source_compartment_details, **kwargs)

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

Parameters:
  • source_id (str) –

    (required) The OCID of the source.

  • change_source_compartment_details (oci.application_migration.models.ChangeCompartmentDetails) – (required) The updated compartment 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 Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • opc_retry_token (str) – (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of retrying the same action. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected.
  • retry_strategy (obj) –

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

    This should be one of the strategies available in the retry module. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

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

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type None

Return type:

Response

Example:

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

create_migration(create_migration_details, **kwargs)

Creates a migration. A migration represents the end-to-end workflow of moving an application from a source environment to Oracle Cloud Infrastructure. Each migration moves a single application to Oracle Cloud Infrastructure. For more information, see Manage Migrations.

When you create a migration, provide the required information to let Application Migration access the source environment. Application Migration uses this information to access the application in the source environment and discover application artifacts.

All Oracle Cloud Infrastructure resources, including migrations, 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. For more information, see Resource Identifiers.

After you send your request, a migration is created in the compartment that contains the source. The new migration’s lifecycle state will temporarily be <code>CREATING</code> and the state of the migration will be <code>DISCOVERING_APPLICATION</code>. During this phase, Application Migration sets the template for the <code>serviceConfig</code> and <code>applicationConfig</code> fields of the migration. When this operation is complete, the state of the migration changes to <code>MISSING_CONFIG_VALUES</code>. Next, you’ll need to update the migration to provide configuration values. Before updating the migration, ensure that its state has changed to <code>MISSING_CONFIG_VALUES</code>.

To track the progress of this operation, you can monitor the status of the Create Migration and Discover Application work requests by using the <code>:func:`get_work_request`</code> REST API operation on the work request or by viewing the status of the work request in the console.

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

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

    This should be one of the strategies available in the retry module. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

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

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type Migration

Return type:

Response

Example:

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

create_source(create_source_details, **kwargs)

Creates a source in the specified compartment. In Application Migration, a source refers to the environment from which the application is being migrated. For more information, see Manage Sources.

All Oracle Cloud Infrastructure resources, including sources, 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.

After you send your request, a source is created in the specified compartment. The new source’s lifecycle state will temporarily be <code>CREATING</code>. Application Migration connects to the source environment with the authentication credentials that you have provided. If the connection is established, the status of the source changes to <code>ACTIVE</code> and Application Migration fetches the list of applications that are available for migration in the source environment.

To track the progress of the operation, you can monitor the status of the Create Source work request by using the <code>:func:`get_work_request`</code> REST API operation on the work request or by viewing the status of the work request in the console.

Ensure that the state of the source has changed to <code>ACTIVE</code>, before you retrieve the list of applications from the source environment using the <code>:func:`list_source_applications`</code> REST API call.

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

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

    This should be one of the strategies available in the retry module. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

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

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type Source

Return type:

Response

Example:

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

delete_migration(migration_id, **kwargs)

Deletes the specified migration.

If you have migrated the application or for any other reason if you no longer require a migration, then you can delete the relevant migration. You can delete a migration, irrespective of its state. If any work request is being processed for the migration that you want to delete, then the associated work requests are cancelled and then the migration is deleted.

Parameters:
  • migration_id (str) –

    (required) The OCID of the migration.

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

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

    This should be one of the strategies available in the retry module. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

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

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type None

Return type:

Response

Example:

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

delete_source(source_id, **kwargs)

Deletes the specified source.

Before deleting a source, you must delete all the migrations associated with the source. If you have migrated all the required applications in a source or for any other reason you no longer require a source, then you can delete the relevant source.

Parameters:
  • source_id (str) –

    (required) The OCID of the source.

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

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

    This should be one of the strategies available in the retry module. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

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

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type None

Return type:

Response

Example:

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

get_migration(migration_id, **kwargs)

Retrieves details of the specified migration.

Parameters:
  • migration_id (str) –

    (required) The OCID of the migration.

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

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

    This should be one of the strategies available in the retry module. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

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

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type Migration

Return type:

Response

Example:

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

get_source(source_id, **kwargs)

Retrieves details of the specified source. Specify the OCID of the source for which you want to retrieve details.

Parameters:
  • source_id (str) –

    (required) The OCID of the source.

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

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

    This should be one of the strategies available in the retry module. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

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

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type Source

Return type:

Response

Example:

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

get_work_request(work_request_id, **kwargs)

Gets the details of the specified work request.

Parameters:
  • work_request_id (str) –

    (required) The OCID of the work request.

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

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

    This should be one of the strategies available in the retry module. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

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

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type WorkRequest

Return type:

Response

Example:

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

list_migrations(compartment_id, **kwargs)

Retrieves details of all the migrations that are available in the specified compartment.

Parameters:
  • compartment_id (str) –

    (required) The OCID of a compartment. Retrieves details of objects in the specified compartment.

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

    (optional) The OCID on which to query for a migration.

  • limit (int) –

    (optional) The number of items returned in a paginated List call. For information about pagination, see List Pagination.

  • page (str) –

    (optional) The value of the opc-next-page response header from the preceding List call. For information about pagination, see List Pagination.

  • sort_order (str) –

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

    Allowed values are: “ASC”, “DESC”

  • sort_by (str) –

    (optional) Specifies the field on which to sort. By default, TIMECREATED is ordered descending. By default, DISPLAYNAME is ordered ascending. Note that you can sort only on one field.

    Allowed values are: “TIMECREATED”, “DISPLAYNAME”

  • display_name (str) – (optional) Display name on which to query.
  • lifecycle_state (str) –

    (optional) This field is not supported. Do not use.

    Allowed values are: “CREATING”, “ACTIVE”, “INACTIVE”, “UPDATING”, “SUCCEEDED”, “DELETING”, “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. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

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

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type list of MigrationSummary

Return type:

Response

Example:

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

list_source_applications(source_id, compartment_id, **kwargs)

Retrieves details of all the applications associated with the specified source. This list is generated dynamically by interrogating the source and the list changes as applications are started or stopped in the source environment.

Parameters:
  • source_id (str) –

    (required) The OCID of the source.

  • compartment_id (str) –

    (required) The OCID of a compartment. Retrieves details of objects in the specified compartment.

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

    (optional) The number of items returned in a paginated List call. For information about pagination, see List Pagination.

  • page (str) –

    (optional) The value of the opc-next-page response header from the preceding List call. For information about pagination, see List Pagination.

  • sort_order (str) –

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

    Allowed values are: “ASC”, “DESC”

  • sort_by (str) –

    (optional) Specifies the field on which to sort. By default, TIMECREATED is ordered descending. By default, DISPLAYNAME is ordered ascending. Note that you can sort only on one field.

    Allowed values are: “TIMECREATED”, “DISPLAYNAME”

  • display_name (str) – (optional) Resource name on which to query.
  • retry_strategy (obj) –

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

    This should be one of the strategies available in the retry module. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

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

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type list of SourceApplicationSummary

Return type:

Response

Example:

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

list_sources(compartment_id, **kwargs)

Retrieves details of all the sources that are available in the specified compartment and match the specified query criteria. If you don’t specify any query criteria, then details of all the sources are displayed. To filter the retrieved results, you can pass one or more of the following query parameters, by appending them to the URI as shown in the following example.

Parameters:
  • compartment_id (str) –

    (required) The OCID of a compartment. Retrieves details of objects in the specified compartment.

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

    (optional) The OCID on which to query for a source.

  • limit (int) –

    (optional) The number of items returned in a paginated List call. For information about pagination, see List Pagination.

  • page (str) –

    (optional) The value of the opc-next-page response header from the preceding List call. For information about pagination, see List Pagination.

  • sort_order (str) –

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

    Allowed values are: “ASC”, “DESC”

  • sort_by (str) –

    (optional) Specifies the field on which to sort. By default, TIMECREATED is ordered descending. By default, DISPLAYNAME is ordered ascending. Note that you can sort only on one field.

    Allowed values are: “TIMECREATED”, “DISPLAYNAME”

  • display_name (str) – (optional) Display name on which to query.
  • lifecycle_state (str) –

    (optional) Retrieves details of sources in the specified lifecycle state.

    Allowed values are: “CREATING”, “DELETING”, “UPDATING”, “ACTIVE”, “INACTIVE”, “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. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

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

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type list of SourceSummary

Return type:

Response

Example:

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

list_work_request_errors(work_request_id, **kwargs)

Retrieves details of the errors encountered while executing an operation that is tracked by the specified work request.

Parameters:
  • work_request_id (str) –

    (required) The OCID of the work request.

  • limit (int) –

    (optional) The number of items returned in a paginated List call. For information about pagination, see List Pagination.

  • page (str) –

    (optional) The value of the opc-next-page response header from the preceding List call. For information about pagination, see List Pagination.

  • sort_order (str) –

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

    Allowed values are: “ASC”, “DESC”

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

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

    This should be one of the strategies available in the retry module. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

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

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type list of WorkRequestError

Return type:

Response

Example:

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

list_work_request_logs(work_request_id, **kwargs)

Retrieves logs for the specified work request.

Parameters:
  • work_request_id (str) –

    (required) The OCID of the work request.

  • limit (int) –

    (optional) The number of items returned in a paginated List call. For information about pagination, see List Pagination.

  • page (str) –

    (optional) The value of the opc-next-page response header from the preceding List call. For information about pagination, see List Pagination.

  • sort_order (str) –

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

    Allowed values are: “ASC”, “DESC”

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

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

    This should be one of the strategies available in the retry module. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

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

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type list of WorkRequestLogEntry

Return type:

Response

Example:

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

list_work_requests(compartment_id, **kwargs)

Retrieves details of all the work requests and match the specified query criteria. To filter the retrieved results, you can pass one or more of the following query parameters, by appending them to the URI as shown in the following example.

Parameters:
  • compartment_id (str) –

    (required) The OCID of a compartment. Retrieves details of objects in the specified compartment.

  • resource_id (str) –

    (optional) The OCID for a resource. Retrieves details of the specified resource.

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

    (optional) The number of items returned in a paginated List call. For information about pagination, see List Pagination.

  • page (str) –

    (optional) The value of the opc-next-page response header from the preceding List call. For information about pagination, 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. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

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

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type list of WorkRequestSummary

Return type:

Response

Example:

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

migrate_application(migration_id, **kwargs)

Starts migrating the specified application to Oracle Cloud Infrastructure.

Before sending this request, ensure that you have provided configuration details to update the migration and the state of the migration is <code>READY</code>.

After you send this request, the migration’s state will temporarily be <code>MIGRATING</code>.

To track the progress of the operation, you can monitor the status of the Migrate Application work request by using the <code>:func:`get_work_request`</code> REST API operation on the work request or by viewing the status of the work request in the console. When this work request is processed successfully, Application Migration creates the required resources in the target environment and the state of the migration changes to <code>MIGRATION_SUCCEEDED</code>.

Parameters:
  • migration_id (str) –

    (required) The OCID of the migration.

  • opc_request_id (str) – (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.
  • 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 retrying the same action. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected.
  • retry_strategy (obj) –

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

    This should be one of the strategies available in the retry module. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

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

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type None

Return type:

Response

Example:

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

update_migration(migration_id, update_migration_details, **kwargs)

Updates the configuration details for the specified migration.

When you create a migration, Application Migration sets the template for the <code>serviceConfig</code> and <code>applicationConfig</code> attributes of the migration. When you update the migration, you must provide values for these fields to specify configuration information for the application in the target environment.

Before updating the migration, complete the following tasks: <ol> <li>Identify the migration that you want to update and ensure that the migration is in the <code>MISSING_CONFIG_VALUES</code> state.</li> <li>Get details of the migration using the <code>GetMigration</code> command. This returns the template for the <code>serviceConfig</code> and <code>applicationConfig</code> attributes of the migration.</li> <li>You must fill out the required details for the <code>serviceConfig</code> and <code>applicationConfig</code> attributes. The <code>isRequired</code> attribute of a configuration property indicates whether it is mandatory to provide a value.</li> <li>You can provide values for the optional configuration properties or you can delete the optional properties for which you do not provide values. Note that you cannot add any property that is not present in the template.</li> </ol>

To update the migration, pass the configuration values in the request body. The information that you must provide depends on the type of application that you are migrating. For reference information about configuration fields, see Provide Configuration Information.

To track the progress of the operation, you can monitor the status of the Update Migration work request by using the <code>:func:`get_work_request`</code> REST API operation on the work request or by viewing the status of the work request in the console.

When the migration has been updated, the state of the migration changes to <code>READY</code>. After updating the migration, you can start the migration whenever you are ready.

Parameters:
  • migration_id (str) –

    (required) The OCID of the migration.

  • update_migration_details (oci.application_migration.models.UpdateMigrationDetails) – (required) Updated configuration for the migration.
  • opc_request_id (str) – (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • opc_retry_token (str) – (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of retrying the same action. 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. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

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

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type None

Return type:

Response

Example:

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

update_source(source_id, update_source_details, **kwargs)

You can update the authorization details to access the source environment from which you want to migrate applications to Oracle Cloud Infrastructure. You can also update the description and tags of a source.

Warning: Oracle recommends that you avoid using any confidential information when you supply string values using the API.

Parameters:
  • source_id (str) –

    (required) The OCID of the source.

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

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

    This should be one of the strategies available in the retry module. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

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

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type None

Return type:

Response

Example:

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