@Generated(value="software.amazon.awssdk:codegen") @ThreadSafe public interface CodestarNotificationsClient extends AwsClient
builder()
method.
This AWS CodeStar Notifications API Reference provides descriptions and usage examples of the operations and data types for the AWS CodeStar Notifications API. You can use the AWS CodeStar Notifications API to work with the following objects:
Notification rules, by calling the following:
CreateNotificationRule, which creates a notification rule for a resource in your account.
DeleteNotificationRule, which deletes a notification rule.
DescribeNotificationRule, which provides information about a notification rule.
ListNotificationRules, which lists the notification rules associated with your account.
UpdateNotificationRule, which changes the name, events, or targets associated with a notification rule.
Subscribe, which subscribes a target to a notification rule.
Unsubscribe, which removes a target from a notification rule.
Targets, by calling the following:
DeleteTarget, which removes a notification rule target from a notification rule.
ListTargets, which lists the targets associated with a notification rule.
Events, by calling the following:
ListEventTypes, which lists the event types you can include in a notification rule.
Tags, by calling the following:
ListTagsForResource, which lists the tags already associated with a notification rule in your account.
TagResource, which associates a tag you provide with a notification rule in your account.
UntagResource, which removes a tag from a notification rule in your account.
For information about how to use AWS CodeStar Notifications, see the Amazon Web Services Developer Tools Console User Guide.
| Modifier and Type | Field and Description |
|---|---|
static String |
SERVICE_METADATA_ID
Value for looking up the service's metadata from the
ServiceMetadataProvider. |
static String |
SERVICE_NAME |
| Modifier and Type | Method and Description |
|---|---|
static CodestarNotificationsClientBuilder |
builder()
Create a builder that can be used to configure and create a
CodestarNotificationsClient. |
static CodestarNotificationsClient |
create()
Create a
CodestarNotificationsClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider. |
default CreateNotificationRuleResponse |
createNotificationRule(Consumer<CreateNotificationRuleRequest.Builder> createNotificationRuleRequest)
Creates a notification rule for a resource.
|
default CreateNotificationRuleResponse |
createNotificationRule(CreateNotificationRuleRequest createNotificationRuleRequest)
Creates a notification rule for a resource.
|
default DeleteNotificationRuleResponse |
deleteNotificationRule(Consumer<DeleteNotificationRuleRequest.Builder> deleteNotificationRuleRequest)
Deletes a notification rule for a resource.
|
default DeleteNotificationRuleResponse |
deleteNotificationRule(DeleteNotificationRuleRequest deleteNotificationRuleRequest)
Deletes a notification rule for a resource.
|
default DeleteTargetResponse |
deleteTarget(Consumer<DeleteTargetRequest.Builder> deleteTargetRequest)
Deletes a specified target for notifications.
|
default DeleteTargetResponse |
deleteTarget(DeleteTargetRequest deleteTargetRequest)
Deletes a specified target for notifications.
|
default DescribeNotificationRuleResponse |
describeNotificationRule(Consumer<DescribeNotificationRuleRequest.Builder> describeNotificationRuleRequest)
Returns information about a specified notification rule.
|
default DescribeNotificationRuleResponse |
describeNotificationRule(DescribeNotificationRuleRequest describeNotificationRuleRequest)
Returns information about a specified notification rule.
|
default ListEventTypesResponse |
listEventTypes(Consumer<ListEventTypesRequest.Builder> listEventTypesRequest)
Returns information about the event types available for configuring notifications.
|
default ListEventTypesResponse |
listEventTypes(ListEventTypesRequest listEventTypesRequest)
Returns information about the event types available for configuring notifications.
|
default ListEventTypesIterable |
listEventTypesPaginator(Consumer<ListEventTypesRequest.Builder> listEventTypesRequest)
Returns information about the event types available for configuring notifications.
|
default ListEventTypesIterable |
listEventTypesPaginator(ListEventTypesRequest listEventTypesRequest)
Returns information about the event types available for configuring notifications.
|
default ListNotificationRulesResponse |
listNotificationRules(Consumer<ListNotificationRulesRequest.Builder> listNotificationRulesRequest)
Returns a list of the notification rules for an Amazon Web Services account.
|
default ListNotificationRulesResponse |
listNotificationRules(ListNotificationRulesRequest listNotificationRulesRequest)
Returns a list of the notification rules for an Amazon Web Services account.
|
default ListNotificationRulesIterable |
listNotificationRulesPaginator(Consumer<ListNotificationRulesRequest.Builder> listNotificationRulesRequest)
Returns a list of the notification rules for an Amazon Web Services account.
|
default ListNotificationRulesIterable |
listNotificationRulesPaginator(ListNotificationRulesRequest listNotificationRulesRequest)
Returns a list of the notification rules for an Amazon Web Services account.
|
default ListTagsForResourceResponse |
listTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest)
Returns a list of the tags associated with a notification rule.
|
default ListTagsForResourceResponse |
listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest)
Returns a list of the tags associated with a notification rule.
|
default ListTargetsResponse |
listTargets(Consumer<ListTargetsRequest.Builder> listTargetsRequest)
Returns a list of the notification rule targets for an Amazon Web Services account.
|
default ListTargetsResponse |
listTargets(ListTargetsRequest listTargetsRequest)
Returns a list of the notification rule targets for an Amazon Web Services account.
|
default ListTargetsIterable |
listTargetsPaginator(Consumer<ListTargetsRequest.Builder> listTargetsRequest)
Returns a list of the notification rule targets for an Amazon Web Services account.
|
default ListTargetsIterable |
listTargetsPaginator(ListTargetsRequest listTargetsRequest)
Returns a list of the notification rule targets for an Amazon Web Services account.
|
default CodestarNotificationsServiceClientConfiguration |
serviceClientConfiguration() |
static ServiceMetadata |
serviceMetadata() |
default SubscribeResponse |
subscribe(Consumer<SubscribeRequest.Builder> subscribeRequest)
Creates an association between a notification rule and an Chatbot topic or Chatbot client so that the associated
target can receive notifications when the events described in the rule are triggered.
|
default SubscribeResponse |
subscribe(SubscribeRequest subscribeRequest)
Creates an association between a notification rule and an Chatbot topic or Chatbot client so that the associated
target can receive notifications when the events described in the rule are triggered.
|
default TagResourceResponse |
tagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest)
Associates a set of provided tags with a notification rule.
|
default TagResourceResponse |
tagResource(TagResourceRequest tagResourceRequest)
Associates a set of provided tags with a notification rule.
|
default UnsubscribeResponse |
unsubscribe(Consumer<UnsubscribeRequest.Builder> unsubscribeRequest)
Removes an association between a notification rule and an Chatbot topic so that subscribers to that topic stop
receiving notifications when the events described in the rule are triggered.
|
default UnsubscribeResponse |
unsubscribe(UnsubscribeRequest unsubscribeRequest)
Removes an association between a notification rule and an Chatbot topic so that subscribers to that topic stop
receiving notifications when the events described in the rule are triggered.
|
default UntagResourceResponse |
untagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest)
Removes the association between one or more provided tags and a notification rule.
|
default UntagResourceResponse |
untagResource(UntagResourceRequest untagResourceRequest)
Removes the association between one or more provided tags and a notification rule.
|
default UpdateNotificationRuleResponse |
updateNotificationRule(Consumer<UpdateNotificationRuleRequest.Builder> updateNotificationRuleRequest)
Updates a notification rule for a resource.
|
default UpdateNotificationRuleResponse |
updateNotificationRule(UpdateNotificationRuleRequest updateNotificationRuleRequest)
Updates a notification rule for a resource.
|
serviceNameclosestatic final String SERVICE_NAME
static final String SERVICE_METADATA_ID
ServiceMetadataProvider.default CreateNotificationRuleResponse createNotificationRule(CreateNotificationRuleRequest createNotificationRuleRequest) throws ResourceAlreadyExistsException, ValidationException, LimitExceededException, ConfigurationException, ConcurrentModificationException, AccessDeniedException, AwsServiceException, SdkClientException, CodestarNotificationsException
Creates a notification rule for a resource. The rule specifies the events you want notifications about and the targets (such as Chatbot topics or Chatbot clients configured for Slack) where you want to receive them.
createNotificationRuleRequest - ResourceAlreadyExistsException - A resource with the same name or ID already exists. Notification rule names must be unique in your Amazon
Web Services account.ValidationException - One or more parameter values are not valid.LimitExceededException - One of the AWS CodeStar Notifications limits has been exceeded. Limits apply to accounts, notification
rules, notifications, resources, and targets. For more information, see Limits.ConfigurationException - Some or all of the configuration is incomplete, missing, or not valid.ConcurrentModificationException - AWS CodeStar Notifications can't complete the request because the resource is being modified by another
process. Wait a few minutes and try again.AccessDeniedException - AWS CodeStar Notifications can't create the notification rule because you do not have sufficient
permissions.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodestarNotificationsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault CreateNotificationRuleResponse createNotificationRule(Consumer<CreateNotificationRuleRequest.Builder> createNotificationRuleRequest) throws ResourceAlreadyExistsException, ValidationException, LimitExceededException, ConfigurationException, ConcurrentModificationException, AccessDeniedException, AwsServiceException, SdkClientException, CodestarNotificationsException
Creates a notification rule for a resource. The rule specifies the events you want notifications about and the targets (such as Chatbot topics or Chatbot clients configured for Slack) where you want to receive them.
This is a convenience which creates an instance of the CreateNotificationRuleRequest.Builder avoiding the
need to create one manually via CreateNotificationRuleRequest.builder()
createNotificationRuleRequest - A Consumer that will call methods on CreateNotificationRuleRequest.Builder to create a
request.ResourceAlreadyExistsException - A resource with the same name or ID already exists. Notification rule names must be unique in your Amazon
Web Services account.ValidationException - One or more parameter values are not valid.LimitExceededException - One of the AWS CodeStar Notifications limits has been exceeded. Limits apply to accounts, notification
rules, notifications, resources, and targets. For more information, see Limits.ConfigurationException - Some or all of the configuration is incomplete, missing, or not valid.ConcurrentModificationException - AWS CodeStar Notifications can't complete the request because the resource is being modified by another
process. Wait a few minutes and try again.AccessDeniedException - AWS CodeStar Notifications can't create the notification rule because you do not have sufficient
permissions.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodestarNotificationsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault DeleteNotificationRuleResponse deleteNotificationRule(DeleteNotificationRuleRequest deleteNotificationRuleRequest) throws ValidationException, LimitExceededException, ConcurrentModificationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Deletes a notification rule for a resource.
deleteNotificationRuleRequest - ValidationException - One or more parameter values are not valid.LimitExceededException - One of the AWS CodeStar Notifications limits has been exceeded. Limits apply to accounts, notification
rules, notifications, resources, and targets. For more information, see Limits.ConcurrentModificationException - AWS CodeStar Notifications can't complete the request because the resource is being modified by another
process. Wait a few minutes and try again.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodestarNotificationsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault DeleteNotificationRuleResponse deleteNotificationRule(Consumer<DeleteNotificationRuleRequest.Builder> deleteNotificationRuleRequest) throws ValidationException, LimitExceededException, ConcurrentModificationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Deletes a notification rule for a resource.
This is a convenience which creates an instance of the DeleteNotificationRuleRequest.Builder avoiding the
need to create one manually via DeleteNotificationRuleRequest.builder()
deleteNotificationRuleRequest - A Consumer that will call methods on DeleteNotificationRuleRequest.Builder to create a
request.ValidationException - One or more parameter values are not valid.LimitExceededException - One of the AWS CodeStar Notifications limits has been exceeded. Limits apply to accounts, notification
rules, notifications, resources, and targets. For more information, see Limits.ConcurrentModificationException - AWS CodeStar Notifications can't complete the request because the resource is being modified by another
process. Wait a few minutes and try again.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodestarNotificationsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault DeleteTargetResponse deleteTarget(DeleteTargetRequest deleteTargetRequest) throws ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Deletes a specified target for notifications.
deleteTargetRequest - ValidationException - One or more parameter values are not valid.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodestarNotificationsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault DeleteTargetResponse deleteTarget(Consumer<DeleteTargetRequest.Builder> deleteTargetRequest) throws ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Deletes a specified target for notifications.
This is a convenience which creates an instance of the DeleteTargetRequest.Builder avoiding the need to
create one manually via DeleteTargetRequest.builder()
deleteTargetRequest - A Consumer that will call methods on DeleteTargetRequest.Builder to create a request.ValidationException - One or more parameter values are not valid.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodestarNotificationsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault DescribeNotificationRuleResponse describeNotificationRule(DescribeNotificationRuleRequest describeNotificationRuleRequest) throws ResourceNotFoundException, ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Returns information about a specified notification rule.
describeNotificationRuleRequest - ResourceNotFoundException - AWS CodeStar Notifications can't find a resource that matches the provided ARN.ValidationException - One or more parameter values are not valid.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodestarNotificationsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault DescribeNotificationRuleResponse describeNotificationRule(Consumer<DescribeNotificationRuleRequest.Builder> describeNotificationRuleRequest) throws ResourceNotFoundException, ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Returns information about a specified notification rule.
This is a convenience which creates an instance of the DescribeNotificationRuleRequest.Builder avoiding
the need to create one manually via DescribeNotificationRuleRequest.builder()
describeNotificationRuleRequest - A Consumer that will call methods on DescribeNotificationRuleRequest.Builder to create a
request.ResourceNotFoundException - AWS CodeStar Notifications can't find a resource that matches the provided ARN.ValidationException - One or more parameter values are not valid.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodestarNotificationsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListEventTypesResponse listEventTypes(ListEventTypesRequest listEventTypesRequest) throws InvalidNextTokenException, ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Returns information about the event types available for configuring notifications.
listEventTypesRequest - InvalidNextTokenException - The value for the enumeration token used in the request to return the next batch of the results is not
valid.ValidationException - One or more parameter values are not valid.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodestarNotificationsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListEventTypesResponse listEventTypes(Consumer<ListEventTypesRequest.Builder> listEventTypesRequest) throws InvalidNextTokenException, ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Returns information about the event types available for configuring notifications.
This is a convenience which creates an instance of the ListEventTypesRequest.Builder avoiding the need to
create one manually via ListEventTypesRequest.builder()
listEventTypesRequest - A Consumer that will call methods on ListEventTypesRequest.Builder to create a request.InvalidNextTokenException - The value for the enumeration token used in the request to return the next batch of the results is not
valid.ValidationException - One or more parameter values are not valid.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodestarNotificationsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListEventTypesIterable listEventTypesPaginator(ListEventTypesRequest listEventTypesRequest) throws InvalidNextTokenException, ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Returns information about the event types available for configuring notifications.
This is a variant of
listEventTypes(software.amazon.awssdk.services.codestarnotifications.model.ListEventTypesRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
internally handle making service calls for you.
When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
software.amazon.awssdk.services.codestarnotifications.paginators.ListEventTypesIterable responses = client.listEventTypesPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{
@code
software.amazon.awssdk.services.codestarnotifications.paginators.ListEventTypesIterable responses = client
.listEventTypesPaginator(request);
for (software.amazon.awssdk.services.codestarnotifications.model.ListEventTypesResponse response : responses) {
// do something;
}
}
3) Use iterator directly
software.amazon.awssdk.services.codestarnotifications.paginators.ListEventTypesIterable responses = client.listEventTypesPaginator(request);
responses.iterator().forEachRemaining(....);
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listEventTypes(software.amazon.awssdk.services.codestarnotifications.model.ListEventTypesRequest)
operation.
listEventTypesRequest - InvalidNextTokenException - The value for the enumeration token used in the request to return the next batch of the results is not
valid.ValidationException - One or more parameter values are not valid.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodestarNotificationsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListEventTypesIterable listEventTypesPaginator(Consumer<ListEventTypesRequest.Builder> listEventTypesRequest) throws InvalidNextTokenException, ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Returns information about the event types available for configuring notifications.
This is a variant of
listEventTypes(software.amazon.awssdk.services.codestarnotifications.model.ListEventTypesRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
internally handle making service calls for you.
When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
software.amazon.awssdk.services.codestarnotifications.paginators.ListEventTypesIterable responses = client.listEventTypesPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{
@code
software.amazon.awssdk.services.codestarnotifications.paginators.ListEventTypesIterable responses = client
.listEventTypesPaginator(request);
for (software.amazon.awssdk.services.codestarnotifications.model.ListEventTypesResponse response : responses) {
// do something;
}
}
3) Use iterator directly
software.amazon.awssdk.services.codestarnotifications.paginators.ListEventTypesIterable responses = client.listEventTypesPaginator(request);
responses.iterator().forEachRemaining(....);
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listEventTypes(software.amazon.awssdk.services.codestarnotifications.model.ListEventTypesRequest)
operation.
This is a convenience which creates an instance of the ListEventTypesRequest.Builder avoiding the need to
create one manually via ListEventTypesRequest.builder()
listEventTypesRequest - A Consumer that will call methods on ListEventTypesRequest.Builder to create a request.InvalidNextTokenException - The value for the enumeration token used in the request to return the next batch of the results is not
valid.ValidationException - One or more parameter values are not valid.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodestarNotificationsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListNotificationRulesResponse listNotificationRules(ListNotificationRulesRequest listNotificationRulesRequest) throws InvalidNextTokenException, ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Returns a list of the notification rules for an Amazon Web Services account.
listNotificationRulesRequest - InvalidNextTokenException - The value for the enumeration token used in the request to return the next batch of the results is not
valid.ValidationException - One or more parameter values are not valid.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodestarNotificationsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListNotificationRulesResponse listNotificationRules(Consumer<ListNotificationRulesRequest.Builder> listNotificationRulesRequest) throws InvalidNextTokenException, ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Returns a list of the notification rules for an Amazon Web Services account.
This is a convenience which creates an instance of the ListNotificationRulesRequest.Builder avoiding the
need to create one manually via ListNotificationRulesRequest.builder()
listNotificationRulesRequest - A Consumer that will call methods on ListNotificationRulesRequest.Builder to create a
request.InvalidNextTokenException - The value for the enumeration token used in the request to return the next batch of the results is not
valid.ValidationException - One or more parameter values are not valid.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodestarNotificationsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListNotificationRulesIterable listNotificationRulesPaginator(ListNotificationRulesRequest listNotificationRulesRequest) throws InvalidNextTokenException, ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Returns a list of the notification rules for an Amazon Web Services account.
This is a variant of
listNotificationRules(software.amazon.awssdk.services.codestarnotifications.model.ListNotificationRulesRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
internally handle making service calls for you.
When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
software.amazon.awssdk.services.codestarnotifications.paginators.ListNotificationRulesIterable responses = client.listNotificationRulesPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{
@code
software.amazon.awssdk.services.codestarnotifications.paginators.ListNotificationRulesIterable responses = client
.listNotificationRulesPaginator(request);
for (software.amazon.awssdk.services.codestarnotifications.model.ListNotificationRulesResponse response : responses) {
// do something;
}
}
3) Use iterator directly
software.amazon.awssdk.services.codestarnotifications.paginators.ListNotificationRulesIterable responses = client.listNotificationRulesPaginator(request);
responses.iterator().forEachRemaining(....);
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listNotificationRules(software.amazon.awssdk.services.codestarnotifications.model.ListNotificationRulesRequest)
operation.
listNotificationRulesRequest - InvalidNextTokenException - The value for the enumeration token used in the request to return the next batch of the results is not
valid.ValidationException - One or more parameter values are not valid.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodestarNotificationsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListNotificationRulesIterable listNotificationRulesPaginator(Consumer<ListNotificationRulesRequest.Builder> listNotificationRulesRequest) throws InvalidNextTokenException, ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Returns a list of the notification rules for an Amazon Web Services account.
This is a variant of
listNotificationRules(software.amazon.awssdk.services.codestarnotifications.model.ListNotificationRulesRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
internally handle making service calls for you.
When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
software.amazon.awssdk.services.codestarnotifications.paginators.ListNotificationRulesIterable responses = client.listNotificationRulesPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{
@code
software.amazon.awssdk.services.codestarnotifications.paginators.ListNotificationRulesIterable responses = client
.listNotificationRulesPaginator(request);
for (software.amazon.awssdk.services.codestarnotifications.model.ListNotificationRulesResponse response : responses) {
// do something;
}
}
3) Use iterator directly
software.amazon.awssdk.services.codestarnotifications.paginators.ListNotificationRulesIterable responses = client.listNotificationRulesPaginator(request);
responses.iterator().forEachRemaining(....);
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listNotificationRules(software.amazon.awssdk.services.codestarnotifications.model.ListNotificationRulesRequest)
operation.
This is a convenience which creates an instance of the ListNotificationRulesRequest.Builder avoiding the
need to create one manually via ListNotificationRulesRequest.builder()
listNotificationRulesRequest - A Consumer that will call methods on ListNotificationRulesRequest.Builder to create a
request.InvalidNextTokenException - The value for the enumeration token used in the request to return the next batch of the results is not
valid.ValidationException - One or more parameter values are not valid.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodestarNotificationsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListTagsForResourceResponse listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) throws ResourceNotFoundException, ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Returns a list of the tags associated with a notification rule.
listTagsForResourceRequest - ResourceNotFoundException - AWS CodeStar Notifications can't find a resource that matches the provided ARN.ValidationException - One or more parameter values are not valid.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodestarNotificationsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListTagsForResourceResponse listTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest) throws ResourceNotFoundException, ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Returns a list of the tags associated with a notification rule.
This is a convenience which creates an instance of the ListTagsForResourceRequest.Builder avoiding the
need to create one manually via ListTagsForResourceRequest.builder()
listTagsForResourceRequest - A Consumer that will call methods on ListTagsForResourceRequest.Builder to create a
request.ResourceNotFoundException - AWS CodeStar Notifications can't find a resource that matches the provided ARN.ValidationException - One or more parameter values are not valid.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodestarNotificationsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListTargetsResponse listTargets(ListTargetsRequest listTargetsRequest) throws InvalidNextTokenException, ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Returns a list of the notification rule targets for an Amazon Web Services account.
listTargetsRequest - InvalidNextTokenException - The value for the enumeration token used in the request to return the next batch of the results is not
valid.ValidationException - One or more parameter values are not valid.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodestarNotificationsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListTargetsResponse listTargets(Consumer<ListTargetsRequest.Builder> listTargetsRequest) throws InvalidNextTokenException, ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Returns a list of the notification rule targets for an Amazon Web Services account.
This is a convenience which creates an instance of the ListTargetsRequest.Builder avoiding the need to
create one manually via ListTargetsRequest.builder()
listTargetsRequest - A Consumer that will call methods on ListTargetsRequest.Builder to create a request.InvalidNextTokenException - The value for the enumeration token used in the request to return the next batch of the results is not
valid.ValidationException - One or more parameter values are not valid.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodestarNotificationsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListTargetsIterable listTargetsPaginator(ListTargetsRequest listTargetsRequest) throws InvalidNextTokenException, ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Returns a list of the notification rule targets for an Amazon Web Services account.
This is a variant of
listTargets(software.amazon.awssdk.services.codestarnotifications.model.ListTargetsRequest) operation.
The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally
handle making service calls for you.
When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
software.amazon.awssdk.services.codestarnotifications.paginators.ListTargetsIterable responses = client.listTargetsPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{
@code
software.amazon.awssdk.services.codestarnotifications.paginators.ListTargetsIterable responses = client
.listTargetsPaginator(request);
for (software.amazon.awssdk.services.codestarnotifications.model.ListTargetsResponse response : responses) {
// do something;
}
}
3) Use iterator directly
software.amazon.awssdk.services.codestarnotifications.paginators.ListTargetsIterable responses = client.listTargetsPaginator(request);
responses.iterator().forEachRemaining(....);
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listTargets(software.amazon.awssdk.services.codestarnotifications.model.ListTargetsRequest)
operation.
listTargetsRequest - InvalidNextTokenException - The value for the enumeration token used in the request to return the next batch of the results is not
valid.ValidationException - One or more parameter values are not valid.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodestarNotificationsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListTargetsIterable listTargetsPaginator(Consumer<ListTargetsRequest.Builder> listTargetsRequest) throws InvalidNextTokenException, ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Returns a list of the notification rule targets for an Amazon Web Services account.
This is a variant of
listTargets(software.amazon.awssdk.services.codestarnotifications.model.ListTargetsRequest) operation.
The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally
handle making service calls for you.
When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
software.amazon.awssdk.services.codestarnotifications.paginators.ListTargetsIterable responses = client.listTargetsPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{
@code
software.amazon.awssdk.services.codestarnotifications.paginators.ListTargetsIterable responses = client
.listTargetsPaginator(request);
for (software.amazon.awssdk.services.codestarnotifications.model.ListTargetsResponse response : responses) {
// do something;
}
}
3) Use iterator directly
software.amazon.awssdk.services.codestarnotifications.paginators.ListTargetsIterable responses = client.listTargetsPaginator(request);
responses.iterator().forEachRemaining(....);
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listTargets(software.amazon.awssdk.services.codestarnotifications.model.ListTargetsRequest)
operation.
This is a convenience which creates an instance of the ListTargetsRequest.Builder avoiding the need to
create one manually via ListTargetsRequest.builder()
listTargetsRequest - A Consumer that will call methods on ListTargetsRequest.Builder to create a request.InvalidNextTokenException - The value for the enumeration token used in the request to return the next batch of the results is not
valid.ValidationException - One or more parameter values are not valid.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodestarNotificationsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault SubscribeResponse subscribe(SubscribeRequest subscribeRequest) throws ValidationException, ResourceNotFoundException, ConfigurationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Creates an association between a notification rule and an Chatbot topic or Chatbot client so that the associated target can receive notifications when the events described in the rule are triggered.
subscribeRequest - ValidationException - One or more parameter values are not valid.ResourceNotFoundException - AWS CodeStar Notifications can't find a resource that matches the provided ARN.ConfigurationException - Some or all of the configuration is incomplete, missing, or not valid.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodestarNotificationsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault SubscribeResponse subscribe(Consumer<SubscribeRequest.Builder> subscribeRequest) throws ValidationException, ResourceNotFoundException, ConfigurationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Creates an association between a notification rule and an Chatbot topic or Chatbot client so that the associated target can receive notifications when the events described in the rule are triggered.
This is a convenience which creates an instance of the SubscribeRequest.Builder avoiding the need to
create one manually via SubscribeRequest.builder()
subscribeRequest - A Consumer that will call methods on SubscribeRequest.Builder to create a request.ValidationException - One or more parameter values are not valid.ResourceNotFoundException - AWS CodeStar Notifications can't find a resource that matches the provided ARN.ConfigurationException - Some or all of the configuration is incomplete, missing, or not valid.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodestarNotificationsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault TagResourceResponse tagResource(TagResourceRequest tagResourceRequest) throws ResourceNotFoundException, LimitExceededException, ValidationException, ConcurrentModificationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Associates a set of provided tags with a notification rule.
tagResourceRequest - ResourceNotFoundException - AWS CodeStar Notifications can't find a resource that matches the provided ARN.LimitExceededException - One of the AWS CodeStar Notifications limits has been exceeded. Limits apply to accounts, notification
rules, notifications, resources, and targets. For more information, see Limits.ValidationException - One or more parameter values are not valid.ConcurrentModificationException - AWS CodeStar Notifications can't complete the request because the resource is being modified by another
process. Wait a few minutes and try again.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodestarNotificationsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault TagResourceResponse tagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest) throws ResourceNotFoundException, LimitExceededException, ValidationException, ConcurrentModificationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Associates a set of provided tags with a notification rule.
This is a convenience which creates an instance of the TagResourceRequest.Builder avoiding the need to
create one manually via TagResourceRequest.builder()
tagResourceRequest - A Consumer that will call methods on TagResourceRequest.Builder to create a request.ResourceNotFoundException - AWS CodeStar Notifications can't find a resource that matches the provided ARN.LimitExceededException - One of the AWS CodeStar Notifications limits has been exceeded. Limits apply to accounts, notification
rules, notifications, resources, and targets. For more information, see Limits.ValidationException - One or more parameter values are not valid.ConcurrentModificationException - AWS CodeStar Notifications can't complete the request because the resource is being modified by another
process. Wait a few minutes and try again.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodestarNotificationsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault UnsubscribeResponse unsubscribe(UnsubscribeRequest unsubscribeRequest) throws ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Removes an association between a notification rule and an Chatbot topic so that subscribers to that topic stop receiving notifications when the events described in the rule are triggered.
unsubscribeRequest - ValidationException - One or more parameter values are not valid.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodestarNotificationsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault UnsubscribeResponse unsubscribe(Consumer<UnsubscribeRequest.Builder> unsubscribeRequest) throws ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Removes an association between a notification rule and an Chatbot topic so that subscribers to that topic stop receiving notifications when the events described in the rule are triggered.
This is a convenience which creates an instance of the UnsubscribeRequest.Builder avoiding the need to
create one manually via UnsubscribeRequest.builder()
unsubscribeRequest - A Consumer that will call methods on UnsubscribeRequest.Builder to create a request.ValidationException - One or more parameter values are not valid.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodestarNotificationsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault UntagResourceResponse untagResource(UntagResourceRequest untagResourceRequest) throws ResourceNotFoundException, LimitExceededException, ValidationException, ConcurrentModificationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Removes the association between one or more provided tags and a notification rule.
untagResourceRequest - ResourceNotFoundException - AWS CodeStar Notifications can't find a resource that matches the provided ARN.LimitExceededException - One of the AWS CodeStar Notifications limits has been exceeded. Limits apply to accounts, notification
rules, notifications, resources, and targets. For more information, see Limits.ValidationException - One or more parameter values are not valid.ConcurrentModificationException - AWS CodeStar Notifications can't complete the request because the resource is being modified by another
process. Wait a few minutes and try again.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodestarNotificationsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault UntagResourceResponse untagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest) throws ResourceNotFoundException, LimitExceededException, ValidationException, ConcurrentModificationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Removes the association between one or more provided tags and a notification rule.
This is a convenience which creates an instance of the UntagResourceRequest.Builder avoiding the need to
create one manually via UntagResourceRequest.builder()
untagResourceRequest - A Consumer that will call methods on UntagResourceRequest.Builder to create a request.ResourceNotFoundException - AWS CodeStar Notifications can't find a resource that matches the provided ARN.LimitExceededException - One of the AWS CodeStar Notifications limits has been exceeded. Limits apply to accounts, notification
rules, notifications, resources, and targets. For more information, see Limits.ValidationException - One or more parameter values are not valid.ConcurrentModificationException - AWS CodeStar Notifications can't complete the request because the resource is being modified by another
process. Wait a few minutes and try again.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodestarNotificationsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault UpdateNotificationRuleResponse updateNotificationRule(UpdateNotificationRuleRequest updateNotificationRuleRequest) throws ValidationException, ResourceNotFoundException, ConfigurationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Updates a notification rule for a resource. You can change the events that trigger the notification rule, the status of the rule, and the targets that receive the notifications.
To add or remove tags for a notification rule, you must use TagResource and UntagResource.
updateNotificationRuleRequest - ValidationException - One or more parameter values are not valid.ResourceNotFoundException - AWS CodeStar Notifications can't find a resource that matches the provided ARN.ConfigurationException - Some or all of the configuration is incomplete, missing, or not valid.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodestarNotificationsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault UpdateNotificationRuleResponse updateNotificationRule(Consumer<UpdateNotificationRuleRequest.Builder> updateNotificationRuleRequest) throws ValidationException, ResourceNotFoundException, ConfigurationException, AwsServiceException, SdkClientException, CodestarNotificationsException
Updates a notification rule for a resource. You can change the events that trigger the notification rule, the status of the rule, and the targets that receive the notifications.
To add or remove tags for a notification rule, you must use TagResource and UntagResource.
This is a convenience which creates an instance of the UpdateNotificationRuleRequest.Builder avoiding the
need to create one manually via UpdateNotificationRuleRequest.builder()
updateNotificationRuleRequest - A Consumer that will call methods on UpdateNotificationRuleRequest.Builder to create a
request.ValidationException - One or more parameter values are not valid.ResourceNotFoundException - AWS CodeStar Notifications can't find a resource that matches the provided ARN.ConfigurationException - Some or all of the configuration is incomplete, missing, or not valid.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodestarNotificationsException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptionstatic CodestarNotificationsClient create()
CodestarNotificationsClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider.static CodestarNotificationsClientBuilder builder()
CodestarNotificationsClient.static ServiceMetadata serviceMetadata()
default CodestarNotificationsServiceClientConfiguration serviceClientConfiguration()
serviceClientConfiguration in interface AwsClientserviceClientConfiguration in interface SdkClientCopyright © 2023. All rights reserved.