pub struct Client { /* private fields */ }Expand description
Client for AWS Budgets
Client for invoking operations on AWS Budgets. Each operation on AWS Budgets 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_budgets::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_budgets::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 CreateBudget operation has
a Client::create_budget, 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.create_budget()
.account_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 create_budget(&self) -> CreateBudgetFluentBuilder
pub fn create_budget(&self) -> CreateBudgetFluentBuilder
Constructs a fluent builder for the CreateBudget operation.
- The fluent builder is configurable:
account_id(impl Into<String>)/set_account_id(Option<String>):
required: trueThe
accountIdthat is associated with the budget.budget(Budget)/set_budget(Option<Budget>):
required: trueThe budget object that you want to create.
notifications_with_subscribers(NotificationWithSubscribers)/set_notifications_with_subscribers(Option<Vec::<NotificationWithSubscribers>>):
required: falseA notification that you want to associate with a budget. A budget can have up to five notifications, and each notification can have one SNS subscriber and up to 10 email subscribers. If you include notifications and subscribers in your
CreateBudgetcall, Amazon Web Services creates the notifications and subscribers for you.resource_tags(ResourceTag)/set_resource_tags(Option<Vec::<ResourceTag>>):
required: falseAn optional list of tags to associate with the specified budget. Each tag consists of a key and a value, and each key must be unique for the resource.
- On success, responds with
CreateBudgetOutput - On failure, responds with
SdkError<CreateBudgetError>
Source§impl Client
impl Client
Sourcepub fn create_budget_action(&self) -> CreateBudgetActionFluentBuilder
pub fn create_budget_action(&self) -> CreateBudgetActionFluentBuilder
Constructs a fluent builder for the CreateBudgetAction operation.
- The fluent builder is configurable:
account_id(impl Into<String>)/set_account_id(Option<String>):
required: trueThe account ID of the user. It’s a 12-digit number.
budget_name(impl Into<String>)/set_budget_name(Option<String>):
required: trueA string that represents the budget name. The “:” and “" characters, and the “/action/” substring, aren’t allowed.
notification_type(NotificationType)/set_notification_type(Option<NotificationType>):
required: trueThe type of a notification. It must be ACTUAL or FORECASTED.
action_type(ActionType)/set_action_type(Option<ActionType>):
required: trueThe type of action. This defines the type of tasks that can be carried out by this action. This field also determines the format for definition.
action_threshold(ActionThreshold)/set_action_threshold(Option<ActionThreshold>):
required: trueThe trigger threshold of the action.
definition(Definition)/set_definition(Option<Definition>):
required: trueSpecifies all of the type-specific parameters.
execution_role_arn(impl Into<String>)/set_execution_role_arn(Option<String>):
required: trueThe role passed for action execution and reversion. Roles and actions must be in the same account.
approval_model(ApprovalModel)/set_approval_model(Option<ApprovalModel>):
required: trueThis specifies if the action needs manual or automatic approval.
subscribers(Subscriber)/set_subscribers(Option<Vec::<Subscriber>>):
required: trueA list of subscribers.
resource_tags(ResourceTag)/set_resource_tags(Option<Vec::<ResourceTag>>):
required: falseAn optional list of tags to associate with the specified budget action. Each tag consists of a key and a value, and each key must be unique for the resource.
- On success, responds with
CreateBudgetActionOutputwith field(s):account_id(String):The account ID of the user. It’s a 12-digit number.
budget_name(String):A string that represents the budget name. The “:” and “" characters, and the “/action/” substring, aren’t allowed.
action_id(String):A system-generated universally unique identifier (UUID) for the action.
- On failure, responds with
SdkError<CreateBudgetActionError>
Source§impl Client
impl Client
Sourcepub fn create_notification(&self) -> CreateNotificationFluentBuilder
pub fn create_notification(&self) -> CreateNotificationFluentBuilder
Constructs a fluent builder for the CreateNotification operation.
- The fluent builder is configurable:
account_id(impl Into<String>)/set_account_id(Option<String>):
required: trueThe
accountIdthat is associated with the budget that you want to create a notification for.budget_name(impl Into<String>)/set_budget_name(Option<String>):
required: trueThe name of the budget that you want Amazon Web Services to notify you about. Budget names must be unique within an account.
notification(Notification)/set_notification(Option<Notification>):
required: trueThe notification that you want to create.
subscribers(Subscriber)/set_subscribers(Option<Vec::<Subscriber>>):
required: trueA list of subscribers that you want to associate with the notification. Each notification can have one SNS subscriber and up to 10 email subscribers.
- On success, responds with
CreateNotificationOutput - On failure, responds with
SdkError<CreateNotificationError>
Source§impl Client
impl Client
Sourcepub fn create_subscriber(&self) -> CreateSubscriberFluentBuilder
pub fn create_subscriber(&self) -> CreateSubscriberFluentBuilder
Constructs a fluent builder for the CreateSubscriber operation.
- The fluent builder is configurable:
account_id(impl Into<String>)/set_account_id(Option<String>):
required: trueThe
accountIdthat is associated with the budget that you want to create a subscriber for.budget_name(impl Into<String>)/set_budget_name(Option<String>):
required: trueThe name of the budget that you want to subscribe to. Budget names must be unique within an account.
notification(Notification)/set_notification(Option<Notification>):
required: trueThe notification that you want to create a subscriber for.
subscriber(Subscriber)/set_subscriber(Option<Subscriber>):
required: trueThe subscriber that you want to associate with a budget notification.
- On success, responds with
CreateSubscriberOutput - On failure, responds with
SdkError<CreateSubscriberError>
Source§impl Client
impl Client
Sourcepub fn delete_budget(&self) -> DeleteBudgetFluentBuilder
pub fn delete_budget(&self) -> DeleteBudgetFluentBuilder
Constructs a fluent builder for the DeleteBudget operation.
- The fluent builder is configurable:
account_id(impl Into<String>)/set_account_id(Option<String>):
required: trueThe
accountIdthat is associated with the budget that you want to delete.budget_name(impl Into<String>)/set_budget_name(Option<String>):
required: trueThe name of the budget that you want to delete.
- On success, responds with
DeleteBudgetOutput - On failure, responds with
SdkError<DeleteBudgetError>
Source§impl Client
impl Client
Sourcepub fn delete_budget_action(&self) -> DeleteBudgetActionFluentBuilder
pub fn delete_budget_action(&self) -> DeleteBudgetActionFluentBuilder
Constructs a fluent builder for the DeleteBudgetAction operation.
- The fluent builder is configurable:
account_id(impl Into<String>)/set_account_id(Option<String>):
required: trueThe account ID of the user. It’s a 12-digit number.
budget_name(impl Into<String>)/set_budget_name(Option<String>):
required: trueA string that represents the budget name. The “:” and “" characters, and the “/action/” substring, aren’t allowed.
action_id(impl Into<String>)/set_action_id(Option<String>):
required: trueA system-generated universally unique identifier (UUID) for the action.
- On success, responds with
DeleteBudgetActionOutputwith field(s):account_id(String):The account ID of the user. It’s a 12-digit number.
budget_name(String):A string that represents the budget name. The “:” and “" characters, and the “/action/” substring, aren’t allowed.
action(Option<Action>):A budget action resource.
- On failure, responds with
SdkError<DeleteBudgetActionError>
Source§impl Client
impl Client
Sourcepub fn delete_notification(&self) -> DeleteNotificationFluentBuilder
pub fn delete_notification(&self) -> DeleteNotificationFluentBuilder
Constructs a fluent builder for the DeleteNotification operation.
- The fluent builder is configurable:
account_id(impl Into<String>)/set_account_id(Option<String>):
required: trueThe
accountIdthat is associated with the budget whose notification you want to delete.budget_name(impl Into<String>)/set_budget_name(Option<String>):
required: trueThe name of the budget whose notification you want to delete.
notification(Notification)/set_notification(Option<Notification>):
required: trueThe notification that you want to delete.
- On success, responds with
DeleteNotificationOutput - On failure, responds with
SdkError<DeleteNotificationError>
Source§impl Client
impl Client
Sourcepub fn delete_subscriber(&self) -> DeleteSubscriberFluentBuilder
pub fn delete_subscriber(&self) -> DeleteSubscriberFluentBuilder
Constructs a fluent builder for the DeleteSubscriber operation.
- The fluent builder is configurable:
account_id(impl Into<String>)/set_account_id(Option<String>):
required: trueThe
accountIdthat is associated with the budget whose subscriber you want to delete.budget_name(impl Into<String>)/set_budget_name(Option<String>):
required: trueThe name of the budget whose subscriber you want to delete.
notification(Notification)/set_notification(Option<Notification>):
required: trueThe notification whose subscriber you want to delete.
subscriber(Subscriber)/set_subscriber(Option<Subscriber>):
required: trueThe subscriber that you want to delete.
- On success, responds with
DeleteSubscriberOutput - On failure, responds with
SdkError<DeleteSubscriberError>
Source§impl Client
impl Client
Sourcepub fn describe_budget(&self) -> DescribeBudgetFluentBuilder
pub fn describe_budget(&self) -> DescribeBudgetFluentBuilder
Constructs a fluent builder for the DescribeBudget operation.
- The fluent builder is configurable:
account_id(impl Into<String>)/set_account_id(Option<String>):
required: trueThe
accountIdthat is associated with the budget that you want a description of.budget_name(impl Into<String>)/set_budget_name(Option<String>):
required: trueThe name of the budget that you want a description of.
show_filter_expression(bool)/set_show_filter_expression(Option<bool>):
required: falseSpecifies whether the response includes the filter expression associated with the budget. By showing the filter expression, you can see detailed filtering logic applied to the budget, such as Amazon Web Services services or tags that are being tracked.
- On success, responds with
DescribeBudgetOutputwith field(s):budget(Option<Budget>):The description of the budget.
- On failure, responds with
SdkError<DescribeBudgetError>
Source§impl Client
impl Client
Sourcepub fn describe_budget_action(&self) -> DescribeBudgetActionFluentBuilder
pub fn describe_budget_action(&self) -> DescribeBudgetActionFluentBuilder
Constructs a fluent builder for the DescribeBudgetAction operation.
- The fluent builder is configurable:
account_id(impl Into<String>)/set_account_id(Option<String>):
required: trueThe account ID of the user. It’s a 12-digit number.
budget_name(impl Into<String>)/set_budget_name(Option<String>):
required: trueA string that represents the budget name. The “:” and “" characters, and the “/action/” substring, aren’t allowed.
action_id(impl Into<String>)/set_action_id(Option<String>):
required: trueA system-generated universally unique identifier (UUID) for the action.
- On success, responds with
DescribeBudgetActionOutputwith field(s):account_id(String):The account ID of the user. It’s a 12-digit number.
budget_name(String):A string that represents the budget name. The “:” and “" characters, and the “/action/” substring, aren’t allowed.
action(Option<Action>):A budget action resource.
- On failure, responds with
SdkError<DescribeBudgetActionError>
Source§impl Client
impl Client
Sourcepub fn describe_budget_action_histories(
&self,
) -> DescribeBudgetActionHistoriesFluentBuilder
pub fn describe_budget_action_histories( &self, ) -> DescribeBudgetActionHistoriesFluentBuilder
Constructs a fluent builder for the DescribeBudgetActionHistories operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
account_id(impl Into<String>)/set_account_id(Option<String>):
required: trueThe account ID of the user. It’s a 12-digit number.
budget_name(impl Into<String>)/set_budget_name(Option<String>):
required: trueA string that represents the budget name. The “:” and “" characters, and the “/action/” substring, aren’t allowed.
action_id(impl Into<String>)/set_action_id(Option<String>):
required: trueA system-generated universally unique identifier (UUID) for the action.
time_period(TimePeriod)/set_time_period(Option<TimePeriod>):
required: falseThe period of time that’s covered by a budget. The period has a start date and an end date. The start date must come before the end date. There are no restrictions on the end date.
max_results(i32)/set_max_results(Option<i32>):
required: falseAn integer that represents how many entries a paginated response contains. The maximum is 100.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseA generic string.
- On success, responds with
DescribeBudgetActionHistoriesOutputwith field(s):action_histories(Vec::<ActionHistory>):The historical record of the budget action resource.
next_token(Option<String>):A generic string.
- On failure, responds with
SdkError<DescribeBudgetActionHistoriesError>
Source§impl Client
impl Client
Sourcepub fn describe_budget_actions_for_account(
&self,
) -> DescribeBudgetActionsForAccountFluentBuilder
pub fn describe_budget_actions_for_account( &self, ) -> DescribeBudgetActionsForAccountFluentBuilder
Constructs a fluent builder for the DescribeBudgetActionsForAccount operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
account_id(impl Into<String>)/set_account_id(Option<String>):
required: trueThe account ID of the user. It’s a 12-digit number.
max_results(i32)/set_max_results(Option<i32>):
required: falseAn integer that represents how many entries a paginated response contains. The maximum is 100.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseA generic string.
- On success, responds with
DescribeBudgetActionsForAccountOutputwith field(s):actions(Vec::<Action>):A list of the budget action resources information.
next_token(Option<String>):A generic string.
- On failure, responds with
SdkError<DescribeBudgetActionsForAccountError>
Source§impl Client
impl Client
Sourcepub fn describe_budget_actions_for_budget(
&self,
) -> DescribeBudgetActionsForBudgetFluentBuilder
pub fn describe_budget_actions_for_budget( &self, ) -> DescribeBudgetActionsForBudgetFluentBuilder
Constructs a fluent builder for the DescribeBudgetActionsForBudget operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
account_id(impl Into<String>)/set_account_id(Option<String>):
required: trueThe account ID of the user. It’s a 12-digit number.
budget_name(impl Into<String>)/set_budget_name(Option<String>):
required: trueA string that represents the budget name. The “:” and “" characters, and the “/action/” substring, aren’t allowed.
max_results(i32)/set_max_results(Option<i32>):
required: falseAn integer that represents how many entries a paginated response contains. The maximum is 100.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseA generic string.
- On success, responds with
DescribeBudgetActionsForBudgetOutputwith field(s):actions(Vec::<Action>):A list of the budget action resources information.
next_token(Option<String>):A generic string.
- On failure, responds with
SdkError<DescribeBudgetActionsForBudgetError>
Source§impl Client
impl Client
Sourcepub fn describe_budget_notifications_for_account(
&self,
) -> DescribeBudgetNotificationsForAccountFluentBuilder
pub fn describe_budget_notifications_for_account( &self, ) -> DescribeBudgetNotificationsForAccountFluentBuilder
Constructs a fluent builder for the DescribeBudgetNotificationsForAccount operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
account_id(impl Into<String>)/set_account_id(Option<String>):
required: trueThe account ID of the user. It’s a 12-digit number.
max_results(i32)/set_max_results(Option<i32>):
required: falseAn integer that represents how many budgets a paginated response contains. The default is 50.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseA generic string.
- On success, responds with
DescribeBudgetNotificationsForAccountOutputwith field(s):budget_notifications_for_account(Option<Vec::<BudgetNotificationsForAccount>>):A list of budget names and associated notifications for an account.
next_token(Option<String>):A generic string.
- On failure, responds with
SdkError<DescribeBudgetNotificationsForAccountError>
Source§impl Client
impl Client
Sourcepub fn describe_budget_performance_history(
&self,
) -> DescribeBudgetPerformanceHistoryFluentBuilder
pub fn describe_budget_performance_history( &self, ) -> DescribeBudgetPerformanceHistoryFluentBuilder
Constructs a fluent builder for the DescribeBudgetPerformanceHistory operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
account_id(impl Into<String>)/set_account_id(Option<String>):
required: trueThe account ID of the user. It’s a 12-digit number.
budget_name(impl Into<String>)/set_budget_name(Option<String>):
required: trueA string that represents the budget name. The “:” and “" characters, and the “/action/” substring, aren’t allowed.
time_period(TimePeriod)/set_time_period(Option<TimePeriod>):
required: falseRetrieves how often the budget went into an
ALARMstate for the specified time period.max_results(i32)/set_max_results(Option<i32>):
required: falseAn integer that represents how many entries a paginated response contains. The maximum is 100.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseA generic string.
- On success, responds with
DescribeBudgetPerformanceHistoryOutputwith field(s):budget_performance_history(Option<BudgetPerformanceHistory>):The history of how often the budget has gone into an
ALARMstate.For
DAILYbudgets, the history saves the state of the budget for the last 60 days. ForMONTHLYbudgets, the history saves the state of the budget for the current month plus the last 12 months. ForQUARTERLYbudgets, the history saves the state of the budget for the last four quarters.next_token(Option<String>):A generic string.
- On failure, responds with
SdkError<DescribeBudgetPerformanceHistoryError>
Source§impl Client
impl Client
Sourcepub fn describe_budgets(&self) -> DescribeBudgetsFluentBuilder
pub fn describe_budgets(&self) -> DescribeBudgetsFluentBuilder
Constructs a fluent builder for the DescribeBudgets operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
account_id(impl Into<String>)/set_account_id(Option<String>):
required: trueThe
accountIdthat is associated with the budgets that you want to describe.max_results(i32)/set_max_results(Option<i32>):
required: falseAn integer that represents how many budgets a paginated response contains. The default is 100.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseThe pagination token that you include in your request to indicate the next set of results that you want to retrieve.
show_filter_expression(bool)/set_show_filter_expression(Option<bool>):
required: falseSpecifies whether the response includes the filter expression associated with the budgets. By showing the filter expression, you can see detailed filtering logic applied to the budgets, such as Amazon Web Services services or tags that are being tracked.
- On success, responds with
DescribeBudgetsOutputwith field(s):budgets(Option<Vec::<Budget>>):A list of budgets.
next_token(Option<String>):The pagination token in the service response that indicates the next set of results that you can retrieve.
- On failure, responds with
SdkError<DescribeBudgetsError>
Source§impl Client
impl Client
Sourcepub fn describe_notifications_for_budget(
&self,
) -> DescribeNotificationsForBudgetFluentBuilder
pub fn describe_notifications_for_budget( &self, ) -> DescribeNotificationsForBudgetFluentBuilder
Constructs a fluent builder for the DescribeNotificationsForBudget operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
account_id(impl Into<String>)/set_account_id(Option<String>):
required: trueThe
accountIdthat is associated with the budget whose notifications you want descriptions of.budget_name(impl Into<String>)/set_budget_name(Option<String>):
required: trueThe name of the budget whose notifications you want descriptions of.
max_results(i32)/set_max_results(Option<i32>):
required: falseAn optional integer that represents how many entries a paginated response contains.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseThe pagination token that you include in your request to indicate the next set of results that you want to retrieve.
- On success, responds with
DescribeNotificationsForBudgetOutputwith field(s):notifications(Option<Vec::<Notification>>):A list of notifications that are associated with a budget.
next_token(Option<String>):The pagination token in the service response that indicates the next set of results that you can retrieve.
- On failure, responds with
SdkError<DescribeNotificationsForBudgetError>
Source§impl Client
impl Client
Sourcepub fn describe_subscribers_for_notification(
&self,
) -> DescribeSubscribersForNotificationFluentBuilder
pub fn describe_subscribers_for_notification( &self, ) -> DescribeSubscribersForNotificationFluentBuilder
Constructs a fluent builder for the DescribeSubscribersForNotification operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
account_id(impl Into<String>)/set_account_id(Option<String>):
required: trueThe
accountIdthat is associated with the budget whose subscribers you want descriptions of.budget_name(impl Into<String>)/set_budget_name(Option<String>):
required: trueThe name of the budget whose subscribers you want descriptions of.
notification(Notification)/set_notification(Option<Notification>):
required: trueThe notification whose subscribers you want to list.
max_results(i32)/set_max_results(Option<i32>):
required: falseAn optional integer that represents how many entries a paginated response contains.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseThe pagination token that you include in your request to indicate the next set of results that you want to retrieve.
- On success, responds with
DescribeSubscribersForNotificationOutputwith field(s):subscribers(Option<Vec::<Subscriber>>):A list of subscribers that are associated with a notification.
next_token(Option<String>):The pagination token in the service response that indicates the next set of results that you can retrieve.
- On failure, responds with
SdkError<DescribeSubscribersForNotificationError>
Source§impl Client
impl Client
Sourcepub fn execute_budget_action(&self) -> ExecuteBudgetActionFluentBuilder
pub fn execute_budget_action(&self) -> ExecuteBudgetActionFluentBuilder
Constructs a fluent builder for the ExecuteBudgetAction operation.
- The fluent builder is configurable:
account_id(impl Into<String>)/set_account_id(Option<String>):
required: trueThe account ID of the user. It’s a 12-digit number.
budget_name(impl Into<String>)/set_budget_name(Option<String>):
required: trueA string that represents the budget name. The “:” and “" characters, and the “/action/” substring, aren’t allowed.
action_id(impl Into<String>)/set_action_id(Option<String>):
required: trueA system-generated universally unique identifier (UUID) for the action.
execution_type(ExecutionType)/set_execution_type(Option<ExecutionType>):
required: trueThe type of execution.
- On success, responds with
ExecuteBudgetActionOutputwith field(s):account_id(String):The account ID of the user. It’s a 12-digit number.
budget_name(String):A string that represents the budget name. The “:” and “" characters, and the “/action/” substring, aren’t allowed.
action_id(String):A system-generated universally unique identifier (UUID) for the action.
execution_type(ExecutionType):The type of execution.
- On failure, responds with
SdkError<ExecuteBudgetActionError>
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 unique identifier for the resource.
- On success, responds with
ListTagsForResourceOutputwith field(s):resource_tags(Option<Vec::<ResourceTag>>):The tags associated with the resource.
- 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 unique identifier for the resource.
resource_tags(ResourceTag)/set_resource_tags(Option<Vec::<ResourceTag>>):
required: trueThe tags associated with the resource.
- 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 unique identifier for the resource.
resource_tag_keys(impl Into<String>)/set_resource_tag_keys(Option<Vec::<String>>):
required: trueThe key that’s associated with the tag.
- On success, responds with
UntagResourceOutput - On failure, responds with
SdkError<UntagResourceError>
Source§impl Client
impl Client
Sourcepub fn update_budget(&self) -> UpdateBudgetFluentBuilder
pub fn update_budget(&self) -> UpdateBudgetFluentBuilder
Constructs a fluent builder for the UpdateBudget operation.
- The fluent builder is configurable:
account_id(impl Into<String>)/set_account_id(Option<String>):
required: trueThe
accountIdthat is associated with the budget that you want to update.new_budget(Budget)/set_new_budget(Option<Budget>):
required: trueThe budget that you want to update your budget to.
- On success, responds with
UpdateBudgetOutput - On failure, responds with
SdkError<UpdateBudgetError>
Source§impl Client
impl Client
Sourcepub fn update_budget_action(&self) -> UpdateBudgetActionFluentBuilder
pub fn update_budget_action(&self) -> UpdateBudgetActionFluentBuilder
Constructs a fluent builder for the UpdateBudgetAction operation.
- The fluent builder is configurable:
account_id(impl Into<String>)/set_account_id(Option<String>):
required: trueThe account ID of the user. It’s a 12-digit number.
budget_name(impl Into<String>)/set_budget_name(Option<String>):
required: trueA string that represents the budget name. The “:” and “" characters, and the “/action/” substring, aren’t allowed.
action_id(impl Into<String>)/set_action_id(Option<String>):
required: trueA system-generated universally unique identifier (UUID) for the action.
notification_type(NotificationType)/set_notification_type(Option<NotificationType>):
required: falseThe type of a notification. It must be ACTUAL or FORECASTED.
action_threshold(ActionThreshold)/set_action_threshold(Option<ActionThreshold>):
required: falseThe trigger threshold of the action.
definition(Definition)/set_definition(Option<Definition>):
required: falseSpecifies all of the type-specific parameters.
execution_role_arn(impl Into<String>)/set_execution_role_arn(Option<String>):
required: falseThe role passed for action execution and reversion. Roles and actions must be in the same account.
approval_model(ApprovalModel)/set_approval_model(Option<ApprovalModel>):
required: falseThis specifies if the action needs manual or automatic approval.
subscribers(Subscriber)/set_subscribers(Option<Vec::<Subscriber>>):
required: falseA list of subscribers.
- On success, responds with
UpdateBudgetActionOutputwith field(s):account_id(String):The account ID of the user. It’s a 12-digit number.
budget_name(String):A string that represents the budget name. The “:” and “" characters, and the “/action/” substring, aren’t allowed.
old_action(Option<Action>):The previous action resource information.
new_action(Option<Action>):The updated action resource information.
- On failure, responds with
SdkError<UpdateBudgetActionError>
Source§impl Client
impl Client
Sourcepub fn update_notification(&self) -> UpdateNotificationFluentBuilder
pub fn update_notification(&self) -> UpdateNotificationFluentBuilder
Constructs a fluent builder for the UpdateNotification operation.
- The fluent builder is configurable:
account_id(impl Into<String>)/set_account_id(Option<String>):
required: trueThe
accountIdthat is associated with the budget whose notification you want to update.budget_name(impl Into<String>)/set_budget_name(Option<String>):
required: trueThe name of the budget whose notification you want to update.
old_notification(Notification)/set_old_notification(Option<Notification>):
required: trueThe previous notification that is associated with a budget.
new_notification(Notification)/set_new_notification(Option<Notification>):
required: trueThe updated notification to be associated with a budget.
- On success, responds with
UpdateNotificationOutput - On failure, responds with
SdkError<UpdateNotificationError>
Source§impl Client
impl Client
Sourcepub fn update_subscriber(&self) -> UpdateSubscriberFluentBuilder
pub fn update_subscriber(&self) -> UpdateSubscriberFluentBuilder
Constructs a fluent builder for the UpdateSubscriber operation.
- The fluent builder is configurable:
account_id(impl Into<String>)/set_account_id(Option<String>):
required: trueThe
accountIdthat is associated with the budget whose subscriber you want to update.budget_name(impl Into<String>)/set_budget_name(Option<String>):
required: trueThe name of the budget whose subscriber you want to update.
notification(Notification)/set_notification(Option<Notification>):
required: trueThe notification whose subscriber you want to update.
old_subscriber(Subscriber)/set_old_subscriber(Option<Subscriber>):
required: trueThe previous subscriber that is associated with a budget notification.
new_subscriber(Subscriber)/set_new_subscriber(Option<Subscriber>):
required: trueThe updated subscriber that is associated with a budget notification.
- On success, responds with
UpdateSubscriberOutput - On failure, responds with
SdkError<UpdateSubscriberError>
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>
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);