public class AmazonCloudWatchEventsAsyncClient extends AmazonCloudWatchEventsClient implements AmazonCloudWatchEventsAsync
AsyncHandler can be
used to receive notification when an asynchronous operation completes.
Amazon CloudWatch Events helps you to respond to state changes in your AWS resources. When your resources change state they automatically send events into an event stream. You can create rules that match selected events in the stream and route them to targets to take action. You can also use rules to take action on a pre-determined schedule. For example, you can configure rules to:
For more information about Amazon CloudWatch Events features, see the Amazon CloudWatch Developer Guide.
LOGGING_AWS_REQUEST_METRIC| Constructor and Description |
|---|
AmazonCloudWatchEventsAsyncClient()
Constructs a new asynchronous client to invoke service methods on Amazon
CloudWatch Events.
|
AmazonCloudWatchEventsAsyncClient(AWSCredentials awsCredentials)
Constructs a new asynchronous client to invoke service methods on Amazon
CloudWatch Events using the specified AWS account credentials.
|
AmazonCloudWatchEventsAsyncClient(AWSCredentials awsCredentials,
ClientConfiguration clientConfiguration,
ExecutorService executorService)
Constructs a new asynchronous client to invoke service methods on Amazon
CloudWatch Events using the specified AWS account credentials, executor
service, and client configuration options.
|
AmazonCloudWatchEventsAsyncClient(AWSCredentials awsCredentials,
ExecutorService executorService)
Constructs a new asynchronous client to invoke service methods on Amazon
CloudWatch Events using the specified AWS account credentials and
executor service.
|
AmazonCloudWatchEventsAsyncClient(AWSCredentialsProvider awsCredentialsProvider)
Constructs a new asynchronous client to invoke service methods on Amazon
CloudWatch Events using the specified AWS account credentials provider.
|
AmazonCloudWatchEventsAsyncClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration)
Constructs a new asynchronous client to invoke service methods on Amazon
CloudWatch Events using the provided AWS account credentials provider and
client configuration options.
|
AmazonCloudWatchEventsAsyncClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration,
ExecutorService executorService)
Constructs a new asynchronous client to invoke service methods on Amazon
CloudWatch Events using the specified AWS account credentials provider,
executor service, and client configuration options.
|
AmazonCloudWatchEventsAsyncClient(AWSCredentialsProvider awsCredentialsProvider,
ExecutorService executorService)
Constructs a new asynchronous client to invoke service methods on Amazon
CloudWatch Events using the specified AWS account credentials provider
and executor service.
|
AmazonCloudWatchEventsAsyncClient(ClientConfiguration clientConfiguration)
Constructs a new asynchronous client to invoke service methods on Amazon
CloudWatch Events.
|
deleteRule, describeRule, disableRule, enableRule, getCachedResponseMetadata, listRuleNamesByTarget, listRules, listTargetsByRule, putEvents, putRule, putTargets, removeTargets, testEventPatternaddRequestHandler, addRequestHandler, configureRegion, getRequestMetricsCollector, getServiceName, getSignerByURI, getSignerRegionOverride, getTimeOffset, removeRequestHandler, removeRequestHandler, setEndpoint, setEndpoint, setRegion, setServiceNameIntern, setSignerRegionOverride, setTimeOffset, withEndpoint, withRegion, withRegion, withTimeOffsetequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdeleteRule, describeRule, disableRule, enableRule, getCachedResponseMetadata, listRuleNamesByTarget, listRules, listTargetsByRule, putEvents, putRule, putTargets, removeTargets, setEndpoint, setRegion, testEventPatternpublic AmazonCloudWatchEventsAsyncClient()
Asynchronous methods are delegated to a fixed-size thread pool containing 50 threads (to match the default maximum number of concurrent connections to the service).
public AmazonCloudWatchEventsAsyncClient(ClientConfiguration clientConfiguration)
Asynchronous methods are delegated to a fixed-size thread pool containing
a number of threads equal to the maximum number of concurrent connections
configured via ClientConfiguration.getMaxConnections().
clientConfiguration - The client configuration options controlling how this client
connects to Amazon CloudWatch Events (ex: proxy settings, retry
counts, etc).DefaultAWSCredentialsProviderChain,
Executors.newFixedThreadPool(int)public AmazonCloudWatchEventsAsyncClient(AWSCredentials awsCredentials)
Asynchronous methods are delegated to a fixed-size thread pool containing 50 threads (to match the default maximum number of concurrent connections to the service).
awsCredentials - The AWS credentials (access key ID and secret key) to use when
authenticating with AWS services.Executors.newFixedThreadPool(int)public AmazonCloudWatchEventsAsyncClient(AWSCredentials awsCredentials, ExecutorService executorService)
awsCredentials - The AWS credentials (access key ID and secret key) to use when
authenticating with AWS services.executorService - The executor service by which all asynchronous requests will be
executed.public AmazonCloudWatchEventsAsyncClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration, ExecutorService executorService)
awsCredentials - The AWS credentials (access key ID and secret key) to use when
authenticating with AWS services.clientConfiguration - Client configuration options (ex: max retry limit, proxy settings,
etc).executorService - The executor service by which all asynchronous requests will be
executed.public AmazonCloudWatchEventsAsyncClient(AWSCredentialsProvider awsCredentialsProvider)
Asynchronous methods are delegated to a fixed-size thread pool containing 50 threads (to match the default maximum number of concurrent connections to the service).
awsCredentialsProvider - The AWS credentials provider which will provide credentials to
authenticate requests with AWS services.Executors.newFixedThreadPool(int)public AmazonCloudWatchEventsAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration)
Asynchronous methods are delegated to a fixed-size thread pool containing
a number of threads equal to the maximum number of concurrent connections
configured via ClientConfiguration.getMaxConnections().
awsCredentialsProvider - The AWS credentials provider which will provide credentials to
authenticate requests with AWS services.clientConfiguration - Client configuration options (ex: max retry limit, proxy settings,
etc).DefaultAWSCredentialsProviderChain,
Executors.newFixedThreadPool(int)public AmazonCloudWatchEventsAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ExecutorService executorService)
awsCredentialsProvider - The AWS credentials provider which will provide credentials to
authenticate requests with AWS services.executorService - The executor service by which all asynchronous requests will be
executed.public AmazonCloudWatchEventsAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, ExecutorService executorService)
awsCredentialsProvider - The AWS credentials provider which will provide credentials to
authenticate requests with AWS services.clientConfiguration - Client configuration options (ex: max retry limit, proxy settings,
etc).executorService - The executor service by which all asynchronous requests will be
executed.public ExecutorService getExecutorService()
public Future<Void> deleteRuleAsync(DeleteRuleRequest request)
AmazonCloudWatchEventsAsyncDeletes a rule. You must remove all targets from a rule using RemoveTargets before you can delete the rule.
Note: When you make a change with this action, incoming events might still continue to match to the deleted rule. Please allow a short period of time for changes to take effect.
deleteRuleAsync in interface AmazonCloudWatchEventsAsyncrequest - Container for the parameters to the DeleteRule operation.public Future<Void> deleteRuleAsync(DeleteRuleRequest request, AsyncHandler<DeleteRuleRequest,Void> asyncHandler)
AmazonCloudWatchEventsAsyncDeletes a rule. You must remove all targets from a rule using RemoveTargets before you can delete the rule.
Note: When you make a change with this action, incoming events might still continue to match to the deleted rule. Please allow a short period of time for changes to take effect.
deleteRuleAsync in interface AmazonCloudWatchEventsAsyncrequest - Container for the parameters to the DeleteRule operation.asyncHandler - Asynchronous callback handler for events in the lifecycle of the
request. Users can provide an implementation of the callback
methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<DescribeRuleResult> describeRuleAsync(DescribeRuleRequest request)
AmazonCloudWatchEventsAsyncDescribes the details of the specified rule.
describeRuleAsync in interface AmazonCloudWatchEventsAsyncrequest - Container for the parameters to the DescribeRule operation.public Future<DescribeRuleResult> describeRuleAsync(DescribeRuleRequest request, AsyncHandler<DescribeRuleRequest,DescribeRuleResult> asyncHandler)
AmazonCloudWatchEventsAsyncDescribes the details of the specified rule.
describeRuleAsync in interface AmazonCloudWatchEventsAsyncrequest - Container for the parameters to the DescribeRule operation.asyncHandler - Asynchronous callback handler for events in the lifecycle of the
request. Users can provide an implementation of the callback
methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<Void> disableRuleAsync(DisableRuleRequest request)
AmazonCloudWatchEventsAsyncDisables a rule. A disabled rule won't match any events, and won't self-trigger if it has a schedule expression.
Note: When you make a change with this action, incoming events might still continue to match to the disabled rule. Please allow a short period of time for changes to take effect.
disableRuleAsync in interface AmazonCloudWatchEventsAsyncrequest - Container for the parameters to the DisableRule operation.public Future<Void> disableRuleAsync(DisableRuleRequest request, AsyncHandler<DisableRuleRequest,Void> asyncHandler)
AmazonCloudWatchEventsAsyncDisables a rule. A disabled rule won't match any events, and won't self-trigger if it has a schedule expression.
Note: When you make a change with this action, incoming events might still continue to match to the disabled rule. Please allow a short period of time for changes to take effect.
disableRuleAsync in interface AmazonCloudWatchEventsAsyncrequest - Container for the parameters to the DisableRule operation.asyncHandler - Asynchronous callback handler for events in the lifecycle of the
request. Users can provide an implementation of the callback
methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<Void> enableRuleAsync(EnableRuleRequest request)
AmazonCloudWatchEventsAsyncEnables a rule. If the rule does not exist, the operation fails.
Note: When you make a change with this action, incoming events might not immediately start matching to a newly enabled rule. Please allow a short period of time for changes to take effect.
enableRuleAsync in interface AmazonCloudWatchEventsAsyncrequest - Container for the parameters to the EnableRule operation.public Future<Void> enableRuleAsync(EnableRuleRequest request, AsyncHandler<EnableRuleRequest,Void> asyncHandler)
AmazonCloudWatchEventsAsyncEnables a rule. If the rule does not exist, the operation fails.
Note: When you make a change with this action, incoming events might not immediately start matching to a newly enabled rule. Please allow a short period of time for changes to take effect.
enableRuleAsync in interface AmazonCloudWatchEventsAsyncrequest - Container for the parameters to the EnableRule operation.asyncHandler - Asynchronous callback handler for events in the lifecycle of the
request. Users can provide an implementation of the callback
methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<ListRuleNamesByTargetResult> listRuleNamesByTargetAsync(ListRuleNamesByTargetRequest request)
AmazonCloudWatchEventsAsyncLists the names of the rules that the given target is put to. Using this action, you can find out which of the rules in Amazon CloudWatch Events can invoke a specific target in your account. If you have more rules in your account than the given limit, the results will be paginated. In that case, use the next token returned in the response and repeat the ListRulesByTarget action until the NextToken in the response is returned as null.
listRuleNamesByTargetAsync in interface AmazonCloudWatchEventsAsyncrequest - Container for the parameters to the ListRuleNamesByTarget
operation.public Future<ListRuleNamesByTargetResult> listRuleNamesByTargetAsync(ListRuleNamesByTargetRequest request, AsyncHandler<ListRuleNamesByTargetRequest,ListRuleNamesByTargetResult> asyncHandler)
AmazonCloudWatchEventsAsyncLists the names of the rules that the given target is put to. Using this action, you can find out which of the rules in Amazon CloudWatch Events can invoke a specific target in your account. If you have more rules in your account than the given limit, the results will be paginated. In that case, use the next token returned in the response and repeat the ListRulesByTarget action until the NextToken in the response is returned as null.
listRuleNamesByTargetAsync in interface AmazonCloudWatchEventsAsyncrequest - Container for the parameters to the ListRuleNamesByTarget
operation.asyncHandler - Asynchronous callback handler for events in the lifecycle of the
request. Users can provide an implementation of the callback
methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<ListRulesResult> listRulesAsync(ListRulesRequest request)
AmazonCloudWatchEventsAsyncLists the Amazon CloudWatch Events rules in your account. You can either list all the rules or you can provide a prefix to match to the rule names. If you have more rules in your account than the given limit, the results will be paginated. In that case, use the next token returned in the response and repeat the ListRules action until the NextToken in the response is returned as null.
listRulesAsync in interface AmazonCloudWatchEventsAsyncrequest - Container for the parameters to the ListRules operation.public Future<ListRulesResult> listRulesAsync(ListRulesRequest request, AsyncHandler<ListRulesRequest,ListRulesResult> asyncHandler)
AmazonCloudWatchEventsAsyncLists the Amazon CloudWatch Events rules in your account. You can either list all the rules or you can provide a prefix to match to the rule names. If you have more rules in your account than the given limit, the results will be paginated. In that case, use the next token returned in the response and repeat the ListRules action until the NextToken in the response is returned as null.
listRulesAsync in interface AmazonCloudWatchEventsAsyncrequest - Container for the parameters to the ListRules operation.asyncHandler - Asynchronous callback handler for events in the lifecycle of the
request. Users can provide an implementation of the callback
methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<ListTargetsByRuleResult> listTargetsByRuleAsync(ListTargetsByRuleRequest request)
AmazonCloudWatchEventsAsyncLists of targets assigned to the rule.
listTargetsByRuleAsync in interface AmazonCloudWatchEventsAsyncrequest - Container for the parameters to the ListTargetsByRule
operation.public Future<ListTargetsByRuleResult> listTargetsByRuleAsync(ListTargetsByRuleRequest request, AsyncHandler<ListTargetsByRuleRequest,ListTargetsByRuleResult> asyncHandler)
AmazonCloudWatchEventsAsyncLists of targets assigned to the rule.
listTargetsByRuleAsync in interface AmazonCloudWatchEventsAsyncrequest - Container for the parameters to the ListTargetsByRule
operation.asyncHandler - Asynchronous callback handler for events in the lifecycle of the
request. Users can provide an implementation of the callback
methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<PutEventsResult> putEventsAsync(PutEventsRequest request)
AmazonCloudWatchEventsAsyncSends custom events to Amazon CloudWatch Events so that they can be matched to rules.
putEventsAsync in interface AmazonCloudWatchEventsAsyncrequest - Container for the parameters to the PutEvents operation.public Future<PutEventsResult> putEventsAsync(PutEventsRequest request, AsyncHandler<PutEventsRequest,PutEventsResult> asyncHandler)
AmazonCloudWatchEventsAsyncSends custom events to Amazon CloudWatch Events so that they can be matched to rules.
putEventsAsync in interface AmazonCloudWatchEventsAsyncrequest - Container for the parameters to the PutEvents operation.asyncHandler - Asynchronous callback handler for events in the lifecycle of the
request. Users can provide an implementation of the callback
methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<PutRuleResult> putRuleAsync(PutRuleRequest request)
AmazonCloudWatchEventsAsyncCreates or updates a rule. Rules are enabled by default, or based on value of the State parameter. You can disable a rule using DisableRule.
Note: When you make a change with this action, incoming events might not immediately start matching to new or updated rules. Please allow a short period of time for changes to take effect.
A rule must contain at least an EventPattern or ScheduleExpression. Rules with EventPatterns are triggered when a matching event is observed. Rules with ScheduleExpressions self-trigger based on the given schedule. A rule can have both an EventPattern and a ScheduleExpression, in which case the rule will trigger on matching events as well as on a schedule.
Note: Most services in AWS treat : or / as the same character in Amazon Resource Names (ARNs). However, CloudWatch Events uses an exact match in event patterns and rules. Be sure to use the correct ARN characters when creating event patterns so that they match the ARN syntax in the event you want to match.
putRuleAsync in interface AmazonCloudWatchEventsAsyncrequest - Container for the parameters to the PutRule operation.public Future<PutRuleResult> putRuleAsync(PutRuleRequest request, AsyncHandler<PutRuleRequest,PutRuleResult> asyncHandler)
AmazonCloudWatchEventsAsyncCreates or updates a rule. Rules are enabled by default, or based on value of the State parameter. You can disable a rule using DisableRule.
Note: When you make a change with this action, incoming events might not immediately start matching to new or updated rules. Please allow a short period of time for changes to take effect.
A rule must contain at least an EventPattern or ScheduleExpression. Rules with EventPatterns are triggered when a matching event is observed. Rules with ScheduleExpressions self-trigger based on the given schedule. A rule can have both an EventPattern and a ScheduleExpression, in which case the rule will trigger on matching events as well as on a schedule.
Note: Most services in AWS treat : or / as the same character in Amazon Resource Names (ARNs). However, CloudWatch Events uses an exact match in event patterns and rules. Be sure to use the correct ARN characters when creating event patterns so that they match the ARN syntax in the event you want to match.
putRuleAsync in interface AmazonCloudWatchEventsAsyncrequest - Container for the parameters to the PutRule operation.asyncHandler - Asynchronous callback handler for events in the lifecycle of the
request. Users can provide an implementation of the callback
methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<PutTargetsResult> putTargetsAsync(PutTargetsRequest request)
AmazonCloudWatchEventsAsyncAdds target(s) to a rule. Updates the target(s) if they are already associated with the role. In other words, if there is already a target with the given target ID, then the target associated with that ID is updated.
Note: When you make a change with this action, when the associated rule triggers, new or updated targets might not be immediately invoked. Please allow a short period of time for changes to take effect.
putTargetsAsync in interface AmazonCloudWatchEventsAsyncrequest - Container for the parameters to the PutTargets operation.public Future<PutTargetsResult> putTargetsAsync(PutTargetsRequest request, AsyncHandler<PutTargetsRequest,PutTargetsResult> asyncHandler)
AmazonCloudWatchEventsAsyncAdds target(s) to a rule. Updates the target(s) if they are already associated with the role. In other words, if there is already a target with the given target ID, then the target associated with that ID is updated.
Note: When you make a change with this action, when the associated rule triggers, new or updated targets might not be immediately invoked. Please allow a short period of time for changes to take effect.
putTargetsAsync in interface AmazonCloudWatchEventsAsyncrequest - Container for the parameters to the PutTargets operation.asyncHandler - Asynchronous callback handler for events in the lifecycle of the
request. Users can provide an implementation of the callback
methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<RemoveTargetsResult> removeTargetsAsync(RemoveTargetsRequest request)
AmazonCloudWatchEventsAsyncRemoves target(s) from a rule so that when the rule is triggered, those targets will no longer be invoked.
Note: When you make a change with this action, when the associated rule triggers, removed targets might still continue to be invoked. Please allow a short period of time for changes to take effect.
removeTargetsAsync in interface AmazonCloudWatchEventsAsyncrequest - Container for the parameters to the RemoveTargets
operation.public Future<RemoveTargetsResult> removeTargetsAsync(RemoveTargetsRequest request, AsyncHandler<RemoveTargetsRequest,RemoveTargetsResult> asyncHandler)
AmazonCloudWatchEventsAsyncRemoves target(s) from a rule so that when the rule is triggered, those targets will no longer be invoked.
Note: When you make a change with this action, when the associated rule triggers, removed targets might still continue to be invoked. Please allow a short period of time for changes to take effect.
removeTargetsAsync in interface AmazonCloudWatchEventsAsyncrequest - Container for the parameters to the RemoveTargets
operation.asyncHandler - Asynchronous callback handler for events in the lifecycle of the
request. Users can provide an implementation of the callback
methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<TestEventPatternResult> testEventPatternAsync(TestEventPatternRequest request)
AmazonCloudWatchEventsAsyncTests whether an event pattern matches the provided event.
Note: Most services in AWS treat : or / as the same character in Amazon Resource Names (ARNs). However, CloudWatch Events uses an exact match in event patterns and rules. Be sure to use the correct ARN characters when creating event patterns so that they match the ARN syntax in the event you want to match.
testEventPatternAsync in interface AmazonCloudWatchEventsAsyncrequest - Container for the parameters to the TestEventPattern
operation.public Future<TestEventPatternResult> testEventPatternAsync(TestEventPatternRequest request, AsyncHandler<TestEventPatternRequest,TestEventPatternResult> asyncHandler)
AmazonCloudWatchEventsAsyncTests whether an event pattern matches the provided event.
Note: Most services in AWS treat : or / as the same character in Amazon Resource Names (ARNs). However, CloudWatch Events uses an exact match in event patterns and rules. Be sure to use the correct ARN characters when creating event patterns so that they match the ARN syntax in the event you want to match.
testEventPatternAsync in interface AmazonCloudWatchEventsAsyncrequest - Container for the parameters to the TestEventPattern
operation.asyncHandler - Asynchronous callback handler for events in the lifecycle of the
request. Users can provide an implementation of the callback
methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public void shutdown()
getExecutorService().shutdown() followed by
getExecutorService().awaitTermination() prior to calling this
method.shutdown in interface AmazonCloudWatchEventsshutdown in class AmazonWebServiceClientCopyright © 2013 Amazon Web Services, Inc. All Rights Reserved.