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
Modifier and TypeFieldDescriptionstatic final String
Value 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 CodestarNotificationsClient
create()
Create aCodestarNotificationsClient
with the region loaded from theDefaultAwsRegionProviderChain
and credentials loaded from theDefaultCredentialsProvider
.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) This is a variant oflistEventTypes(software.amazon.awssdk.services.codestarnotifications.model.ListEventTypesRequest)
operation.default ListEventTypesIterable
listEventTypesPaginator
(ListEventTypesRequest listEventTypesRequest) This is a variant oflistEventTypes(software.amazon.awssdk.services.codestarnotifications.model.ListEventTypesRequest)
operation.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) This is a variant oflistNotificationRules(software.amazon.awssdk.services.codestarnotifications.model.ListNotificationRulesRequest)
operation.default ListNotificationRulesIterable
listNotificationRulesPaginator
(ListNotificationRulesRequest listNotificationRulesRequest) This is a variant oflistNotificationRules(software.amazon.awssdk.services.codestarnotifications.model.ListNotificationRulesRequest)
operation.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) This is a variant oflistTargets(software.amazon.awssdk.services.codestarnotifications.model.ListTargetsRequest)
operation.default ListTargetsIterable
listTargetsPaginator
(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 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.Methods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
close
Methods 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.Builder
avoiding the need to create one manually viaCreateNotificationRuleRequest.builder()
- Parameters:
createNotificationRuleRequest
- AConsumer
that will call methods onCreateNotificationRuleRequest.Builder
to 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.Builder
avoiding the need to create one manually viaDeleteNotificationRuleRequest.builder()
- Parameters:
deleteNotificationRuleRequest
- AConsumer
that will call methods onDeleteNotificationRuleRequest.Builder
to 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.Builder
avoiding the need to create one manually viaDeleteTargetRequest.builder()
- Parameters:
deleteTargetRequest
- AConsumer
that will call methods onDeleteTargetRequest.Builder
to 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.Builder
avoiding the need to create one manually viaDescribeNotificationRuleRequest.builder()
- Parameters:
describeNotificationRuleRequest
- AConsumer
that will call methods onDescribeNotificationRuleRequest.Builder
to 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.Builder
avoiding the need to create one manually viaListEventTypesRequest.builder()
- Parameters:
listEventTypesRequest
- AConsumer
that will call methods onListEventTypesRequest.Builder
to 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 Streamsoftware.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 Streamsoftware.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.Builder
avoiding the need to create one manually viaListEventTypesRequest.builder()
- Parameters:
listEventTypesRequest
- AConsumer
that will call methods onListEventTypesRequest.Builder
to 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.Builder
avoiding the need to create one manually viaListNotificationRulesRequest.builder()
- Parameters:
listNotificationRulesRequest
- AConsumer
that will call methods onListNotificationRulesRequest.Builder
to 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 Streamsoftware.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 Streamsoftware.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.Builder
avoiding the need to create one manually viaListNotificationRulesRequest.builder()
- Parameters:
listNotificationRulesRequest
- AConsumer
that will call methods onListNotificationRulesRequest.Builder
to 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.Builder
avoiding the need to create one manually viaListTagsForResourceRequest.builder()
- Parameters:
listTagsForResourceRequest
- AConsumer
that will call methods onListTagsForResourceRequest.Builder
to 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.Builder
avoiding the need to create one manually viaListTargetsRequest.builder()
- Parameters:
listTargetsRequest
- AConsumer
that will call methods onListTargetsRequest.Builder
to 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 Streamsoftware.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 Streamsoftware.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.Builder
avoiding the need to create one manually viaListTargetsRequest.builder()
- Parameters:
listTargetsRequest
- AConsumer
that will call methods onListTargetsRequest.Builder
to 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.Builder
avoiding the need to create one manually viaSubscribeRequest.builder()
- Parameters:
subscribeRequest
- AConsumer
that will call methods onSubscribeRequest.Builder
to 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.Builder
avoiding the need to create one manually viaTagResourceRequest.builder()
- Parameters:
tagResourceRequest
- AConsumer
that will call methods onTagResourceRequest.Builder
to 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.Builder
avoiding the need to create one manually viaUnsubscribeRequest.builder()
- Parameters:
unsubscribeRequest
- AConsumer
that will call methods onUnsubscribeRequest.Builder
to 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.Builder
avoiding the need to create one manually viaUntagResourceRequest.builder()
- Parameters:
untagResourceRequest
- AConsumer
that will call methods onUntagResourceRequest.Builder
to 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.Builder
avoiding the need to create one manually viaUpdateNotificationRuleRequest.builder()
- Parameters:
updateNotificationRuleRequest
- AConsumer
that will call methods onUpdateNotificationRuleRequest.Builder
to create a request.- Returns:
- Result of the UpdateNotificationRule operation returned by the service.
- See Also:
-
create
Create aCodestarNotificationsClient
with the region loaded from theDefaultAwsRegionProviderChain
and credentials loaded from theDefaultCredentialsProvider
. -
builder
Create a builder that can be used to configure and create aCodestarNotificationsClient
. -
serviceMetadata
-
serviceClientConfiguration
Description copied from interface:SdkClient
The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration- Specified by:
serviceClientConfiguration
in interfaceAwsClient
- Specified by:
serviceClientConfiguration
in interfaceSdkClient
- Returns:
- SdkServiceClientConfiguration
-