Struct aws_sdk_codestarnotifications::client::Client
source · [−]pub struct Client { /* private fields */ }Expand description
Client for AWS CodeStar Notifications
Client for invoking operations on AWS CodeStar Notifications. Each operation on AWS CodeStar Notifications is a method on this
this struct. .send() MUST be invoked on the generated operations to dispatch the request to the service.
Examples
Constructing a client and invoking an operation
// create a shared configuration. This can be used & shared between multiple service clients.
let shared_config = aws_config::load_from_env().await;
let client = aws_sdk_codestarnotifications::Client::new(&shared_config);
// invoke an operation
/* let rsp = client
.<operation_name>().
.<param>("some value")
.send().await; */Constructing a client with custom configuration
use aws_config::retry::RetryConfig;
let shared_config = aws_config::load_from_env().await;
let config = aws_sdk_codestarnotifications::config::Builder::from(&shared_config)
.retry_config(RetryConfig::disabled())
.build();
let client = aws_sdk_codestarnotifications::Client::from_conf(config);Implementations
sourceimpl Client
impl Client
sourcepub fn with_config(
client: Client<DynConnector, DynMiddleware<DynConnector>>,
conf: Config
) -> Self
pub fn with_config(
client: Client<DynConnector, DynMiddleware<DynConnector>>,
conf: Config
) -> Self
Creates a client with the given service configuration.
sourceimpl Client
impl Client
sourcepub fn create_notification_rule(&self) -> CreateNotificationRule
pub fn create_notification_rule(&self) -> CreateNotificationRule
Constructs a fluent builder for the CreateNotificationRule operation.
- The fluent builder is configurable:
name(impl Into<String>)/set_name(Option<String>):The name for the notification rule. Notification rule names must be unique in your Amazon Web Services account.
event_type_ids(Vec<String>)/set_event_type_ids(Option<Vec<String>>):A list of event types associated with this notification rule. For a list of allowed events, see
EventTypeSummary.resource(impl Into<String>)/set_resource(Option<String>):The Amazon Resource Name (ARN) of the resource to associate with the notification rule. Supported resources include pipelines in CodePipeline, repositories in CodeCommit, and build projects in CodeBuild.
targets(Vec<Target>)/set_targets(Option<Vec<Target>>):A list of Amazon Resource Names (ARNs) of Amazon Simple Notification Service topics and Chatbot clients to associate with the notification rule.
detail_type(DetailType)/set_detail_type(Option<DetailType>):The level of detail to include in the notifications for this resource.
BASICwill include only the contents of the event as it would appear in Amazon CloudWatch.FULLwill include any supplemental information provided by AWS CodeStar Notifications and/or the service for the resource for which the notification is created.client_request_token(impl Into<String>)/set_client_request_token(Option<String>):A unique, client-generated idempotency token that, when provided in a request, ensures the request cannot be repeated with a changed parameter. If a request with the same parameters is received and a token is included, the request returns information about the initial request that used that token.
The Amazon Web Services SDKs prepopulate client request tokens. If you are using an Amazon Web Services SDK, an idempotency token is created for you.
tags(HashMap<String, String>)/set_tags(Option<HashMap<String, String>>):A list of tags to apply to this notification rule. Key names cannot start with “
aws”.status(NotificationRuleStatus)/set_status(Option<NotificationRuleStatus>):The status of the notification rule. The default value is
ENABLED. If the status is set toDISABLED, notifications aren’t sent for the notification rule.
- On success, responds with
CreateNotificationRuleOutputwith field(s):arn(Option<String>):The Amazon Resource Name (ARN) of the notification rule.
- On failure, responds with
SdkError<CreateNotificationRuleError>
sourcepub fn delete_notification_rule(&self) -> DeleteNotificationRule
pub fn delete_notification_rule(&self) -> DeleteNotificationRule
Constructs a fluent builder for the DeleteNotificationRule operation.
- The fluent builder is configurable:
arn(impl Into<String>)/set_arn(Option<String>):The Amazon Resource Name (ARN) of the notification rule you want to delete.
- On success, responds with
DeleteNotificationRuleOutputwith field(s):arn(Option<String>):The Amazon Resource Name (ARN) of the deleted notification rule.
- On failure, responds with
SdkError<DeleteNotificationRuleError>
sourcepub fn delete_target(&self) -> DeleteTarget
pub fn delete_target(&self) -> DeleteTarget
Constructs a fluent builder for the DeleteTarget operation.
- The fluent builder is configurable:
target_address(impl Into<String>)/set_target_address(Option<String>):The Amazon Resource Name (ARN) of the Chatbot topic or Chatbot client to delete.
force_unsubscribe_all(bool)/set_force_unsubscribe_all(bool):A Boolean value that can be used to delete all associations with this Chatbot topic. The default value is FALSE. If set to TRUE, all associations between that target and every notification rule in your Amazon Web Services account are deleted.
- On success, responds with
DeleteTargetOutput - On failure, responds with
SdkError<DeleteTargetError>
sourcepub fn describe_notification_rule(&self) -> DescribeNotificationRule
pub fn describe_notification_rule(&self) -> DescribeNotificationRule
Constructs a fluent builder for the DescribeNotificationRule operation.
- The fluent builder is configurable:
arn(impl Into<String>)/set_arn(Option<String>):The Amazon Resource Name (ARN) of the notification rule.
- On success, responds with
DescribeNotificationRuleOutputwith field(s):arn(Option<String>):The Amazon Resource Name (ARN) of the notification rule.
name(Option<String>):The name of the notification rule.
event_types(Option<Vec<EventTypeSummary>>):A list of the event types associated with the notification rule.
resource(Option<String>):The Amazon Resource Name (ARN) of the resource associated with the notification rule.
targets(Option<Vec<TargetSummary>>):A list of the Chatbot topics and Chatbot clients associated with the notification rule.
detail_type(Option<DetailType>):The level of detail included in the notifications for this resource. BASIC will include only the contents of the event as it would appear in Amazon CloudWatch. FULL will include any supplemental information provided by AWS CodeStar Notifications and/or the service for the resource for which the notification is created.
created_by(Option<String>):The name or email alias of the person who created the notification rule.
status(Option<NotificationRuleStatus>):The status of the notification rule. Valid statuses are on (sending notifications) or off (not sending notifications).
created_timestamp(Option<DateTime>):The date and time the notification rule was created, in timestamp format.
last_modified_timestamp(Option<DateTime>):The date and time the notification rule was most recently updated, in timestamp format.
tags(Option<HashMap<String, String>>):The tags associated with the notification rule.
- On failure, responds with
SdkError<DescribeNotificationRuleError>
sourcepub fn list_event_types(&self) -> ListEventTypes
pub fn list_event_types(&self) -> ListEventTypes
Constructs a fluent builder for the ListEventTypes operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
filters(Vec<ListEventTypesFilter>)/set_filters(Option<Vec<ListEventTypesFilter>>):The filters to use to return information by service or resource type.
next_token(impl Into<String>)/set_next_token(Option<String>):An enumeration token that, when provided in a request, returns the next batch of the results.
max_results(i32)/set_max_results(Option<i32>):A non-negative integer used to limit the number of returned results. The default number is 50. The maximum number of results that can be returned is 100.
- On success, responds with
ListEventTypesOutputwith field(s):event_types(Option<Vec<EventTypeSummary>>):Information about each event, including service name, resource type, event ID, and event name.
next_token(Option<String>):An enumeration token that can be used in a request to return the next batch of the results.
- On failure, responds with
SdkError<ListEventTypesError>
sourcepub fn list_notification_rules(&self) -> ListNotificationRules
pub fn list_notification_rules(&self) -> ListNotificationRules
Constructs a fluent builder for the ListNotificationRules operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
filters(Vec<ListNotificationRulesFilter>)/set_filters(Option<Vec<ListNotificationRulesFilter>>):The filters to use to return information by service or resource type. For valid values, see
ListNotificationRulesFilter.A filter with the same name can appear more than once when used with OR statements. Filters with different names should be applied with AND statements.
next_token(impl Into<String>)/set_next_token(Option<String>):An enumeration token that, when provided in a request, returns the next batch of the results.
max_results(i32)/set_max_results(Option<i32>):A non-negative integer used to limit the number of returned results. The maximum number of results that can be returned is 100.
- On success, responds with
ListNotificationRulesOutputwith field(s):next_token(Option<String>):An enumeration token that can be used in a request to return the next batch of the results.
notification_rules(Option<Vec<NotificationRuleSummary>>):The list of notification rules for the Amazon Web Services account, by Amazon Resource Name (ARN) and ID.
- On failure, responds with
SdkError<ListNotificationRulesError>
Constructs a fluent builder for the ListTagsForResource operation.
- The fluent builder is configurable:
arn(impl Into<String>)/set_arn(Option<String>):The Amazon Resource Name (ARN) for the notification rule.
- On success, responds with
ListTagsForResourceOutputwith field(s):tags(Option<HashMap<String, String>>):The tags associated with the notification rule.
- On failure, responds with
SdkError<ListTagsForResourceError>
sourcepub fn list_targets(&self) -> ListTargets
pub fn list_targets(&self) -> ListTargets
Constructs a fluent builder for the ListTargets operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
filters(Vec<ListTargetsFilter>)/set_filters(Option<Vec<ListTargetsFilter>>):The filters to use to return information by service or resource type. Valid filters include target type, target address, and target status.
A filter with the same name can appear more than once when used with OR statements. Filters with different names should be applied with AND statements.
next_token(impl Into<String>)/set_next_token(Option<String>):An enumeration token that, when provided in a request, returns the next batch of the results.
max_results(i32)/set_max_results(Option<i32>):A non-negative integer used to limit the number of returned results. The maximum number of results that can be returned is 100.
- On success, responds with
ListTargetsOutputwith field(s):targets(Option<Vec<TargetSummary>>):The list of notification rule targets.
next_token(Option<String>):An enumeration token that can be used in a request to return the next batch of results.
- On failure, responds with
SdkError<ListTargetsError>
sourcepub fn subscribe(&self) -> Subscribe
pub fn subscribe(&self) -> Subscribe
Constructs a fluent builder for the Subscribe operation.
- The fluent builder is configurable:
arn(impl Into<String>)/set_arn(Option<String>):The Amazon Resource Name (ARN) of the notification rule for which you want to create the association.
target(Target)/set_target(Option<Target>):Information about the Chatbot topics or Chatbot clients associated with a notification rule.
client_request_token(impl Into<String>)/set_client_request_token(Option<String>):An enumeration token that, when provided in a request, returns the next batch of the results.
- On success, responds with
SubscribeOutputwith field(s):arn(Option<String>):The Amazon Resource Name (ARN) of the notification rule for which you have created assocations.
- On failure, responds with
SdkError<SubscribeError>
sourcepub fn tag_resource(&self) -> TagResource
pub fn tag_resource(&self) -> TagResource
Constructs a fluent builder for the TagResource operation.
- The fluent builder is configurable:
arn(impl Into<String>)/set_arn(Option<String>):The Amazon Resource Name (ARN) of the notification rule to tag.
tags(HashMap<String, String>)/set_tags(Option<HashMap<String, String>>):The list of tags to associate with the resource. Tag key names cannot start with “
aws”.
- On success, responds with
TagResourceOutputwith field(s):tags(Option<HashMap<String, String>>):The list of tags associated with the resource.
- On failure, responds with
SdkError<TagResourceError>
sourcepub fn unsubscribe(&self) -> Unsubscribe
pub fn unsubscribe(&self) -> Unsubscribe
Constructs a fluent builder for the Unsubscribe operation.
- The fluent builder is configurable:
arn(impl Into<String>)/set_arn(Option<String>):The Amazon Resource Name (ARN) of the notification rule.
target_address(impl Into<String>)/set_target_address(Option<String>):The ARN of the Chatbot topic to unsubscribe from the notification rule.
- On success, responds with
UnsubscribeOutputwith field(s):arn(Option<String>):The Amazon Resource Name (ARN) of the the notification rule from which you have removed a subscription.
- On failure, responds with
SdkError<UnsubscribeError>
sourcepub fn untag_resource(&self) -> UntagResource
pub fn untag_resource(&self) -> UntagResource
Constructs a fluent builder for the UntagResource operation.
- The fluent builder is configurable:
arn(impl Into<String>)/set_arn(Option<String>):The Amazon Resource Name (ARN) of the notification rule from which to remove the tags.
tag_keys(Vec<String>)/set_tag_keys(Option<Vec<String>>):The key names of the tags to remove.
- On success, responds with
UntagResourceOutput - On failure, responds with
SdkError<UntagResourceError>
sourcepub fn update_notification_rule(&self) -> UpdateNotificationRule
pub fn update_notification_rule(&self) -> UpdateNotificationRule
Constructs a fluent builder for the UpdateNotificationRule operation.
- The fluent builder is configurable:
arn(impl Into<String>)/set_arn(Option<String>):The Amazon Resource Name (ARN) of the notification rule.
name(impl Into<String>)/set_name(Option<String>):The name of the notification rule.
status(NotificationRuleStatus)/set_status(Option<NotificationRuleStatus>):The status of the notification rule. Valid statuses include enabled (sending notifications) or disabled (not sending notifications).
event_type_ids(Vec<String>)/set_event_type_ids(Option<Vec<String>>):A list of event types associated with this notification rule. For a complete list of event types and IDs, see Notification concepts in the Developer Tools Console User Guide.
targets(Vec<Target>)/set_targets(Option<Vec<Target>>):The address and type of the targets to receive notifications from this notification rule.
detail_type(DetailType)/set_detail_type(Option<DetailType>):The level of detail to include in the notifications for this resource. BASIC will include only the contents of the event as it would appear in Amazon CloudWatch. FULL will include any supplemental information provided by AWS CodeStar Notifications and/or the service for the resource for which the notification is created.
- On success, responds with
UpdateNotificationRuleOutput - On failure, responds with
SdkError<UpdateNotificationRuleError>
sourceimpl Client
impl Client
sourcepub fn from_conf_conn<C, E>(conf: Config, conn: C) -> Selfwhere
C: SmithyConnector<Error = E> + Send + 'static,
E: Into<ConnectorError>,
pub fn from_conf_conn<C, E>(conf: Config, conn: C) -> Selfwhere
C: SmithyConnector<Error = E> + Send + 'static,
E: Into<ConnectorError>,
Creates a client with the given service config and connector override.