@Generated(value="OracleSDKGenerator", comments="API Version: 20210216") public class DatabaseRecoveryAsyncClient extends Object implements DatabaseRecoveryAsync
Async client implementation for DatabaseRecovery 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 |
DatabaseRecoveryAsyncClient.Builder
Builder class for this client.
|
Modifier and Type | Field and Description |
---|---|
static Service |
SERVICE
Service instance for DatabaseRecovery.
|
Constructor and Description |
---|
DatabaseRecoveryAsyncClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider,
ClientConfiguration configuration,
ClientConfigurator clientConfigurator,
RequestSignerFactory defaultRequestSignerFactory)
Creates a new service instance using the given authentication provider and client configuration.
|
DatabaseRecoveryAsyncClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider,
ClientConfiguration configuration,
ClientConfigurator clientConfigurator,
RequestSignerFactory defaultRequestSignerFactory,
List<ClientConfigurator> additionalClientConfigurators)
Creates a new service instance using the given authentication provider and client configuration.
|
DatabaseRecoveryAsyncClient(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.
|
DatabaseRecoveryAsyncClient(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.
|
DatabaseRecoveryAsyncClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider,
ClientConfiguration configuration,
ClientConfigurator clientConfigurator,
RequestSignerFactory defaultRequestSignerFactory,
Map<SigningStrategy,RequestSignerFactory> signingStrategyRequestSignerFactories,
List<ClientConfigurator> additionalClientConfigurators,
String endpoint,
RestClientFactoryBuilder restClientFactoryBuilder)
Creates a new service instance using the given authentication provider and client configuration.
|
DatabaseRecoveryAsyncClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider)
Creates a new service instance using the given authentication provider.
|
DatabaseRecoveryAsyncClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider,
ClientConfiguration configuration)
Creates a new service instance using the given authentication provider and client configuration.
|
DatabaseRecoveryAsyncClient(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 DatabaseRecovery.
public DatabaseRecoveryAsyncClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider)
Creates a new service instance using the given authentication provider.
authenticationDetailsProvider
- The authentication details provider, required.public DatabaseRecoveryAsyncClient(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 DatabaseRecoveryAsyncClient(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 DatabaseRecoveryAsyncClient(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 DatabaseRecoveryAsyncClient(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 DatabaseRecoveryAsyncClient(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 DatabaseRecoveryAsyncClient(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 DatabaseRecoveryAsyncClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory, Map<SigningStrategy,RequestSignerFactory> signingStrategyRequestSignerFactories, List<ClientConfigurator> additionalClientConfigurators, String endpoint, 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 DatabaseRecoveryAsyncClient.Builder builder()
Create a builder for this client.
public void refreshClient()
DatabaseRecoveryAsync
Rebuilds the client from scratch. Useful to refresh certificates.
refreshClient
in interface DatabaseRecoveryAsync
public void setEndpoint(String endpoint)
DatabaseRecoveryAsync
Sets the endpoint to call (ex, https://www.example.com).
setEndpoint
in interface DatabaseRecoveryAsync
endpoint
- The endpoint of the serice.public String getEndpoint()
DatabaseRecoveryAsync
Gets the set endpoint for REST call (ex, https://www.example.com)
getEndpoint
in interface DatabaseRecoveryAsync
public void setRegion(Region region)
DatabaseRecoveryAsync
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 DatabaseRecoveryAsync
region
- The region of the service.public void setRegion(String regionId)
DatabaseRecoveryAsync
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 DatabaseRecoveryAsync
regionId
- The public region ID.public void useRealmSpecificEndpointTemplate(boolean useOfRealmSpecificEndpointTemplateEnabled)
This method should be used to enable or disable the use of realm-specific endpoint template. The default value is null. To enable the use of endpoint template defined for the realm in use, set the flag to true To disable the use of endpoint template defined for the realm in use, set the flag to false
useRealmSpecificEndpointTemplate
in interface DatabaseRecoveryAsync
useOfRealmSpecificEndpointTemplateEnabled
- This flag can be set to true or false to
enable or disable the use of realm-specific endpoint template respectivelypublic void close()
close
in interface AutoCloseable
public Future<CancelProtectedDatabaseDeletionResponse> cancelProtectedDatabaseDeletion(CancelProtectedDatabaseDeletionRequest request, AsyncHandler<CancelProtectedDatabaseDeletionRequest,CancelProtectedDatabaseDeletionResponse> handler)
DatabaseRecoveryAsync
Cancels the scheduled deletion of a protected database, and returns the protected database to an ACTIVE state. You can cancel the deletion only if the protected database is in the DELETE SCHEDULED state.
cancelProtectedDatabaseDeletion
in interface DatabaseRecoveryAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<ChangeProtectedDatabaseCompartmentResponse> changeProtectedDatabaseCompartment(ChangeProtectedDatabaseCompartmentRequest request, AsyncHandler<ChangeProtectedDatabaseCompartmentRequest,ChangeProtectedDatabaseCompartmentResponse> handler)
DatabaseRecoveryAsync
Moves a protected database resource from the existing compartment to the specified compartment. When provided, If-Match is checked against ETag values of the resource.
changeProtectedDatabaseCompartment
in interface DatabaseRecoveryAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<ChangeProtectedDatabaseSubscriptionResponse> changeProtectedDatabaseSubscription(ChangeProtectedDatabaseSubscriptionRequest request, AsyncHandler<ChangeProtectedDatabaseSubscriptionRequest,ChangeProtectedDatabaseSubscriptionResponse> handler)
DatabaseRecoveryAsync
Associates the protected database with a new cloud service environment, such as Microsoft Azure.
changeProtectedDatabaseSubscription
in interface DatabaseRecoveryAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<ChangeProtectionPolicyCompartmentResponse> changeProtectionPolicyCompartment(ChangeProtectionPolicyCompartmentRequest request, AsyncHandler<ChangeProtectionPolicyCompartmentRequest,ChangeProtectionPolicyCompartmentResponse> handler)
DatabaseRecoveryAsync
Moves a protection policy resource from the existing compartment to the specified compartment. When provided, If-Match is checked against ETag values of the resource.
changeProtectionPolicyCompartment
in interface DatabaseRecoveryAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<ChangeRecoveryServiceSubnetCompartmentResponse> changeRecoveryServiceSubnetCompartment(ChangeRecoveryServiceSubnetCompartmentRequest request, AsyncHandler<ChangeRecoveryServiceSubnetCompartmentRequest,ChangeRecoveryServiceSubnetCompartmentResponse> handler)
DatabaseRecoveryAsync
Moves a recovery service subnet resource from the existing compartment to the specified compartment. When provided, If-Match is checked against ETag values of the resource.
changeRecoveryServiceSubnetCompartment
in interface DatabaseRecoveryAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<CreateProtectedDatabaseResponse> createProtectedDatabase(CreateProtectedDatabaseRequest request, AsyncHandler<CreateProtectedDatabaseRequest,CreateProtectedDatabaseResponse> handler)
DatabaseRecoveryAsync
Creates a new Protected Database.
createProtectedDatabase
in interface DatabaseRecoveryAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<CreateProtectionPolicyResponse> createProtectionPolicy(CreateProtectionPolicyRequest request, AsyncHandler<CreateProtectionPolicyRequest,CreateProtectionPolicyResponse> handler)
DatabaseRecoveryAsync
Creates a new Protection Policy.
createProtectionPolicy
in interface DatabaseRecoveryAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<CreateRecoveryServiceSubnetResponse> createRecoveryServiceSubnet(CreateRecoveryServiceSubnetRequest request, AsyncHandler<CreateRecoveryServiceSubnetRequest,CreateRecoveryServiceSubnetResponse> handler)
DatabaseRecoveryAsync
Creates a new Recovery Service Subnet.
createRecoveryServiceSubnet
in interface DatabaseRecoveryAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<DeleteProtectedDatabaseResponse> deleteProtectedDatabase(DeleteProtectedDatabaseRequest request, AsyncHandler<DeleteProtectedDatabaseRequest,DeleteProtectedDatabaseResponse> handler)
DatabaseRecoveryAsync
Deletes a protected database based on the specified protected database ID.
deleteProtectedDatabase
in interface DatabaseRecoveryAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<DeleteProtectionPolicyResponse> deleteProtectionPolicy(DeleteProtectionPolicyRequest request, AsyncHandler<DeleteProtectionPolicyRequest,DeleteProtectionPolicyResponse> handler)
DatabaseRecoveryAsync
Deletes a specified protection policy. You can delete custom policies only. Deleting a Oracle predefined policies will result in status code 405 Method Not Allowed.
deleteProtectionPolicy
in interface DatabaseRecoveryAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<DeleteRecoveryServiceSubnetResponse> deleteRecoveryServiceSubnet(DeleteRecoveryServiceSubnetRequest request, AsyncHandler<DeleteRecoveryServiceSubnetRequest,DeleteRecoveryServiceSubnetResponse> handler)
DatabaseRecoveryAsync
Deletes a specified recovery service subnet.
deleteRecoveryServiceSubnet
in interface DatabaseRecoveryAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<FetchProtectedDatabaseConfigurationResponse> fetchProtectedDatabaseConfiguration(FetchProtectedDatabaseConfigurationRequest request, AsyncHandler<FetchProtectedDatabaseConfigurationRequest,FetchProtectedDatabaseConfigurationResponse> handler)
DatabaseRecoveryAsync
Downloads the network service configuration file ‘tnsnames.ora’ for a specified protected database. Applies to user-defined recovery systems only.
fetchProtectedDatabaseConfiguration
in interface DatabaseRecoveryAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<GetProtectedDatabaseResponse> getProtectedDatabase(GetProtectedDatabaseRequest request, AsyncHandler<GetProtectedDatabaseRequest,GetProtectedDatabaseResponse> handler)
DatabaseRecoveryAsync
Gets information about a specified protected database.
getProtectedDatabase
in interface DatabaseRecoveryAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<GetProtectionPolicyResponse> getProtectionPolicy(GetProtectionPolicyRequest request, AsyncHandler<GetProtectionPolicyRequest,GetProtectionPolicyResponse> handler)
DatabaseRecoveryAsync
Gets information about a specified protection policy.
getProtectionPolicy
in interface DatabaseRecoveryAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<GetRecoveryServiceSubnetResponse> getRecoveryServiceSubnet(GetRecoveryServiceSubnetRequest request, AsyncHandler<GetRecoveryServiceSubnetRequest,GetRecoveryServiceSubnetResponse> handler)
DatabaseRecoveryAsync
Gets information about a specified recovery service subnet.
getRecoveryServiceSubnet
in interface DatabaseRecoveryAsync
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)
DatabaseRecoveryAsync
Gets the status of the work request based on the specified ID
getWorkRequest
in interface DatabaseRecoveryAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<ListProtectedDatabasesResponse> listProtectedDatabases(ListProtectedDatabasesRequest request, AsyncHandler<ListProtectedDatabasesRequest,ListProtectedDatabasesResponse> handler)
DatabaseRecoveryAsync
Lists the protected databases based on the specified parameters.
listProtectedDatabases
in interface DatabaseRecoveryAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<ListProtectionPoliciesResponse> listProtectionPolicies(ListProtectionPoliciesRequest request, AsyncHandler<ListProtectionPoliciesRequest,ListProtectionPoliciesResponse> handler)
DatabaseRecoveryAsync
Gets a list of protection policies based on the specified parameters.
listProtectionPolicies
in interface DatabaseRecoveryAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<ListRecoveryServiceSubnetsResponse> listRecoveryServiceSubnets(ListRecoveryServiceSubnetsRequest request, AsyncHandler<ListRecoveryServiceSubnetsRequest,ListRecoveryServiceSubnetsResponse> handler)
DatabaseRecoveryAsync
Returns a list of Recovery Service Subnets.
listRecoveryServiceSubnets
in interface DatabaseRecoveryAsync
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)
DatabaseRecoveryAsync
Return a (paginated) list of errors for a given work request.
listWorkRequestErrors
in interface DatabaseRecoveryAsync
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)
DatabaseRecoveryAsync
Return a (paginated) list of logs for a given work request.
listWorkRequestLogs
in interface DatabaseRecoveryAsync
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)
DatabaseRecoveryAsync
Lists the work requests in a compartment.
listWorkRequests
in interface DatabaseRecoveryAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<ScheduleProtectedDatabaseDeletionResponse> scheduleProtectedDatabaseDeletion(ScheduleProtectedDatabaseDeletionRequest request, AsyncHandler<ScheduleProtectedDatabaseDeletionRequest,ScheduleProtectedDatabaseDeletionResponse> handler)
DatabaseRecoveryAsync
Defines a preferred schedule to delete a protected database after you terminate the source database. The default schedule is DELETE_AFTER_72_HOURS, so that the delete operation can occur 72 hours (3 days) after the source database is terminated. The alternate schedule is DELETE_AFTER_RETENTION_PERIOD. Specify this option if you want to delete a protected database only after the policy-defined backup retention period expires.
scheduleProtectedDatabaseDeletion
in interface DatabaseRecoveryAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<UpdateProtectedDatabaseResponse> updateProtectedDatabase(UpdateProtectedDatabaseRequest request, AsyncHandler<UpdateProtectedDatabaseRequest,UpdateProtectedDatabaseResponse> handler)
DatabaseRecoveryAsync
Updates the Protected Database
updateProtectedDatabase
in interface DatabaseRecoveryAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<UpdateProtectionPolicyResponse> updateProtectionPolicy(UpdateProtectionPolicyRequest request, AsyncHandler<UpdateProtectionPolicyRequest,UpdateProtectionPolicyResponse> handler)
DatabaseRecoveryAsync
Updates the specified protection policy.
updateProtectionPolicy
in interface DatabaseRecoveryAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<UpdateRecoveryServiceSubnetResponse> updateRecoveryServiceSubnet(UpdateRecoveryServiceSubnetRequest request, AsyncHandler<UpdateRecoveryServiceSubnetRequest,UpdateRecoveryServiceSubnetResponse> handler)
DatabaseRecoveryAsync
Updates the specified recovery service subnet.
updateRecoveryServiceSubnet
in interface DatabaseRecoveryAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Copyright © 2016–2024. All rights reserved.