Class: Aws::CodeStarNotifications::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::CodeStarNotifications::Client
- Includes:
- Aws::ClientStubs
- Defined in:
- lib/aws-sdk-codestarnotifications/client.rb
Overview
An API client for CodeStarNotifications. To construct a client, you need to configure a ‘:region` and `:credentials`.
client = Aws::CodeStarNotifications::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
See #initialize for a full list of supported configuration options.
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
API Operations collapse
-
#create_notification_rule(params = {}) ⇒ Types::CreateNotificationRuleResult
Creates a notification rule for a resource.
-
#delete_notification_rule(params = {}) ⇒ Types::DeleteNotificationRuleResult
Deletes a notification rule for a resource.
-
#delete_target(params = {}) ⇒ Struct
Deletes a specified target for notifications.
-
#describe_notification_rule(params = {}) ⇒ Types::DescribeNotificationRuleResult
Returns information about a specified notification rule.
-
#list_event_types(params = {}) ⇒ Types::ListEventTypesResult
Returns information about the event types available for configuring notifications.
-
#list_notification_rules(params = {}) ⇒ Types::ListNotificationRulesResult
Returns a list of the notification rules for an Amazon Web Services account.
-
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResult
Returns a list of the tags associated with a notification rule.
-
#list_targets(params = {}) ⇒ Types::ListTargetsResult
Returns a list of the notification rule targets for an Amazon Web Services account.
-
#subscribe(params = {}) ⇒ Types::SubscribeResult
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.
-
#tag_resource(params = {}) ⇒ Types::TagResourceResult
Associates a set of provided tags with a notification rule.
-
#unsubscribe(params = {}) ⇒ Types::UnsubscribeResult
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.
-
#untag_resource(params = {}) ⇒ Struct
Removes the association between one or more provided tags and a notification rule.
-
#update_notification_rule(params = {}) ⇒ Struct
Updates a notification rule for a resource.
Class Method Summary collapse
- .errors_module ⇒ Object private
Instance Method Summary collapse
- #build_request(operation_name, params = {}) ⇒ Object private
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
- #waiter_names ⇒ Object deprecated private Deprecated.
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
444 445 446 |
# File 'lib/aws-sdk-codestarnotifications/client.rb', line 444 def initialize(*args) super end |
Class Attribute Details
.identifier ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1095 1096 1097 |
# File 'lib/aws-sdk-codestarnotifications/client.rb', line 1095 def identifier @identifier end |
Class Method Details
.errors_module ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1098 1099 1100 |
# File 'lib/aws-sdk-codestarnotifications/client.rb', line 1098 def errors_module Errors end |
Instance Method Details
#build_request(operation_name, params = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 |
# File 'lib/aws-sdk-codestarnotifications/client.rb', line 1068 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) tracer = config.telemetry_provider.tracer_provider.tracer( Aws::Telemetry.module_to_tracer_name('Aws::CodeStarNotifications') ) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config, tracer: tracer ) context[:gem_name] = 'aws-sdk-codestarnotifications' context[:gem_version] = '1.46.0' Seahorse::Client::Request.new(handlers, context) end |
#create_notification_rule(params = {}) ⇒ Types::CreateNotificationRuleResult
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.
538 539 540 541 |
# File 'lib/aws-sdk-codestarnotifications/client.rb', line 538 def create_notification_rule(params = {}, = {}) req = build_request(:create_notification_rule, params) req.send_request() end |
#delete_notification_rule(params = {}) ⇒ Types::DeleteNotificationRuleResult
Deletes a notification rule for a resource.
567 568 569 570 |
# File 'lib/aws-sdk-codestarnotifications/client.rb', line 567 def delete_notification_rule(params = {}, = {}) req = build_request(:delete_notification_rule, params) req.send_request() end |
#delete_target(params = {}) ⇒ Struct
Deletes a specified target for notifications.
597 598 599 600 |
# File 'lib/aws-sdk-codestarnotifications/client.rb', line 597 def delete_target(params = {}, = {}) req = build_request(:delete_target, params) req.send_request() end |
#describe_notification_rule(params = {}) ⇒ Types::DescribeNotificationRuleResult
Returns information about a specified notification rule.
653 654 655 656 |
# File 'lib/aws-sdk-codestarnotifications/client.rb', line 653 def describe_notification_rule(params = {}, = {}) req = build_request(:describe_notification_rule, params) req.send_request() end |
#list_event_types(params = {}) ⇒ Types::ListEventTypesResult
Returns information about the event types available for configuring notifications.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
706 707 708 709 |
# File 'lib/aws-sdk-codestarnotifications/client.rb', line 706 def list_event_types(params = {}, = {}) req = build_request(:list_event_types, params) req.send_request() end |
#list_notification_rules(params = {}) ⇒ Types::ListNotificationRulesResult
Returns a list of the notification rules for an Amazon Web Services account.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
763 764 765 766 |
# File 'lib/aws-sdk-codestarnotifications/client.rb', line 763 def list_notification_rules(params = {}, = {}) req = build_request(:list_notification_rules, params) req.send_request() end |
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResult
Returns a list of the tags associated with a notification rule.
792 793 794 795 |
# File 'lib/aws-sdk-codestarnotifications/client.rb', line 792 def (params = {}, = {}) req = build_request(:list_tags_for_resource, params) req.send_request() end |
#list_targets(params = {}) ⇒ Types::ListTargetsResult
Returns a list of the notification rule targets for an Amazon Web Services account.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
850 851 852 853 |
# File 'lib/aws-sdk-codestarnotifications/client.rb', line 850 def list_targets(params = {}, = {}) req = build_request(:list_targets, params) req.send_request() end |
#subscribe(params = {}) ⇒ Types::SubscribeResult
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.
894 895 896 897 |
# File 'lib/aws-sdk-codestarnotifications/client.rb', line 894 def subscribe(params = {}, = {}) req = build_request(:subscribe, params) req.send_request() end |
#tag_resource(params = {}) ⇒ Types::TagResourceResult
Associates a set of provided tags with a notification rule.
930 931 932 933 |
# File 'lib/aws-sdk-codestarnotifications/client.rb', line 930 def tag_resource(params = {}, = {}) req = build_request(:tag_resource, params) req.send_request() end |
#unsubscribe(params = {}) ⇒ Types::UnsubscribeResult
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.
965 966 967 968 |
# File 'lib/aws-sdk-codestarnotifications/client.rb', line 965 def unsubscribe(params = {}, = {}) req = build_request(:unsubscribe, params) req.send_request() end |
#untag_resource(params = {}) ⇒ Struct
Removes the association between one or more provided tags and a notification rule.
993 994 995 996 |
# File 'lib/aws-sdk-codestarnotifications/client.rb', line 993 def untag_resource(params = {}, = {}) req = build_request(:untag_resource, params) req.send_request() end |
#update_notification_rule(params = {}) ⇒ Struct
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.
<note markdown=“1”> To add or remove tags for a notification rule, you must use TagResource and UntagResource.
</note>
1059 1060 1061 1062 |
# File 'lib/aws-sdk-codestarnotifications/client.rb', line 1059 def update_notification_rule(params = {}, = {}) req = build_request(:update_notification_rule, params) req.send_request() end |
#waiter_names ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1088 1089 1090 |
# File 'lib/aws-sdk-codestarnotifications/client.rb', line 1088 def waiter_names [] end |