pub struct Client { /* private fields */ }Expand description
Client for AWS Chatbot
Client for invoking operations on AWS Chatbot. Each operation on AWS Chatbot 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_chatbot::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_chatbot::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 AssociateToConfiguration operation has
a Client::associate_to_configuration, 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.associate_to_configuration()
.resource("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_to_configuration(
&self,
) -> AssociateToConfigurationFluentBuilder
pub fn associate_to_configuration( &self, ) -> AssociateToConfigurationFluentBuilder
Constructs a fluent builder for the AssociateToConfiguration operation.
- The fluent builder is configurable:
resource(impl Into<String>)/set_resource(Option<String>):
required: trueThe resource Amazon Resource Name (ARN) to link.
chat_configuration(impl Into<String>)/set_chat_configuration(Option<String>):
required: trueThe channel configuration to associate with the resource.
- On success, responds with
AssociateToConfigurationOutput - On failure, responds with
SdkError<AssociateToConfigurationError>
Source§impl Client
impl Client
Sourcepub fn create_chime_webhook_configuration(
&self,
) -> CreateChimeWebhookConfigurationFluentBuilder
pub fn create_chime_webhook_configuration( &self, ) -> CreateChimeWebhookConfigurationFluentBuilder
Constructs a fluent builder for the CreateChimeWebhookConfiguration operation.
- The fluent builder is configurable:
webhook_description(impl Into<String>)/set_webhook_description(Option<String>):
required: trueA description of the webhook. We recommend using the convention
RoomName/WebhookName.For more information, see Tutorial: Get started with Amazon Chime in the AWS Chatbot Administrator Guide.
webhook_url(impl Into<String>)/set_webhook_url(Option<String>):
required: trueThe URL for the Amazon Chime webhook.
sns_topic_arns(impl Into<String>)/set_sns_topic_arns(Option<Vec::<String>>):
required: trueThe Amazon Resource Names (ARNs) of the SNS topics that deliver notifications to AWS Chatbot.
iam_role_arn(impl Into<String>)/set_iam_role_arn(Option<String>):
required: trueA user-defined role that AWS Chatbot assumes. This is not the service-linked role.
For more information, see IAM policies for AWS Chatbot in the AWS Chatbot Administrator Guide.
configuration_name(impl Into<String>)/set_configuration_name(Option<String>):
required: trueThe name of the configuration.
logging_level(impl Into<String>)/set_logging_level(Option<String>):
required: falseLogging levels include
ERROR,INFO, orNONE.tags(Tag)/set_tags(Option<Vec::<Tag>>):
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
CreateChimeWebhookConfigurationOutputwith field(s):webhook_configuration(Option<ChimeWebhookConfiguration>):An Amazon Chime webhook configuration.
- On failure, responds with
SdkError<CreateChimeWebhookConfigurationError>
Source§impl Client
impl Client
Sourcepub fn create_custom_action(&self) -> CreateCustomActionFluentBuilder
pub fn create_custom_action(&self) -> CreateCustomActionFluentBuilder
Constructs a fluent builder for the CreateCustomAction operation.
- The fluent builder is configurable:
definition(CustomActionDefinition)/set_definition(Option<CustomActionDefinition>):
required: trueThe definition of the command to run when invoked as an alias or as an action button.
alias_name(impl Into<String>)/set_alias_name(Option<String>):
required: falseThe name used to invoke this action in a chat channel. For example,
@aws run my-alias.attachments(CustomActionAttachment)/set_attachments(Option<Vec::<CustomActionAttachment>>):
required: falseDefines when this custom action button should be attached to a notification.
tags(Tag)/set_tags(Option<Vec::<Tag>>):
required: falseA map of tags assigned to a resource. A tag is a string-to-string map of key-value pairs.
client_token(impl Into<String>)/set_client_token(Option<String>):
required: falseA unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, subsequent retries with the same client token returns the result from the original successful request.
If you do not specify a client token, one is automatically generated by the SDK.
action_name(impl Into<String>)/set_action_name(Option<String>):
required: trueThe name of the custom action. This name is included in the Amazon Resource Name (ARN).
- On success, responds with
CreateCustomActionOutputwith field(s):custom_action_arn(String):The fully defined ARN of the custom action.
- On failure, responds with
SdkError<CreateCustomActionError>
Source§impl Client
impl Client
Sourcepub fn create_microsoft_teams_channel_configuration(
&self,
) -> CreateMicrosoftTeamsChannelConfigurationFluentBuilder
pub fn create_microsoft_teams_channel_configuration( &self, ) -> CreateMicrosoftTeamsChannelConfigurationFluentBuilder
Constructs a fluent builder for the CreateMicrosoftTeamsChannelConfiguration operation.
- The fluent builder is configurable:
channel_id(impl Into<String>)/set_channel_id(Option<String>):
required: trueThe ID of the Microsoft Teams channel.
channel_name(impl Into<String>)/set_channel_name(Option<String>):
required: falseThe name of the Microsoft Teams channel.
team_id(impl Into<String>)/set_team_id(Option<String>):
required: trueThe ID of the Microsoft Teams authorized with AWS Chatbot.
To get the team ID, you must perform the initial authorization flow with Microsoft Teams in the AWS Chatbot console. Then you can copy and paste the team ID from the console. For more information, see Step 1: Configure a Microsoft Teams client in the AWS Chatbot Administrator Guide.
team_name(impl Into<String>)/set_team_name(Option<String>):
required: falseThe name of the Microsoft Teams Team.
tenant_id(impl Into<String>)/set_tenant_id(Option<String>):
required: trueThe ID of the Microsoft Teams tenant.
sns_topic_arns(impl Into<String>)/set_sns_topic_arns(Option<Vec::<String>>):
required: falseThe Amazon Resource Names (ARNs) of the SNS topics that deliver notifications to AWS Chatbot.
iam_role_arn(impl Into<String>)/set_iam_role_arn(Option<String>):
required: trueA user-defined role that AWS Chatbot assumes. This is not the service-linked role.
For more information, see IAM policies for AWS Chatbot in the AWS Chatbot Administrator Guide.
configuration_name(impl Into<String>)/set_configuration_name(Option<String>):
required: trueThe name of the configuration.
logging_level(impl Into<String>)/set_logging_level(Option<String>):
required: falseLogging levels include
ERROR,INFO, orNONE.guardrail_policy_arns(impl Into<String>)/set_guardrail_policy_arns(Option<Vec::<String>>):
required: falseThe list of IAM policy ARNs that are applied as channel guardrails. The AWS managed
AdministratorAccesspolicy is applied by default if this is not set.user_authorization_required(bool)/set_user_authorization_required(Option<bool>):
required: falseEnables use of a user role requirement in your chat configuration.
tags(Tag)/set_tags(Option<Vec::<Tag>>):
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
CreateMicrosoftTeamsChannelConfigurationOutputwith field(s):channel_configuration(Option<TeamsChannelConfiguration>):The configuration for a Microsoft Teams channel configured with AWS Chatbot.
- On failure, responds with
SdkError<CreateMicrosoftTeamsChannelConfigurationError>
Source§impl Client
impl Client
Sourcepub fn create_slack_channel_configuration(
&self,
) -> CreateSlackChannelConfigurationFluentBuilder
pub fn create_slack_channel_configuration( &self, ) -> CreateSlackChannelConfigurationFluentBuilder
Constructs a fluent builder for the CreateSlackChannelConfiguration operation.
- The fluent builder is configurable:
slack_team_id(impl Into<String>)/set_slack_team_id(Option<String>):
required: trueThe ID of the Slack workspace authorized with AWS Chatbot.
slack_channel_id(impl Into<String>)/set_slack_channel_id(Option<String>):
required: trueThe ID of the Slack channel.
To get this ID, open Slack, right click on the channel name in the left pane, then choose Copy Link. The channel ID is the 9-character string at the end of the URL. For example, ABCBBLZZZ.
slack_channel_name(impl Into<String>)/set_slack_channel_name(Option<String>):
required: falseThe name of the Slack channel.
sns_topic_arns(impl Into<String>)/set_sns_topic_arns(Option<Vec::<String>>):
required: falseThe Amazon Resource Names (ARNs) of the SNS topics that deliver notifications to AWS Chatbot.
iam_role_arn(impl Into<String>)/set_iam_role_arn(Option<String>):
required: trueA user-defined role that AWS Chatbot assumes. This is not the service-linked role.
For more information, see IAM policies for AWS Chatbot in the AWS Chatbot Administrator Guide.
configuration_name(impl Into<String>)/set_configuration_name(Option<String>):
required: trueThe name of the configuration.
logging_level(impl Into<String>)/set_logging_level(Option<String>):
required: falseLogging levels include
ERROR,INFO, orNONE.guardrail_policy_arns(impl Into<String>)/set_guardrail_policy_arns(Option<Vec::<String>>):
required: falseThe list of IAM policy ARNs that are applied as channel guardrails. The AWS managed
AdministratorAccesspolicy is applied by default if this is not set.user_authorization_required(bool)/set_user_authorization_required(Option<bool>):
required: falseEnables use of a user role requirement in your chat configuration.
tags(Tag)/set_tags(Option<Vec::<Tag>>):
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
CreateSlackChannelConfigurationOutputwith field(s):channel_configuration(Option<SlackChannelConfiguration>):The configuration for a Slack channel configured with AWS Chatbot.
- On failure, responds with
SdkError<CreateSlackChannelConfigurationError>
Source§impl Client
impl Client
Sourcepub fn delete_chime_webhook_configuration(
&self,
) -> DeleteChimeWebhookConfigurationFluentBuilder
pub fn delete_chime_webhook_configuration( &self, ) -> DeleteChimeWebhookConfigurationFluentBuilder
Constructs a fluent builder for the DeleteChimeWebhookConfiguration operation.
- The fluent builder is configurable:
chat_configuration_arn(impl Into<String>)/set_chat_configuration_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the ChimeWebhookConfiguration to delete.
- On success, responds with
DeleteChimeWebhookConfigurationOutput - On failure, responds with
SdkError<DeleteChimeWebhookConfigurationError>
Source§impl Client
impl Client
Sourcepub fn delete_custom_action(&self) -> DeleteCustomActionFluentBuilder
pub fn delete_custom_action(&self) -> DeleteCustomActionFluentBuilder
Constructs a fluent builder for the DeleteCustomAction operation.
- The fluent builder is configurable:
custom_action_arn(impl Into<String>)/set_custom_action_arn(Option<String>):
required: trueThe fully defined ARN of the custom action.
- On success, responds with
DeleteCustomActionOutput - On failure, responds with
SdkError<DeleteCustomActionError>
Source§impl Client
impl Client
Sourcepub fn delete_microsoft_teams_channel_configuration(
&self,
) -> DeleteMicrosoftTeamsChannelConfigurationFluentBuilder
pub fn delete_microsoft_teams_channel_configuration( &self, ) -> DeleteMicrosoftTeamsChannelConfigurationFluentBuilder
Constructs a fluent builder for the DeleteMicrosoftTeamsChannelConfiguration operation.
- The fluent builder is configurable:
chat_configuration_arn(impl Into<String>)/set_chat_configuration_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the MicrosoftTeamsChannelConfiguration associated with the user identity to delete.
- On success, responds with
DeleteMicrosoftTeamsChannelConfigurationOutput - On failure, responds with
SdkError<DeleteMicrosoftTeamsChannelConfigurationError>
Source§impl Client
impl Client
Sourcepub fn delete_microsoft_teams_configured_team(
&self,
) -> DeleteMicrosoftTeamsConfiguredTeamFluentBuilder
pub fn delete_microsoft_teams_configured_team( &self, ) -> DeleteMicrosoftTeamsConfiguredTeamFluentBuilder
Constructs a fluent builder for the DeleteMicrosoftTeamsConfiguredTeam operation.
- The fluent builder is configurable:
team_id(impl Into<String>)/set_team_id(Option<String>):
required: trueThe ID of the Microsoft Teams team authorized with AWS Chatbot.
To get the team ID, you must perform the initial authorization flow with Microsoft Teams in the AWS Chatbot console. Then you can copy and paste the team ID from the console. For more information, see Step 1: Configure a Microsoft Teams client in the AWS Chatbot Administrator Guide.
- On success, responds with
DeleteMicrosoftTeamsConfiguredTeamOutput - On failure, responds with
SdkError<DeleteMicrosoftTeamsConfiguredTeamError>
Source§impl Client
impl Client
Sourcepub fn delete_microsoft_teams_user_identity(
&self,
) -> DeleteMicrosoftTeamsUserIdentityFluentBuilder
pub fn delete_microsoft_teams_user_identity( &self, ) -> DeleteMicrosoftTeamsUserIdentityFluentBuilder
Constructs a fluent builder for the DeleteMicrosoftTeamsUserIdentity operation.
- The fluent builder is configurable:
chat_configuration_arn(impl Into<String>)/set_chat_configuration_arn(Option<String>):
required: trueThe ARN of the MicrosoftTeamsChannelConfiguration associated with the user identity to delete.
user_id(impl Into<String>)/set_user_id(Option<String>):
required: trueThe Microsoft Teams user ID.
- On success, responds with
DeleteMicrosoftTeamsUserIdentityOutput - On failure, responds with
SdkError<DeleteMicrosoftTeamsUserIdentityError>
Source§impl Client
impl Client
Sourcepub fn delete_slack_channel_configuration(
&self,
) -> DeleteSlackChannelConfigurationFluentBuilder
pub fn delete_slack_channel_configuration( &self, ) -> DeleteSlackChannelConfigurationFluentBuilder
Constructs a fluent builder for the DeleteSlackChannelConfiguration operation.
- The fluent builder is configurable:
chat_configuration_arn(impl Into<String>)/set_chat_configuration_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the SlackChannelConfiguration to delete.
- On success, responds with
DeleteSlackChannelConfigurationOutput - On failure, responds with
SdkError<DeleteSlackChannelConfigurationError>
Source§impl Client
impl Client
Sourcepub fn delete_slack_user_identity(&self) -> DeleteSlackUserIdentityFluentBuilder
pub fn delete_slack_user_identity(&self) -> DeleteSlackUserIdentityFluentBuilder
Constructs a fluent builder for the DeleteSlackUserIdentity operation.
- The fluent builder is configurable:
chat_configuration_arn(impl Into<String>)/set_chat_configuration_arn(Option<String>):
required: trueThe ARN of the SlackChannelConfiguration associated with the user identity to delete.
slack_team_id(impl Into<String>)/set_slack_team_id(Option<String>):
required: trueThe ID of the Slack workspace authorized with AWS Chatbot.
slack_user_id(impl Into<String>)/set_slack_user_id(Option<String>):
required: trueThe ID of the user in Slack
- On success, responds with
DeleteSlackUserIdentityOutput - On failure, responds with
SdkError<DeleteSlackUserIdentityError>
Source§impl Client
impl Client
Constructs a fluent builder for the DeleteSlackWorkspaceAuthorization operation.
- The fluent builder is configurable:
slack_team_id(impl Into<String>)/set_slack_team_id(Option<String>):
required: trueThe ID of the Slack workspace authorized with AWS Chatbot.
- On success, responds with
DeleteSlackWorkspaceAuthorizationOutput - On failure, responds with
SdkError<DeleteSlackWorkspaceAuthorizationError>
Source§impl Client
impl Client
Sourcepub fn describe_chime_webhook_configurations(
&self,
) -> DescribeChimeWebhookConfigurationsFluentBuilder
pub fn describe_chime_webhook_configurations( &self, ) -> DescribeChimeWebhookConfigurationsFluentBuilder
Constructs a fluent builder for the DescribeChimeWebhookConfigurations 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 results to include in the response. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseAn optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.
chat_configuration_arn(impl Into<String>)/set_chat_configuration_arn(Option<String>):
required: falseAn optional Amazon Resource Name (ARN) of a ChimeWebhookConfiguration to describe.
- On success, responds with
DescribeChimeWebhookConfigurationsOutputwith field(s):next_token(Option<String>):An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.
webhook_configurations(Option<Vec::<ChimeWebhookConfiguration>>):A list of Amazon Chime webhooks associated with the account.
- On failure, responds with
SdkError<DescribeChimeWebhookConfigurationsError>
Source§impl Client
impl Client
Sourcepub fn describe_slack_channel_configurations(
&self,
) -> DescribeSlackChannelConfigurationsFluentBuilder
pub fn describe_slack_channel_configurations( &self, ) -> DescribeSlackChannelConfigurationsFluentBuilder
Constructs a fluent builder for the DescribeSlackChannelConfigurations 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 results to include in the response. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseAn optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.
chat_configuration_arn(impl Into<String>)/set_chat_configuration_arn(Option<String>):
required: falseAn optional Amazon Resource Name (ARN) of a SlackChannelConfiguration to describe.
- On success, responds with
DescribeSlackChannelConfigurationsOutputwith field(s):next_token(Option<String>):An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.
slack_channel_configurations(Option<Vec::<SlackChannelConfiguration>>):A list of Slack channel configurations.
- On failure, responds with
SdkError<DescribeSlackChannelConfigurationsError>
Source§impl Client
impl Client
Sourcepub fn describe_slack_user_identities(
&self,
) -> DescribeSlackUserIdentitiesFluentBuilder
pub fn describe_slack_user_identities( &self, ) -> DescribeSlackUserIdentitiesFluentBuilder
Constructs a fluent builder for the DescribeSlackUserIdentities operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
chat_configuration_arn(impl Into<String>)/set_chat_configuration_arn(Option<String>):
required: falseThe Amazon Resource Name (ARN) of the SlackChannelConfiguration associated with the user identities to describe.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseAn optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to include in the response. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.
- On success, responds with
DescribeSlackUserIdentitiesOutputwith field(s):slack_user_identities(Option<Vec::<SlackUserIdentity>>):A list of Slack User Identities.
next_token(Option<String>):An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.
- On failure, responds with
SdkError<DescribeSlackUserIdentitiesError>
Source§impl Client
impl Client
Sourcepub fn describe_slack_workspaces(&self) -> DescribeSlackWorkspacesFluentBuilder
pub fn describe_slack_workspaces(&self) -> DescribeSlackWorkspacesFluentBuilder
Constructs a fluent builder for the DescribeSlackWorkspaces 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 results to include in the response. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseAn optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.
- On success, responds with
DescribeSlackWorkspacesOutputwith field(s):slack_workspaces(Option<Vec::<SlackWorkspace>>):A list of Slack workspaces registered with AWS Chatbot.
next_token(Option<String>):An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.
- On failure, responds with
SdkError<DescribeSlackWorkspacesError>
Source§impl Client
impl Client
Sourcepub fn disassociate_from_configuration(
&self,
) -> DisassociateFromConfigurationFluentBuilder
pub fn disassociate_from_configuration( &self, ) -> DisassociateFromConfigurationFluentBuilder
Constructs a fluent builder for the DisassociateFromConfiguration operation.
- The fluent builder is configurable:
resource(impl Into<String>)/set_resource(Option<String>):
required: trueThe resource (for example, a custom action) Amazon Resource Name (ARN) to unlink.
chat_configuration(impl Into<String>)/set_chat_configuration(Option<String>):
required: trueThe channel configuration the resource is being disassociated from.
- On success, responds with
DisassociateFromConfigurationOutput - On failure, responds with
SdkError<DisassociateFromConfigurationError>
Source§impl Client
impl Client
Sourcepub fn get_account_preferences(&self) -> GetAccountPreferencesFluentBuilder
pub fn get_account_preferences(&self) -> GetAccountPreferencesFluentBuilder
Constructs a fluent builder for the GetAccountPreferences operation.
- The fluent builder takes no input, just
sendit. - On success, responds with
GetAccountPreferencesOutputwith field(s):account_preferences(Option<AccountPreferences>):The preferences related to AWS Chatbot usage in the calling AWS account.
- On failure, responds with
SdkError<GetAccountPreferencesError>
Source§impl Client
impl Client
Sourcepub fn get_custom_action(&self) -> GetCustomActionFluentBuilder
pub fn get_custom_action(&self) -> GetCustomActionFluentBuilder
Constructs a fluent builder for the GetCustomAction operation.
- The fluent builder is configurable:
custom_action_arn(impl Into<String>)/set_custom_action_arn(Option<String>):
required: trueReturns the fully defined Amazon Resource Name (ARN) of the custom action.
- On success, responds with
GetCustomActionOutputwith field(s):custom_action(Option<CustomAction>):Returns the custom action.
- On failure, responds with
SdkError<GetCustomActionError>
Source§impl Client
impl Client
Sourcepub fn get_microsoft_teams_channel_configuration(
&self,
) -> GetMicrosoftTeamsChannelConfigurationFluentBuilder
pub fn get_microsoft_teams_channel_configuration( &self, ) -> GetMicrosoftTeamsChannelConfigurationFluentBuilder
Constructs a fluent builder for the GetMicrosoftTeamsChannelConfiguration operation.
- The fluent builder is configurable:
chat_configuration_arn(impl Into<String>)/set_chat_configuration_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the MicrosoftTeamsChannelConfiguration to retrieve.
- On success, responds with
GetMicrosoftTeamsChannelConfigurationOutputwith field(s):channel_configuration(Option<TeamsChannelConfiguration>):The configuration for a Microsoft Teams channel configured with AWS Chatbot.
- On failure, responds with
SdkError<GetMicrosoftTeamsChannelConfigurationError>
Source§impl Client
impl Client
Sourcepub fn list_associations(&self) -> ListAssociationsFluentBuilder
pub fn list_associations(&self) -> ListAssociationsFluentBuilder
Constructs a fluent builder for the ListAssociations operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
chat_configuration(impl Into<String>)/set_chat_configuration(Option<String>):
required: trueThe channel configuration to list associations for.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to include in the response. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseAn optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.
- On success, responds with
ListAssociationsOutputwith field(s):associations(Vec::<AssociationListing>):The resources associated with this channel configuration.
next_token(Option<String>):An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.
- On failure, responds with
SdkError<ListAssociationsError>
Source§impl Client
impl Client
Sourcepub fn list_custom_actions(&self) -> ListCustomActionsFluentBuilder
pub fn list_custom_actions(&self) -> ListCustomActionsFluentBuilder
Constructs a fluent builder for the ListCustomActions 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 results to include in the response. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseAn optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.
- On success, responds with
ListCustomActionsOutputwith field(s):custom_actions(Vec::<String>):A list of custom actions.
next_token(Option<String>):An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.
- On failure, responds with
SdkError<ListCustomActionsError>
Source§impl Client
impl Client
Sourcepub fn list_microsoft_teams_channel_configurations(
&self,
) -> ListMicrosoftTeamsChannelConfigurationsFluentBuilder
pub fn list_microsoft_teams_channel_configurations( &self, ) -> ListMicrosoftTeamsChannelConfigurationsFluentBuilder
Constructs a fluent builder for the ListMicrosoftTeamsChannelConfigurations 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 results to include in the response. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseAn optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.
team_id(impl Into<String>)/set_team_id(Option<String>):
required: falseThe ID of the Microsoft Teams authorized with AWS Chatbot.
To get the team ID, you must perform the initial authorization flow with Microsoft Teams in the AWS Chatbot console. Then you can copy and paste the team ID from the console. For more information, see Step 1: Configure a Microsoft Teams client in the AWS Chatbot Administrator Guide.
- On success, responds with
ListMicrosoftTeamsChannelConfigurationsOutputwith field(s):next_token(Option<String>):An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.
team_channel_configurations(Option<Vec::<TeamsChannelConfiguration>>):A list of AWS Chatbot channel configurations for Microsoft Teams.
- On failure, responds with
SdkError<ListMicrosoftTeamsChannelConfigurationsError>
Source§impl Client
impl Client
Sourcepub fn list_microsoft_teams_configured_teams(
&self,
) -> ListMicrosoftTeamsConfiguredTeamsFluentBuilder
pub fn list_microsoft_teams_configured_teams( &self, ) -> ListMicrosoftTeamsConfiguredTeamsFluentBuilder
Constructs a fluent builder for the ListMicrosoftTeamsConfiguredTeams 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 results to include in the response. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseAn optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.
- On success, responds with
ListMicrosoftTeamsConfiguredTeamsOutputwith field(s):configured_teams(Option<Vec::<ConfiguredTeam>>):A list of teams in Microsoft Teams that are configured with AWS Chatbot.
next_token(Option<String>):An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.
- On failure, responds with
SdkError<ListMicrosoftTeamsConfiguredTeamsError>
Source§impl Client
impl Client
Sourcepub fn list_microsoft_teams_user_identities(
&self,
) -> ListMicrosoftTeamsUserIdentitiesFluentBuilder
pub fn list_microsoft_teams_user_identities( &self, ) -> ListMicrosoftTeamsUserIdentitiesFluentBuilder
Constructs a fluent builder for the ListMicrosoftTeamsUserIdentities operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
chat_configuration_arn(impl Into<String>)/set_chat_configuration_arn(Option<String>):
required: falseThe Amazon Resource Name (ARN) of the MicrosoftTeamsChannelConfiguration associated with the user identities to list.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseAn optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to include in the response. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.
- On success, responds with
ListMicrosoftTeamsUserIdentitiesOutputwith field(s):teams_user_identities(Option<Vec::<TeamsUserIdentity>>):User level permissions associated to a channel configuration.
next_token(Option<String>):An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.
- On failure, responds with
SdkError<ListMicrosoftTeamsUserIdentitiesError>
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 ARN of the resource to list tags for.
- On success, responds with
ListTagsForResourceOutputwith field(s):tags(Option<Vec::<Tag>>):Key-value pairs that are assigned to a resource, usually for the purpose of grouping and searching for items. Tags are metadata that you define.
- On failure, responds with
SdkError<ListTagsForResourceError>
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 ARN of the configuration.
tags(Tag)/set_tags(Option<Vec::<Tag>>):
required: trueA list of tags to apply to the configuration.
- 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 value of the resource that will have the tag removed. An Amazon Resource Name (ARN) is an identifier for a specific AWS resource, such as a server, user, or role.
tag_keys(impl Into<String>)/set_tag_keys(Option<Vec::<String>>):
required: trueTagKeys are key-value pairs assigned to ARNs that can be used to group and search for resources by type. This metadata can be attached to resources for any purpose.
- On success, responds with
UntagResourceOutput - On failure, responds with
SdkError<UntagResourceError>
Source§impl Client
impl Client
Sourcepub fn update_account_preferences(
&self,
) -> UpdateAccountPreferencesFluentBuilder
pub fn update_account_preferences( &self, ) -> UpdateAccountPreferencesFluentBuilder
Constructs a fluent builder for the UpdateAccountPreferences operation.
- The fluent builder is configurable:
user_authorization_required(bool)/set_user_authorization_required(Option<bool>):
required: falseEnables use of a user role requirement in your chat configuration.
training_data_collection_enabled(bool)/set_training_data_collection_enabled(Option<bool>):
required: falseTurns on training data collection.
This helps improve the AWS Chatbot experience by allowing AWS Chatbot to store and use your customer information, such as AWS Chatbot configurations, notifications, user inputs, AWS Chatbot generated responses, and interaction data. This data helps us to continuously improve and develop Artificial Intelligence (AI) technologies. Your data is not shared with any third parties and is protected using sophisticated controls to prevent unauthorized access and misuse. AWS Chatbot does not store or use interactions in chat channels with Amazon Q for training AI technologies for AWS Chatbot.
- On success, responds with
UpdateAccountPreferencesOutputwith field(s):account_preferences(Option<AccountPreferences>):Preferences related to AWS Chatbot usage in the calling AWS account.
- On failure, responds with
SdkError<UpdateAccountPreferencesError>
Source§impl Client
impl Client
Sourcepub fn update_chime_webhook_configuration(
&self,
) -> UpdateChimeWebhookConfigurationFluentBuilder
pub fn update_chime_webhook_configuration( &self, ) -> UpdateChimeWebhookConfigurationFluentBuilder
Constructs a fluent builder for the UpdateChimeWebhookConfiguration operation.
- The fluent builder is configurable:
chat_configuration_arn(impl Into<String>)/set_chat_configuration_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the ChimeWebhookConfiguration to update.
webhook_description(impl Into<String>)/set_webhook_description(Option<String>):
required: falseA description of the webhook. We recommend using the convention
RoomName/WebhookName.For more information, see Tutorial: Get started with Amazon Chime in the AWS Chatbot Administrator Guide.
webhook_url(impl Into<String>)/set_webhook_url(Option<String>):
required: falseThe URL for the Amazon Chime webhook.
sns_topic_arns(impl Into<String>)/set_sns_topic_arns(Option<Vec::<String>>):
required: falseThe ARNs of the SNS topics that deliver notifications to AWS Chatbot.
iam_role_arn(impl Into<String>)/set_iam_role_arn(Option<String>):
required: falseA user-defined role that AWS Chatbot assumes. This is not the service-linked role.
For more information, see IAM policies for AWS Chatbot in the AWS Chatbot Administrator Guide.
logging_level(impl Into<String>)/set_logging_level(Option<String>):
required: falseLogging levels include
ERROR,INFO, orNONE.
- On success, responds with
UpdateChimeWebhookConfigurationOutputwith field(s):webhook_configuration(Option<ChimeWebhookConfiguration>):A Amazon Chime webhook configuration.
- On failure, responds with
SdkError<UpdateChimeWebhookConfigurationError>
Source§impl Client
impl Client
Sourcepub fn update_custom_action(&self) -> UpdateCustomActionFluentBuilder
pub fn update_custom_action(&self) -> UpdateCustomActionFluentBuilder
Constructs a fluent builder for the UpdateCustomAction operation.
- The fluent builder is configurable:
custom_action_arn(impl Into<String>)/set_custom_action_arn(Option<String>):
required: trueThe fully defined Amazon Resource Name (ARN) of the custom action.
definition(CustomActionDefinition)/set_definition(Option<CustomActionDefinition>):
required: trueThe definition of the command to run when invoked as an alias or as an action button.
alias_name(impl Into<String>)/set_alias_name(Option<String>):
required: falseThe name used to invoke this action in the chat channel. For example,
@aws run my-alias.attachments(CustomActionAttachment)/set_attachments(Option<Vec::<CustomActionAttachment>>):
required: falseDefines when this custom action button should be attached to a notification.
- On success, responds with
UpdateCustomActionOutputwith field(s):custom_action_arn(String):The fully defined ARN of the custom action.
- On failure, responds with
SdkError<UpdateCustomActionError>
Source§impl Client
impl Client
Sourcepub fn update_microsoft_teams_channel_configuration(
&self,
) -> UpdateMicrosoftTeamsChannelConfigurationFluentBuilder
pub fn update_microsoft_teams_channel_configuration( &self, ) -> UpdateMicrosoftTeamsChannelConfigurationFluentBuilder
Constructs a fluent builder for the UpdateMicrosoftTeamsChannelConfiguration operation.
- The fluent builder is configurable:
chat_configuration_arn(impl Into<String>)/set_chat_configuration_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the TeamsChannelConfiguration to update.
channel_id(impl Into<String>)/set_channel_id(Option<String>):
required: trueThe ID of the Microsoft Teams channel.
channel_name(impl Into<String>)/set_channel_name(Option<String>):
required: falseThe name of the Microsoft Teams channel.
sns_topic_arns(impl Into<String>)/set_sns_topic_arns(Option<Vec::<String>>):
required: falseThe Amazon Resource Names (ARNs) of the SNS topics that deliver notifications to AWS Chatbot.
iam_role_arn(impl Into<String>)/set_iam_role_arn(Option<String>):
required: falseA user-defined role that AWS Chatbot assumes. This is not the service-linked role.
For more information, see IAM policies for AWS Chatbot in the AWS Chatbot Administrator Guide.
logging_level(impl Into<String>)/set_logging_level(Option<String>):
required: falseLogging levels include
ERROR,INFO, orNONE.guardrail_policy_arns(impl Into<String>)/set_guardrail_policy_arns(Option<Vec::<String>>):
required: falseThe list of IAM policy ARNs that are applied as channel guardrails. The AWS managed
AdministratorAccesspolicy is applied by default if this is not set.user_authorization_required(bool)/set_user_authorization_required(Option<bool>):
required: falseEnables use of a user role requirement in your chat configuration.
- On success, responds with
UpdateMicrosoftTeamsChannelConfigurationOutputwith field(s):channel_configuration(Option<TeamsChannelConfiguration>):The configuration for a Microsoft Teams channel configured with AWS Chatbot.
- On failure, responds with
SdkError<UpdateMicrosoftTeamsChannelConfigurationError>
Source§impl Client
impl Client
Sourcepub fn update_slack_channel_configuration(
&self,
) -> UpdateSlackChannelConfigurationFluentBuilder
pub fn update_slack_channel_configuration( &self, ) -> UpdateSlackChannelConfigurationFluentBuilder
Constructs a fluent builder for the UpdateSlackChannelConfiguration operation.
- The fluent builder is configurable:
chat_configuration_arn(impl Into<String>)/set_chat_configuration_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the SlackChannelConfiguration to update.
slack_channel_id(impl Into<String>)/set_slack_channel_id(Option<String>):
required: trueThe ID of the Slack channel.
To get this ID, open Slack, right click on the channel name in the left pane, then choose Copy Link. The channel ID is the 9-character string at the end of the URL. For example, ABCBBLZZZ.
slack_channel_name(impl Into<String>)/set_slack_channel_name(Option<String>):
required: falseThe name of the Slack channel.
sns_topic_arns(impl Into<String>)/set_sns_topic_arns(Option<Vec::<String>>):
required: falseThe Amazon Resource Names (ARNs) of the SNS topics that deliver notifications to AWS Chatbot.
iam_role_arn(impl Into<String>)/set_iam_role_arn(Option<String>):
required: falseA user-defined role that AWS Chatbot assumes. This is not the service-linked role.
For more information, see IAM policies for AWS Chatbot in the AWS Chatbot Administrator Guide.
logging_level(impl Into<String>)/set_logging_level(Option<String>):
required: falseLogging levels include
ERROR,INFO, orNONE.guardrail_policy_arns(impl Into<String>)/set_guardrail_policy_arns(Option<Vec::<String>>):
required: falseThe list of IAM policy ARNs that are applied as channel guardrails. The AWS managed
AdministratorAccesspolicy is applied by default if this is not set.user_authorization_required(bool)/set_user_authorization_required(Option<bool>):
required: falseEnables use of a user role requirement in your chat configuration.
- On success, responds with
UpdateSlackChannelConfigurationOutputwith field(s):channel_configuration(Option<SlackChannelConfiguration>):The configuration for a Slack channel configured with AWS Chatbot.
- On failure, responds with
SdkError<UpdateSlackChannelConfigurationError>
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_implconfigured. - Identity caching is enabled without a
sleep_implandtime_sourceconfigured. - No
behavior_versionis 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_configis missing an async sleep implementation. If you experience this panic, set thesleep_implon the Config passed into this function to fix it. - This method will panic if the
sdk_configis missing an HTTP connector. If you experience this panic, set thehttp_connectoron the Config passed into this function to fix it. - This method will panic if no
BehaviorVersionis provided. If you experience this panic, setbehavior_versionon the Config or enable thebehavior-version-latestCargo 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);