Struct aws_sdk_codestarnotifications::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::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. Notifictaion rule names must be unique in your AWS 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 AWS CodePipeline, repositories in AWS CodeCommit, and build projects in AWS CodeBuild.
targets(Vec<Target>)
/set_targets(Option<Vec<Target>>)
:A list of Amazon Resource Names (ARNs) of SNS topics 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. BASIC will include only the contents of the event as it would appear in AWS 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.
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 AWS SDKs prepopulate client request tokens. If you are using an AWS 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 to DISABLED, notifications aren’t sent for the notification rule.
- On success, responds with
CreateNotificationRuleOutput
with 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
DeleteNotificationRuleOutput
with 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 SNS topic to delete.
force_unsubscribe_all(bool)
/set_force_unsubscribe_all(bool)
:A Boolean value that can be used to delete all associations with this SNS topic. The default value is FALSE. If set to TRUE, all associations between that target and every notification rule in your AWS 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
DescribeNotificationRuleOutput
with 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 SNS topics 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 AWS 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
ListEventTypesOutput
with 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
ListNotificationRulesOutput
with 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 AWS 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
ListTagsForResourceOutput
with 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
ListTargetsOutput
with 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 SNS topics 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
SubscribeOutput
with 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
TagResourceOutput
with 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 SNS topic to unsubscribe from the notification rule.
- On success, responds with
UnsubscribeOutput
with 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.
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 AWS 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) -> Self where
C: SmithyConnector<Error = E> + Send + 'static,
E: Into<ConnectorError>,
pub fn from_conf_conn<C, E>(conf: Config, conn: C) -> Self where
C: SmithyConnector<Error = E> + Send + 'static,
E: Into<ConnectorError>,
Creates a client with the given service config and connector override.
Trait Implementations
sourceimpl From<Client<DynConnector, DynMiddleware<DynConnector>, Standard>> for Client
impl From<Client<DynConnector, DynMiddleware<DynConnector>, Standard>> for Client
sourcefn from(client: Client<DynConnector, DynMiddleware<DynConnector>>) -> Self
fn from(client: Client<DynConnector, DynMiddleware<DynConnector>>) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more