com.amazonaws.services.rds.AmazonRDSAsyncClient Maven / Gradle / Ivy
/*
* Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
package com.amazonaws.services.rds;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import com.amazonaws.AmazonClientException;
import com.amazonaws.AmazonServiceException;
import com.amazonaws.handlers.AsyncHandler;
import com.amazonaws.ClientConfiguration;
import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.AWSCredentialsProvider;
import com.amazonaws.auth.DefaultAWSCredentialsProviderChain;
import com.amazonaws.services.rds.model.*;
/**
* Asynchronous client for accessing AmazonRDS.
* All asynchronous calls made using this client are non-blocking. Callers could either
* process the result and handle the exceptions in the worker thread by providing a callback handler
* when making the call, or use the returned Future object to check the result of the call in the calling thread.
* Amazon Relational Database Service
* Amazon Relational Database Service (Amazon RDS) is a web service that makes it easier to set up, operate, and scale a relational database in the
* cloud. It provides cost-efficient, resizable capacity for an industry-standard relational database and manages common database administration tasks,
* freeing up developers to focus on what makes their applications and businesses unique.
*
*
* Amazon RDS gives you access to the capabilities of a familiar MySQL or Oracle database server. This means the code, applications, and tools you
* already use today with your existing MySQL or Oracle databases work with Amazon RDS without modification. Amazon RDS automatically backs up your
* database and maintains the database software that powers your DB Instance. Amazon RDS is flexible: you can scale your database instance's compute
* resources and storage capacity to meet your application's demand. As with all Amazon Web Services, there are no up-front investments, and you pay only
* for the resources you use.
*
*
* This is the Amazon RDS API Reference . It contains a comprehensive description of all Amazon RDS Query APIs and data types. Note that this API
* is asynchronous and some actions may require polling to determine when an action has been applied. See the parameter description to determine if a
* change is applied immediately or on the next instance reboot or during the maintenance window. To get started with Amazon RDS, go to the Amazon RDS Getting Started Guide . For more information on Amazon
* RDS concepts and usage scenarios, go to the Amazon RDS User Guide .
*
*/
public class AmazonRDSAsyncClient extends AmazonRDSClient
implements AmazonRDSAsync {
/**
* Executor service for executing asynchronous requests.
*/
private ExecutorService executorService;
/**
* Constructs a new asynchronous client to invoke service methods on
* AmazonRDS. A credentials provider chain will be used
* that searches for credentials in this order:
*
* - Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_KEY
* - Java System Properties - aws.accessKeyId and aws.secretKey
* - Instance profile credentials delivered through the Amazon EC2 metadata service
*
*
*
* All service calls made using this new client object are blocking, and will not
* return until the service call completes.
*
* @see DefaultAWSCredentialsProvider
*/
public AmazonRDSAsyncClient() {
this(new DefaultAWSCredentialsProviderChain());
}
/**
* Constructs a new asynchronous client to invoke service methods on
* AmazonRDS. A credentials provider chain will be used
* that searches for credentials in this order:
*
* - Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_KEY
* - Java System Properties - aws.accessKeyId and aws.secretKey
* - Instance profile credentials delivered through the Amazon EC2 metadata service
*
*
*
* All service calls made using this new client object are blocking, and will not
* return until the service call completes.
*
* @param clientConfiguration The client configuration options controlling how this
* client connects to AmazonRDS
* (ex: proxy settings, retry counts, etc.).
*
* @see DefaultAWSCredentialsProvider
*/
public AmazonRDSAsyncClient(ClientConfiguration clientConfiguration) {
this(new DefaultAWSCredentialsProviderChain(), clientConfiguration, Executors.newCachedThreadPool());
}
/**
* Constructs a new asynchronous client to invoke service methods on
* AmazonRDS using the specified AWS account credentials.
* Default client settings will be used, and a default cached thread pool will be
* created for executing the asynchronous tasks.
*
*
* All calls made using this new client object are non-blocking, and will immediately
* return a Java Future object that the caller can later check to see if the service
* call has actually completed.
*
* @param awsCredentials The AWS credentials (access key ID and secret key) to use
* when authenticating with AWS services.
*/
public AmazonRDSAsyncClient(AWSCredentials awsCredentials) {
this(awsCredentials, Executors.newCachedThreadPool());
}
/**
* Constructs a new asynchronous client to invoke service methods on
* AmazonRDS using the specified AWS account credentials
* and executor service. Default client settings will be used.
*
*
* All calls made using this new client object are non-blocking, and will immediately
* return a Java Future object that the caller can later check to see if the service
* call has actually completed.
*
* @param awsCredentials
* The AWS credentials (access key ID and secret key) to use
* when authenticating with AWS services.
* @param executorService
* The executor service by which all asynchronous requests will
* be executed.
*/
public AmazonRDSAsyncClient(AWSCredentials awsCredentials, ExecutorService executorService) {
super(awsCredentials);
this.executorService = executorService;
}
/**
* Constructs a new asynchronous client to invoke service methods on
* AmazonRDS using the specified AWS account credentials,
* executor service, and client configuration options.
*
*
* All calls made using this new client object are non-blocking, and will immediately
* return a Java Future object that the caller can later check to see if the service
* call has actually completed.
*
* @param awsCredentials
* The AWS credentials (access key ID and secret key) to use
* when authenticating with AWS services.
* @param clientConfiguration
* Client configuration options (ex: max retry limit, proxy
* settings, etc).
* @param executorService
* The executor service by which all asynchronous requests will
* be executed.
*/
public AmazonRDSAsyncClient(AWSCredentials awsCredentials,
ClientConfiguration clientConfiguration, ExecutorService executorService) {
super(awsCredentials, clientConfiguration);
this.executorService = executorService;
}
/**
* Constructs a new asynchronous client to invoke service methods on
* AmazonRDS using the specified AWS account credentials provider.
* Default client settings will be used, and a default cached thread pool will be
* created for executing the asynchronous tasks.
*
*
* All calls made using this new client object are non-blocking, and will immediately
* return a Java Future object that the caller can later check to see if the service
* call has actually completed.
*
* @param awsCredentialsProvider
* The AWS credentials provider which will provide credentials
* to authenticate requests with AWS services.
*/
public AmazonRDSAsyncClient(AWSCredentialsProvider awsCredentialsProvider) {
this(awsCredentialsProvider, Executors.newCachedThreadPool());
}
/**
* Constructs a new asynchronous client to invoke service methods on
* AmazonRDS using the specified AWS account credentials provider
* and executor service. Default client settings will be used.
*
*
* All calls made using this new client object are non-blocking, and will immediately
* return a Java Future object that the caller can later check to see if the service
* call has actually completed.
*
* @param awsCredentialsProvider
* The AWS credentials provider which will provide credentials
* to authenticate requests with AWS services.
* @param executorService
* The executor service by which all asynchronous requests will
* be executed.
*/
public AmazonRDSAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ExecutorService executorService) {
this(awsCredentialsProvider, new ClientConfiguration(), executorService);
}
/**
* Constructs a new asynchronous client to invoke service methods on
* AmazonRDS using the specified AWS account credentials
* provider and client configuration options.
*
*
* All calls made using this new client object are non-blocking, and will immediately
* return a Java Future object that the caller can later check to see if the service
* call has actually completed.
*
* @param awsCredentialsProvider
* The AWS credentials provider which will provide credentials
* to authenticate requests with AWS services.
* @param clientConfiguration
* Client configuration options (ex: max retry limit, proxy
* settings, etc).
*/
public AmazonRDSAsyncClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration) {
this(awsCredentialsProvider, clientConfiguration, Executors.newCachedThreadPool());
}
/**
* Constructs a new asynchronous client to invoke service methods on
* AmazonRDS using the specified AWS account credentials
* provider, executor service, and client configuration options.
*
*
* All calls made using this new client object are non-blocking, and will immediately
* return a Java Future object that the caller can later check to see if the service
* call has actually completed.
*
* @param awsCredentialsProvider
* The AWS credentials provider which will provide credentials
* to authenticate requests with AWS services.
* @param clientConfiguration
* Client configuration options (ex: max retry limit, proxy
* settings, etc).
* @param executorService
* The executor service by which all asynchronous requests will
* be executed.
*/
public AmazonRDSAsyncClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration, ExecutorService executorService) {
super(awsCredentialsProvider, clientConfiguration);
this.executorService = executorService;
}
/**
* Returns the executor service used by this async client to execute
* requests.
*
* @return The executor service used by this async client to execute
* requests.
*/
public ExecutorService getExecutorService() {
return executorService;
}
/**
* Shuts down the client, releasing all managed resources. This includes
* forcibly terminating all pending asynchronous service calls. Clients who
* wish to give pending asynchronous service calls time to complete should
* call getExecutorService().shutdown() prior to calling this method.
*/
@Override
public void shutdown() {
super.shutdown();
executorService.shutdownNow();
}
/**
*
* Revokes ingress from a DBSecurityGroup for previously authorized IP
* ranges or EC2 or VPC Security Groups. Required parameters for this API
* are one of CIDRIP, EC2SecurityGroupId for VPC, or
* (EC2SecurityGroupOwnerId and either EC2SecurityGroupName or
* EC2SecurityGroupId).
*
*
* @param revokeDBSecurityGroupIngressRequest Container for the necessary
* parameters to execute the RevokeDBSecurityGroupIngress operation on
* AmazonRDS.
*
* @return A Java Future object containing the response from the
* RevokeDBSecurityGroupIngress service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future revokeDBSecurityGroupIngressAsync(final RevokeDBSecurityGroupIngressRequest revokeDBSecurityGroupIngressRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DBSecurityGroup call() throws Exception {
return revokeDBSecurityGroupIngress(revokeDBSecurityGroupIngressRequest);
}
});
}
/**
*
* Revokes ingress from a DBSecurityGroup for previously authorized IP
* ranges or EC2 or VPC Security Groups. Required parameters for this API
* are one of CIDRIP, EC2SecurityGroupId for VPC, or
* (EC2SecurityGroupOwnerId and either EC2SecurityGroupName or
* EC2SecurityGroupId).
*
*
* @param revokeDBSecurityGroupIngressRequest Container for the necessary
* parameters to execute the RevokeDBSecurityGroupIngress operation on
* AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* RevokeDBSecurityGroupIngress service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future revokeDBSecurityGroupIngressAsync(
final RevokeDBSecurityGroupIngressRequest revokeDBSecurityGroupIngressRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DBSecurityGroup call() throws Exception {
DBSecurityGroup result;
try {
result = revokeDBSecurityGroupIngress(revokeDBSecurityGroupIngressRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(revokeDBSecurityGroupIngressRequest, result);
return result;
}
});
}
/**
*
* Lists available reserved DB Instance offerings.
*
*
* @param describeReservedDBInstancesOfferingsRequest Container for the
* necessary parameters to execute the
* DescribeReservedDBInstancesOfferings operation on AmazonRDS.
*
* @return A Java Future object containing the response from the
* DescribeReservedDBInstancesOfferings service method, as returned by
* AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future describeReservedDBInstancesOfferingsAsync(final DescribeReservedDBInstancesOfferingsRequest describeReservedDBInstancesOfferingsRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DescribeReservedDBInstancesOfferingsResult call() throws Exception {
return describeReservedDBInstancesOfferings(describeReservedDBInstancesOfferingsRequest);
}
});
}
/**
*
* Lists available reserved DB Instance offerings.
*
*
* @param describeReservedDBInstancesOfferingsRequest Container for the
* necessary parameters to execute the
* DescribeReservedDBInstancesOfferings operation on AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* DescribeReservedDBInstancesOfferings service method, as returned by
* AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future describeReservedDBInstancesOfferingsAsync(
final DescribeReservedDBInstancesOfferingsRequest describeReservedDBInstancesOfferingsRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DescribeReservedDBInstancesOfferingsResult call() throws Exception {
DescribeReservedDBInstancesOfferingsResult result;
try {
result = describeReservedDBInstancesOfferings(describeReservedDBInstancesOfferingsRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(describeReservedDBInstancesOfferingsRequest, result);
return result;
}
});
}
/**
*
* Returns information about provisioned RDS instances. This API
* supports pagination.
*
*
* @param describeDBInstancesRequest Container for the necessary
* parameters to execute the DescribeDBInstances operation on AmazonRDS.
*
* @return A Java Future object containing the response from the
* DescribeDBInstances service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future describeDBInstancesAsync(final DescribeDBInstancesRequest describeDBInstancesRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DescribeDBInstancesResult call() throws Exception {
return describeDBInstances(describeDBInstancesRequest);
}
});
}
/**
*
* Returns information about provisioned RDS instances. This API
* supports pagination.
*
*
* @param describeDBInstancesRequest Container for the necessary
* parameters to execute the DescribeDBInstances operation on AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* DescribeDBInstances service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future describeDBInstancesAsync(
final DescribeDBInstancesRequest describeDBInstancesRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DescribeDBInstancesResult call() throws Exception {
DescribeDBInstancesResult result;
try {
result = describeDBInstances(describeDBInstancesRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(describeDBInstancesRequest, result);
return result;
}
});
}
/**
*
* Returns a list of the available DB engines.
*
*
* @param describeDBEngineVersionsRequest Container for the necessary
* parameters to execute the DescribeDBEngineVersions operation on
* AmazonRDS.
*
* @return A Java Future object containing the response from the
* DescribeDBEngineVersions service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future describeDBEngineVersionsAsync(final DescribeDBEngineVersionsRequest describeDBEngineVersionsRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DescribeDBEngineVersionsResult call() throws Exception {
return describeDBEngineVersions(describeDBEngineVersionsRequest);
}
});
}
/**
*
* Returns a list of the available DB engines.
*
*
* @param describeDBEngineVersionsRequest Container for the necessary
* parameters to execute the DescribeDBEngineVersions operation on
* AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* DescribeDBEngineVersions service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future describeDBEngineVersionsAsync(
final DescribeDBEngineVersionsRequest describeDBEngineVersionsRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DescribeDBEngineVersionsResult call() throws Exception {
DescribeDBEngineVersionsResult result;
try {
result = describeDBEngineVersions(describeDBEngineVersionsRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(describeDBEngineVersionsRequest, result);
return result;
}
});
}
/**
*
* Describes the available option groups.
*
*
* @param describeOptionGroupsRequest Container for the necessary
* parameters to execute the DescribeOptionGroups operation on AmazonRDS.
*
* @return A Java Future object containing the response from the
* DescribeOptionGroups service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future describeOptionGroupsAsync(final DescribeOptionGroupsRequest describeOptionGroupsRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DescribeOptionGroupsResult call() throws Exception {
return describeOptionGroups(describeOptionGroupsRequest);
}
});
}
/**
*
* Describes the available option groups.
*
*
* @param describeOptionGroupsRequest Container for the necessary
* parameters to execute the DescribeOptionGroups operation on AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* DescribeOptionGroups service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future describeOptionGroupsAsync(
final DescribeOptionGroupsRequest describeOptionGroupsRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DescribeOptionGroupsResult call() throws Exception {
DescribeOptionGroupsResult result;
try {
result = describeOptionGroups(describeOptionGroupsRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(describeOptionGroupsRequest, result);
return result;
}
});
}
/**
*
* Returns a list of DBSecurityGroup descriptions. If a
* DBSecurityGroupName is specified, the list will contain only the
* descriptions of the specified DBSecurityGroup.
*
*
* For an overview of CIDR ranges, go to the
* Wikipedia Tutorial .
*
*
* @param describeDBSecurityGroupsRequest Container for the necessary
* parameters to execute the DescribeDBSecurityGroups operation on
* AmazonRDS.
*
* @return A Java Future object containing the response from the
* DescribeDBSecurityGroups service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future describeDBSecurityGroupsAsync(final DescribeDBSecurityGroupsRequest describeDBSecurityGroupsRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DescribeDBSecurityGroupsResult call() throws Exception {
return describeDBSecurityGroups(describeDBSecurityGroupsRequest);
}
});
}
/**
*
* Returns a list of DBSecurityGroup descriptions. If a
* DBSecurityGroupName is specified, the list will contain only the
* descriptions of the specified DBSecurityGroup.
*
*
* For an overview of CIDR ranges, go to the
* Wikipedia Tutorial .
*
*
* @param describeDBSecurityGroupsRequest Container for the necessary
* parameters to execute the DescribeDBSecurityGroups operation on
* AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* DescribeDBSecurityGroups service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future describeDBSecurityGroupsAsync(
final DescribeDBSecurityGroupsRequest describeDBSecurityGroupsRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DescribeDBSecurityGroupsResult call() throws Exception {
DescribeDBSecurityGroupsResult result;
try {
result = describeDBSecurityGroups(describeDBSecurityGroupsRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(describeDBSecurityGroupsRequest, result);
return result;
}
});
}
/**
*
* Copies the specified DBSnapshot. The source DBSnapshot must be in the
* "available" state.
*
*
* @param copyDBSnapshotRequest Container for the necessary parameters to
* execute the CopyDBSnapshot operation on AmazonRDS.
*
* @return A Java Future object containing the response from the
* CopyDBSnapshot service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future copyDBSnapshotAsync(final CopyDBSnapshotRequest copyDBSnapshotRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DBSnapshot call() throws Exception {
return copyDBSnapshot(copyDBSnapshotRequest);
}
});
}
/**
*
* Copies the specified DBSnapshot. The source DBSnapshot must be in the
* "available" state.
*
*
* @param copyDBSnapshotRequest Container for the necessary parameters to
* execute the CopyDBSnapshot operation on AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* CopyDBSnapshot service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future copyDBSnapshotAsync(
final CopyDBSnapshotRequest copyDBSnapshotRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DBSnapshot call() throws Exception {
DBSnapshot result;
try {
result = copyDBSnapshot(copyDBSnapshotRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(copyDBSnapshotRequest, result);
return result;
}
});
}
/**
*
* Returns a list of orderable DB Instance options for the specified
* engine.
*
*
* @param describeOrderableDBInstanceOptionsRequest Container for the
* necessary parameters to execute the DescribeOrderableDBInstanceOptions
* operation on AmazonRDS.
*
* @return A Java Future object containing the response from the
* DescribeOrderableDBInstanceOptions service method, as returned by
* AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future describeOrderableDBInstanceOptionsAsync(final DescribeOrderableDBInstanceOptionsRequest describeOrderableDBInstanceOptionsRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DescribeOrderableDBInstanceOptionsResult call() throws Exception {
return describeOrderableDBInstanceOptions(describeOrderableDBInstanceOptionsRequest);
}
});
}
/**
*
* Returns a list of orderable DB Instance options for the specified
* engine.
*
*
* @param describeOrderableDBInstanceOptionsRequest Container for the
* necessary parameters to execute the DescribeOrderableDBInstanceOptions
* operation on AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* DescribeOrderableDBInstanceOptions service method, as returned by
* AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future describeOrderableDBInstanceOptionsAsync(
final DescribeOrderableDBInstanceOptionsRequest describeOrderableDBInstanceOptionsRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DescribeOrderableDBInstanceOptionsResult call() throws Exception {
DescribeOrderableDBInstanceOptionsResult result;
try {
result = describeOrderableDBInstanceOptions(describeOrderableDBInstanceOptionsRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(describeOrderableDBInstanceOptionsRequest, result);
return result;
}
});
}
/**
*
* Promotes a Read Replica DB Instance to a standalone DB Instance.
*
*
* @param promoteReadReplicaRequest Container for the necessary
* parameters to execute the PromoteReadReplica operation on AmazonRDS.
*
* @return A Java Future object containing the response from the
* PromoteReadReplica service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future promoteReadReplicaAsync(final PromoteReadReplicaRequest promoteReadReplicaRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DBInstance call() throws Exception {
return promoteReadReplica(promoteReadReplicaRequest);
}
});
}
/**
*
* Promotes a Read Replica DB Instance to a standalone DB Instance.
*
*
* @param promoteReadReplicaRequest Container for the necessary
* parameters to execute the PromoteReadReplica operation on AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* PromoteReadReplica service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future promoteReadReplicaAsync(
final PromoteReadReplicaRequest promoteReadReplicaRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DBInstance call() throws Exception {
DBInstance result;
try {
result = promoteReadReplica(promoteReadReplicaRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(promoteReadReplicaRequest, result);
return result;
}
});
}
/**
*
* Modify settings for a DB Instance. You can change one or more
* database configuration parameters by specifying these parameters and
* the new values in the request.
*
*
* @param modifyDBInstanceRequest Container for the necessary parameters
* to execute the ModifyDBInstance operation on AmazonRDS.
*
* @return A Java Future object containing the response from the
* ModifyDBInstance service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future modifyDBInstanceAsync(final ModifyDBInstanceRequest modifyDBInstanceRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DBInstance call() throws Exception {
return modifyDBInstance(modifyDBInstanceRequest);
}
});
}
/**
*
* Modify settings for a DB Instance. You can change one or more
* database configuration parameters by specifying these parameters and
* the new values in the request.
*
*
* @param modifyDBInstanceRequest Container for the necessary parameters
* to execute the ModifyDBInstance operation on AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* ModifyDBInstance service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future modifyDBInstanceAsync(
final ModifyDBInstanceRequest modifyDBInstanceRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DBInstance call() throws Exception {
DBInstance result;
try {
result = modifyDBInstance(modifyDBInstanceRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(modifyDBInstanceRequest, result);
return result;
}
});
}
/**
*
* The DeleteDBInstance action deletes a previously provisioned DB
* instance. A successful response from the web service indicates the
* request was received correctly. When you delete a DB instance, all
* automated backups for that instance are deleted and cannot be
* recovered. Manual DB Snapshots of the DB instance to be deleted are
* not deleted.
*
*
* If a final DBSnapshot is requested the status of the RDS instance
* will be "deleting" until the DBSnapshot is created. DescribeDBInstance
* is used to monitor the status of this operation. This cannot be
* canceled or reverted once submitted.
*
*
* @param deleteDBInstanceRequest Container for the necessary parameters
* to execute the DeleteDBInstance operation on AmazonRDS.
*
* @return A Java Future object containing the response from the
* DeleteDBInstance service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future deleteDBInstanceAsync(final DeleteDBInstanceRequest deleteDBInstanceRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DBInstance call() throws Exception {
return deleteDBInstance(deleteDBInstanceRequest);
}
});
}
/**
*
* The DeleteDBInstance action deletes a previously provisioned DB
* instance. A successful response from the web service indicates the
* request was received correctly. When you delete a DB instance, all
* automated backups for that instance are deleted and cannot be
* recovered. Manual DB Snapshots of the DB instance to be deleted are
* not deleted.
*
*
* If a final DBSnapshot is requested the status of the RDS instance
* will be "deleting" until the DBSnapshot is created. DescribeDBInstance
* is used to monitor the status of this operation. This cannot be
* canceled or reverted once submitted.
*
*
* @param deleteDBInstanceRequest Container for the necessary parameters
* to execute the DeleteDBInstance operation on AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* DeleteDBInstance service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future deleteDBInstanceAsync(
final DeleteDBInstanceRequest deleteDBInstanceRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DBInstance call() throws Exception {
DBInstance result;
try {
result = deleteDBInstance(deleteDBInstanceRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(deleteDBInstanceRequest, result);
return result;
}
});
}
/**
*
* Returns a list of DBParameterGroup descriptions. If a
* DBParameterGroupName is specified, the list will contain only the
* description of the specified DBParameterGroup.
*
*
* @param describeDBParameterGroupsRequest Container for the necessary
* parameters to execute the DescribeDBParameterGroups operation on
* AmazonRDS.
*
* @return A Java Future object containing the response from the
* DescribeDBParameterGroups service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future describeDBParameterGroupsAsync(final DescribeDBParameterGroupsRequest describeDBParameterGroupsRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DescribeDBParameterGroupsResult call() throws Exception {
return describeDBParameterGroups(describeDBParameterGroupsRequest);
}
});
}
/**
*
* Returns a list of DBParameterGroup descriptions. If a
* DBParameterGroupName is specified, the list will contain only the
* description of the specified DBParameterGroup.
*
*
* @param describeDBParameterGroupsRequest Container for the necessary
* parameters to execute the DescribeDBParameterGroups operation on
* AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* DescribeDBParameterGroups service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future describeDBParameterGroupsAsync(
final DescribeDBParameterGroupsRequest describeDBParameterGroupsRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DescribeDBParameterGroupsResult call() throws Exception {
DescribeDBParameterGroupsResult result;
try {
result = describeDBParameterGroups(describeDBParameterGroupsRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(describeDBParameterGroupsRequest, result);
return result;
}
});
}
/**
*
* Purchases a reserved DB Instance offering.
*
*
* @param purchaseReservedDBInstancesOfferingRequest Container for the
* necessary parameters to execute the
* PurchaseReservedDBInstancesOffering operation on AmazonRDS.
*
* @return A Java Future object containing the response from the
* PurchaseReservedDBInstancesOffering service method, as returned by
* AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future purchaseReservedDBInstancesOfferingAsync(final PurchaseReservedDBInstancesOfferingRequest purchaseReservedDBInstancesOfferingRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public ReservedDBInstance call() throws Exception {
return purchaseReservedDBInstancesOffering(purchaseReservedDBInstancesOfferingRequest);
}
});
}
/**
*
* Purchases a reserved DB Instance offering.
*
*
* @param purchaseReservedDBInstancesOfferingRequest Container for the
* necessary parameters to execute the
* PurchaseReservedDBInstancesOffering operation on AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* PurchaseReservedDBInstancesOffering service method, as returned by
* AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future purchaseReservedDBInstancesOfferingAsync(
final PurchaseReservedDBInstancesOfferingRequest purchaseReservedDBInstancesOfferingRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public ReservedDBInstance call() throws Exception {
ReservedDBInstance result;
try {
result = purchaseReservedDBInstancesOffering(purchaseReservedDBInstancesOfferingRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(purchaseReservedDBInstancesOfferingRequest, result);
return result;
}
});
}
/**
*
* Deletes a specified DBParameterGroup. The DBParameterGroup cannot be
* associated with any RDS instances to be deleted.
*
*
* NOTE: The specified DB Parameter Group cannot be associated
* with any DB Instances.
*
*
* @param deleteDBParameterGroupRequest Container for the necessary
* parameters to execute the DeleteDBParameterGroup operation on
* AmazonRDS.
*
* @return A Java Future object containing the response from the
* DeleteDBParameterGroup service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future deleteDBParameterGroupAsync(final DeleteDBParameterGroupRequest deleteDBParameterGroupRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public Void call() throws Exception {
deleteDBParameterGroup(deleteDBParameterGroupRequest);
return null;
}
});
}
/**
*
* Deletes a specified DBParameterGroup. The DBParameterGroup cannot be
* associated with any RDS instances to be deleted.
*
*
* NOTE: The specified DB Parameter Group cannot be associated
* with any DB Instances.
*
*
* @param deleteDBParameterGroupRequest Container for the necessary
* parameters to execute the DeleteDBParameterGroup operation on
* AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* DeleteDBParameterGroup service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future deleteDBParameterGroupAsync(
final DeleteDBParameterGroupRequest deleteDBParameterGroupRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public Void call() throws Exception {
try {
deleteDBParameterGroup(deleteDBParameterGroupRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(deleteDBParameterGroupRequest, null);
return null;
}
});
}
/**
*
* Deletes an RDS event notification subscription.
*
*
* @param deleteEventSubscriptionRequest Container for the necessary
* parameters to execute the DeleteEventSubscription operation on
* AmazonRDS.
*
* @return A Java Future object containing the response from the
* DeleteEventSubscription service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future deleteEventSubscriptionAsync(final DeleteEventSubscriptionRequest deleteEventSubscriptionRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public EventSubscription call() throws Exception {
return deleteEventSubscription(deleteEventSubscriptionRequest);
}
});
}
/**
*
* Deletes an RDS event notification subscription.
*
*
* @param deleteEventSubscriptionRequest Container for the necessary
* parameters to execute the DeleteEventSubscription operation on
* AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* DeleteEventSubscription service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future deleteEventSubscriptionAsync(
final DeleteEventSubscriptionRequest deleteEventSubscriptionRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public EventSubscription call() throws Exception {
EventSubscription result;
try {
result = deleteEventSubscription(deleteEventSubscriptionRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(deleteEventSubscriptionRequest, result);
return result;
}
});
}
/**
*
* Creates an RDS event notification subscription. This action requires a
* topic ARN (Amazon Resource Name) created by either the RDS console,
* the SNS console, or the SNS API. To obtain an ARN with SNS, you must
* create a topic in Amazon SNS and subscribe to the topic. The ARN is
* displayed in the SNS console.
*
*
* You can specify the type of source (SourceType) you want to be
* notified of, provide a list of RDS sources (SourceIds) that triggers
* the events, and provide a list of event categories (EventCategories)
* for events you want to be notified of. For example, you can specify
* SourceType = db-instance, SourceIds = mydbinstance1, mydbinstance2 and
* EventCategories = Availability, Backup.
*
*
* If you specify both the SourceType and SourceIds, such as SourceType =
* db-instance and SourceIdentifier = myDBInstance1, you will be notified
* of all the db-instance events for the specified source. If you specify
* a SourceType but do not specify a SourceIdentifier, you will receive
* notice of the events for that source type for all your RDS sources. If
* you do not specify either the SourceType nor the SourceIdentifier, you
* will be notified of events generated from all RDS sources belonging to
* your customer account.
*
*
* @param createEventSubscriptionRequest Container for the necessary
* parameters to execute the CreateEventSubscription operation on
* AmazonRDS.
*
* @return A Java Future object containing the response from the
* CreateEventSubscription service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future createEventSubscriptionAsync(final CreateEventSubscriptionRequest createEventSubscriptionRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public EventSubscription call() throws Exception {
return createEventSubscription(createEventSubscriptionRequest);
}
});
}
/**
*
* Creates an RDS event notification subscription. This action requires a
* topic ARN (Amazon Resource Name) created by either the RDS console,
* the SNS console, or the SNS API. To obtain an ARN with SNS, you must
* create a topic in Amazon SNS and subscribe to the topic. The ARN is
* displayed in the SNS console.
*
*
* You can specify the type of source (SourceType) you want to be
* notified of, provide a list of RDS sources (SourceIds) that triggers
* the events, and provide a list of event categories (EventCategories)
* for events you want to be notified of. For example, you can specify
* SourceType = db-instance, SourceIds = mydbinstance1, mydbinstance2 and
* EventCategories = Availability, Backup.
*
*
* If you specify both the SourceType and SourceIds, such as SourceType =
* db-instance and SourceIdentifier = myDBInstance1, you will be notified
* of all the db-instance events for the specified source. If you specify
* a SourceType but do not specify a SourceIdentifier, you will receive
* notice of the events for that source type for all your RDS sources. If
* you do not specify either the SourceType nor the SourceIdentifier, you
* will be notified of events generated from all RDS sources belonging to
* your customer account.
*
*
* @param createEventSubscriptionRequest Container for the necessary
* parameters to execute the CreateEventSubscription operation on
* AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* CreateEventSubscription service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future createEventSubscriptionAsync(
final CreateEventSubscriptionRequest createEventSubscriptionRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public EventSubscription call() throws Exception {
EventSubscription result;
try {
result = createEventSubscription(createEventSubscriptionRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(createEventSubscriptionRequest, result);
return result;
}
});
}
/**
*
* Modifies the parameters of a DBParameterGroup to the engine/system
* default value. To reset specific parameters submit a list of the
* following: ParameterName and ApplyMethod. To reset the entire
* DBParameterGroup specify the DBParameterGroup name and
* ResetAllParameters parameters. When resetting the entire group,
* dynamic parameters are updated immediately and static parameters are
* set to pending-reboot to take effect on the next DB instance restart
* or RebootDBInstance request.
*
*
* @param resetDBParameterGroupRequest Container for the necessary
* parameters to execute the ResetDBParameterGroup operation on
* AmazonRDS.
*
* @return A Java Future object containing the response from the
* ResetDBParameterGroup service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future resetDBParameterGroupAsync(final ResetDBParameterGroupRequest resetDBParameterGroupRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public ResetDBParameterGroupResult call() throws Exception {
return resetDBParameterGroup(resetDBParameterGroupRequest);
}
});
}
/**
*
* Modifies the parameters of a DBParameterGroup to the engine/system
* default value. To reset specific parameters submit a list of the
* following: ParameterName and ApplyMethod. To reset the entire
* DBParameterGroup specify the DBParameterGroup name and
* ResetAllParameters parameters. When resetting the entire group,
* dynamic parameters are updated immediately and static parameters are
* set to pending-reboot to take effect on the next DB instance restart
* or RebootDBInstance request.
*
*
* @param resetDBParameterGroupRequest Container for the necessary
* parameters to execute the ResetDBParameterGroup operation on
* AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* ResetDBParameterGroup service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future resetDBParameterGroupAsync(
final ResetDBParameterGroupRequest resetDBParameterGroupRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public ResetDBParameterGroupResult call() throws Exception {
ResetDBParameterGroupResult result;
try {
result = resetDBParameterGroup(resetDBParameterGroupRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(resetDBParameterGroupRequest, result);
return result;
}
});
}
/**
*
* Creates a DBSnapshot. The source DBInstance must be in "available"
* state.
*
*
* @param createDBSnapshotRequest Container for the necessary parameters
* to execute the CreateDBSnapshot operation on AmazonRDS.
*
* @return A Java Future object containing the response from the
* CreateDBSnapshot service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future createDBSnapshotAsync(final CreateDBSnapshotRequest createDBSnapshotRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DBSnapshot call() throws Exception {
return createDBSnapshot(createDBSnapshotRequest);
}
});
}
/**
*
* Creates a DBSnapshot. The source DBInstance must be in "available"
* state.
*
*
* @param createDBSnapshotRequest Container for the necessary parameters
* to execute the CreateDBSnapshot operation on AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* CreateDBSnapshot service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future createDBSnapshotAsync(
final CreateDBSnapshotRequest createDBSnapshotRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DBSnapshot call() throws Exception {
DBSnapshot result;
try {
result = createDBSnapshot(createDBSnapshotRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(createDBSnapshotRequest, result);
return result;
}
});
}
/**
*
* Deletes a DBSnapshot.
*
*
* NOTE:The DBSnapshot must be in the available state to be
* deleted.
*
*
* @param deleteDBSnapshotRequest Container for the necessary parameters
* to execute the DeleteDBSnapshot operation on AmazonRDS.
*
* @return A Java Future object containing the response from the
* DeleteDBSnapshot service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future deleteDBSnapshotAsync(final DeleteDBSnapshotRequest deleteDBSnapshotRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DBSnapshot call() throws Exception {
return deleteDBSnapshot(deleteDBSnapshotRequest);
}
});
}
/**
*
* Deletes a DBSnapshot.
*
*
* NOTE:The DBSnapshot must be in the available state to be
* deleted.
*
*
* @param deleteDBSnapshotRequest Container for the necessary parameters
* to execute the DeleteDBSnapshot operation on AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* DeleteDBSnapshot service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future deleteDBSnapshotAsync(
final DeleteDBSnapshotRequest deleteDBSnapshotRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DBSnapshot call() throws Exception {
DBSnapshot result;
try {
result = deleteDBSnapshot(deleteDBSnapshotRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(deleteDBSnapshotRequest, result);
return result;
}
});
}
/**
*
* Downloads the last line of the specified log file.
*
*
* @param downloadDBLogFilePortionRequest Container for the necessary
* parameters to execute the DownloadDBLogFilePortion operation on
* AmazonRDS.
*
* @return A Java Future object containing the response from the
* DownloadDBLogFilePortion service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future downloadDBLogFilePortionAsync(final DownloadDBLogFilePortionRequest downloadDBLogFilePortionRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DownloadDBLogFilePortionResult call() throws Exception {
return downloadDBLogFilePortion(downloadDBLogFilePortionRequest);
}
});
}
/**
*
* Downloads the last line of the specified log file.
*
*
* @param downloadDBLogFilePortionRequest Container for the necessary
* parameters to execute the DownloadDBLogFilePortion operation on
* AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* DownloadDBLogFilePortion service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future downloadDBLogFilePortionAsync(
final DownloadDBLogFilePortionRequest downloadDBLogFilePortionRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DownloadDBLogFilePortionResult call() throws Exception {
DownloadDBLogFilePortionResult result;
try {
result = downloadDBLogFilePortion(downloadDBLogFilePortionRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(downloadDBLogFilePortionRequest, result);
return result;
}
});
}
/**
*
* Creates a new DB subnet group. DB subnet groups must contain at least
* one subnet in at least two AZs in the region.
*
*
* @param createDBSubnetGroupRequest Container for the necessary
* parameters to execute the CreateDBSubnetGroup operation on AmazonRDS.
*
* @return A Java Future object containing the response from the
* CreateDBSubnetGroup service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future createDBSubnetGroupAsync(final CreateDBSubnetGroupRequest createDBSubnetGroupRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DBSubnetGroup call() throws Exception {
return createDBSubnetGroup(createDBSubnetGroupRequest);
}
});
}
/**
*
* Creates a new DB subnet group. DB subnet groups must contain at least
* one subnet in at least two AZs in the region.
*
*
* @param createDBSubnetGroupRequest Container for the necessary
* parameters to execute the CreateDBSubnetGroup operation on AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* CreateDBSubnetGroup service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future createDBSubnetGroupAsync(
final CreateDBSubnetGroupRequest createDBSubnetGroupRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DBSubnetGroup call() throws Exception {
DBSubnetGroup result;
try {
result = createDBSubnetGroup(createDBSubnetGroupRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(createDBSubnetGroupRequest, result);
return result;
}
});
}
/**
*
* Modifies an existing RDS event notification subscription. Note that
* you cannot modify the source identifiers using this call; to change
* source identifiers for a subscription, use the
* AddSourceIdentifierToSubscription and
* RemoveSourceIdentifierFromSubscription calls.
*
*
* You can see a list of the event categories for a given SourceType in
* the
* Events topic in the Amazon RDS User Guide or by using the
* DescribeEventCategories action.
*
*
* @param modifyEventSubscriptionRequest Container for the necessary
* parameters to execute the ModifyEventSubscription operation on
* AmazonRDS.
*
* @return A Java Future object containing the response from the
* ModifyEventSubscription service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future modifyEventSubscriptionAsync(final ModifyEventSubscriptionRequest modifyEventSubscriptionRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public EventSubscription call() throws Exception {
return modifyEventSubscription(modifyEventSubscriptionRequest);
}
});
}
/**
*
* Modifies an existing RDS event notification subscription. Note that
* you cannot modify the source identifiers using this call; to change
* source identifiers for a subscription, use the
* AddSourceIdentifierToSubscription and
* RemoveSourceIdentifierFromSubscription calls.
*
*
* You can see a list of the event categories for a given SourceType in
* the
* Events topic in the Amazon RDS User Guide or by using the
* DescribeEventCategories action.
*
*
* @param modifyEventSubscriptionRequest Container for the necessary
* parameters to execute the ModifyEventSubscription operation on
* AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* ModifyEventSubscription service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future modifyEventSubscriptionAsync(
final ModifyEventSubscriptionRequest modifyEventSubscriptionRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public EventSubscription call() throws Exception {
EventSubscription result;
try {
result = modifyEventSubscription(modifyEventSubscriptionRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(modifyEventSubscriptionRequest, result);
return result;
}
});
}
/**
*
* Lists all tags on a DB Instance.
*
*
* For an overview on tagging DB Instances, see
* DB Instance Tags.
*
*
* @param listTagsForResourceRequest Container for the necessary
* parameters to execute the ListTagsForResource operation on AmazonRDS.
*
* @return A Java Future object containing the response from the
* ListTagsForResource service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future listTagsForResourceAsync(final ListTagsForResourceRequest listTagsForResourceRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public ListTagsForResourceResult call() throws Exception {
return listTagsForResource(listTagsForResourceRequest);
}
});
}
/**
*
* Lists all tags on a DB Instance.
*
*
* For an overview on tagging DB Instances, see
* DB Instance Tags.
*
*
* @param listTagsForResourceRequest Container for the necessary
* parameters to execute the ListTagsForResource operation on AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* ListTagsForResource service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future listTagsForResourceAsync(
final ListTagsForResourceRequest listTagsForResourceRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public ListTagsForResourceResult call() throws Exception {
ListTagsForResourceResult result;
try {
result = listTagsForResource(listTagsForResourceRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(listTagsForResourceRequest, result);
return result;
}
});
}
/**
*
* Modifies an existing Option Group.
*
*
* @param modifyOptionGroupRequest Container for the necessary parameters
* to execute the ModifyOptionGroup operation on AmazonRDS.
*
* @return A Java Future object containing the response from the
* ModifyOptionGroup service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future modifyOptionGroupAsync(final ModifyOptionGroupRequest modifyOptionGroupRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public OptionGroup call() throws Exception {
return modifyOptionGroup(modifyOptionGroupRequest);
}
});
}
/**
*
* Modifies an existing Option Group.
*
*
* @param modifyOptionGroupRequest Container for the necessary parameters
* to execute the ModifyOptionGroup operation on AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* ModifyOptionGroup service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future modifyOptionGroupAsync(
final ModifyOptionGroupRequest modifyOptionGroupRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public OptionGroup call() throws Exception {
OptionGroup result;
try {
result = modifyOptionGroup(modifyOptionGroupRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(modifyOptionGroupRequest, result);
return result;
}
});
}
/**
*
* Lists all the subscription descriptions for a customer account. The
* description for a subscription includes SubscriptionName, SNSTopicARN,
* CustomerID, SourceType, SourceID, CreationTime, and Status.
*
*
* If you specify a SubscriptionName, lists the description for that
* subscription.
*
*
* @param describeEventSubscriptionsRequest Container for the necessary
* parameters to execute the DescribeEventSubscriptions operation on
* AmazonRDS.
*
* @return A Java Future object containing the response from the
* DescribeEventSubscriptions service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future describeEventSubscriptionsAsync(final DescribeEventSubscriptionsRequest describeEventSubscriptionsRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DescribeEventSubscriptionsResult call() throws Exception {
return describeEventSubscriptions(describeEventSubscriptionsRequest);
}
});
}
/**
*
* Lists all the subscription descriptions for a customer account. The
* description for a subscription includes SubscriptionName, SNSTopicARN,
* CustomerID, SourceType, SourceID, CreationTime, and Status.
*
*
* If you specify a SubscriptionName, lists the description for that
* subscription.
*
*
* @param describeEventSubscriptionsRequest Container for the necessary
* parameters to execute the DescribeEventSubscriptions operation on
* AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* DescribeEventSubscriptions service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future describeEventSubscriptionsAsync(
final DescribeEventSubscriptionsRequest describeEventSubscriptionsRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DescribeEventSubscriptionsResult call() throws Exception {
DescribeEventSubscriptionsResult result;
try {
result = describeEventSubscriptions(describeEventSubscriptionsRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(describeEventSubscriptionsRequest, result);
return result;
}
});
}
/**
*
* Creates a new Option Group. You can create up to 20 option groups.
*
*
* @param createOptionGroupRequest Container for the necessary parameters
* to execute the CreateOptionGroup operation on AmazonRDS.
*
* @return A Java Future object containing the response from the
* CreateOptionGroup service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future createOptionGroupAsync(final CreateOptionGroupRequest createOptionGroupRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public OptionGroup call() throws Exception {
return createOptionGroup(createOptionGroupRequest);
}
});
}
/**
*
* Creates a new Option Group. You can create up to 20 option groups.
*
*
* @param createOptionGroupRequest Container for the necessary parameters
* to execute the CreateOptionGroup operation on AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* CreateOptionGroup service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future createOptionGroupAsync(
final CreateOptionGroupRequest createOptionGroupRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public OptionGroup call() throws Exception {
OptionGroup result;
try {
result = createOptionGroup(createOptionGroupRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(createOptionGroupRequest, result);
return result;
}
});
}
/**
*
* Returns a list of DB log files for the DB instance.
*
*
* @param describeDBLogFilesRequest Container for the necessary
* parameters to execute the DescribeDBLogFiles operation on AmazonRDS.
*
* @return A Java Future object containing the response from the
* DescribeDBLogFiles service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future describeDBLogFilesAsync(final DescribeDBLogFilesRequest describeDBLogFilesRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DescribeDBLogFilesResult call() throws Exception {
return describeDBLogFiles(describeDBLogFilesRequest);
}
});
}
/**
*
* Returns a list of DB log files for the DB instance.
*
*
* @param describeDBLogFilesRequest Container for the necessary
* parameters to execute the DescribeDBLogFiles operation on AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* DescribeDBLogFiles service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future describeDBLogFilesAsync(
final DescribeDBLogFilesRequest describeDBLogFilesRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DescribeDBLogFilesResult call() throws Exception {
DescribeDBLogFilesResult result;
try {
result = describeDBLogFiles(describeDBLogFilesRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(describeDBLogFilesRequest, result);
return result;
}
});
}
/**
*
* Modifies an existing DB subnet group. DB subnet groups must contain
* at least one subnet in at least two AZs in the region.
*
*
* @param modifyDBSubnetGroupRequest Container for the necessary
* parameters to execute the ModifyDBSubnetGroup operation on AmazonRDS.
*
* @return A Java Future object containing the response from the
* ModifyDBSubnetGroup service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future modifyDBSubnetGroupAsync(final ModifyDBSubnetGroupRequest modifyDBSubnetGroupRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DBSubnetGroup call() throws Exception {
return modifyDBSubnetGroup(modifyDBSubnetGroupRequest);
}
});
}
/**
*
* Modifies an existing DB subnet group. DB subnet groups must contain
* at least one subnet in at least two AZs in the region.
*
*
* @param modifyDBSubnetGroupRequest Container for the necessary
* parameters to execute the ModifyDBSubnetGroup operation on AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* ModifyDBSubnetGroup service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future modifyDBSubnetGroupAsync(
final ModifyDBSubnetGroupRequest modifyDBSubnetGroupRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DBSubnetGroup call() throws Exception {
DBSubnetGroup result;
try {
result = modifyDBSubnetGroup(modifyDBSubnetGroupRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(modifyDBSubnetGroupRequest, result);
return result;
}
});
}
/**
*
* Returns information about reserved DB Instances for this account, or
* about a specified reserved DB Instance.
*
*
* @param describeReservedDBInstancesRequest Container for the necessary
* parameters to execute the DescribeReservedDBInstances operation on
* AmazonRDS.
*
* @return A Java Future object containing the response from the
* DescribeReservedDBInstances service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future describeReservedDBInstancesAsync(final DescribeReservedDBInstancesRequest describeReservedDBInstancesRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DescribeReservedDBInstancesResult call() throws Exception {
return describeReservedDBInstances(describeReservedDBInstancesRequest);
}
});
}
/**
*
* Returns information about reserved DB Instances for this account, or
* about a specified reserved DB Instance.
*
*
* @param describeReservedDBInstancesRequest Container for the necessary
* parameters to execute the DescribeReservedDBInstances operation on
* AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* DescribeReservedDBInstances service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future describeReservedDBInstancesAsync(
final DescribeReservedDBInstancesRequest describeReservedDBInstancesRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DescribeReservedDBInstancesResult call() throws Exception {
DescribeReservedDBInstancesResult result;
try {
result = describeReservedDBInstances(describeReservedDBInstancesRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(describeReservedDBInstancesRequest, result);
return result;
}
});
}
/**
*
* Removes a source identifier from an existing RDS event notification
* subscription.
*
*
* @param removeSourceIdentifierFromSubscriptionRequest Container for the
* necessary parameters to execute the
* RemoveSourceIdentifierFromSubscription operation on AmazonRDS.
*
* @return A Java Future object containing the response from the
* RemoveSourceIdentifierFromSubscription service method, as returned by
* AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future removeSourceIdentifierFromSubscriptionAsync(final RemoveSourceIdentifierFromSubscriptionRequest removeSourceIdentifierFromSubscriptionRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public EventSubscription call() throws Exception {
return removeSourceIdentifierFromSubscription(removeSourceIdentifierFromSubscriptionRequest);
}
});
}
/**
*
* Removes a source identifier from an existing RDS event notification
* subscription.
*
*
* @param removeSourceIdentifierFromSubscriptionRequest Container for the
* necessary parameters to execute the
* RemoveSourceIdentifierFromSubscription operation on AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* RemoveSourceIdentifierFromSubscription service method, as returned by
* AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future removeSourceIdentifierFromSubscriptionAsync(
final RemoveSourceIdentifierFromSubscriptionRequest removeSourceIdentifierFromSubscriptionRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public EventSubscription call() throws Exception {
EventSubscription result;
try {
result = removeSourceIdentifierFromSubscription(removeSourceIdentifierFromSubscriptionRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(removeSourceIdentifierFromSubscriptionRequest, result);
return result;
}
});
}
/**
*
* Creates a DB Instance that acts as a Read Replica of a source DB
* Instance.
*
*
* All Read Replica DB Instances are created as Single-AZ deployments
* with backups disabled. All other DB Instance attributes (including DB
* Security Groups and DB Parameter Groups) are inherited from the source
* DB Instance, except as specified below.
*
*
* IMPORTANT: The source DB Instance must have backup retention
* enabled.
*
*
* @param createDBInstanceReadReplicaRequest Container for the necessary
* parameters to execute the CreateDBInstanceReadReplica operation on
* AmazonRDS.
*
* @return A Java Future object containing the response from the
* CreateDBInstanceReadReplica service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future createDBInstanceReadReplicaAsync(final CreateDBInstanceReadReplicaRequest createDBInstanceReadReplicaRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DBInstance call() throws Exception {
return createDBInstanceReadReplica(createDBInstanceReadReplicaRequest);
}
});
}
/**
*
* Creates a DB Instance that acts as a Read Replica of a source DB
* Instance.
*
*
* All Read Replica DB Instances are created as Single-AZ deployments
* with backups disabled. All other DB Instance attributes (including DB
* Security Groups and DB Parameter Groups) are inherited from the source
* DB Instance, except as specified below.
*
*
* IMPORTANT: The source DB Instance must have backup retention
* enabled.
*
*
* @param createDBInstanceReadReplicaRequest Container for the necessary
* parameters to execute the CreateDBInstanceReadReplica operation on
* AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* CreateDBInstanceReadReplica service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future createDBInstanceReadReplicaAsync(
final CreateDBInstanceReadReplicaRequest createDBInstanceReadReplicaRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DBInstance call() throws Exception {
DBInstance result;
try {
result = createDBInstanceReadReplica(createDBInstanceReadReplicaRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(createDBInstanceReadReplicaRequest, result);
return result;
}
});
}
/**
*
* Displays a list of categories for all event source types, or, if
* specified, for a specified source type. You can see a list of the
* event categories and source types in the
* Events topic in the Amazon RDS User Guide.
*
*
* @param describeEventCategoriesRequest Container for the necessary
* parameters to execute the DescribeEventCategories operation on
* AmazonRDS.
*
* @return A Java Future object containing the response from the
* DescribeEventCategories service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future describeEventCategoriesAsync(final DescribeEventCategoriesRequest describeEventCategoriesRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DescribeEventCategoriesResult call() throws Exception {
return describeEventCategories(describeEventCategoriesRequest);
}
});
}
/**
*
* Displays a list of categories for all event source types, or, if
* specified, for a specified source type. You can see a list of the
* event categories and source types in the
* Events topic in the Amazon RDS User Guide.
*
*
* @param describeEventCategoriesRequest Container for the necessary
* parameters to execute the DescribeEventCategories operation on
* AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* DescribeEventCategories service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future describeEventCategoriesAsync(
final DescribeEventCategoriesRequest describeEventCategoriesRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DescribeEventCategoriesResult call() throws Exception {
DescribeEventCategoriesResult result;
try {
result = describeEventCategories(describeEventCategoriesRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(describeEventCategoriesRequest, result);
return result;
}
});
}
/**
*
* Deletes an existing Option Group.
*
*
* @param deleteOptionGroupRequest Container for the necessary parameters
* to execute the DeleteOptionGroup operation on AmazonRDS.
*
* @return A Java Future object containing the response from the
* DeleteOptionGroup service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future deleteOptionGroupAsync(final DeleteOptionGroupRequest deleteOptionGroupRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public Void call() throws Exception {
deleteOptionGroup(deleteOptionGroupRequest);
return null;
}
});
}
/**
*
* Deletes an existing Option Group.
*
*
* @param deleteOptionGroupRequest Container for the necessary parameters
* to execute the DeleteOptionGroup operation on AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* DeleteOptionGroup service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future deleteOptionGroupAsync(
final DeleteOptionGroupRequest deleteOptionGroupRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public Void call() throws Exception {
try {
deleteOptionGroup(deleteOptionGroupRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(deleteOptionGroupRequest, null);
return null;
}
});
}
/**
*
* Enables ingress to a DBSecurityGroup using one of two forms of
* authorization. First, EC2 or VPC Security Groups can be added to the
* DBSecurityGroup if the application using the database is running on
* EC2 or VPC instances. Second, IP ranges are available if the
* application accessing your database is running on the Internet.
* Required parameters for this API are one of CIDR range,
* EC2SecurityGroupId for VPC, or (EC2SecurityGroupOwnerId and either
* EC2SecurityGroupName or EC2SecurityGroupId for non-VPC).
*
*
* NOTE: You cannot authorize ingress from an EC2 security group
* in one Region to an Amazon RDS DB Instance in another. You cannot
* authorize ingress from a VPC security group in one VPC to an Amazon
* RDS DB Instance in another.
*
*
* For an overview of CIDR ranges, go to the
* Wikipedia Tutorial .
*
*
* @param authorizeDBSecurityGroupIngressRequest Container for the
* necessary parameters to execute the AuthorizeDBSecurityGroupIngress
* operation on AmazonRDS.
*
* @return A Java Future object containing the response from the
* AuthorizeDBSecurityGroupIngress service method, as returned by
* AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future authorizeDBSecurityGroupIngressAsync(final AuthorizeDBSecurityGroupIngressRequest authorizeDBSecurityGroupIngressRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DBSecurityGroup call() throws Exception {
return authorizeDBSecurityGroupIngress(authorizeDBSecurityGroupIngressRequest);
}
});
}
/**
*
* Enables ingress to a DBSecurityGroup using one of two forms of
* authorization. First, EC2 or VPC Security Groups can be added to the
* DBSecurityGroup if the application using the database is running on
* EC2 or VPC instances. Second, IP ranges are available if the
* application accessing your database is running on the Internet.
* Required parameters for this API are one of CIDR range,
* EC2SecurityGroupId for VPC, or (EC2SecurityGroupOwnerId and either
* EC2SecurityGroupName or EC2SecurityGroupId for non-VPC).
*
*
* NOTE: You cannot authorize ingress from an EC2 security group
* in one Region to an Amazon RDS DB Instance in another. You cannot
* authorize ingress from a VPC security group in one VPC to an Amazon
* RDS DB Instance in another.
*
*
* For an overview of CIDR ranges, go to the
* Wikipedia Tutorial .
*
*
* @param authorizeDBSecurityGroupIngressRequest Container for the
* necessary parameters to execute the AuthorizeDBSecurityGroupIngress
* operation on AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* AuthorizeDBSecurityGroupIngress service method, as returned by
* AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future authorizeDBSecurityGroupIngressAsync(
final AuthorizeDBSecurityGroupIngressRequest authorizeDBSecurityGroupIngressRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DBSecurityGroup call() throws Exception {
DBSecurityGroup result;
try {
result = authorizeDBSecurityGroupIngress(authorizeDBSecurityGroupIngressRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(authorizeDBSecurityGroupIngressRequest, result);
return result;
}
});
}
/**
*
* Returns events related to DB Instances, DB Security Groups, DB
* Snapshots and DB Parameter Groups for the past 14 days. Events
* specific to a particular DB Instance, DB Security Group, database
* snapshot or DB Parameter Group can be obtained by providing the name
* as a parameter. By default, the past hour of events are returned.
*
*
* @param describeEventsRequest Container for the necessary parameters to
* execute the DescribeEvents operation on AmazonRDS.
*
* @return A Java Future object containing the response from the
* DescribeEvents service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future describeEventsAsync(final DescribeEventsRequest describeEventsRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DescribeEventsResult call() throws Exception {
return describeEvents(describeEventsRequest);
}
});
}
/**
*
* Returns events related to DB Instances, DB Security Groups, DB
* Snapshots and DB Parameter Groups for the past 14 days. Events
* specific to a particular DB Instance, DB Security Group, database
* snapshot or DB Parameter Group can be obtained by providing the name
* as a parameter. By default, the past hour of events are returned.
*
*
* @param describeEventsRequest Container for the necessary parameters to
* execute the DescribeEvents operation on AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* DescribeEvents service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future describeEventsAsync(
final DescribeEventsRequest describeEventsRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DescribeEventsResult call() throws Exception {
DescribeEventsResult result;
try {
result = describeEvents(describeEventsRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(describeEventsRequest, result);
return result;
}
});
}
/**
*
* Returns the detailed parameter list for a particular
* DBParameterGroup.
*
*
* @param describeDBParametersRequest Container for the necessary
* parameters to execute the DescribeDBParameters operation on AmazonRDS.
*
* @return A Java Future object containing the response from the
* DescribeDBParameters service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future describeDBParametersAsync(final DescribeDBParametersRequest describeDBParametersRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DescribeDBParametersResult call() throws Exception {
return describeDBParameters(describeDBParametersRequest);
}
});
}
/**
*
* Returns the detailed parameter list for a particular
* DBParameterGroup.
*
*
* @param describeDBParametersRequest Container for the necessary
* parameters to execute the DescribeDBParameters operation on AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* DescribeDBParameters service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future describeDBParametersAsync(
final DescribeDBParametersRequest describeDBParametersRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DescribeDBParametersResult call() throws Exception {
DescribeDBParametersResult result;
try {
result = describeDBParameters(describeDBParametersRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(describeDBParametersRequest, result);
return result;
}
});
}
/**
*
* Returns the default engine and system parameter information for the
* specified database engine.
*
*
* @param describeEngineDefaultParametersRequest Container for the
* necessary parameters to execute the DescribeEngineDefaultParameters
* operation on AmazonRDS.
*
* @return A Java Future object containing the response from the
* DescribeEngineDefaultParameters service method, as returned by
* AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future describeEngineDefaultParametersAsync(final DescribeEngineDefaultParametersRequest describeEngineDefaultParametersRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public EngineDefaults call() throws Exception {
return describeEngineDefaultParameters(describeEngineDefaultParametersRequest);
}
});
}
/**
*
* Returns the default engine and system parameter information for the
* specified database engine.
*
*
* @param describeEngineDefaultParametersRequest Container for the
* necessary parameters to execute the DescribeEngineDefaultParameters
* operation on AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* DescribeEngineDefaultParameters service method, as returned by
* AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future describeEngineDefaultParametersAsync(
final DescribeEngineDefaultParametersRequest describeEngineDefaultParametersRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public EngineDefaults call() throws Exception {
EngineDefaults result;
try {
result = describeEngineDefaultParameters(describeEngineDefaultParametersRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(describeEngineDefaultParametersRequest, result);
return result;
}
});
}
/**
*
* Creates a new DB Security Group. DB Security Groups control access to
* a DB Instance.
*
*
* @param createDBSecurityGroupRequest Container for the necessary
* parameters to execute the CreateDBSecurityGroup operation on
* AmazonRDS.
*
* @return A Java Future object containing the response from the
* CreateDBSecurityGroup service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future createDBSecurityGroupAsync(final CreateDBSecurityGroupRequest createDBSecurityGroupRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DBSecurityGroup call() throws Exception {
return createDBSecurityGroup(createDBSecurityGroupRequest);
}
});
}
/**
*
* Creates a new DB Security Group. DB Security Groups control access to
* a DB Instance.
*
*
* @param createDBSecurityGroupRequest Container for the necessary
* parameters to execute the CreateDBSecurityGroup operation on
* AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* CreateDBSecurityGroup service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future createDBSecurityGroupAsync(
final CreateDBSecurityGroupRequest createDBSecurityGroupRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DBSecurityGroup call() throws Exception {
DBSecurityGroup result;
try {
result = createDBSecurityGroup(createDBSecurityGroupRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(createDBSecurityGroupRequest, result);
return result;
}
});
}
/**
*
* Returns a list of DBSubnetGroup descriptions. If a DBSubnetGroupName
* is specified, the list will contain only the descriptions of the
* specified DBSubnetGroup.
*
*
* For an overview of CIDR ranges, go to the
* Wikipedia Tutorial .
*
*
* @param describeDBSubnetGroupsRequest Container for the necessary
* parameters to execute the DescribeDBSubnetGroups operation on
* AmazonRDS.
*
* @return A Java Future object containing the response from the
* DescribeDBSubnetGroups service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future describeDBSubnetGroupsAsync(final DescribeDBSubnetGroupsRequest describeDBSubnetGroupsRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DescribeDBSubnetGroupsResult call() throws Exception {
return describeDBSubnetGroups(describeDBSubnetGroupsRequest);
}
});
}
/**
*
* Returns a list of DBSubnetGroup descriptions. If a DBSubnetGroupName
* is specified, the list will contain only the descriptions of the
* specified DBSubnetGroup.
*
*
* For an overview of CIDR ranges, go to the
* Wikipedia Tutorial .
*
*
* @param describeDBSubnetGroupsRequest Container for the necessary
* parameters to execute the DescribeDBSubnetGroups operation on
* AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* DescribeDBSubnetGroups service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future describeDBSubnetGroupsAsync(
final DescribeDBSubnetGroupsRequest describeDBSubnetGroupsRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DescribeDBSubnetGroupsResult call() throws Exception {
DescribeDBSubnetGroupsResult result;
try {
result = describeDBSubnetGroups(describeDBSubnetGroupsRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(describeDBSubnetGroupsRequest, result);
return result;
}
});
}
/**
*
* Returns information about DBSnapshots. This API supports pagination.
*
*
* @param describeDBSnapshotsRequest Container for the necessary
* parameters to execute the DescribeDBSnapshots operation on AmazonRDS.
*
* @return A Java Future object containing the response from the
* DescribeDBSnapshots service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future describeDBSnapshotsAsync(final DescribeDBSnapshotsRequest describeDBSnapshotsRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DescribeDBSnapshotsResult call() throws Exception {
return describeDBSnapshots(describeDBSnapshotsRequest);
}
});
}
/**
*
* Returns information about DBSnapshots. This API supports pagination.
*
*
* @param describeDBSnapshotsRequest Container for the necessary
* parameters to execute the DescribeDBSnapshots operation on AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* DescribeDBSnapshots service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future describeDBSnapshotsAsync(
final DescribeDBSnapshotsRequest describeDBSnapshotsRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DescribeDBSnapshotsResult call() throws Exception {
DescribeDBSnapshotsResult result;
try {
result = describeDBSnapshots(describeDBSnapshotsRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(describeDBSnapshotsRequest, result);
return result;
}
});
}
/**
*
* Reboots a previously provisioned RDS instance. This API results in
* the application of modified DBParameterGroup parameters with
* ApplyStatus of pending-reboot to the RDS instance. This action is
* taken as soon as possible, and results in a momentary outage to the
* RDS instance during which the RDS instance status is set to rebooting.
* If the RDS instance is configured for MultiAZ, it is possible that the
* reboot will be conducted through a failover. A DBInstance event is
* created when the reboot is completed.
*
*
* @param rebootDBInstanceRequest Container for the necessary parameters
* to execute the RebootDBInstance operation on AmazonRDS.
*
* @return A Java Future object containing the response from the
* RebootDBInstance service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future rebootDBInstanceAsync(final RebootDBInstanceRequest rebootDBInstanceRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DBInstance call() throws Exception {
return rebootDBInstance(rebootDBInstanceRequest);
}
});
}
/**
*
* Reboots a previously provisioned RDS instance. This API results in
* the application of modified DBParameterGroup parameters with
* ApplyStatus of pending-reboot to the RDS instance. This action is
* taken as soon as possible, and results in a momentary outage to the
* RDS instance during which the RDS instance status is set to rebooting.
* If the RDS instance is configured for MultiAZ, it is possible that the
* reboot will be conducted through a failover. A DBInstance event is
* created when the reboot is completed.
*
*
* @param rebootDBInstanceRequest Container for the necessary parameters
* to execute the RebootDBInstance operation on AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* RebootDBInstance service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future rebootDBInstanceAsync(
final RebootDBInstanceRequest rebootDBInstanceRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DBInstance call() throws Exception {
DBInstance result;
try {
result = rebootDBInstance(rebootDBInstanceRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(rebootDBInstanceRequest, result);
return result;
}
});
}
/**
*
* Deletes a DB Security Group.
*
*
* NOTE:The specified DB Security Group must not be associated
* with any DB Instances.
*
*
* @param deleteDBSecurityGroupRequest Container for the necessary
* parameters to execute the DeleteDBSecurityGroup operation on
* AmazonRDS.
*
* @return A Java Future object containing the response from the
* DeleteDBSecurityGroup service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future deleteDBSecurityGroupAsync(final DeleteDBSecurityGroupRequest deleteDBSecurityGroupRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public Void call() throws Exception {
deleteDBSecurityGroup(deleteDBSecurityGroupRequest);
return null;
}
});
}
/**
*
* Deletes a DB Security Group.
*
*
* NOTE:The specified DB Security Group must not be associated
* with any DB Instances.
*
*
* @param deleteDBSecurityGroupRequest Container for the necessary
* parameters to execute the DeleteDBSecurityGroup operation on
* AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* DeleteDBSecurityGroup service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future deleteDBSecurityGroupAsync(
final DeleteDBSecurityGroupRequest deleteDBSecurityGroupRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public Void call() throws Exception {
try {
deleteDBSecurityGroup(deleteDBSecurityGroupRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(deleteDBSecurityGroupRequest, null);
return null;
}
});
}
/**
*
* Creates a new DB Parameter Group.
*
*
* A DB Parameter Group is initially created with the default parameters
* for the database engine used by the DB Instance. To provide custom
* values for any of the parameters, you must modify the group after
* creating it using ModifyDBParameterGroup . Once you've created
* a DB Parameter Group, you need to associate it with your DB Instance
* using ModifyDBInstance . When you associate a new DB Parameter
* Group with a running DB Instance, you need to reboot the DB Instance
* for the new DB Parameter Group and associated settings to take effect.
*
*
* @param createDBParameterGroupRequest Container for the necessary
* parameters to execute the CreateDBParameterGroup operation on
* AmazonRDS.
*
* @return A Java Future object containing the response from the
* CreateDBParameterGroup service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future createDBParameterGroupAsync(final CreateDBParameterGroupRequest createDBParameterGroupRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DBParameterGroup call() throws Exception {
return createDBParameterGroup(createDBParameterGroupRequest);
}
});
}
/**
*
* Creates a new DB Parameter Group.
*
*
* A DB Parameter Group is initially created with the default parameters
* for the database engine used by the DB Instance. To provide custom
* values for any of the parameters, you must modify the group after
* creating it using ModifyDBParameterGroup . Once you've created
* a DB Parameter Group, you need to associate it with your DB Instance
* using ModifyDBInstance . When you associate a new DB Parameter
* Group with a running DB Instance, you need to reboot the DB Instance
* for the new DB Parameter Group and associated settings to take effect.
*
*
* @param createDBParameterGroupRequest Container for the necessary
* parameters to execute the CreateDBParameterGroup operation on
* AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* CreateDBParameterGroup service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future createDBParameterGroupAsync(
final CreateDBParameterGroupRequest createDBParameterGroupRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DBParameterGroup call() throws Exception {
DBParameterGroup result;
try {
result = createDBParameterGroup(createDBParameterGroupRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(createDBParameterGroupRequest, result);
return result;
}
});
}
/**
*
* Creates a new DB Instance from a DB snapshot. The target database is
* created from the source database restore point with the same
* configuration as the original source database, except that the new RDS
* instance is created with the default security group.
*
*
* @param restoreDBInstanceFromDBSnapshotRequest Container for the
* necessary parameters to execute the RestoreDBInstanceFromDBSnapshot
* operation on AmazonRDS.
*
* @return A Java Future object containing the response from the
* RestoreDBInstanceFromDBSnapshot service method, as returned by
* AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future restoreDBInstanceFromDBSnapshotAsync(final RestoreDBInstanceFromDBSnapshotRequest restoreDBInstanceFromDBSnapshotRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DBInstance call() throws Exception {
return restoreDBInstanceFromDBSnapshot(restoreDBInstanceFromDBSnapshotRequest);
}
});
}
/**
*
* Creates a new DB Instance from a DB snapshot. The target database is
* created from the source database restore point with the same
* configuration as the original source database, except that the new RDS
* instance is created with the default security group.
*
*
* @param restoreDBInstanceFromDBSnapshotRequest Container for the
* necessary parameters to execute the RestoreDBInstanceFromDBSnapshot
* operation on AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* RestoreDBInstanceFromDBSnapshot service method, as returned by
* AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future restoreDBInstanceFromDBSnapshotAsync(
final RestoreDBInstanceFromDBSnapshotRequest restoreDBInstanceFromDBSnapshotRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DBInstance call() throws Exception {
DBInstance result;
try {
result = restoreDBInstanceFromDBSnapshot(restoreDBInstanceFromDBSnapshotRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(restoreDBInstanceFromDBSnapshotRequest, result);
return result;
}
});
}
/**
*
* Restores a DB Instance to an arbitrary point-in-time. Users can
* restore to any point in time before the latestRestorableTime for up to
* backupRetentionPeriod days. The target database is created from the
* source database with the same configuration as the original database
* except that the DB instance is created with the default DB security
* group.
*
*
* @param restoreDBInstanceToPointInTimeRequest Container for the
* necessary parameters to execute the RestoreDBInstanceToPointInTime
* operation on AmazonRDS.
*
* @return A Java Future object containing the response from the
* RestoreDBInstanceToPointInTime service method, as returned by
* AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future restoreDBInstanceToPointInTimeAsync(final RestoreDBInstanceToPointInTimeRequest restoreDBInstanceToPointInTimeRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DBInstance call() throws Exception {
return restoreDBInstanceToPointInTime(restoreDBInstanceToPointInTimeRequest);
}
});
}
/**
*
* Restores a DB Instance to an arbitrary point-in-time. Users can
* restore to any point in time before the latestRestorableTime for up to
* backupRetentionPeriod days. The target database is created from the
* source database with the same configuration as the original database
* except that the DB instance is created with the default DB security
* group.
*
*
* @param restoreDBInstanceToPointInTimeRequest Container for the
* necessary parameters to execute the RestoreDBInstanceToPointInTime
* operation on AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* RestoreDBInstanceToPointInTime service method, as returned by
* AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future restoreDBInstanceToPointInTimeAsync(
final RestoreDBInstanceToPointInTimeRequest restoreDBInstanceToPointInTimeRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DBInstance call() throws Exception {
DBInstance result;
try {
result = restoreDBInstanceToPointInTime(restoreDBInstanceToPointInTimeRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(restoreDBInstanceToPointInTimeRequest, result);
return result;
}
});
}
/**
*
* Removes metadata tags from a DB Instance.
*
*
* For an overview on tagging DB Instances, see
* DB Instance Tags.
*
*
* @param removeTagsFromResourceRequest Container for the necessary
* parameters to execute the RemoveTagsFromResource operation on
* AmazonRDS.
*
* @return A Java Future object containing the response from the
* RemoveTagsFromResource service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future removeTagsFromResourceAsync(final RemoveTagsFromResourceRequest removeTagsFromResourceRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public Void call() throws Exception {
removeTagsFromResource(removeTagsFromResourceRequest);
return null;
}
});
}
/**
*
* Removes metadata tags from a DB Instance.
*
*
* For an overview on tagging DB Instances, see
* DB Instance Tags.
*
*
* @param removeTagsFromResourceRequest Container for the necessary
* parameters to execute the RemoveTagsFromResource operation on
* AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* RemoveTagsFromResource service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future removeTagsFromResourceAsync(
final RemoveTagsFromResourceRequest removeTagsFromResourceRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public Void call() throws Exception {
try {
removeTagsFromResource(removeTagsFromResourceRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(removeTagsFromResourceRequest, null);
return null;
}
});
}
/**
*
* Describes all available options.
*
*
* @param describeOptionGroupOptionsRequest Container for the necessary
* parameters to execute the DescribeOptionGroupOptions operation on
* AmazonRDS.
*
* @return A Java Future object containing the response from the
* DescribeOptionGroupOptions service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future describeOptionGroupOptionsAsync(final DescribeOptionGroupOptionsRequest describeOptionGroupOptionsRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DescribeOptionGroupOptionsResult call() throws Exception {
return describeOptionGroupOptions(describeOptionGroupOptionsRequest);
}
});
}
/**
*
* Describes all available options.
*
*
* @param describeOptionGroupOptionsRequest Container for the necessary
* parameters to execute the DescribeOptionGroupOptions operation on
* AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* DescribeOptionGroupOptions service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future describeOptionGroupOptionsAsync(
final DescribeOptionGroupOptionsRequest describeOptionGroupOptionsRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DescribeOptionGroupOptionsResult call() throws Exception {
DescribeOptionGroupOptionsResult result;
try {
result = describeOptionGroupOptions(describeOptionGroupOptionsRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(describeOptionGroupOptionsRequest, result);
return result;
}
});
}
/**
*
* Modifies the parameters of a DBParameterGroup. To modify more than
* one parameter submit a list of the following: ParameterName,
* ParameterValue, and ApplyMethod. A maximum of 20 parameters can be
* modified in a single request.
*
*
* NOTE: The apply-immediate method can be used only for dynamic
* parameters; the pending-reboot method can be used with MySQL and
* Oracle DB Instances for either dynamic or static parameters. For
* Microsoft SQL Server DB Instances, the pending-reboot method can be
* used only for static parameters.
*
*
* @param modifyDBParameterGroupRequest Container for the necessary
* parameters to execute the ModifyDBParameterGroup operation on
* AmazonRDS.
*
* @return A Java Future object containing the response from the
* ModifyDBParameterGroup service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future modifyDBParameterGroupAsync(final ModifyDBParameterGroupRequest modifyDBParameterGroupRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public ModifyDBParameterGroupResult call() throws Exception {
return modifyDBParameterGroup(modifyDBParameterGroupRequest);
}
});
}
/**
*
* Modifies the parameters of a DBParameterGroup. To modify more than
* one parameter submit a list of the following: ParameterName,
* ParameterValue, and ApplyMethod. A maximum of 20 parameters can be
* modified in a single request.
*
*
* NOTE: The apply-immediate method can be used only for dynamic
* parameters; the pending-reboot method can be used with MySQL and
* Oracle DB Instances for either dynamic or static parameters. For
* Microsoft SQL Server DB Instances, the pending-reboot method can be
* used only for static parameters.
*
*
* @param modifyDBParameterGroupRequest Container for the necessary
* parameters to execute the ModifyDBParameterGroup operation on
* AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* ModifyDBParameterGroup service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future modifyDBParameterGroupAsync(
final ModifyDBParameterGroupRequest modifyDBParameterGroupRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public ModifyDBParameterGroupResult call() throws Exception {
ModifyDBParameterGroupResult result;
try {
result = modifyDBParameterGroup(modifyDBParameterGroupRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(modifyDBParameterGroupRequest, result);
return result;
}
});
}
/**
*
* Adds a source identifier to an existing RDS event notification
* subscription.
*
*
* @param addSourceIdentifierToSubscriptionRequest Container for the
* necessary parameters to execute the AddSourceIdentifierToSubscription
* operation on AmazonRDS.
*
* @return A Java Future object containing the response from the
* AddSourceIdentifierToSubscription service method, as returned by
* AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future addSourceIdentifierToSubscriptionAsync(final AddSourceIdentifierToSubscriptionRequest addSourceIdentifierToSubscriptionRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public EventSubscription call() throws Exception {
return addSourceIdentifierToSubscription(addSourceIdentifierToSubscriptionRequest);
}
});
}
/**
*
* Adds a source identifier to an existing RDS event notification
* subscription.
*
*
* @param addSourceIdentifierToSubscriptionRequest Container for the
* necessary parameters to execute the AddSourceIdentifierToSubscription
* operation on AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* AddSourceIdentifierToSubscription service method, as returned by
* AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future addSourceIdentifierToSubscriptionAsync(
final AddSourceIdentifierToSubscriptionRequest addSourceIdentifierToSubscriptionRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public EventSubscription call() throws Exception {
EventSubscription result;
try {
result = addSourceIdentifierToSubscription(addSourceIdentifierToSubscriptionRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(addSourceIdentifierToSubscriptionRequest, result);
return result;
}
});
}
/**
*
* Creates a new DB instance.
*
*
* @param createDBInstanceRequest Container for the necessary parameters
* to execute the CreateDBInstance operation on AmazonRDS.
*
* @return A Java Future object containing the response from the
* CreateDBInstance service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future createDBInstanceAsync(final CreateDBInstanceRequest createDBInstanceRequest)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DBInstance call() throws Exception {
return createDBInstance(createDBInstanceRequest);
}
});
}
/**
*
* Creates a new DB instance.
*
*
* @param createDBInstanceRequest Container for the necessary parameters
* to execute the CreateDBInstance operation on AmazonRDS.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* CreateDBInstance service method, as returned by AmazonRDS.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonRDS indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future createDBInstanceAsync(
final CreateDBInstanceRequest createDBInstanceRequest,
final AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable() {
public DBInstance call() throws Exception {
DBInstance result;
try {
result = createDBInstance(createDBInstanceRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(createDBInstanceRequest, result);
return result;
}
});
}
/**
*
* Deletes a DB subnet group.
*
*
*