Interface CodestarNotificationsClient
- All Superinterfaces:
AutoCloseable,AwsClient,SdkAutoCloseable,SdkClient
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.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringValue for looking up the service's metadata from theServiceMetadataProvider.static final String -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Create a builder that can be used to configure and create aCodestarNotificationsClient.static CodestarNotificationsClientcreate()Create aCodestarNotificationsClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.default CreateNotificationRuleResponsecreateNotificationRule(Consumer<CreateNotificationRuleRequest.Builder> createNotificationRuleRequest) Creates a notification rule for a resource.default CreateNotificationRuleResponsecreateNotificationRule(CreateNotificationRuleRequest createNotificationRuleRequest) Creates a notification rule for a resource.default DeleteNotificationRuleResponsedeleteNotificationRule(Consumer<DeleteNotificationRuleRequest.Builder> deleteNotificationRuleRequest) Deletes a notification rule for a resource.default DeleteNotificationRuleResponsedeleteNotificationRule(DeleteNotificationRuleRequest deleteNotificationRuleRequest) Deletes a notification rule for a resource.default DeleteTargetResponsedeleteTarget(Consumer<DeleteTargetRequest.Builder> deleteTargetRequest) Deletes a specified target for notifications.default DeleteTargetResponsedeleteTarget(DeleteTargetRequest deleteTargetRequest) Deletes a specified target for notifications.default DescribeNotificationRuleResponsedescribeNotificationRule(Consumer<DescribeNotificationRuleRequest.Builder> describeNotificationRuleRequest) Returns information about a specified notification rule.default DescribeNotificationRuleResponsedescribeNotificationRule(DescribeNotificationRuleRequest describeNotificationRuleRequest) Returns information about a specified notification rule.default ListEventTypesResponselistEventTypes(Consumer<ListEventTypesRequest.Builder> listEventTypesRequest) Returns information about the event types available for configuring notifications.default ListEventTypesResponselistEventTypes(ListEventTypesRequest listEventTypesRequest) Returns information about the event types available for configuring notifications.default ListEventTypesIterablelistEventTypesPaginator(Consumer<ListEventTypesRequest.Builder> listEventTypesRequest) This is a variant oflistEventTypes(software.amazon.awssdk.services.codestarnotifications.model.ListEventTypesRequest)operation.default ListEventTypesIterablelistEventTypesPaginator(ListEventTypesRequest listEventTypesRequest) This is a variant oflistEventTypes(software.amazon.awssdk.services.codestarnotifications.model.ListEventTypesRequest)operation.default ListNotificationRulesResponselistNotificationRules(Consumer<ListNotificationRulesRequest.Builder> listNotificationRulesRequest) Returns a list of the notification rules for an Amazon Web Services account.default ListNotificationRulesResponselistNotificationRules(ListNotificationRulesRequest listNotificationRulesRequest) Returns a list of the notification rules for an Amazon Web Services account.default ListNotificationRulesIterablelistNotificationRulesPaginator(Consumer<ListNotificationRulesRequest.Builder> listNotificationRulesRequest) This is a variant oflistNotificationRules(software.amazon.awssdk.services.codestarnotifications.model.ListNotificationRulesRequest)operation.default ListNotificationRulesIterablelistNotificationRulesPaginator(ListNotificationRulesRequest listNotificationRulesRequest) This is a variant oflistNotificationRules(software.amazon.awssdk.services.codestarnotifications.model.ListNotificationRulesRequest)operation.default ListTagsForResourceResponselistTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest) Returns a list of the tags associated with a notification rule.default ListTagsForResourceResponselistTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) Returns a list of the tags associated with a notification rule.default ListTargetsResponselistTargets(Consumer<ListTargetsRequest.Builder> listTargetsRequest) Returns a list of the notification rule targets for an Amazon Web Services account.default ListTargetsResponselistTargets(ListTargetsRequest listTargetsRequest) Returns a list of the notification rule targets for an Amazon Web Services account.default ListTargetsIterablelistTargetsPaginator(Consumer<ListTargetsRequest.Builder> listTargetsRequest) This is a variant oflistTargets(software.amazon.awssdk.services.codestarnotifications.model.ListTargetsRequest)operation.default ListTargetsIterablelistTargetsPaginator(ListTargetsRequest listTargetsRequest) This is a variant oflistTargets(software.amazon.awssdk.services.codestarnotifications.model.ListTargetsRequest)operation.The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfigurationstatic ServiceMetadatadefault SubscribeResponsesubscribe(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 SubscribeResponsesubscribe(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 TagResourceResponsetagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest) Associates a set of provided tags with a notification rule.default TagResourceResponsetagResource(TagResourceRequest tagResourceRequest) Associates a set of provided tags with a notification rule.default UnsubscribeResponseunsubscribe(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 UnsubscribeResponseunsubscribe(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 UntagResourceResponseuntagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest) Removes the association between one or more provided tags and a notification rule.default UntagResourceResponseuntagResource(UntagResourceRequest untagResourceRequest) Removes the association between one or more provided tags and a notification rule.default UpdateNotificationRuleResponseupdateNotificationRule(Consumer<UpdateNotificationRuleRequest.Builder> updateNotificationRuleRequest) Updates a notification rule for a resource.default UpdateNotificationRuleResponseupdateNotificationRule(UpdateNotificationRuleRequest updateNotificationRuleRequest) Updates a notification rule for a resource.Methods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
closeMethods inherited from interface software.amazon.awssdk.core.SdkClient
serviceName
-
Field Details
-
SERVICE_NAME
- See Also:
-
SERVICE_METADATA_ID
Value for looking up the service's metadata from theServiceMetadataProvider.- See Also:
-
-
Method Details
-
createNotificationRule
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.
- Parameters:
createNotificationRuleRequest-- Returns:
- Result of the CreateNotificationRule operation returned by the service.
- See Also:
-
createNotificationRule
default 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.Builderavoiding the need to create one manually viaCreateNotificationRuleRequest.builder()- Parameters:
createNotificationRuleRequest- AConsumerthat will call methods onCreateNotificationRuleRequest.Builderto create a request.- Returns:
- Result of the CreateNotificationRule operation returned by the service.
- See Also:
-
deleteNotificationRule
default DeleteNotificationRuleResponse deleteNotificationRule(DeleteNotificationRuleRequest deleteNotificationRuleRequest) throws ValidationException, LimitExceededException, ConcurrentModificationException, AwsServiceException, SdkClientException, CodestarNotificationsException Deletes a notification rule for a resource.
- Parameters:
deleteNotificationRuleRequest-- Returns:
- Result of the DeleteNotificationRule operation returned by the service.
- See Also:
-
deleteNotificationRule
default 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.Builderavoiding the need to create one manually viaDeleteNotificationRuleRequest.builder()- Parameters:
deleteNotificationRuleRequest- AConsumerthat will call methods onDeleteNotificationRuleRequest.Builderto create a request.- Returns:
- Result of the DeleteNotificationRule operation returned by the service.
- See Also:
-
deleteTarget
default DeleteTargetResponse deleteTarget(DeleteTargetRequest deleteTargetRequest) throws ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException Deletes a specified target for notifications.
- Parameters:
deleteTargetRequest-- Returns:
- Result of the DeleteTarget operation returned by the service.
- See Also:
-
deleteTarget
default 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.Builderavoiding the need to create one manually viaDeleteTargetRequest.builder()- Parameters:
deleteTargetRequest- AConsumerthat will call methods onDeleteTargetRequest.Builderto create a request.- Returns:
- Result of the DeleteTarget operation returned by the service.
- See Also:
-
describeNotificationRule
default DescribeNotificationRuleResponse describeNotificationRule(DescribeNotificationRuleRequest describeNotificationRuleRequest) throws ResourceNotFoundException, ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException Returns information about a specified notification rule.
- Parameters:
describeNotificationRuleRequest-- Returns:
- Result of the DescribeNotificationRule operation returned by the service.
- See Also:
-
describeNotificationRule
default 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.Builderavoiding the need to create one manually viaDescribeNotificationRuleRequest.builder()- Parameters:
describeNotificationRuleRequest- AConsumerthat will call methods onDescribeNotificationRuleRequest.Builderto create a request.- Returns:
- Result of the DescribeNotificationRule operation returned by the service.
- See Also:
-
listEventTypes
default ListEventTypesResponse listEventTypes(ListEventTypesRequest listEventTypesRequest) throws InvalidNextTokenException, ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException Returns information about the event types available for configuring notifications.
- Parameters:
listEventTypesRequest-- Returns:
- Result of the ListEventTypes operation returned by the service.
- See Also:
-
listEventTypes
default 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.Builderavoiding the need to create one manually viaListEventTypesRequest.builder()- Parameters:
listEventTypesRequest- AConsumerthat will call methods onListEventTypesRequest.Builderto create a request.- Returns:
- Result of the ListEventTypes operation returned by the service.
- See Also:
-
listEventTypesPaginator
default ListEventTypesIterable listEventTypesPaginator(ListEventTypesRequest listEventTypesRequest) throws InvalidNextTokenException, ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException 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
2) Using For loopsoftware.amazon.awssdk.services.codestarnotifications.paginators.ListEventTypesIterable responses = client.listEventTypesPaginator(request); responses.stream().forEach(....);{ @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 directlysoftware.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.- Parameters:
listEventTypesRequest-- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
listEventTypesPaginator
default ListEventTypesIterable listEventTypesPaginator(Consumer<ListEventTypesRequest.Builder> listEventTypesRequest) throws InvalidNextTokenException, ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException 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
2) Using For loopsoftware.amazon.awssdk.services.codestarnotifications.paginators.ListEventTypesIterable responses = client.listEventTypesPaginator(request); responses.stream().forEach(....);{ @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 directlysoftware.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.Builderavoiding the need to create one manually viaListEventTypesRequest.builder()- Parameters:
listEventTypesRequest- AConsumerthat will call methods onListEventTypesRequest.Builderto create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
listNotificationRules
default ListNotificationRulesResponse listNotificationRules(ListNotificationRulesRequest listNotificationRulesRequest) throws InvalidNextTokenException, ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException Returns a list of the notification rules for an Amazon Web Services account.
- Parameters:
listNotificationRulesRequest-- Returns:
- Result of the ListNotificationRules operation returned by the service.
- See Also:
-
listNotificationRules
default 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.Builderavoiding the need to create one manually viaListNotificationRulesRequest.builder()- Parameters:
listNotificationRulesRequest- AConsumerthat will call methods onListNotificationRulesRequest.Builderto create a request.- Returns:
- Result of the ListNotificationRules operation returned by the service.
- See Also:
-
listNotificationRulesPaginator
default ListNotificationRulesIterable listNotificationRulesPaginator(ListNotificationRulesRequest listNotificationRulesRequest) throws InvalidNextTokenException, ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException 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
2) Using For loopsoftware.amazon.awssdk.services.codestarnotifications.paginators.ListNotificationRulesIterable responses = client.listNotificationRulesPaginator(request); responses.stream().forEach(....);{ @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 directlysoftware.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.- Parameters:
listNotificationRulesRequest-- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
listNotificationRulesPaginator
default ListNotificationRulesIterable listNotificationRulesPaginator(Consumer<ListNotificationRulesRequest.Builder> listNotificationRulesRequest) throws InvalidNextTokenException, ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException 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
2) Using For loopsoftware.amazon.awssdk.services.codestarnotifications.paginators.ListNotificationRulesIterable responses = client.listNotificationRulesPaginator(request); responses.stream().forEach(....);{ @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 directlysoftware.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.Builderavoiding the need to create one manually viaListNotificationRulesRequest.builder()- Parameters:
listNotificationRulesRequest- AConsumerthat will call methods onListNotificationRulesRequest.Builderto create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
listTagsForResource
default ListTagsForResourceResponse listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) throws ResourceNotFoundException, ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException Returns a list of the tags associated with a notification rule.
- Parameters:
listTagsForResourceRequest-- Returns:
- Result of the ListTagsForResource operation returned by the service.
- See Also:
-
listTagsForResource
default 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.Builderavoiding the need to create one manually viaListTagsForResourceRequest.builder()- Parameters:
listTagsForResourceRequest- AConsumerthat will call methods onListTagsForResourceRequest.Builderto create a request.- Returns:
- Result of the ListTagsForResource operation returned by the service.
- See Also:
-
listTargets
default ListTargetsResponse listTargets(ListTargetsRequest listTargetsRequest) throws InvalidNextTokenException, ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException Returns a list of the notification rule targets for an Amazon Web Services account.
- Parameters:
listTargetsRequest-- Returns:
- Result of the ListTargets operation returned by the service.
- See Also:
-
listTargets
default 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.Builderavoiding the need to create one manually viaListTargetsRequest.builder()- Parameters:
listTargetsRequest- AConsumerthat will call methods onListTargetsRequest.Builderto create a request.- Returns:
- Result of the ListTargets operation returned by the service.
- See Also:
-
listTargetsPaginator
default ListTargetsIterable listTargetsPaginator(ListTargetsRequest listTargetsRequest) throws InvalidNextTokenException, ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException 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
2) Using For loopsoftware.amazon.awssdk.services.codestarnotifications.paginators.ListTargetsIterable responses = client.listTargetsPaginator(request); responses.stream().forEach(....);{ @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 directlysoftware.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.- Parameters:
listTargetsRequest-- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
listTargetsPaginator
default ListTargetsIterable listTargetsPaginator(Consumer<ListTargetsRequest.Builder> listTargetsRequest) throws InvalidNextTokenException, ValidationException, AwsServiceException, SdkClientException, CodestarNotificationsException 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
2) Using For loopsoftware.amazon.awssdk.services.codestarnotifications.paginators.ListTargetsIterable responses = client.listTargetsPaginator(request); responses.stream().forEach(....);{ @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 directlysoftware.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.Builderavoiding the need to create one manually viaListTargetsRequest.builder()- Parameters:
listTargetsRequest- AConsumerthat will call methods onListTargetsRequest.Builderto create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
subscribe
default 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.
- Parameters:
subscribeRequest-- Returns:
- Result of the Subscribe operation returned by the service.
- See Also:
-
subscribe
default 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.Builderavoiding the need to create one manually viaSubscribeRequest.builder()- Parameters:
subscribeRequest- AConsumerthat will call methods onSubscribeRequest.Builderto create a request.- Returns:
- Result of the Subscribe operation returned by the service.
- See Also:
-
tagResource
default TagResourceResponse tagResource(TagResourceRequest tagResourceRequest) throws ResourceNotFoundException, LimitExceededException, ValidationException, ConcurrentModificationException, AwsServiceException, SdkClientException, CodestarNotificationsException Associates a set of provided tags with a notification rule.
- Parameters:
tagResourceRequest-- Returns:
- Result of the TagResource operation returned by the service.
- See Also:
-
tagResource
default 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.Builderavoiding the need to create one manually viaTagResourceRequest.builder()- Parameters:
tagResourceRequest- AConsumerthat will call methods onTagResourceRequest.Builderto create a request.- Returns:
- Result of the TagResource operation returned by the service.
- See Also:
-
unsubscribe
default 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.
- Parameters:
unsubscribeRequest-- Returns:
- Result of the Unsubscribe operation returned by the service.
- See Also:
-
unsubscribe
default 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.Builderavoiding the need to create one manually viaUnsubscribeRequest.builder()- Parameters:
unsubscribeRequest- AConsumerthat will call methods onUnsubscribeRequest.Builderto create a request.- Returns:
- Result of the Unsubscribe operation returned by the service.
- See Also:
-
untagResource
default 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.
- Parameters:
untagResourceRequest-- Returns:
- Result of the UntagResource operation returned by the service.
- See Also:
-
untagResource
default 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.Builderavoiding the need to create one manually viaUntagResourceRequest.builder()- Parameters:
untagResourceRequest- AConsumerthat will call methods onUntagResourceRequest.Builderto create a request.- Returns:
- Result of the UntagResource operation returned by the service.
- See Also:
-
updateNotificationRule
default 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.
- Parameters:
updateNotificationRuleRequest-- Returns:
- Result of the UpdateNotificationRule operation returned by the service.
- See Also:
-
updateNotificationRule
default 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.Builderavoiding the need to create one manually viaUpdateNotificationRuleRequest.builder()- Parameters:
updateNotificationRuleRequest- AConsumerthat will call methods onUpdateNotificationRuleRequest.Builderto create a request.- Returns:
- Result of the UpdateNotificationRule operation returned by the service.
- See Also:
-
create
Create aCodestarNotificationsClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider. -
builder
Create a builder that can be used to configure and create aCodestarNotificationsClient. -
serviceMetadata
-
serviceClientConfiguration
Description copied from interface:SdkClientThe SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration- Specified by:
serviceClientConfigurationin interfaceAwsClient- Specified by:
serviceClientConfigurationin interfaceSdkClient- Returns:
- SdkServiceClientConfiguration
-