@Generated(value="OracleSDKGenerator", comments="API Version: 20191031") public class ApplicationMigrationAsyncClient extends BaseAsyncClient implements ApplicationMigrationAsync
Async client implementation for ApplicationMigration service.
There are two ways to use async client: 1. Use AsyncHandler: using AsyncHandler, if the response
to the call is an InputStream
, like getObject Api in object storage service,
developers need to process the stream in AsyncHandler, and not anywhere else, because the stream
will be closed right after the AsyncHandler is invoked.
2. Use Java Future: using Java Future, developers need to close the stream after they are done
with the Java Future.
Accessing the result should be done in a mutually exclusive manner, either through the Future or
the AsyncHandler, but not both. If the Future is used, the caller should pass in null as the
AsyncHandler. If the AsyncHandler is used, it is still safe to use the Future to determine
whether or not the request was completed via Future.isDone/isCancelled.
Please refer to
https://github.com/oracle/oci-java-sdk/blob/master/bmc-examples/src/main/java/ResteasyClientWithObjectStorageExample.java
Modifier and Type | Class and Description |
---|---|
static class |
ApplicationMigrationAsyncClient.Builder
Builder class for this client.
|
Modifier and Type | Field and Description |
---|---|
static Service |
SERVICE
Service instance for ApplicationMigration.
|
Constructor and Description |
---|
ApplicationMigrationAsyncClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider,
ClientConfiguration configuration,
ClientConfigurator clientConfigurator,
RequestSignerFactory defaultRequestSignerFactory)
Deprecated.
Use the
builder instead. |
ApplicationMigrationAsyncClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider,
ClientConfiguration configuration,
ClientConfigurator clientConfigurator,
RequestSignerFactory defaultRequestSignerFactory,
List<ClientConfigurator> additionalClientConfigurators)
Deprecated.
Use the
builder instead. |
ApplicationMigrationAsyncClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider,
ClientConfiguration configuration,
ClientConfigurator clientConfigurator,
RequestSignerFactory defaultRequestSignerFactory,
List<ClientConfigurator> additionalClientConfigurators,
String endpoint)
Deprecated.
Use the
builder instead. |
ApplicationMigrationAsyncClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider,
ClientConfiguration configuration,
ClientConfigurator clientConfigurator,
RequestSignerFactory defaultRequestSignerFactory,
Map<SigningStrategy,RequestSignerFactory> signingStrategyRequestSignerFactories,
List<ClientConfigurator> additionalClientConfigurators,
String endpoint)
Deprecated.
Use the
builder instead. |
ApplicationMigrationAsyncClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider)
Deprecated.
Use the
builder instead. |
ApplicationMigrationAsyncClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider,
ClientConfiguration configuration)
Deprecated.
Use the
builder instead. |
ApplicationMigrationAsyncClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider,
ClientConfiguration configuration,
ClientConfigurator clientConfigurator)
Deprecated.
Use the
builder instead. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getEndpoint, refreshClient, setEndpoint, useRealmSpecificEndpointTemplate
close
public static final Service SERVICE
Service instance for ApplicationMigration.
@Deprecated public ApplicationMigrationAsyncClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider)
builder
instead.Create a new client instance.
authenticationDetailsProvider
- The authentication details (see ApplicationMigrationAsyncClient.Builder.build(com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider)
)@Deprecated public ApplicationMigrationAsyncClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration)
builder
instead.Create a new client instance.
authenticationDetailsProvider
- The authentication details (see ApplicationMigrationAsyncClient.Builder.build(com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider)
)configuration
- ClientBuilderBase.configuration
@Deprecated public ApplicationMigrationAsyncClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator)
builder
instead.Create a new client instance.
authenticationDetailsProvider
- The authentication details (see ApplicationMigrationAsyncClient.Builder.build(com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider)
)configuration
- ClientBuilderBase.configuration
clientConfigurator
- ClientBuilderBase.clientConfigurator(com.oracle.bmc.http.ClientConfigurator)
@Deprecated public ApplicationMigrationAsyncClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory)
builder
instead.Create a new client instance.
authenticationDetailsProvider
- The authentication details (see ApplicationMigrationAsyncClient.Builder.build(com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider)
)configuration
- ClientBuilderBase.configuration
clientConfigurator
- ClientBuilderBase.clientConfigurator(com.oracle.bmc.http.ClientConfigurator)
defaultRequestSignerFactory
- ClientBuilderBase.requestSignerFactory
@Deprecated public ApplicationMigrationAsyncClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory, List<ClientConfigurator> additionalClientConfigurators)
builder
instead.Create a new client instance.
authenticationDetailsProvider
- The authentication details (see ApplicationMigrationAsyncClient.Builder.build(com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider)
)configuration
- ClientBuilderBase.configuration
clientConfigurator
- ClientBuilderBase.clientConfigurator(com.oracle.bmc.http.ClientConfigurator)
defaultRequestSignerFactory
- ClientBuilderBase.requestSignerFactory
additionalClientConfigurators
- ClientBuilderBase.additionalClientConfigurators
@Deprecated public ApplicationMigrationAsyncClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory, List<ClientConfigurator> additionalClientConfigurators, String endpoint)
builder
instead.Create a new client instance.
authenticationDetailsProvider
- The authentication details (see ApplicationMigrationAsyncClient.Builder.build(com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider)
)configuration
- ClientBuilderBase.configuration
clientConfigurator
- ClientBuilderBase.clientConfigurator(com.oracle.bmc.http.ClientConfigurator)
defaultRequestSignerFactory
- ClientBuilderBase.requestSignerFactory
additionalClientConfigurators
- ClientBuilderBase.additionalClientConfigurators
endpoint
- ClientBuilderBase.endpoint(java.lang.String)
@Deprecated public ApplicationMigrationAsyncClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory, Map<SigningStrategy,RequestSignerFactory> signingStrategyRequestSignerFactories, List<ClientConfigurator> additionalClientConfigurators, String endpoint)
builder
instead.Create a new client instance.
authenticationDetailsProvider
- The authentication details (see ApplicationMigrationAsyncClient.Builder.build(com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider)
)configuration
- ClientBuilderBase.configuration
clientConfigurator
- ClientBuilderBase.clientConfigurator(com.oracle.bmc.http.ClientConfigurator)
defaultRequestSignerFactory
- ClientBuilderBase.requestSignerFactory
additionalClientConfigurators
- ClientBuilderBase.additionalClientConfigurators
endpoint
- ClientBuilderBase.endpoint(java.lang.String)
signingStrategyRequestSignerFactories
- ClientBuilderBase.signingStrategyRequestSignerFactories
public static ApplicationMigrationAsyncClient.Builder builder()
Create a builder for this client.
public void setRegion(Region region)
ApplicationMigrationAsync
Sets the region to call (ex, Region.US_PHOENIX_1).
Note, this will call setEndpoint
after resolving the
endpoint. If the service is not available in this region, however, an
IllegalArgumentException will be raised.
setRegion
in interface ApplicationMigrationAsync
region
- The region of the service.public void setRegion(String regionId)
ApplicationMigrationAsync
Sets the region to call (ex, ‘us-phoenix-1’).
Note, this will first try to map the region ID to a known Region and call setRegion
.
If no known Region could be determined, it will create an endpoint based on the default
endpoint format (Region.formatDefaultRegionEndpoint(Service, String)
and then call setEndpoint
.
setRegion
in interface ApplicationMigrationAsync
regionId
- The public region ID.public Future<CancelWorkRequestResponse> cancelWorkRequest(CancelWorkRequestRequest request, AsyncHandler<CancelWorkRequestRequest,CancelWorkRequestResponse> handler)
ApplicationMigrationAsync
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.
cancelWorkRequest
in interface ApplicationMigrationAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<ChangeMigrationCompartmentResponse> changeMigrationCompartment(ChangeMigrationCompartmentRequest request, AsyncHandler<ChangeMigrationCompartmentRequest,ChangeMigrationCompartmentResponse> handler)
ApplicationMigrationAsync
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.
changeMigrationCompartment
in interface ApplicationMigrationAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<ChangeSourceCompartmentResponse> changeSourceCompartment(ChangeSourceCompartmentRequest request, AsyncHandler<ChangeSourceCompartmentRequest,ChangeSourceCompartmentResponse> handler)
ApplicationMigrationAsync
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.
changeSourceCompartment
in interface ApplicationMigrationAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<CreateMigrationResponse> createMigration(CreateMigrationRequest request, AsyncHandler<CreateMigrationRequest,CreateMigrationResponse> handler)
ApplicationMigrationAsync
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 CREATING
and the
state of the migration will be DISCOVERING_APPLICATION
. During this phase,
Application Migration sets the template for the serviceConfig
and
applicationConfig
fields of the migration. When this operation is complete, the state
of the migration changes to MISSING_CONFIG_VALUES
. Next, you'll need to update
the migration to provide configuration values. Before updating the migration, ensure that its
state has changed to MISSING_CONFIG_VALUES
.
To track the progress of this operation, you can monitor the status of the Create
Migration and Discover Application work requests by using the
REST
API operation on the work request or by viewing the status of the work request in the
console.getWorkRequest
createMigration
in interface ApplicationMigrationAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<CreateSourceResponse> createSource(CreateSourceRequest request, AsyncHandler<CreateSourceRequest,CreateSourceResponse> handler)
ApplicationMigrationAsync
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 CREATING
. 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 ACTIVE
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
REST
API operation on the work request or by viewing the status of the work request in the
console.
getWorkRequest
Ensure that the state of the source has changed to ACTIVE
, before you
retrieve the list of applications from the source environment using the
REST API call.listSourceApplications
createSource
in interface ApplicationMigrationAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<DeleteMigrationResponse> deleteMigration(DeleteMigrationRequest request, AsyncHandler<DeleteMigrationRequest,DeleteMigrationResponse> handler)
ApplicationMigrationAsync
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.
deleteMigration
in interface ApplicationMigrationAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<DeleteSourceResponse> deleteSource(DeleteSourceRequest request, AsyncHandler<DeleteSourceRequest,DeleteSourceResponse> handler)
ApplicationMigrationAsync
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.
deleteSource
in interface ApplicationMigrationAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<GetMigrationResponse> getMigration(GetMigrationRequest request, AsyncHandler<GetMigrationRequest,GetMigrationResponse> handler)
ApplicationMigrationAsync
Retrieves details of the specified migration.
getMigration
in interface ApplicationMigrationAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<GetSourceResponse> getSource(GetSourceRequest request, AsyncHandler<GetSourceRequest,GetSourceResponse> handler)
ApplicationMigrationAsync
Retrieves details of the specified source. Specify the OCID of the source for which you want to retrieve details.
getSource
in interface ApplicationMigrationAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<GetWorkRequestResponse> getWorkRequest(GetWorkRequestRequest request, AsyncHandler<GetWorkRequestRequest,GetWorkRequestResponse> handler)
ApplicationMigrationAsync
Gets the details of the specified work request.
getWorkRequest
in interface ApplicationMigrationAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<ListMigrationsResponse> listMigrations(ListMigrationsRequest request, AsyncHandler<ListMigrationsRequest,ListMigrationsResponse> handler)
ApplicationMigrationAsync
Retrieves details of all the migrations that are available in the specified compartment.
listMigrations
in interface ApplicationMigrationAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<ListSourceApplicationsResponse> listSourceApplications(ListSourceApplicationsRequest request, AsyncHandler<ListSourceApplicationsRequest,ListSourceApplicationsResponse> handler)
ApplicationMigrationAsync
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.
listSourceApplications
in interface ApplicationMigrationAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<ListSourcesResponse> listSources(ListSourcesRequest request, AsyncHandler<ListSourcesRequest,ListSourcesResponse> handler)
ApplicationMigrationAsync
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.
listSources
in interface ApplicationMigrationAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<ListWorkRequestErrorsResponse> listWorkRequestErrors(ListWorkRequestErrorsRequest request, AsyncHandler<ListWorkRequestErrorsRequest,ListWorkRequestErrorsResponse> handler)
ApplicationMigrationAsync
Retrieves details of the errors encountered while executing an operation that is tracked by the specified work request.
listWorkRequestErrors
in interface ApplicationMigrationAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<ListWorkRequestLogsResponse> listWorkRequestLogs(ListWorkRequestLogsRequest request, AsyncHandler<ListWorkRequestLogsRequest,ListWorkRequestLogsResponse> handler)
ApplicationMigrationAsync
Retrieves logs for the specified work request.
listWorkRequestLogs
in interface ApplicationMigrationAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<ListWorkRequestsResponse> listWorkRequests(ListWorkRequestsRequest request, AsyncHandler<ListWorkRequestsRequest,ListWorkRequestsResponse> handler)
ApplicationMigrationAsync
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.
listWorkRequests
in interface ApplicationMigrationAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<MigrateApplicationResponse> migrateApplication(MigrateApplicationRequest request, AsyncHandler<MigrateApplicationRequest,MigrateApplicationResponse> handler)
ApplicationMigrationAsync
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 READY
.
After you send this request, the migration's state will temporarily be MIGRATING
.
To track the progress of the operation, you can monitor the status of the Migrate
Application work request by using the
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 getWorkRequest
MIGRATION_SUCCEEDED
.
migrateApplication
in interface ApplicationMigrationAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<UpdateMigrationResponse> updateMigration(UpdateMigrationRequest request, AsyncHandler<UpdateMigrationRequest,UpdateMigrationResponse> handler)
ApplicationMigrationAsync
Updates the configuration details for the specified migration.
When you create a migration, Application Migration sets the template for the
serviceConfig
and applicationConfig
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:
MISSING_CONFIG_VALUES
state.
GetMigration
command. This returns
the template for the serviceConfig
and applicationConfig
attributes of the migration.
serviceConfig
and
applicationConfig
attributes. The isRequired
attribute of a
configuration property indicates whether it is mandatory to provide a value.
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](https://docs.cloud.oracle.com/iaas/application-migration/manage_migrations.htm#provide_configuration_details).
To track the progress of the operation, you can monitor the status of the Update Migration
work request by using the
REST
API operation on the work request or by viewing the status of the work request in the
console.
getWorkRequest
When the migration has been updated, the state of the migration changes to READY
. After updating the migration, you can start the migration whenever you are ready.
updateMigration
in interface ApplicationMigrationAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<UpdateSourceResponse> updateSource(UpdateSourceRequest request, AsyncHandler<UpdateSourceRequest,UpdateSourceResponse> handler)
ApplicationMigrationAsync
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.
updateSource
in interface ApplicationMigrationAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.protected ClientConfigurator getDefaultConfigurator()
public void useRealmSpecificEndpointTemplate(boolean useOfRealmSpecificEndpointTemplateEnabled)
useOfRealmSpecificEndpointTemplateEnabled
- This flag can be set to true or false to
enable or disable the use of realm-specific endpoint template respectivelypublic final void populateServiceParametersInEndpoint(String endpoint, Map<String,Object> requiredParametersMap)
endpoint
- The endpoint template in userequiredParametersMap
- Map of parameter name as key and value set in request path or
query parameter as valuepublic final void updateBaseEndpoint(String endpoint)
endpoint
- The updated endpoint to usepublic final void setEndpoint(String endpoint)
public final String getEndpoint()
public final void refreshClient()
HttpClient
. This will call ClientConfigurator
s again, and
can be used to e.g. refresh the SSL certificate.public final void close()
close
in interface AutoCloseable
protected <REQ extends BmcRequest<?>,RESP extends BmcResponse,RESP_BUILDER extends BmcResponse.Builder<RESP>> ClientCall<REQ,RESP,RESP_BUILDER> clientCall(REQ request, Supplier<RESP_BUILDER> responseBuilder)
Copyright © 2016–2023. All rights reserved.