@Generated(value="OracleSDKGenerator", comments="API Version: 20191031") public class ApplicationMigrationAsyncClient extends Object implements ApplicationMigrationAsync
Async client implementation for ApplicationMigration service.
There are two ways to use async client:
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. 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)
Creates a new service instance using the given authentication provider and client configuration.
|
ApplicationMigrationAsyncClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider,
ClientConfiguration configuration,
ClientConfigurator clientConfigurator,
RequestSignerFactory defaultRequestSignerFactory,
List<ClientConfigurator> additionalClientConfigurators)
Creates a new service instance using the given authentication provider and client configuration.
|
ApplicationMigrationAsyncClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider,
ClientConfiguration configuration,
ClientConfigurator clientConfigurator,
RequestSignerFactory defaultRequestSignerFactory,
List<ClientConfigurator> additionalClientConfigurators,
String endpoint)
Creates a new service instance using the given authentication provider and client configuration.
|
ApplicationMigrationAsyncClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider,
ClientConfiguration configuration,
ClientConfigurator clientConfigurator,
RequestSignerFactory defaultRequestSignerFactory,
Map<SigningStrategy,RequestSignerFactory> signingStrategyRequestSignerFactories,
List<ClientConfigurator> additionalClientConfigurators,
String endpoint)
Creates a new service instance using the given authentication provider and client configuration.
|
ApplicationMigrationAsyncClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider,
ClientConfiguration configuration,
ClientConfigurator clientConfigurator,
RequestSignerFactory defaultRequestSignerFactory,
Map<SigningStrategy,RequestSignerFactory> signingStrategyRequestSignerFactories,
List<ClientConfigurator> additionalClientConfigurators,
String endpoint,
com.oracle.bmc.http.internal.RestClientFactoryBuilder restClientFactoryBuilder)
Creates a new service instance using the given authentication provider and client configuration.
|
ApplicationMigrationAsyncClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider)
Creates a new service instance using the given authentication provider.
|
ApplicationMigrationAsyncClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider,
ClientConfiguration configuration)
Creates a new service instance using the given authentication provider and client configuration.
|
ApplicationMigrationAsyncClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider,
ClientConfiguration configuration,
ClientConfigurator clientConfigurator)
Creates a new service instance using the given authentication provider and client configuration.
|
public static final Service SERVICE
Service instance for ApplicationMigration.
public ApplicationMigrationAsyncClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider)
Creates a new service instance using the given authentication provider.
authenticationDetailsProvider
- The authentication details provider, required.public ApplicationMigrationAsyncClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration)
Creates a new service instance using the given authentication provider and client configuration.
authenticationDetailsProvider
- The authentication details provider, required.configuration
- The client configuration, optional.public ApplicationMigrationAsyncClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator)
Creates a new service instance using the given authentication provider and client configuration. Additionally, a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization.
authenticationDetailsProvider
- The authentication details provider, required.configuration
- The client configuration, optional.clientConfigurator
- ClientConfigurator that will be invoked for additional configuration of a REST client, optional.public ApplicationMigrationAsyncClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory)
Creates a new service instance using the given authentication provider and client configuration. Additionally, a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization.
This is an advanced constructor for clients that want to take control over how requests are signed.
authenticationDetailsProvider
- The authentication details provider, required.configuration
- The client configuration, optional.clientConfigurator
- ClientConfigurator that will be invoked for additional configuration of a REST client, optional.defaultRequestSignerFactory
- The request signer factory used to create the request signer for this service.public ApplicationMigrationAsyncClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory, List<ClientConfigurator> additionalClientConfigurators)
Creates a new service instance using the given authentication provider and client configuration. Additionally, a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization.
This is an advanced constructor for clients that want to take control over how requests are signed.
authenticationDetailsProvider
- The authentication details provider, required.configuration
- The client configuration, optional.clientConfigurator
- ClientConfigurator that will be invoked for additional configuration of a REST client, optional.defaultRequestSignerFactory
- The request signer factory used to create the request signer for this service.additionalClientConfigurators
- Additional client configurators to be run after the primary configurator.public ApplicationMigrationAsyncClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory, List<ClientConfigurator> additionalClientConfigurators, String endpoint)
Creates a new service instance using the given authentication provider and client configuration. Additionally, a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization.
This is an advanced constructor for clients that want to take control over how requests are signed.
authenticationDetailsProvider
- The authentication details provider, required.configuration
- The client configuration, optional.clientConfigurator
- ClientConfigurator that will be invoked for additional configuration of a REST client, optional.defaultRequestSignerFactory
- The request signer factory used to create the request signer for this service.additionalClientConfigurators
- Additional client configurators to be run after the primary configurator.endpoint
- Endpoint, or null to leave unset (note, may be overridden by authenticationDetailsProvider
)public ApplicationMigrationAsyncClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory, Map<SigningStrategy,RequestSignerFactory> signingStrategyRequestSignerFactories, List<ClientConfigurator> additionalClientConfigurators, String endpoint)
Creates a new service instance using the given authentication provider and client configuration. Additionally, a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization.
This is an advanced constructor for clients that want to take control over how requests are signed.
authenticationDetailsProvider
- The authentication details provider, required.configuration
- The client configuration, optional.clientConfigurator
- ClientConfigurator that will be invoked for additional configuration of a REST client, optional.defaultRequestSignerFactory
- The request signer factory used to create the request signer for this service.signingStrategyRequestSignerFactories
- The request signer factories for each signing strategy used to create the request signeradditionalClientConfigurators
- Additional client configurators to be run after the primary configurator.endpoint
- Endpoint, or null to leave unset (note, may be overridden by authenticationDetailsProvider
)public ApplicationMigrationAsyncClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory, Map<SigningStrategy,RequestSignerFactory> signingStrategyRequestSignerFactories, List<ClientConfigurator> additionalClientConfigurators, String endpoint, com.oracle.bmc.http.internal.RestClientFactoryBuilder restClientFactoryBuilder)
Creates a new service instance using the given authentication provider and client configuration. Additionally, a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization.
This is an advanced constructor for clients that want to take control over how requests are signed.
authenticationDetailsProvider
- The authentication details provider, required.configuration
- The client configuration, optional.clientConfigurator
- ClientConfigurator that will be invoked for additional configuration of a REST client, optional.defaultRequestSignerFactory
- The request signer factory used to create the request signer for this service.signingStrategyRequestSignerFactories
- The request signer factories for each signing strategy used to create the request signeradditionalClientConfigurators
- Additional client configurators to be run after the primary configurator.endpoint
- Endpoint, or null to leave unset (note, may be overridden by authenticationDetailsProvider
)restClientFactoryBuilder
- the builder for the RestClientFactory
public static ApplicationMigrationAsyncClient.Builder builder()
Create a builder for this client.
public void setEndpoint(String endpoint)
ApplicationMigrationAsync
Sets the endpoint to call (ex, https://www.example.com).
setEndpoint
in interface ApplicationMigrationAsync
endpoint
- The endpoint of the serice.public String getEndpoint()
ApplicationMigrationAsync
Gets the set endpoint for REST call (ex, https://www.example.com)
getEndpoint
in interface ApplicationMigrationAsync
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 void close()
close
in interface AutoCloseable
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.Copyright © 2016–2021. All rights reserved.