pub struct Client { /* private fields */ }
Expand description
Client for AWS Systems Manager Incident Manager Contacts
Client for invoking operations on AWS Systems Manager Incident Manager Contacts. Each operation on AWS Systems Manager Incident Manager Contacts 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_ssmcontacts::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_ssmcontacts::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 AcceptPage
operation has
a Client::accept_page
, 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.accept_page()
.page_id("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 accept_page(&self) -> AcceptPageFluentBuilder
pub fn accept_page(&self) -> AcceptPageFluentBuilder
Constructs a fluent builder for the AcceptPage
operation.
- The fluent builder is configurable:
page_id(impl Into<String>)
/set_page_id(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the engagement to a contact channel.
contact_channel_id(impl Into<String>)
/set_contact_channel_id(Option<String>)
:
required: falseThe ARN of the contact channel.
accept_type(AcceptType)
/set_accept_type(Option<AcceptType>)
:
required: trueThe type indicates if the page was
DELIVERED
orREAD
.note(impl Into<String>)
/set_note(Option<String>)
:
required: falseInformation provided by the user when the user acknowledges the page.
accept_code(impl Into<String>)
/set_accept_code(Option<String>)
:
required: trueA 6-digit code used to acknowledge the page.
accept_code_validation(AcceptCodeValidation)
/set_accept_code_validation(Option<AcceptCodeValidation>)
:
required: falseAn optional field that Incident Manager uses to
ENFORCE
AcceptCode
validation when acknowledging an page. Acknowledgement can occur by replying to a page, or when entering the AcceptCode in the console. Enforcing AcceptCode validation causes Incident Manager to verify that the code entered by the user matches the code sent by Incident Manager with the page.Incident Manager can also
IGNORE
AcceptCode
validation. IgnoringAcceptCode
validation causes Incident Manager to accept any value entered for theAcceptCode
.
- On success, responds with
AcceptPageOutput
- On failure, responds with
SdkError<AcceptPageError>
Source§impl Client
impl Client
Sourcepub fn activate_contact_channel(&self) -> ActivateContactChannelFluentBuilder
pub fn activate_contact_channel(&self) -> ActivateContactChannelFluentBuilder
Constructs a fluent builder for the ActivateContactChannel
operation.
- The fluent builder is configurable:
contact_channel_id(impl Into<String>)
/set_contact_channel_id(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the contact channel.
activation_code(impl Into<String>)
/set_activation_code(Option<String>)
:
required: trueThe code sent to the contact channel when it was created in the contact.
- On success, responds with
ActivateContactChannelOutput
- On failure, responds with
SdkError<ActivateContactChannelError>
Source§impl Client
impl Client
Sourcepub fn create_contact(&self) -> CreateContactFluentBuilder
pub fn create_contact(&self) -> CreateContactFluentBuilder
Constructs a fluent builder for the CreateContact
operation.
- The fluent builder is configurable:
alias(impl Into<String>)
/set_alias(Option<String>)
:
required: trueThe short name to quickly identify a contact or escalation plan. The contact alias must be unique and identifiable.
display_name(impl Into<String>)
/set_display_name(Option<String>)
:
required: falseThe full name of the contact or escalation plan.
r#type(ContactType)
/set_type(Option<ContactType>)
:
required: trueThe type of contact to create.
-
PERSONAL
: A single, individual contact. -
ESCALATION
: An escalation plan. -
ONCALL_SCHEDULE
: An on-call schedule.
-
plan(Plan)
/set_plan(Option<Plan>)
:
required: trueA list of stages. A contact has an engagement plan with stages that contact specified contact channels. An escalation plan uses stages that contact specified contacts.
tags(Tag)
/set_tags(Option<Vec::<Tag>>)
:
required: falseAdds a tag to the target. You can only tag resources created in the first Region of your replication set.
idempotency_token(impl Into<String>)
/set_idempotency_token(Option<String>)
:
required: falseA token ensuring that the operation is called only once with the specified details.
- On success, responds with
CreateContactOutput
with field(s):contact_arn(String)
:The Amazon Resource Name (ARN) of the created contact or escalation plan.
- On failure, responds with
SdkError<CreateContactError>
Source§impl Client
impl Client
Sourcepub fn create_contact_channel(&self) -> CreateContactChannelFluentBuilder
pub fn create_contact_channel(&self) -> CreateContactChannelFluentBuilder
Constructs a fluent builder for the CreateContactChannel
operation.
- The fluent builder is configurable:
contact_id(impl Into<String>)
/set_contact_id(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the contact you are adding the contact channel to.
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the contact channel.
r#type(ChannelType)
/set_type(Option<ChannelType>)
:
required: trueIncident Manager supports three types of contact channels:
-
SMS
-
VOICE
-
EMAIL
-
delivery_address(ContactChannelAddress)
/set_delivery_address(Option<ContactChannelAddress>)
:
required: trueThe details that Incident Manager uses when trying to engage the contact channel. The format is dependent on the type of the contact channel. The following are the expected formats:
-
SMS - ‘+’ followed by the country code and phone number
-
VOICE - ‘+’ followed by the country code and phone number
-
EMAIL - any standard email format
-
defer_activation(bool)
/set_defer_activation(Option<bool>)
:
required: falseIf you want to activate the channel at a later time, you can choose to defer activation. Incident Manager can’t engage your contact channel until it has been activated.
idempotency_token(impl Into<String>)
/set_idempotency_token(Option<String>)
:
required: falseA token ensuring that the operation is called only once with the specified details.
- On success, responds with
CreateContactChannelOutput
with field(s):contact_channel_arn(String)
:The Amazon Resource Name (ARN) of the contact channel.
- On failure, responds with
SdkError<CreateContactChannelError>
Source§impl Client
impl Client
Sourcepub fn create_rotation(&self) -> CreateRotationFluentBuilder
pub fn create_rotation(&self) -> CreateRotationFluentBuilder
Constructs a fluent builder for the CreateRotation
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the rotation.
contact_ids(impl Into<String>)
/set_contact_ids(Option<Vec::<String>>)
:
required: trueThe Amazon Resource Names (ARNs) of the contacts to add to the rotation.
Only the
PERSONAL
contact type is supported. The contact typesESCALATION
andONCALL_SCHEDULE
are not supported for this operation.The order that you list the contacts in is their shift order in the rotation schedule. To change the order of the contact’s shifts, use the
UpdateRotation
operation.start_time(DateTime)
/set_start_time(Option<DateTime>)
:
required: falseThe date and time that the rotation goes into effect.
time_zone_id(impl Into<String>)
/set_time_zone_id(Option<String>)
:
required: trueThe time zone to base the rotation’s activity on in Internet Assigned Numbers Authority (IANA) format. For example: “America/Los_Angeles”, “UTC”, or “Asia/Seoul”. For more information, see the Time Zone Database on the IANA website.
Designators for time zones that don’t support Daylight Savings Time rules, such as Pacific Standard Time (PST), are not supported.
recurrence(RecurrenceSettings)
/set_recurrence(Option<RecurrenceSettings>)
:
required: trueInformation about the rule that specifies when a shift’s team members rotate.
tags(Tag)
/set_tags(Option<Vec::<Tag>>)
:
required: falseOptional metadata to assign to the rotation. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For more information, see Tagging Incident Manager resources in the Incident Manager User Guide.
idempotency_token(impl Into<String>)
/set_idempotency_token(Option<String>)
:
required: falseA token that ensures that the operation is called only once with the specified details.
- On success, responds with
CreateRotationOutput
with field(s):rotation_arn(String)
:The Amazon Resource Name (ARN) of the created rotation.
- On failure, responds with
SdkError<CreateRotationError>
Source§impl Client
impl Client
Sourcepub fn create_rotation_override(&self) -> CreateRotationOverrideFluentBuilder
pub fn create_rotation_override(&self) -> CreateRotationOverrideFluentBuilder
Constructs a fluent builder for the CreateRotationOverride
operation.
- The fluent builder is configurable:
rotation_id(impl Into<String>)
/set_rotation_id(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the rotation to create an override for.
new_contact_ids(impl Into<String>)
/set_new_contact_ids(Option<Vec::<String>>)
:
required: trueThe Amazon Resource Names (ARNs) of the contacts to replace those in the current on-call rotation with.
If you want to include any current team members in the override shift, you must include their ARNs in the new contact ID list.
start_time(DateTime)
/set_start_time(Option<DateTime>)
:
required: trueThe date and time when the override goes into effect.
end_time(DateTime)
/set_end_time(Option<DateTime>)
:
required: trueThe date and time when the override ends.
idempotency_token(impl Into<String>)
/set_idempotency_token(Option<String>)
:
required: falseA token that ensures that the operation is called only once with the specified details.
- On success, responds with
CreateRotationOverrideOutput
with field(s):rotation_override_id(String)
:The Amazon Resource Name (ARN) of the created rotation override.
- On failure, responds with
SdkError<CreateRotationOverrideError>
Source§impl Client
impl Client
Sourcepub fn deactivate_contact_channel(
&self,
) -> DeactivateContactChannelFluentBuilder
pub fn deactivate_contact_channel( &self, ) -> DeactivateContactChannelFluentBuilder
Constructs a fluent builder for the DeactivateContactChannel
operation.
- The fluent builder is configurable:
contact_channel_id(impl Into<String>)
/set_contact_channel_id(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the contact channel you’re deactivating.
- On success, responds with
DeactivateContactChannelOutput
- On failure, responds with
SdkError<DeactivateContactChannelError>
Source§impl Client
impl Client
Sourcepub fn delete_contact(&self) -> DeleteContactFluentBuilder
pub fn delete_contact(&self) -> DeleteContactFluentBuilder
Constructs a fluent builder for the DeleteContact
operation.
- The fluent builder is configurable:
contact_id(impl Into<String>)
/set_contact_id(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the contact that you’re deleting.
- On success, responds with
DeleteContactOutput
- On failure, responds with
SdkError<DeleteContactError>
Source§impl Client
impl Client
Sourcepub fn delete_contact_channel(&self) -> DeleteContactChannelFluentBuilder
pub fn delete_contact_channel(&self) -> DeleteContactChannelFluentBuilder
Constructs a fluent builder for the DeleteContactChannel
operation.
- The fluent builder is configurable:
contact_channel_id(impl Into<String>)
/set_contact_channel_id(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the contact channel.
- On success, responds with
DeleteContactChannelOutput
- On failure, responds with
SdkError<DeleteContactChannelError>
Source§impl Client
impl Client
Sourcepub fn delete_rotation(&self) -> DeleteRotationFluentBuilder
pub fn delete_rotation(&self) -> DeleteRotationFluentBuilder
Constructs a fluent builder for the DeleteRotation
operation.
- The fluent builder is configurable:
rotation_id(impl Into<String>)
/set_rotation_id(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the on-call rotation to delete.
- On success, responds with
DeleteRotationOutput
- On failure, responds with
SdkError<DeleteRotationError>
Source§impl Client
impl Client
Sourcepub fn delete_rotation_override(&self) -> DeleteRotationOverrideFluentBuilder
pub fn delete_rotation_override(&self) -> DeleteRotationOverrideFluentBuilder
Constructs a fluent builder for the DeleteRotationOverride
operation.
- The fluent builder is configurable:
rotation_id(impl Into<String>)
/set_rotation_id(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the rotation that was overridden.
rotation_override_id(impl Into<String>)
/set_rotation_override_id(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the on-call rotation override to delete.
- On success, responds with
DeleteRotationOverrideOutput
- On failure, responds with
SdkError<DeleteRotationOverrideError>
Source§impl Client
impl Client
Sourcepub fn describe_engagement(&self) -> DescribeEngagementFluentBuilder
pub fn describe_engagement(&self) -> DescribeEngagementFluentBuilder
Constructs a fluent builder for the DescribeEngagement
operation.
- The fluent builder is configurable:
engagement_id(impl Into<String>)
/set_engagement_id(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the engagement you want the details of.
- On success, responds with
DescribeEngagementOutput
with field(s):contact_arn(String)
:The ARN of the escalation plan or contacts involved in the engagement.
engagement_arn(String)
:The ARN of the engagement.
sender(String)
:The user that started the engagement.
subject(String)
:The secure subject of the message that was sent to the contact. Use this field for engagements to
VOICE
andEMAIL
.content(String)
:The secure content of the message that was sent to the contact. Use this field for engagements to
VOICE
andEMAIL
.public_subject(Option<String>)
:The insecure subject of the message that was sent to the contact. Use this field for engagements to
SMS
.public_content(Option<String>)
:The insecure content of the message that was sent to the contact. Use this field for engagements to
SMS
.incident_id(Option<String>)
:The ARN of the incident in which the engagement occurred.
start_time(Option<DateTime>)
:The time that the engagement started.
stop_time(Option<DateTime>)
:The time that the engagement ended.
- On failure, responds with
SdkError<DescribeEngagementError>
Source§impl Client
impl Client
Sourcepub fn describe_page(&self) -> DescribePageFluentBuilder
pub fn describe_page(&self) -> DescribePageFluentBuilder
Constructs a fluent builder for the DescribePage
operation.
- The fluent builder is configurable:
page_id(impl Into<String>)
/set_page_id(Option<String>)
:
required: trueThe ID of the engagement to a contact channel.
- On success, responds with
DescribePageOutput
with field(s):page_arn(String)
:The Amazon Resource Name (ARN) of the engagement to a contact channel.
engagement_arn(String)
:The ARN of the engagement that engaged the contact channel.
contact_arn(String)
:The ARN of the contact that was engaged.
sender(String)
:The user that started the engagement.
subject(String)
:The secure subject of the message that was sent to the contact. Use this field for engagements to
VOICE
andEMAIL
.content(String)
:The secure content of the message that was sent to the contact. Use this field for engagements to
VOICE
andEMAIL
.public_subject(Option<String>)
:The insecure subject of the message that was sent to the contact. Use this field for engagements to
SMS
.public_content(Option<String>)
:The insecure content of the message that was sent to the contact. Use this field for engagements to
SMS
.incident_id(Option<String>)
:The ARN of the incident that engaged the contact channel.
sent_time(Option<DateTime>)
:The time the engagement was sent to the contact channel.
read_time(Option<DateTime>)
:The time that the contact channel acknowledged the engagement.
delivery_time(Option<DateTime>)
:The time that the contact channel received the engagement.
- On failure, responds with
SdkError<DescribePageError>
Source§impl Client
impl Client
Sourcepub fn get_contact(&self) -> GetContactFluentBuilder
pub fn get_contact(&self) -> GetContactFluentBuilder
Constructs a fluent builder for the GetContact
operation.
- The fluent builder is configurable:
contact_id(impl Into<String>)
/set_contact_id(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the contact or escalation plan.
- On success, responds with
GetContactOutput
with field(s):contact_arn(String)
:The ARN of the contact or escalation plan.
alias(String)
:The alias of the contact or escalation plan. The alias is unique and identifiable.
display_name(Option<String>)
:The full name of the contact or escalation plan.
r#type(ContactType)
:The type of contact.
plan(Option<Plan>)
:Details about the specific timing or stages and targets of the escalation plan or engagement plan.
- On failure, responds with
SdkError<GetContactError>
Source§impl Client
impl Client
Sourcepub fn get_contact_channel(&self) -> GetContactChannelFluentBuilder
pub fn get_contact_channel(&self) -> GetContactChannelFluentBuilder
Constructs a fluent builder for the GetContactChannel
operation.
- The fluent builder is configurable:
contact_channel_id(impl Into<String>)
/set_contact_channel_id(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the contact channel you want information about.
- On success, responds with
GetContactChannelOutput
with field(s):contact_arn(String)
:The ARN of the contact that the channel belongs to.
contact_channel_arn(String)
:The ARN of the contact channel.
name(String)
:The name of the contact channel
r#type(ChannelType)
:The type of contact channel. The type is
SMS
,VOICE
, orEMAIL
.delivery_address(Option<ContactChannelAddress>)
:The details that Incident Manager uses when trying to engage the contact channel.
activation_status(Option<ActivationStatus>)
:A Boolean value indicating if the contact channel has been activated or not.
- On failure, responds with
SdkError<GetContactChannelError>
Source§impl Client
impl Client
Sourcepub fn get_contact_policy(&self) -> GetContactPolicyFluentBuilder
pub fn get_contact_policy(&self) -> GetContactPolicyFluentBuilder
Constructs a fluent builder for the GetContactPolicy
operation.
- The fluent builder is configurable:
contact_arn(impl Into<String>)
/set_contact_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the contact or escalation plan.
- On success, responds with
GetContactPolicyOutput
with field(s):contact_arn(Option<String>)
:The ARN of the contact or escalation plan.
policy(Option<String>)
:Details about the resource policy attached to the contact or escalation plan.
- On failure, responds with
SdkError<GetContactPolicyError>
Source§impl Client
impl Client
Sourcepub fn get_rotation(&self) -> GetRotationFluentBuilder
pub fn get_rotation(&self) -> GetRotationFluentBuilder
Constructs a fluent builder for the GetRotation
operation.
- The fluent builder is configurable:
rotation_id(impl Into<String>)
/set_rotation_id(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the on-call rotation to retrieve information about.
- On success, responds with
GetRotationOutput
with field(s):rotation_arn(String)
:The Amazon Resource Name (ARN) of the on-call rotation.
name(String)
:The name of the on-call rotation.
contact_ids(Vec::<String>)
:The Amazon Resource Names (ARNs) of the contacts assigned to the on-call rotation team.
start_time(DateTime)
:The specified start time for the on-call rotation.
time_zone_id(String)
:The time zone that the rotation’s activity is based on, in Internet Assigned Numbers Authority (IANA) format.
recurrence(Option<RecurrenceSettings>)
:Specifies how long a rotation lasts before restarting at the beginning of the shift order.
- On failure, responds with
SdkError<GetRotationError>
Source§impl Client
impl Client
Sourcepub fn get_rotation_override(&self) -> GetRotationOverrideFluentBuilder
pub fn get_rotation_override(&self) -> GetRotationOverrideFluentBuilder
Constructs a fluent builder for the GetRotationOverride
operation.
- The fluent builder is configurable:
rotation_id(impl Into<String>)
/set_rotation_id(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the overridden rotation to retrieve information about.
rotation_override_id(impl Into<String>)
/set_rotation_override_id(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the on-call rotation override to retrieve information about.
- On success, responds with
GetRotationOverrideOutput
with field(s):rotation_override_id(Option<String>)
:The Amazon Resource Name (ARN) of the override to an on-call rotation.
rotation_arn(Option<String>)
:The Amazon Resource Name (ARN) of the on-call rotation that was overridden.
new_contact_ids(Option<Vec::<String>>)
:The Amazon Resource Names (ARNs) of the contacts assigned to the override of the on-call rotation.
start_time(Option<DateTime>)
:The date and time when the override goes into effect.
end_time(Option<DateTime>)
:The date and time when the override ends.
create_time(Option<DateTime>)
:The date and time when the override was created.
- On failure, responds with
SdkError<GetRotationOverrideError>
Source§impl Client
impl Client
Sourcepub fn list_contact_channels(&self) -> ListContactChannelsFluentBuilder
pub fn list_contact_channels(&self) -> ListContactChannelsFluentBuilder
Constructs a fluent builder for the ListContactChannels
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
contact_id(impl Into<String>)
/set_contact_id(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the contact.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe pagination token to continue to the next page of results.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of contact channels per page.
- On success, responds with
ListContactChannelsOutput
with field(s):next_token(Option<String>)
:The pagination token to continue to the next page of results.
contact_channels(Vec::<ContactChannel>)
:A list of contact channels related to the specified contact.
- On failure, responds with
SdkError<ListContactChannelsError>
Source§impl Client
impl Client
Sourcepub fn list_contacts(&self) -> ListContactsFluentBuilder
pub fn list_contacts(&self) -> ListContactsFluentBuilder
Constructs a fluent builder for the ListContacts
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe pagination token to continue to the next page of results.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of contacts and escalation plans per page of results.
alias_prefix(impl Into<String>)
/set_alias_prefix(Option<String>)
:
required: falseUsed to list only contacts who’s aliases start with the specified prefix.
r#type(ContactType)
/set_type(Option<ContactType>)
:
required: falseThe type of contact.
- On success, responds with
ListContactsOutput
with field(s):next_token(Option<String>)
:The pagination token to continue to the next page of results.
contacts(Option<Vec::<Contact>>)
:A list of the contacts and escalation plans in your Incident Manager account.
- On failure, responds with
SdkError<ListContactsError>
Source§impl Client
impl Client
Sourcepub fn list_engagements(&self) -> ListEngagementsFluentBuilder
pub fn list_engagements(&self) -> ListEngagementsFluentBuilder
Constructs a fluent builder for the ListEngagements
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe pagination token to continue to the next page of results.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of engagements per page of results.
incident_id(impl Into<String>)
/set_incident_id(Option<String>)
:
required: falseThe Amazon Resource Name (ARN) of the incident you’re listing engagements for.
time_range_value(TimeRange)
/set_time_range_value(Option<TimeRange>)
:
required: falseThe time range to lists engagements for an incident.
- On success, responds with
ListEngagementsOutput
with field(s):next_token(Option<String>)
:The pagination token to continue to the next page of results.
engagements(Vec::<Engagement>)
:A list of each engagement that occurred during the specified time range of an incident.
- On failure, responds with
SdkError<ListEngagementsError>
Source§impl Client
impl Client
Sourcepub fn list_page_receipts(&self) -> ListPageReceiptsFluentBuilder
pub fn list_page_receipts(&self) -> ListPageReceiptsFluentBuilder
Constructs a fluent builder for the ListPageReceipts
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
page_id(impl Into<String>)
/set_page_id(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the engagement to a specific contact channel.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe pagination token to continue to the next page of results.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of acknowledgements per page of results.
- On success, responds with
ListPageReceiptsOutput
with field(s):next_token(Option<String>)
:The pagination token to continue to the next page of results.
receipts(Option<Vec::<Receipt>>)
:A list of each acknowledgement.
- On failure, responds with
SdkError<ListPageReceiptsError>
Source§impl Client
impl Client
Sourcepub fn list_page_resolutions(&self) -> ListPageResolutionsFluentBuilder
pub fn list_page_resolutions(&self) -> ListPageResolutionsFluentBuilder
Constructs a fluent builder for the ListPageResolutions
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseA token to start the list. Use this token to get the next set of results.
page_id(impl Into<String>)
/set_page_id(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the contact engaged for the incident.
- On success, responds with
ListPageResolutionsOutput
with field(s):next_token(Option<String>)
:The token for the next set of items to return. Use this token to get the next set of results.
page_resolutions(Vec::<ResolutionContact>)
:Information about the resolution for an engagement.
- On failure, responds with
SdkError<ListPageResolutionsError>
Source§impl Client
impl Client
Sourcepub fn list_pages_by_contact(&self) -> ListPagesByContactFluentBuilder
pub fn list_pages_by_contact(&self) -> ListPagesByContactFluentBuilder
Constructs a fluent builder for the ListPagesByContact
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
contact_id(impl Into<String>)
/set_contact_id(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the contact you are retrieving engagements for.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe pagination token to continue to the next page of results.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of engagements to contact channels to list per page of results.
- On success, responds with
ListPagesByContactOutput
with field(s):next_token(Option<String>)
:The pagination token to continue to the next page of results.
pages(Vec::<Page>)
:The list of engagements to a contact’s contact channel.
- On failure, responds with
SdkError<ListPagesByContactError>
Source§impl Client
impl Client
Sourcepub fn list_pages_by_engagement(&self) -> ListPagesByEngagementFluentBuilder
pub fn list_pages_by_engagement(&self) -> ListPagesByEngagementFluentBuilder
Constructs a fluent builder for the ListPagesByEngagement
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
engagement_id(impl Into<String>)
/set_engagement_id(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the engagement.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe pagination token to continue to the next page of results.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of engagements to contact channels to list per page of results.
- On success, responds with
ListPagesByEngagementOutput
with field(s):next_token(Option<String>)
:The pagination token to continue to the next page of results.
pages(Vec::<Page>)
:The list of engagements to contact channels.
- On failure, responds with
SdkError<ListPagesByEngagementError>
Source§impl Client
impl Client
Sourcepub fn list_preview_rotation_shifts(
&self,
) -> ListPreviewRotationShiftsFluentBuilder
pub fn list_preview_rotation_shifts( &self, ) -> ListPreviewRotationShiftsFluentBuilder
Constructs a fluent builder for the ListPreviewRotationShifts
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
rotation_start_time(DateTime)
/set_rotation_start_time(Option<DateTime>)
:
required: falseThe date and time a rotation would begin. The first shift is calculated from this date and time.
start_time(DateTime)
/set_start_time(Option<DateTime>)
:
required: falseUsed to filter the range of calculated shifts before sending the response back to the user.
end_time(DateTime)
/set_end_time(Option<DateTime>)
:
required: trueThe date and time a rotation shift would end.
members(impl Into<String>)
/set_members(Option<Vec::<String>>)
:
required: trueThe contacts that would be assigned to a rotation.
time_zone_id(impl Into<String>)
/set_time_zone_id(Option<String>)
:
required: trueThe time zone the rotation’s activity would be based on, in Internet Assigned Numbers Authority (IANA) format. For example: “America/Los_Angeles”, “UTC”, or “Asia/Seoul”.
recurrence(RecurrenceSettings)
/set_recurrence(Option<RecurrenceSettings>)
:
required: trueInformation about how long a rotation would last before restarting at the beginning of the shift order.
overrides(PreviewOverride)
/set_overrides(Option<Vec::<PreviewOverride>>)
:
required: falseInformation about changes that would be made in a rotation override.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseA token to start the list. This token is used to get the next set of results.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of items to return for this call. The call also returns a token that can be specified in a subsequent call to get the next set of results.
- On success, responds with
ListPreviewRotationShiftsOutput
with field(s):rotation_shifts(Option<Vec::<RotationShift>>)
:Details about a rotation shift, including times, types, and contacts.
next_token(Option<String>)
:The token for the next set of items to return. This token is used to get the next set of results.
- On failure, responds with
SdkError<ListPreviewRotationShiftsError>
Source§impl Client
impl Client
Sourcepub fn list_rotation_overrides(&self) -> ListRotationOverridesFluentBuilder
pub fn list_rotation_overrides(&self) -> ListRotationOverridesFluentBuilder
Constructs a fluent builder for the ListRotationOverrides
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
rotation_id(impl Into<String>)
/set_rotation_id(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the rotation to retrieve information about.
start_time(DateTime)
/set_start_time(Option<DateTime>)
:
required: trueThe date and time for the beginning of a time range for listing overrides.
end_time(DateTime)
/set_end_time(Option<DateTime>)
:
required: trueThe date and time for the end of a time range for listing overrides.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseA token to start the list. Use this token to get the next set of results.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.
- On success, responds with
ListRotationOverridesOutput
with field(s):rotation_overrides(Option<Vec::<RotationOverride>>)
:A list of rotation overrides in the specified time range.
next_token(Option<String>)
:The token for the next set of items to return. Use this token to get the next set of results.
- On failure, responds with
SdkError<ListRotationOverridesError>
Source§impl Client
impl Client
Sourcepub fn list_rotation_shifts(&self) -> ListRotationShiftsFluentBuilder
pub fn list_rotation_shifts(&self) -> ListRotationShiftsFluentBuilder
Constructs a fluent builder for the ListRotationShifts
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
rotation_id(impl Into<String>)
/set_rotation_id(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the rotation to retrieve shift information about.
start_time(DateTime)
/set_start_time(Option<DateTime>)
:
required: falseThe date and time for the beginning of the time range to list shifts for.
end_time(DateTime)
/set_end_time(Option<DateTime>)
:
required: trueThe date and time for the end of the time range to list shifts for.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseA token to start the list. Use this token to get the next set of results.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.
- On success, responds with
ListRotationShiftsOutput
with field(s):rotation_shifts(Option<Vec::<RotationShift>>)
:Information about shifts that meet the filter criteria.
next_token(Option<String>)
:The token for the next set of items to return. Use this token to get the next set of results.
- On failure, responds with
SdkError<ListRotationShiftsError>
Source§impl Client
impl Client
Sourcepub fn list_rotations(&self) -> ListRotationsFluentBuilder
pub fn list_rotations(&self) -> ListRotationsFluentBuilder
Constructs a fluent builder for the ListRotations
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
rotation_name_prefix(impl Into<String>)
/set_rotation_name_prefix(Option<String>)
:
required: falseA filter to include rotations in list results based on their common prefix. For example, entering prod returns a list of all rotation names that begin with
prod
, such asproduction
andprod-1
.next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseA token to start the list. Use this token to get the next set of results.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.
- On success, responds with
ListRotationsOutput
with field(s):next_token(Option<String>)
:The token for the next set of items to return. Use this token to get the next set of results.
rotations(Vec::<Rotation>)
:Information about rotations that meet the filter criteria.
- On failure, responds with
SdkError<ListRotationsError>
Source§impl Client
impl Client
Constructs a fluent builder for the ListTagsForResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the contact, escalation plan, rotation, or on-call schedule.
- On success, responds with
ListTagsForResourceOutput
with field(s):tags(Option<Vec::<Tag>>)
:The tags related to the contact or escalation plan.
- On failure, responds with
SdkError<ListTagsForResourceError>
Source§impl Client
impl Client
Sourcepub fn put_contact_policy(&self) -> PutContactPolicyFluentBuilder
pub fn put_contact_policy(&self) -> PutContactPolicyFluentBuilder
Constructs a fluent builder for the PutContactPolicy
operation.
- The fluent builder is configurable:
contact_arn(impl Into<String>)
/set_contact_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the contact or escalation plan.
policy(impl Into<String>)
/set_policy(Option<String>)
:
required: trueDetails of the resource policy.
- On success, responds with
PutContactPolicyOutput
- On failure, responds with
SdkError<PutContactPolicyError>
Source§impl Client
impl Client
Sourcepub fn send_activation_code(&self) -> SendActivationCodeFluentBuilder
pub fn send_activation_code(&self) -> SendActivationCodeFluentBuilder
Constructs a fluent builder for the SendActivationCode
operation.
- The fluent builder is configurable:
contact_channel_id(impl Into<String>)
/set_contact_channel_id(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the contact channel.
- On success, responds with
SendActivationCodeOutput
- On failure, responds with
SdkError<SendActivationCodeError>
Source§impl Client
impl Client
Sourcepub fn start_engagement(&self) -> StartEngagementFluentBuilder
pub fn start_engagement(&self) -> StartEngagementFluentBuilder
Constructs a fluent builder for the StartEngagement
operation.
- The fluent builder is configurable:
contact_id(impl Into<String>)
/set_contact_id(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the contact being engaged.
sender(impl Into<String>)
/set_sender(Option<String>)
:
required: trueThe user that started the engagement.
subject(impl Into<String>)
/set_subject(Option<String>)
:
required: trueThe secure subject of the message that was sent to the contact. Use this field for engagements to
VOICE
orEMAIL
.content(impl Into<String>)
/set_content(Option<String>)
:
required: trueThe secure content of the message that was sent to the contact. Use this field for engagements to
VOICE
orEMAIL
.public_subject(impl Into<String>)
/set_public_subject(Option<String>)
:
required: falseThe insecure subject of the message that was sent to the contact. Use this field for engagements to
SMS
.public_content(impl Into<String>)
/set_public_content(Option<String>)
:
required: falseThe insecure content of the message that was sent to the contact. Use this field for engagements to
SMS
.incident_id(impl Into<String>)
/set_incident_id(Option<String>)
:
required: falseThe ARN of the incident that the engagement is part of.
idempotency_token(impl Into<String>)
/set_idempotency_token(Option<String>)
:
required: falseA token ensuring that the operation is called only once with the specified details.
- On success, responds with
StartEngagementOutput
with field(s):engagement_arn(String)
:The ARN of the engagement.
- On failure, responds with
SdkError<StartEngagementError>
Source§impl Client
impl Client
Sourcepub fn stop_engagement(&self) -> StopEngagementFluentBuilder
pub fn stop_engagement(&self) -> StopEngagementFluentBuilder
Constructs a fluent builder for the StopEngagement
operation.
- The fluent builder is configurable:
engagement_id(impl Into<String>)
/set_engagement_id(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the engagement.
reason(impl Into<String>)
/set_reason(Option<String>)
:
required: falseThe reason that you’re stopping the engagement.
- On success, responds with
StopEngagementOutput
- On failure, responds with
SdkError<StopEngagementError>
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:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the contact or escalation plan.
tags(Tag)
/set_tags(Option<Vec::<Tag>>)
:
required: trueA list of tags that you are adding to the contact or escalation plan.
- 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:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the contact or escalation plan.
tag_keys(impl Into<String>)
/set_tag_keys(Option<Vec::<String>>)
:
required: trueThe key of the tag that you want to remove.
- On success, responds with
UntagResourceOutput
- On failure, responds with
SdkError<UntagResourceError>
Source§impl Client
impl Client
Sourcepub fn update_contact(&self) -> UpdateContactFluentBuilder
pub fn update_contact(&self) -> UpdateContactFluentBuilder
Constructs a fluent builder for the UpdateContact
operation.
- The fluent builder is configurable:
contact_id(impl Into<String>)
/set_contact_id(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the contact or escalation plan you’re updating.
display_name(impl Into<String>)
/set_display_name(Option<String>)
:
required: falseThe full name of the contact or escalation plan.
plan(Plan)
/set_plan(Option<Plan>)
:
required: falseA list of stages. A contact has an engagement plan with stages for specified contact channels. An escalation plan uses these stages to contact specified contacts.
- On success, responds with
UpdateContactOutput
- On failure, responds with
SdkError<UpdateContactError>
Source§impl Client
impl Client
Sourcepub fn update_contact_channel(&self) -> UpdateContactChannelFluentBuilder
pub fn update_contact_channel(&self) -> UpdateContactChannelFluentBuilder
Constructs a fluent builder for the UpdateContactChannel
operation.
- The fluent builder is configurable:
contact_channel_id(impl Into<String>)
/set_contact_channel_id(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the contact channel you want to update.
name(impl Into<String>)
/set_name(Option<String>)
:
required: falseThe name of the contact channel.
delivery_address(ContactChannelAddress)
/set_delivery_address(Option<ContactChannelAddress>)
:
required: falseThe details that Incident Manager uses when trying to engage the contact channel.
- On success, responds with
UpdateContactChannelOutput
- On failure, responds with
SdkError<UpdateContactChannelError>
Source§impl Client
impl Client
Sourcepub fn update_rotation(&self) -> UpdateRotationFluentBuilder
pub fn update_rotation(&self) -> UpdateRotationFluentBuilder
Constructs a fluent builder for the UpdateRotation
operation.
- The fluent builder is configurable:
rotation_id(impl Into<String>)
/set_rotation_id(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the rotation to update.
contact_ids(impl Into<String>)
/set_contact_ids(Option<Vec::<String>>)
:
required: falseThe Amazon Resource Names (ARNs) of the contacts to include in the updated rotation.
Only the
PERSONAL
contact type is supported. The contact typesESCALATION
andONCALL_SCHEDULE
are not supported for this operation.The order in which you list the contacts is their shift order in the rotation schedule.
start_time(DateTime)
/set_start_time(Option<DateTime>)
:
required: falseThe date and time the rotation goes into effect.
time_zone_id(impl Into<String>)
/set_time_zone_id(Option<String>)
:
required: falseThe time zone to base the updated rotation’s activity on, in Internet Assigned Numbers Authority (IANA) format. For example: “America/Los_Angeles”, “UTC”, or “Asia/Seoul”. For more information, see the Time Zone Database on the IANA website.
Designators for time zones that don’t support Daylight Savings Time Rules, such as Pacific Standard Time (PST), aren’t supported.
recurrence(RecurrenceSettings)
/set_recurrence(Option<RecurrenceSettings>)
:
required: trueInformation about how long the updated rotation lasts before restarting at the beginning of the shift order.
- On success, responds with
UpdateRotationOutput
- On failure, responds with
SdkError<UpdateRotationError>
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>
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>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
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>
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>
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>
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>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
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 rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
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);