pub struct Client { /* private fields */ }
Expand description
Client for AWS User Notifications
Client for invoking operations on AWS User Notifications. Each operation on AWS User Notifications is a method on this
this struct. .send()
MUST be invoked on the generated operations to dispatch the request to the service.
§Constructing a Client
A Config
is required to construct a client. For most use cases, the aws-config
crate should be used to automatically resolve this config using
aws_config::load_from_env()
, since this will resolve an SdkConfig
which can be shared
across multiple different AWS SDK clients. This config resolution process can be customized
by calling aws_config::from_env()
instead, which returns a ConfigLoader
that uses
the builder pattern to customize the default config.
In the simplest case, creating a client looks as follows:
let config = aws_config::load_from_env().await;
let client = aws_sdk_notifications::Client::new(&config);
Occasionally, SDKs may have additional service-specific values that can be set on the Config
that
is absent from SdkConfig
, or slightly different settings for a specific client may be desired.
The Builder
struct implements From<&SdkConfig>
, so setting these specific settings can be
done as follows:
let sdk_config = ::aws_config::load_from_env().await;
let config = aws_sdk_notifications::config::Builder::from(&sdk_config)
.some_service_specific_setting("value")
.build();
See the aws-config
docs and Config
for more information on customizing configuration.
Note: Client construction is expensive due to connection thread pool initialization, and should be done once at application start-up.
§Using the Client
A client has a function for every operation that can be performed by the service.
For example, the ListTagsForResource
operation has
a Client::list_tags_for_resource
, function which returns a builder for that operation.
The fluent builder ultimately has a send()
function that returns an async future that
returns a result, as illustrated below:
let result = client.list_tags_for_resource()
.arn("example")
.send()
.await;
The underlying HTTP requests that get made by this can be modified with the customize_operation
function on the fluent builder. See the customize
module for more
information.
Implementations§
Source§impl Client
impl Client
Sourcepub fn associate_channel(&self) -> AssociateChannelFluentBuilder
pub fn associate_channel(&self) -> AssociateChannelFluentBuilder
Constructs a fluent builder for the AssociateChannel
operation.
- The fluent builder is configurable:
arn(impl Into<String>)
/set_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the Channel to associate with the NotificationConfiguration.
Supported ARNs include AWS Chatbot, the Console Mobile Application, and notifications-contacts.
notification_configuration_arn(impl Into<String>)
/set_notification_configuration_arn(Option<String>)
:
required: trueThe ARN of the NotificationConfiguration to associate with the Channel.
- On success, responds with
AssociateChannelOutput
- On failure, responds with
SdkError<AssociateChannelError>
Source§impl Client
impl Client
Sourcepub fn create_event_rule(&self) -> CreateEventRuleFluentBuilder
pub fn create_event_rule(&self) -> CreateEventRuleFluentBuilder
Constructs a fluent builder for the CreateEventRule
operation.
- The fluent builder is configurable:
notification_configuration_arn(impl Into<String>)
/set_notification_configuration_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the NotificationConfiguration associated with this EventRule.
source(impl Into<String>)
/set_source(Option<String>)
:
required: trueThe matched event source.
Must match one of the valid EventBridge sources. Only AWS service sourced events are supported. For example,
aws.ec2
andaws.cloudwatch
. For more information, see Event delivery from AWS services in the Amazon EventBridge User Guide.event_type(impl Into<String>)
/set_event_type(Option<String>)
:
required: trueThe event type to match.
Must match one of the valid Amazon EventBridge event types. For example, EC2 Instance State-change Notification and AWS CloudWatch Alarm State Change. For more information, see Event delivery from AWS services in the Amazon EventBridge User Guide.
event_pattern(impl Into<String>)
/set_event_pattern(Option<String>)
:
required: falseAn additional event pattern used to further filter the events this EventRule receives.
For more information, see Amazon EventBridge event patterns in the Amazon EventBridge User Guide.
regions(impl Into<String>)
/set_regions(Option<Vec::<String>>)
:
required: trueA list of AWS Regions that send events to this EventRule.
- On success, responds with
CreateEventRuleOutput
with field(s):arn(String)
:The ARN of the resource.
notification_configuration_arn(String)
:The ARN of a NotificationConfiguration.
status_summary_by_region(HashMap::<String, EventRuleStatusSummary>)
:A list of an EventRule’s status by Region. Regions are mapped to EventRuleStatusSummary.
- On failure, responds with
SdkError<CreateEventRuleError>
Source§impl Client
impl Client
Sourcepub fn create_notification_configuration(
&self,
) -> CreateNotificationConfigurationFluentBuilder
pub fn create_notification_configuration( &self, ) -> CreateNotificationConfigurationFluentBuilder
Constructs a fluent builder for the CreateNotificationConfiguration
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the NotificationConfiguration. Supports RFC 3986’s unreserved characters.
description(impl Into<String>)
/set_description(Option<String>)
:
required: trueThe description of the NotificationConfiguration.
aggregation_duration(AggregationDuration)
/set_aggregation_duration(Option<AggregationDuration>)
:
required: falseThe aggregation preference of the NotificationConfiguration.
-
Values:
-
LONG
-
Aggregate notifications for long periods of time (12 hours).
-
-
SHORT
-
Aggregate notifications for short periods of time (5 minutes).
-
-
NONE
-
Don’t aggregate notifications.
No delay in delivery.
-
-
-
tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: falseA map of tags assigned to a resource. A tag is a string-to-string map of key-value pairs.
- On success, responds with
CreateNotificationConfigurationOutput
with field(s):arn(String)
:The Amazon Resource Name (ARN) of the the resource.
status(NotificationConfigurationStatus)
:The status of this NotificationConfiguration.
The status should always be
INACTIVE
when part of the CreateNotificationConfiguration response.-
Values:
-
ACTIVE
-
All EventRules are
ACTIVE
and any call can be run.
-
-
PARTIALLY_ACTIVE
-
Some EventRules are
ACTIVE
and some areINACTIVE
. -
Any call can be run.
-
-
INACTIVE
-
All EventRules are
INACTIVE
and any call can be run.
-
-
DELETING
-
This NotificationConfiguration is being deleted.
-
Only
GET
andLIST
calls can be run.
-
-
-
- On failure, responds with
SdkError<CreateNotificationConfigurationError>
Source§impl Client
impl Client
Sourcepub fn delete_event_rule(&self) -> DeleteEventRuleFluentBuilder
pub fn delete_event_rule(&self) -> DeleteEventRuleFluentBuilder
Constructs a fluent builder for the DeleteEventRule
operation.
- The fluent builder is configurable:
arn(impl Into<String>)
/set_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the EventRule to delete.
- On success, responds with
DeleteEventRuleOutput
- On failure, responds with
SdkError<DeleteEventRuleError>
Source§impl Client
impl Client
Sourcepub fn delete_notification_configuration(
&self,
) -> DeleteNotificationConfigurationFluentBuilder
pub fn delete_notification_configuration( &self, ) -> DeleteNotificationConfigurationFluentBuilder
Constructs a fluent builder for the DeleteNotificationConfiguration
operation.
- The fluent builder is configurable:
arn(impl Into<String>)
/set_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the NotificationConfiguration to delete.
- On success, responds with
DeleteNotificationConfigurationOutput
- On failure, responds with
SdkError<DeleteNotificationConfigurationError>
Source§impl Client
impl Client
Sourcepub fn deregister_notification_hub(
&self,
) -> DeregisterNotificationHubFluentBuilder
pub fn deregister_notification_hub( &self, ) -> DeregisterNotificationHubFluentBuilder
Constructs a fluent builder for the DeregisterNotificationHub
operation.
- The fluent builder is configurable:
notification_hub_region(impl Into<String>)
/set_notification_hub_region(Option<String>)
:
required: trueThe NotificationHub Region.
- On success, responds with
DeregisterNotificationHubOutput
with field(s):notification_hub_region(String)
:The NotificationHub Region.
status_summary(Option<NotificationHubStatusSummary>)
:NotificationHub status information.
- On failure, responds with
SdkError<DeregisterNotificationHubError>
Source§impl Client
impl Client
Sourcepub fn disassociate_channel(&self) -> DisassociateChannelFluentBuilder
pub fn disassociate_channel(&self) -> DisassociateChannelFluentBuilder
Constructs a fluent builder for the DisassociateChannel
operation.
- The fluent builder is configurable:
arn(impl Into<String>)
/set_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the Channel to disassociate.
notification_configuration_arn(impl Into<String>)
/set_notification_configuration_arn(Option<String>)
:
required: trueThe ARN of the NotificationConfiguration to disassociate.
- On success, responds with
DisassociateChannelOutput
- On failure, responds with
SdkError<DisassociateChannelError>
Source§impl Client
impl Client
Sourcepub fn get_event_rule(&self) -> GetEventRuleFluentBuilder
pub fn get_event_rule(&self) -> GetEventRuleFluentBuilder
Constructs a fluent builder for the GetEventRule
operation.
- The fluent builder is configurable:
arn(impl Into<String>)
/set_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the EventRule to return.
- On success, responds with
GetEventRuleOutput
with field(s):arn(String)
:The ARN of the resource.
notification_configuration_arn(String)
:The ARN of a NotificationConfiguration.
creation_time(DateTime)
:The date when the EventRule was created.
source(String)
:The matched event source.
Must match one of the valid EventBridge sources. Only AWS service sourced events are supported. For example,
aws.ec2
andaws.cloudwatch
. For more information, see Event delivery from AWS services in the Amazon EventBridge User Guide.event_type(String)
:The event type to match.
Must match one of the valid Amazon EventBridge event types. For example, EC2 Instance State-change Notification and AWS CloudWatch Alarm State Change. For more information, see Event delivery from AWS services in the Amazon EventBridge User Guide.
event_pattern(String)
:An additional event pattern used to further filter the events this EventRule receives.
For more information, see Amazon EventBridge event patterns in the Amazon EventBridge User Guide.
regions(Vec::<String>)
:A list of AWS Regions that send events to this EventRule.
managed_rules(Vec::<String>)
:A list of managed rules from EventBridge that are are associated with this EventRule.
These are created by AWS User Notifications within your account so this EventRule functions.
status_summary_by_region(HashMap::<String, EventRuleStatusSummary>)
:A list of an EventRule’s status by Region. Regions are mapped to EventRuleStatusSummary.
- On failure, responds with
SdkError<GetEventRuleError>
Source§impl Client
impl Client
Sourcepub fn get_notification_configuration(
&self,
) -> GetNotificationConfigurationFluentBuilder
pub fn get_notification_configuration( &self, ) -> GetNotificationConfigurationFluentBuilder
Constructs a fluent builder for the GetNotificationConfiguration
operation.
- The fluent builder is configurable:
arn(impl Into<String>)
/set_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the NotificationConfiguration to return.
- On success, responds with
GetNotificationConfigurationOutput
with field(s):arn(String)
:The ARN of the resource.
name(String)
:The name of the NotificationConfiguration.
description(String)
:The description of the NotificationConfiguration.
status(NotificationConfigurationStatus)
:The status of this NotificationConfiguration.
The status should always be
INACTIVE
when part of the CreateNotificationConfiguration response.-
Values:
-
ACTIVE
-
All EventRules are
ACTIVE
and any call can be run.
-
-
PARTIALLY_ACTIVE
-
Some EventRules are
ACTIVE
and some areINACTIVE
. -
Any call can be run.
-
-
INACTIVE
-
All EventRules are
INACTIVE
and any call can be run.
-
-
DELETING
-
This NotificationConfiguration is being deleted. Only
GET
andLIST
calls can be run. -
Only
GET
andLIST
calls can be run.
-
-
-
creation_time(DateTime)
:The creation time of the NotificationConfiguration.
aggregation_duration(Option<AggregationDuration>)
:The aggregation preference of the NotificationConfiguration.
-
Values:
-
LONG
-
Aggregate notifications for long periods of time (12 hours).
-
-
SHORT
-
Aggregate notifications for short periods of time (5 minutes).
-
-
NONE
-
Don’t aggregate notifications.
No delay in delivery.
-
-
-
- On failure, responds with
SdkError<GetNotificationConfigurationError>
Source§impl Client
impl Client
Sourcepub fn get_notification_event(&self) -> GetNotificationEventFluentBuilder
pub fn get_notification_event(&self) -> GetNotificationEventFluentBuilder
Constructs a fluent builder for the GetNotificationEvent
operation.
- The fluent builder is configurable:
arn(impl Into<String>)
/set_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the NotificationEvent to return.
locale(LocaleCode)
/set_locale(Option<LocaleCode>)
:
required: falseThe locale code of the language used for the retrieved NotificationEvent. The default locale is English
en_US
.
- On success, responds with
GetNotificationEventOutput
with field(s):arn(String)
:The ARN of the resource.
notification_configuration_arn(String)
:The ARN of the NotificationConfiguration.
creation_time(DateTime)
:The creation time of the NotificationEvent.
content(Option<NotificationEventSchema>)
:The content of the NotificationEvent.
- On failure, responds with
SdkError<GetNotificationEventError>
Source§impl Client
impl Client
Sourcepub fn list_channels(&self) -> ListChannelsFluentBuilder
pub fn list_channels(&self) -> ListChannelsFluentBuilder
Constructs a fluent builder for the ListChannels
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
notification_configuration_arn(impl Into<String>)
/set_notification_configuration_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the NotificationConfiguration.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results to be returned in this call. The default value is 20.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe start token for paginated calls. Retrieved from the response of a previous ListNotificationEvents call. NextToken uses Base64 encoding.
- On success, responds with
ListChannelsOutput
with field(s):next_token(Option<String>)
:A pagination token. If a non-null pagination token is returned in a result, pass its value in another request to retrieve more entries.
channels(Vec::<String>)
:A list of Channels.
- On failure, responds with
SdkError<ListChannelsError>
Source§impl Client
impl Client
Sourcepub fn list_event_rules(&self) -> ListEventRulesFluentBuilder
pub fn list_event_rules(&self) -> ListEventRulesFluentBuilder
Constructs a fluent builder for the ListEventRules
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
notification_configuration_arn(impl Into<String>)
/set_notification_configuration_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the NotificationConfiguration.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results to be returned in this call. The default value is 20.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe start token for paginated calls. Retrieved from the response of a previous ListEventRules call. Next token uses Base64 encoding.
- On success, responds with
ListEventRulesOutput
with field(s):next_token(Option<String>)
:A pagination token. If a non-null pagination token is returned in a result, pass its value in another request to retrieve more entries.
event_rules(Vec::<EventRuleStructure>)
:A list of EventRules.
- On failure, responds with
SdkError<ListEventRulesError>
Source§impl Client
impl Client
Sourcepub fn list_notification_configurations(
&self,
) -> ListNotificationConfigurationsFluentBuilder
pub fn list_notification_configurations( &self, ) -> ListNotificationConfigurationsFluentBuilder
Constructs a fluent builder for the ListNotificationConfigurations
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
event_rule_source(impl Into<String>)
/set_event_rule_source(Option<String>)
:
required: falseThe matched event source.
Must match one of the valid EventBridge sources. Only AWS service sourced events are supported. For example,
aws.ec2
andaws.cloudwatch
. For more information, see Event delivery from AWS services in the Amazon EventBridge User Guide.channel_arn(impl Into<String>)
/set_channel_arn(Option<String>)
:
required: falseThe Amazon Resource Name (ARN) of the Channel to match.
status(NotificationConfigurationStatus)
/set_status(Option<NotificationConfigurationStatus>)
:
required: falseThe NotificationConfiguration status to match.
-
Values:
-
ACTIVE
-
All EventRules are
ACTIVE
and any call can be run.
-
-
PARTIALLY_ACTIVE
-
Some EventRules are
ACTIVE
and some areINACTIVE
. Any call can be run. -
Any call can be run.
-
-
INACTIVE
-
All EventRules are
INACTIVE
and any call can be run.
-
-
DELETING
-
This NotificationConfiguration is being deleted.
-
Only
GET
andLIST
calls can be run.
-
-
-
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results to be returned in this call. Defaults to 20.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe start token for paginated calls. Retrieved from the response of a previous ListEventRules call. Next token uses Base64 encoding.
- On success, responds with
ListNotificationConfigurationsOutput
with field(s):next_token(Option<String>)
:A pagination token. If a non-null pagination token is returned in a result, pass its value in another request to retrieve more entries.
notification_configurations(Vec::<NotificationConfigurationStructure>)
:The NotificationConfigurations in the account.
- On failure, responds with
SdkError<ListNotificationConfigurationsError>
Source§impl Client
impl Client
Sourcepub fn list_notification_events(&self) -> ListNotificationEventsFluentBuilder
pub fn list_notification_events(&self) -> ListNotificationEventsFluentBuilder
Constructs a fluent builder for the ListNotificationEvents
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
start_time(DateTime)
/set_start_time(Option<DateTime>)
:
required: falseThe earliest time of events to return from this call.
end_time(DateTime)
/set_end_time(Option<DateTime>)
:
required: falseLatest time of events to return from this call.
locale(LocaleCode)
/set_locale(Option<LocaleCode>)
:
required: falseThe locale code of the language used for the retrieved NotificationEvent. The default locale is English
(en_US)
.source(impl Into<String>)
/set_source(Option<String>)
:
required: falseThe matched event source.
Must match one of the valid EventBridge sources. Only AWS service sourced events are supported. For example,
aws.ec2
andaws.cloudwatch
. For more information, see Event delivery from AWS services in the Amazon EventBridge User Guide.include_child_events(bool)
/set_include_child_events(Option<bool>)
:
required: falseInclude aggregated child events in the result.
aggregate_notification_event_arn(impl Into<String>)
/set_aggregate_notification_event_arn(Option<String>)
:
required: falseThe Amazon Resource Name (ARN) of the aggregatedNotificationEventArn to match.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results to be returned in this call. Defaults to 20.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe start token for paginated calls. Retrieved from the response of a previous ListEventRules call. Next token uses Base64 encoding.
- On success, responds with
ListNotificationEventsOutput
with field(s):next_token(Option<String>)
:A pagination token. If a non-null pagination token is returned in a result, pass its value in another request to retrieve more entries.
notification_events(Vec::<NotificationEventOverview>)
:The list of notification events.
- On failure, responds with
SdkError<ListNotificationEventsError>
Source§impl Client
impl Client
Sourcepub fn list_notification_hubs(&self) -> ListNotificationHubsFluentBuilder
pub fn list_notification_hubs(&self) -> ListNotificationHubsFluentBuilder
Constructs a fluent builder for the ListNotificationHubs
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of records to list in a single response.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseA pagination token. Set to null to start listing notification hubs from the start.
- On success, responds with
ListNotificationHubsOutput
with field(s):notification_hubs(Vec::<NotificationHubOverview>)
:The NotificationHubs in the account.
next_token(Option<String>)
:A pagination token. If a non-null pagination token is returned in a result, pass its value in another request to retrieve more entries.
- On failure, responds with
SdkError<ListNotificationHubsError>
Source§impl Client
impl Client
Constructs a fluent builder for the ListTagsForResource
operation.
- The fluent builder is configurable:
arn(impl Into<String>)
/set_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) to use to list tags.
- On success, responds with
ListTagsForResourceOutput
with field(s):tags(Option<HashMap::<String, String>>)
:A list of tags for the specified ARN.
- On failure, responds with
SdkError<ListTagsForResourceError>
Source§impl Client
impl Client
Sourcepub fn register_notification_hub(&self) -> RegisterNotificationHubFluentBuilder
pub fn register_notification_hub(&self) -> RegisterNotificationHubFluentBuilder
Constructs a fluent builder for the RegisterNotificationHub
operation.
- The fluent builder is configurable:
notification_hub_region(impl Into<String>)
/set_notification_hub_region(Option<String>)
:
required: trueThe Region of the NotificationHub.
- On success, responds with
RegisterNotificationHubOutput
with field(s):notification_hub_region(String)
:The Region of the NotificationHub.
status_summary(Option<NotificationHubStatusSummary>)
:NotificationHub status information.
creation_time(DateTime)
:The date the resource was created.
last_activation_time(Option<DateTime>)
:The date the resource was last activated.
- On failure, responds with
SdkError<RegisterNotificationHubError>
Source§impl Client
impl Client
Sourcepub fn tag_resource(&self) -> TagResourceFluentBuilder
pub fn tag_resource(&self) -> TagResourceFluentBuilder
Constructs a fluent builder for the TagResource
operation.
- The fluent builder is configurable:
arn(impl Into<String>)
/set_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) to use to tag a resource.
tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: trueA map of tags assigned to a resource. A tag is a string-to-string map of key-value pairs.
- On success, responds with
TagResourceOutput
- On failure, responds with
SdkError<TagResourceError>
Source§impl Client
impl Client
Sourcepub fn untag_resource(&self) -> UntagResourceFluentBuilder
pub fn untag_resource(&self) -> UntagResourceFluentBuilder
Constructs a fluent builder for the UntagResource
operation.
- The fluent builder is configurable:
arn(impl Into<String>)
/set_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) to use to untag a resource.
tag_keys(impl Into<String>)
/set_tag_keys(Option<Vec::<String>>)
:
required: trueThe tag keys to use to untag a resource.
- On success, responds with
UntagResourceOutput
- On failure, responds with
SdkError<UntagResourceError>
Source§impl Client
impl Client
Sourcepub fn update_event_rule(&self) -> UpdateEventRuleFluentBuilder
pub fn update_event_rule(&self) -> UpdateEventRuleFluentBuilder
Constructs a fluent builder for the UpdateEventRule
operation.
- The fluent builder is configurable:
arn(impl Into<String>)
/set_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) to use to update the EventRule.
event_pattern(impl Into<String>)
/set_event_pattern(Option<String>)
:
required: falseAn additional event pattern used to further filter the events this EventRule receives.
For more information, see Amazon EventBridge event patterns in the Amazon EventBridge User Guide.
regions(impl Into<String>)
/set_regions(Option<Vec::<String>>)
:
required: falseA list of AWS Regions that sends events to this EventRule.
- On success, responds with
UpdateEventRuleOutput
with field(s):arn(String)
:The Amazon Resource Name (ARN) to use to update the EventRule.
notification_configuration_arn(String)
:The ARN of the NotificationConfiguration.
status_summary_by_region(HashMap::<String, EventRuleStatusSummary>)
:The status of the action by Region.
- On failure, responds with
SdkError<UpdateEventRuleError>
Source§impl Client
impl Client
Sourcepub fn update_notification_configuration(
&self,
) -> UpdateNotificationConfigurationFluentBuilder
pub fn update_notification_configuration( &self, ) -> UpdateNotificationConfigurationFluentBuilder
Constructs a fluent builder for the UpdateNotificationConfiguration
operation.
- The fluent builder is configurable:
arn(impl Into<String>)
/set_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) used to update the NotificationConfiguration.
name(impl Into<String>)
/set_name(Option<String>)
:
required: falseThe name of the NotificationConfiguration.
description(impl Into<String>)
/set_description(Option<String>)
:
required: falseThe description of the NotificationConfiguration.
aggregation_duration(AggregationDuration)
/set_aggregation_duration(Option<AggregationDuration>)
:
required: falseThe status of this NotificationConfiguration.
The status should always be
INACTIVE
when part of the CreateNotificationConfiguration response.-
Values:
-
ACTIVE
-
All EventRules are
ACTIVE
and any call can be run.
-
-
PARTIALLY_ACTIVE
-
Some EventRules are
ACTIVE
and some areINACTIVE
. Any call can be run. -
Any call can be run.
-
-
INACTIVE
-
All EventRules are
INACTIVE
and any call can be run.
-
-
DELETING
-
This NotificationConfiguration is being deleted.
-
Only
GET
andLIST
calls can be run.
-
-
-
- On success, responds with
UpdateNotificationConfigurationOutput
with field(s):arn(String)
:The ARN used to update the NotificationConfiguration.
- On failure, responds with
SdkError<UpdateNotificationConfigurationError>
Source§impl Client
impl Client
Sourcepub fn from_conf(conf: Config) -> Self
pub fn from_conf(conf: Config) -> Self
Creates a new client from the service Config
.
§Panics
This method will panic in the following cases:
- Retries or timeouts are enabled without a
sleep_impl
configured. - Identity caching is enabled without a
sleep_impl
andtime_source
configured. - No
behavior_version
is provided.
The panic message for each of these will have instructions on how to resolve them.
Source§impl Client
impl Client
Sourcepub fn new(sdk_config: &SdkConfig) -> Self
pub fn new(sdk_config: &SdkConfig) -> Self
Creates a new client from an SDK Config.
§Panics
- This method will panic if the
sdk_config
is missing an async sleep implementation. If you experience this panic, set thesleep_impl
on the Config passed into this function to fix it. - This method will panic if the
sdk_config
is missing an HTTP connector. If you experience this panic, set thehttp_connector
on the Config passed into this function to fix it. - This method will panic if no
BehaviorVersion
is provided. If you experience this panic, setbehavior_version
on the Config or enable thebehavior-version-latest
Cargo feature.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the foreground set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red()
and
green()
, which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg()
:
use yansi::{Paint, Color};
painted.fg(Color::White);
Set foreground color to white using white()
.
use yansi::Paint;
painted.white();
Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Returns self
with the
fg()
set to
Color::BrightBlack
.
§Example
println!("{}", value.bright_black());
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Returns self
with the
fg()
set to
Color::BrightGreen
.
§Example
println!("{}", value.bright_green());
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Returns self
with the
fg()
set to
Color::BrightYellow
.
§Example
println!("{}", value.bright_yellow());
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Returns self
with the
fg()
set to
Color::BrightMagenta
.
§Example
println!("{}", value.bright_magenta());
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Returns self
with the
fg()
set to
Color::BrightWhite
.
§Example
println!("{}", value.bright_white());
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the background set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red()
and
on_green()
, which have the same functionality but
are pithier.
§Example
Set background color to red using fg()
:
use yansi::{Paint, Color};
painted.bg(Color::Red);
Set background color to red using on_red()
.
use yansi::Paint;
painted.on_red();
Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightBlack
.
§Example
println!("{}", value.on_bright_black());
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightGreen
.
§Example
println!("{}", value.on_bright_green());
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightYellow
.
§Example
println!("{}", value.on_bright_yellow());
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightBlue
.
§Example
println!("{}", value.on_bright_blue());
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightMagenta
.
§Example
println!("{}", value.on_bright_magenta());
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightCyan
.
§Example
println!("{}", value.on_bright_cyan());
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightWhite
.
§Example
println!("{}", value.on_bright_white());
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute
value
.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold()
and
underline()
, which have the same functionality
but are pithier.
§Example
Make text bold using attr()
:
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);
Make text bold using using bold()
.
use yansi::Paint;
painted.bold();
Source§fn underline(&self) -> Painted<&T>
fn underline(&self) -> Painted<&T>
Returns self
with the
attr()
set to
Attribute::Underline
.
§Example
println!("{}", value.underline());
Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Returns self
with the
attr()
set to
Attribute::RapidBlink
.
§Example
println!("{}", value.rapid_blink());
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi
Quirk
value
.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask()
and
wrap()
, which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk()
:
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);
Enable wrapping using wrap()
.
use yansi::Paint;
painted.wrap();
Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition
value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted
only when both stdout
and stderr
are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);