pub struct Client { /* private fields */ }Expand description
Client for AWS Billing and Cost Management Pricing Calculator
Client for invoking operations on AWS Billing and Cost Management Pricing Calculator. Each operation on AWS Billing and Cost Management Pricing Calculator 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_bcmpricingcalculator::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_bcmpricingcalculator::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 BatchCreateBillScenarioCommitmentModification operation has
a Client::batch_create_bill_scenario_commitment_modification, 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.batch_create_bill_scenario_commitment_modification()
.bill_scenario_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 batch_create_bill_scenario_commitment_modification(
&self,
) -> BatchCreateBillScenarioCommitmentModificationFluentBuilder
pub fn batch_create_bill_scenario_commitment_modification( &self, ) -> BatchCreateBillScenarioCommitmentModificationFluentBuilder
Constructs a fluent builder for the BatchCreateBillScenarioCommitmentModification operation.
- The fluent builder is configurable:
bill_scenario_id(impl Into<String>)/set_bill_scenario_id(Option<String>):
required: trueThe ID of the Bill Scenario for which you want to create the modeled commitment.
commitment_modifications(BatchCreateBillScenarioCommitmentModificationEntry)/set_commitment_modifications(Option<Vec::<BatchCreateBillScenarioCommitmentModificationEntry>>):
required: trueList of commitments that you want to model in the Bill Scenario.
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.
- On success, responds with
BatchCreateBillScenarioCommitmentModificationOutputwith field(s):items(Option<Vec::<BatchCreateBillScenarioCommitmentModificationItem>>):Returns the list of successful commitment line items that were created for the Bill Scenario.
errors(Option<Vec::<BatchCreateBillScenarioCommitmentModificationError>>):Returns the list of errors reason and the commitment item keys that cannot be created in the Bill Scenario.
- On failure, responds with
SdkError<BatchCreateBillScenarioCommitmentModificationError>
Source§impl Client
impl Client
Sourcepub fn batch_create_bill_scenario_usage_modification(
&self,
) -> BatchCreateBillScenarioUsageModificationFluentBuilder
pub fn batch_create_bill_scenario_usage_modification( &self, ) -> BatchCreateBillScenarioUsageModificationFluentBuilder
Constructs a fluent builder for the BatchCreateBillScenarioUsageModification operation.
- The fluent builder is configurable:
bill_scenario_id(impl Into<String>)/set_bill_scenario_id(Option<String>):
required: trueThe ID of the Bill Scenario for which you want to create the modeled usage.
usage_modifications(BatchCreateBillScenarioUsageModificationEntry)/set_usage_modifications(Option<Vec::<BatchCreateBillScenarioUsageModificationEntry>>):
required: trueList of usage that you want to model in the Bill Scenario.
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.
- On success, responds with
BatchCreateBillScenarioUsageModificationOutputwith field(s):items(Option<Vec::<BatchCreateBillScenarioUsageModificationItem>>):Returns the list of successful usage line items that were created for the Bill Scenario.
errors(Option<Vec::<BatchCreateBillScenarioUsageModificationError>>):Returns the list of errors reason and the usage item keys that cannot be created in the Bill Scenario.
- On failure, responds with
SdkError<BatchCreateBillScenarioUsageModificationError>
Source§impl Client
impl Client
Sourcepub fn batch_create_workload_estimate_usage(
&self,
) -> BatchCreateWorkloadEstimateUsageFluentBuilder
pub fn batch_create_workload_estimate_usage( &self, ) -> BatchCreateWorkloadEstimateUsageFluentBuilder
Constructs a fluent builder for the BatchCreateWorkloadEstimateUsage operation.
- The fluent builder is configurable:
workload_estimate_id(impl Into<String>)/set_workload_estimate_id(Option<String>):
required: trueThe ID of the Workload estimate for which you want to create the modeled usage.
usage(BatchCreateWorkloadEstimateUsageEntry)/set_usage(Option<Vec::<BatchCreateWorkloadEstimateUsageEntry>>):
required: trueList of usage that you want to model in the Workload estimate.
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.
- On success, responds with
BatchCreateWorkloadEstimateUsageOutputwith field(s):items(Option<Vec::<BatchCreateWorkloadEstimateUsageItem>>):Returns the list of successful usage line items that were created for the Workload estimate.
errors(Option<Vec::<BatchCreateWorkloadEstimateUsageError>>):Returns the list of errors reason and the usage item keys that cannot be created in the Workload estimate.
- On failure, responds with
SdkError<BatchCreateWorkloadEstimateUsageError>
Source§impl Client
impl Client
Sourcepub fn batch_delete_bill_scenario_commitment_modification(
&self,
) -> BatchDeleteBillScenarioCommitmentModificationFluentBuilder
pub fn batch_delete_bill_scenario_commitment_modification( &self, ) -> BatchDeleteBillScenarioCommitmentModificationFluentBuilder
Constructs a fluent builder for the BatchDeleteBillScenarioCommitmentModification operation.
- The fluent builder is configurable:
bill_scenario_id(impl Into<String>)/set_bill_scenario_id(Option<String>):
required: trueThe ID of the Bill Scenario for which you want to delete the modeled commitment.
ids(impl Into<String>)/set_ids(Option<Vec::<String>>):
required: trueList of commitments that you want to delete from the Bill Scenario.
- On success, responds with
BatchDeleteBillScenarioCommitmentModificationOutputwith field(s):errors(Option<Vec::<BatchDeleteBillScenarioCommitmentModificationError>>):Returns the list of errors reason and the commitment item keys that cannot be deleted from the Bill Scenario.
- On failure, responds with
SdkError<BatchDeleteBillScenarioCommitmentModificationError>
Source§impl Client
impl Client
Sourcepub fn batch_delete_bill_scenario_usage_modification(
&self,
) -> BatchDeleteBillScenarioUsageModificationFluentBuilder
pub fn batch_delete_bill_scenario_usage_modification( &self, ) -> BatchDeleteBillScenarioUsageModificationFluentBuilder
Constructs a fluent builder for the BatchDeleteBillScenarioUsageModification operation.
- The fluent builder is configurable:
bill_scenario_id(impl Into<String>)/set_bill_scenario_id(Option<String>):
required: trueThe ID of the Bill Scenario for which you want to delete the modeled usage.
ids(impl Into<String>)/set_ids(Option<Vec::<String>>):
required: trueList of usage that you want to delete from the Bill Scenario.
- On success, responds with
BatchDeleteBillScenarioUsageModificationOutputwith field(s):errors(Option<Vec::<BatchDeleteBillScenarioUsageModificationError>>):Returns the list of errors reason and the usage item keys that cannot be deleted from the Bill Scenario.
- On failure, responds with
SdkError<BatchDeleteBillScenarioUsageModificationError>
Source§impl Client
impl Client
Sourcepub fn batch_delete_workload_estimate_usage(
&self,
) -> BatchDeleteWorkloadEstimateUsageFluentBuilder
pub fn batch_delete_workload_estimate_usage( &self, ) -> BatchDeleteWorkloadEstimateUsageFluentBuilder
Constructs a fluent builder for the BatchDeleteWorkloadEstimateUsage operation.
- The fluent builder is configurable:
workload_estimate_id(impl Into<String>)/set_workload_estimate_id(Option<String>):
required: trueThe ID of the Workload estimate for which you want to delete the modeled usage.
ids(impl Into<String>)/set_ids(Option<Vec::<String>>):
required: trueList of usage that you want to delete from the Workload estimate.
- On success, responds with
BatchDeleteWorkloadEstimateUsageOutputwith field(s):errors(Option<Vec::<BatchDeleteWorkloadEstimateUsageError>>):Returns the list of errors reason and the usage item keys that cannot be deleted from the Workload estimate.
- On failure, responds with
SdkError<BatchDeleteWorkloadEstimateUsageError>
Source§impl Client
impl Client
Sourcepub fn batch_update_bill_scenario_commitment_modification(
&self,
) -> BatchUpdateBillScenarioCommitmentModificationFluentBuilder
pub fn batch_update_bill_scenario_commitment_modification( &self, ) -> BatchUpdateBillScenarioCommitmentModificationFluentBuilder
Constructs a fluent builder for the BatchUpdateBillScenarioCommitmentModification operation.
- The fluent builder is configurable:
bill_scenario_id(impl Into<String>)/set_bill_scenario_id(Option<String>):
required: trueThe ID of the Bill Scenario for which you want to modify the commitment group of a modeled commitment.
commitment_modifications(BatchUpdateBillScenarioCommitmentModificationEntry)/set_commitment_modifications(Option<Vec::<BatchUpdateBillScenarioCommitmentModificationEntry>>):
required: trueList of commitments that you want to update in a Bill Scenario.
- On success, responds with
BatchUpdateBillScenarioCommitmentModificationOutputwith field(s):items(Option<Vec::<BillScenarioCommitmentModificationItem>>):Returns the list of successful commitment line items that were updated for a Bill Scenario.
errors(Option<Vec::<BatchUpdateBillScenarioCommitmentModificationError>>):Returns the list of error reasons and commitment line item IDs that could not be updated for the Bill Scenario.
- On failure, responds with
SdkError<BatchUpdateBillScenarioCommitmentModificationError>
Source§impl Client
impl Client
Sourcepub fn batch_update_bill_scenario_usage_modification(
&self,
) -> BatchUpdateBillScenarioUsageModificationFluentBuilder
pub fn batch_update_bill_scenario_usage_modification( &self, ) -> BatchUpdateBillScenarioUsageModificationFluentBuilder
Constructs a fluent builder for the BatchUpdateBillScenarioUsageModification operation.
- The fluent builder is configurable:
bill_scenario_id(impl Into<String>)/set_bill_scenario_id(Option<String>):
required: trueThe ID of the Bill Scenario for which you want to modify the usage lines.
usage_modifications(BatchUpdateBillScenarioUsageModificationEntry)/set_usage_modifications(Option<Vec::<BatchUpdateBillScenarioUsageModificationEntry>>):
required: trueList of usage lines that you want to update in a Bill Scenario identified by the usage ID.
- On success, responds with
BatchUpdateBillScenarioUsageModificationOutputwith field(s):items(Option<Vec::<BillScenarioUsageModificationItem>>):Returns the list of successful usage line items that were updated for a Bill Scenario.
errors(Option<Vec::<BatchUpdateBillScenarioUsageModificationError>>):Returns the list of error reasons and usage line item IDs that could not be updated for the Bill Scenario.
- On failure, responds with
SdkError<BatchUpdateBillScenarioUsageModificationError>
Source§impl Client
impl Client
Sourcepub fn batch_update_workload_estimate_usage(
&self,
) -> BatchUpdateWorkloadEstimateUsageFluentBuilder
pub fn batch_update_workload_estimate_usage( &self, ) -> BatchUpdateWorkloadEstimateUsageFluentBuilder
Constructs a fluent builder for the BatchUpdateWorkloadEstimateUsage operation.
- The fluent builder is configurable:
workload_estimate_id(impl Into<String>)/set_workload_estimate_id(Option<String>):
required: trueThe ID of the Workload estimate for which you want to modify the usage lines.
usage(BatchUpdateWorkloadEstimateUsageEntry)/set_usage(Option<Vec::<BatchUpdateWorkloadEstimateUsageEntry>>):
required: trueList of usage line amounts and usage group that you want to update in a Workload estimate identified by the usage ID.
- On success, responds with
BatchUpdateWorkloadEstimateUsageOutputwith field(s):items(Option<Vec::<WorkloadEstimateUsageItem>>):Returns the list of successful usage line items that were updated for a Workload estimate.
errors(Option<Vec::<BatchUpdateWorkloadEstimateUsageError>>):Returns the list of error reasons and usage line item IDs that could not be updated for the Workload estimate.
- On failure, responds with
SdkError<BatchUpdateWorkloadEstimateUsageError>
Source§impl Client
impl Client
Sourcepub fn create_bill_estimate(&self) -> CreateBillEstimateFluentBuilder
pub fn create_bill_estimate(&self) -> CreateBillEstimateFluentBuilder
Constructs a fluent builder for the CreateBillEstimate operation.
- The fluent builder is configurable:
bill_scenario_id(impl Into<String>)/set_bill_scenario_id(Option<String>):
required: trueThe ID of the Bill Scenario for which you want to create a Bill estimate.
name(impl Into<String>)/set_name(Option<String>):
required: trueThe name of the Bill estimate that will be created. Names must be unique for an account.
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.
tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: falseAn optional list of tags to associate with the specified BillEstimate. You can use resource tags to control access to your BillEstimate using IAM policies. Each tag consists of a key and a value, and each key must be unique for the resource. The following restrictions apply to resource tags:
-
Although the maximum number of array members is 200, you can assign a maximum of 50 user-tags to one resource. The remaining are reserved for Amazon Web Services.
-
The maximum length of a key is 128 characters.
-
The maximum length of a value is 256 characters.
-
Keys and values can only contain alphanumeric characters, spaces, and any of the following:
_.:/=+@-. -
Keys and values are case sensitive.
-
Keys and values are trimmed for any leading or trailing whitespaces.
-
Don’t use
aws:as a prefix for your keys. This prefix is reserved for Amazon Web Services.
-
- On success, responds with
CreateBillEstimateOutputwith field(s):id(String):The unique identifier of your newly created Bill estimate.
name(Option<String>):The name of your newly created Bill estimate.
status(Option<BillEstimateStatus>):The status of your newly created Bill estimate. Bill estimate creation can take anywhere between 8 to 12 hours. The status will allow you to identify when the Bill estimate is complete or has failed.
failure_message(Option<String>):This attribute provides the reason if a Bill estimate result generation fails.
bill_interval(Option<BillInterval>):The bill month start and end timestamp that was used to create the Bill estimate. This is set to the last complete anniversary bill month start and end timestamp.
cost_summary(Option<BillEstimateCostSummary>):Returns summary-level cost information once a Bill estimate is successfully generated. This summary includes: 1) the total cost difference, showing the pre-tax cost change for the consolidated billing family between the completed anniversary bill and the estimated bill, and 2) total cost differences per service, detailing the pre-tax cost of each service, comparing the completed anniversary bill to the estimated bill on a per-service basis.
created_at(Option<DateTime>):The timestamp of when the Bill estimate create process was started (not when it successfully completed or failed).
expires_at(Option<DateTime>):The timestamp of when the Bill estimate will expire. A Bill estimate becomes inaccessible after expiration.
group_sharing_preference(Option<GroupSharingPreferenceEnum>):The setting for the reserved instance and savings plan group sharing used in this estimate.
cost_category_group_sharing_preference_arn(Option<String>):The arn of the cost category used in the reserved and prioritized group sharing.
cost_category_group_sharing_preference_effective_date(Option<DateTime>):Timestamp of the effective date of the cost category used in the group sharing settings.
- On failure, responds with
SdkError<CreateBillEstimateError>
Source§impl Client
impl Client
Sourcepub fn create_bill_scenario(&self) -> CreateBillScenarioFluentBuilder
pub fn create_bill_scenario(&self) -> CreateBillScenarioFluentBuilder
Constructs a fluent builder for the CreateBillScenario operation.
- The fluent builder is configurable:
name(impl Into<String>)/set_name(Option<String>):
required: trueA descriptive name for the bill scenario.
client_token(impl Into<String>)/set_client_token(Option<String>):
required: falseA unique, case-sensitive identifier to ensure idempotency of the request.
tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: falseThe tags to apply to the bill scenario.
group_sharing_preference(GroupSharingPreferenceEnum)/set_group_sharing_preference(Option<GroupSharingPreferenceEnum>):
required: falseThe setting for the reserved instance and savings plan group sharing used in this estimate.
cost_category_group_sharing_preference_arn(impl Into<String>)/set_cost_category_group_sharing_preference_arn(Option<String>):
required: falseThe arn of the cost category used in the reserved and prioritized group sharing.
- On success, responds with
CreateBillScenarioOutputwith field(s):id(String):The unique identifier for the created bill scenario.
name(Option<String>):The name of the created bill scenario.
bill_interval(Option<BillInterval>):The time period covered by the bill scenario.
status(Option<BillScenarioStatus>):The current status of the bill scenario.
created_at(Option<DateTime>):The timestamp when the bill scenario was created.
expires_at(Option<DateTime>):The timestamp when the bill scenario will expire.
failure_message(Option<String>):An error message if the bill scenario creation failed.
group_sharing_preference(Option<GroupSharingPreferenceEnum>):The setting for the reserved instance and savings plan group sharing used in this estimate.
cost_category_group_sharing_preference_arn(Option<String>):The arn of the cost category used in the reserved and prioritized group sharing.
- On failure, responds with
SdkError<CreateBillScenarioError>
Source§impl Client
impl Client
Sourcepub fn create_workload_estimate(&self) -> CreateWorkloadEstimateFluentBuilder
pub fn create_workload_estimate(&self) -> CreateWorkloadEstimateFluentBuilder
Constructs a fluent builder for the CreateWorkloadEstimate operation.
- The fluent builder is configurable:
name(impl Into<String>)/set_name(Option<String>):
required: trueA descriptive name for the workload estimate.
client_token(impl Into<String>)/set_client_token(Option<String>):
required: falseA unique, case-sensitive identifier to ensure idempotency of the request.
rate_type(WorkloadEstimateRateType)/set_rate_type(Option<WorkloadEstimateRateType>):
required: falseThe type of pricing rates to use for the estimate.
tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: falseThe tags to apply to the workload estimate.
- On success, responds with
CreateWorkloadEstimateOutputwith field(s):id(String):The unique identifier for the created workload estimate.
name(Option<String>):The name of the created workload estimate.
created_at(Option<DateTime>):The timestamp when the workload estimate was created.
expires_at(Option<DateTime>):The timestamp when the workload estimate will expire.
rate_type(Option<WorkloadEstimateRateType>):The type of pricing rates used for the estimate.
rate_timestamp(Option<DateTime>):The timestamp of the pricing rates used for the estimate.
status(Option<WorkloadEstimateStatus>):The current status of the workload estimate.
total_cost(Option<f64>):The total estimated cost for the workload.
cost_currency(Option<CurrencyCode>):The currency of the estimated cost.
failure_message(Option<String>):An error message if the workload estimate creation failed.
- On failure, responds with
SdkError<CreateWorkloadEstimateError>
Source§impl Client
impl Client
Sourcepub fn delete_bill_estimate(&self) -> DeleteBillEstimateFluentBuilder
pub fn delete_bill_estimate(&self) -> DeleteBillEstimateFluentBuilder
Constructs a fluent builder for the DeleteBillEstimate operation.
- The fluent builder is configurable:
identifier(impl Into<String>)/set_identifier(Option<String>):
required: trueThe unique identifier of the bill estimate to delete.
- On success, responds with
DeleteBillEstimateOutput - On failure, responds with
SdkError<DeleteBillEstimateError>
Source§impl Client
impl Client
Sourcepub fn delete_bill_scenario(&self) -> DeleteBillScenarioFluentBuilder
pub fn delete_bill_scenario(&self) -> DeleteBillScenarioFluentBuilder
Constructs a fluent builder for the DeleteBillScenario operation.
- The fluent builder is configurable:
identifier(impl Into<String>)/set_identifier(Option<String>):
required: trueThe unique identifier of the bill scenario to delete.
- On success, responds with
DeleteBillScenarioOutput - On failure, responds with
SdkError<DeleteBillScenarioError>
Source§impl Client
impl Client
Sourcepub fn delete_workload_estimate(&self) -> DeleteWorkloadEstimateFluentBuilder
pub fn delete_workload_estimate(&self) -> DeleteWorkloadEstimateFluentBuilder
Constructs a fluent builder for the DeleteWorkloadEstimate operation.
- The fluent builder is configurable:
identifier(impl Into<String>)/set_identifier(Option<String>):
required: trueThe unique identifier of the workload estimate to delete.
- On success, responds with
DeleteWorkloadEstimateOutput - On failure, responds with
SdkError<DeleteWorkloadEstimateError>
Source§impl Client
impl Client
Sourcepub fn get_bill_estimate(&self) -> GetBillEstimateFluentBuilder
pub fn get_bill_estimate(&self) -> GetBillEstimateFluentBuilder
Constructs a fluent builder for the GetBillEstimate operation.
- The fluent builder is configurable:
identifier(impl Into<String>)/set_identifier(Option<String>):
required: trueThe unique identifier of the bill estimate to retrieve.
- On success, responds with
GetBillEstimateOutputwith field(s):id(String):The unique identifier of the retrieved bill estimate.
name(Option<String>):The name of the retrieved bill estimate.
status(Option<BillEstimateStatus>):The current status of the bill estimate.
failure_message(Option<String>):An error message if the bill estimate retrieval failed.
bill_interval(Option<BillInterval>):The time period covered by the bill estimate.
cost_summary(Option<BillEstimateCostSummary>):A summary of the estimated costs.
created_at(Option<DateTime>):The timestamp when the bill estimate was created.
expires_at(Option<DateTime>):The timestamp when the bill estimate will expire.
group_sharing_preference(Option<GroupSharingPreferenceEnum>):The setting for the reserved instance and savings plan group sharing used in this estimate.
cost_category_group_sharing_preference_arn(Option<String>):The arn of the cost category used in the reserved and prioritized group sharing.
cost_category_group_sharing_preference_effective_date(Option<DateTime>):Timestamp of the effective date of the cost category used in the group sharing settings.
- On failure, responds with
SdkError<GetBillEstimateError>
Source§impl Client
impl Client
Sourcepub fn get_bill_scenario(&self) -> GetBillScenarioFluentBuilder
pub fn get_bill_scenario(&self) -> GetBillScenarioFluentBuilder
Constructs a fluent builder for the GetBillScenario operation.
- The fluent builder is configurable:
identifier(impl Into<String>)/set_identifier(Option<String>):
required: trueThe unique identifier of the bill scenario to retrieve.
- On success, responds with
GetBillScenarioOutputwith field(s):id(String):The unique identifier of the retrieved bill scenario.
name(Option<String>):The name of the retrieved bill scenario.
bill_interval(Option<BillInterval>):The time period covered by the bill scenario.
status(Option<BillScenarioStatus>):The current status of the bill scenario.
created_at(Option<DateTime>):The timestamp when the bill scenario was created.
expires_at(Option<DateTime>):The timestamp when the bill scenario will expire.
failure_message(Option<String>):An error message if the bill scenario retrieval failed.
group_sharing_preference(Option<GroupSharingPreferenceEnum>):The setting for the reserved instance and savings plan group sharing used in this estimate.
cost_category_group_sharing_preference_arn(Option<String>):The arn of the cost category used in the reserved and prioritized group sharing.
- On failure, responds with
SdkError<GetBillScenarioError>
Source§impl Client
impl Client
Sourcepub fn get_preferences(&self) -> GetPreferencesFluentBuilder
pub fn get_preferences(&self) -> GetPreferencesFluentBuilder
Constructs a fluent builder for the GetPreferences operation.
- The fluent builder takes no input, just
sendit. - On success, responds with
GetPreferencesOutputwith field(s):management_account_rate_type_selections(Option<Vec::<RateType>>):The preferred rate types for the management account.
member_account_rate_type_selections(Option<Vec::<RateType>>):The preferred rate types for member accounts.
standalone_account_rate_type_selections(Option<Vec::<RateType>>):The preferred rate types for a standalone account.
- On failure, responds with
SdkError<GetPreferencesError>
Source§impl Client
impl Client
Sourcepub fn get_workload_estimate(&self) -> GetWorkloadEstimateFluentBuilder
pub fn get_workload_estimate(&self) -> GetWorkloadEstimateFluentBuilder
Constructs a fluent builder for the GetWorkloadEstimate operation.
- The fluent builder is configurable:
identifier(impl Into<String>)/set_identifier(Option<String>):
required: trueThe unique identifier of the workload estimate to retrieve.
- On success, responds with
GetWorkloadEstimateOutputwith field(s):id(String):The unique identifier of the retrieved workload estimate.
name(Option<String>):The name of the retrieved workload estimate.
created_at(Option<DateTime>):The timestamp when the workload estimate was created.
expires_at(Option<DateTime>):The timestamp when the workload estimate will expire.
rate_type(Option<WorkloadEstimateRateType>):The type of pricing rates used for the estimate.
rate_timestamp(Option<DateTime>):The timestamp of the pricing rates used for the estimate.
status(Option<WorkloadEstimateStatus>):The current status of the workload estimate.
total_cost(Option<f64>):The total estimated cost for the workload.
cost_currency(Option<CurrencyCode>):The currency of the estimated cost.
failure_message(Option<String>):An error message if the workload estimate retrieval failed.
- On failure, responds with
SdkError<GetWorkloadEstimateError>
Source§impl Client
impl Client
Sourcepub fn list_bill_estimate_commitments(
&self,
) -> ListBillEstimateCommitmentsFluentBuilder
pub fn list_bill_estimate_commitments( &self, ) -> ListBillEstimateCommitmentsFluentBuilder
Constructs a fluent builder for the ListBillEstimateCommitments operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
bill_estimate_id(impl Into<String>)/set_bill_estimate_id(Option<String>):
required: trueThe unique identifier of the bill estimate to list commitments for.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseA token to retrieve the next page of results.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to return per page.
- On success, responds with
ListBillEstimateCommitmentsOutputwith field(s):items(Option<Vec::<BillEstimateCommitmentSummary>>):The list of commitments associated with the bill estimate.
next_token(Option<String>):A token to retrieve the next page of results, if any.
- On failure, responds with
SdkError<ListBillEstimateCommitmentsError>
Source§impl Client
impl Client
Sourcepub fn list_bill_estimate_input_commitment_modifications(
&self,
) -> ListBillEstimateInputCommitmentModificationsFluentBuilder
pub fn list_bill_estimate_input_commitment_modifications( &self, ) -> ListBillEstimateInputCommitmentModificationsFluentBuilder
Constructs a fluent builder for the ListBillEstimateInputCommitmentModifications operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
bill_estimate_id(impl Into<String>)/set_bill_estimate_id(Option<String>):
required: trueThe unique identifier of the bill estimate to list input commitment modifications for.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseA token to retrieve the next page of results.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to return per page.
- On success, responds with
ListBillEstimateInputCommitmentModificationsOutputwith field(s):items(Option<Vec::<BillEstimateInputCommitmentModificationSummary>>):The list of input commitment modifications associated with the bill estimate.
next_token(Option<String>):A token to retrieve the next page of results, if any.
- On failure, responds with
SdkError<ListBillEstimateInputCommitmentModificationsError>
Source§impl Client
impl Client
Sourcepub fn list_bill_estimate_input_usage_modifications(
&self,
) -> ListBillEstimateInputUsageModificationsFluentBuilder
pub fn list_bill_estimate_input_usage_modifications( &self, ) -> ListBillEstimateInputUsageModificationsFluentBuilder
Constructs a fluent builder for the ListBillEstimateInputUsageModifications operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
bill_estimate_id(impl Into<String>)/set_bill_estimate_id(Option<String>):
required: trueThe unique identifier of the bill estimate to list input usage modifications for.
filters(ListUsageFilter)/set_filters(Option<Vec::<ListUsageFilter>>):
required: falseFilters to apply to the list of input usage modifications.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseA token to retrieve the next page of results.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to return per page.
- On success, responds with
ListBillEstimateInputUsageModificationsOutputwith field(s):items(Option<Vec::<BillEstimateInputUsageModificationSummary>>):The list of input usage modifications associated with the bill estimate.
next_token(Option<String>):A token to retrieve the next page of results, if any.
- On failure, responds with
SdkError<ListBillEstimateInputUsageModificationsError>
Source§impl Client
impl Client
Sourcepub fn list_bill_estimate_line_items(
&self,
) -> ListBillEstimateLineItemsFluentBuilder
pub fn list_bill_estimate_line_items( &self, ) -> ListBillEstimateLineItemsFluentBuilder
Constructs a fluent builder for the ListBillEstimateLineItems operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
bill_estimate_id(impl Into<String>)/set_bill_estimate_id(Option<String>):
required: trueThe unique identifier of the bill estimate to list line items for.
filters(ListBillEstimateLineItemsFilter)/set_filters(Option<Vec::<ListBillEstimateLineItemsFilter>>):
required: falseFilters to apply to the list of line items.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseA token to retrieve the next page of results.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to return per page.
- On success, responds with
ListBillEstimateLineItemsOutputwith field(s):items(Option<Vec::<BillEstimateLineItemSummary>>):The list of line items associated with the bill estimate.
next_token(Option<String>):A token to retrieve the next page of results, if any.
- On failure, responds with
SdkError<ListBillEstimateLineItemsError>
Source§impl Client
impl Client
Sourcepub fn list_bill_estimates(&self) -> ListBillEstimatesFluentBuilder
pub fn list_bill_estimates(&self) -> ListBillEstimatesFluentBuilder
Constructs a fluent builder for the ListBillEstimates operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
filters(ListBillEstimatesFilter)/set_filters(Option<Vec::<ListBillEstimatesFilter>>):
required: falseFilters to apply to the list of bill estimates.
created_at_filter(FilterTimestamp)/set_created_at_filter(Option<FilterTimestamp>):
required: falseFilter bill estimates based on the creation date.
expires_at_filter(FilterTimestamp)/set_expires_at_filter(Option<FilterTimestamp>):
required: falseFilter bill estimates based on the expiration date.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseA token to retrieve the next page of results.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to return per page.
- On success, responds with
ListBillEstimatesOutputwith field(s):items(Option<Vec::<BillEstimateSummary>>):The list of bill estimates for the account.
next_token(Option<String>):A token to retrieve the next page of results, if any.
- On failure, responds with
SdkError<ListBillEstimatesError>
Source§impl Client
impl Client
Sourcepub fn list_bill_scenario_commitment_modifications(
&self,
) -> ListBillScenarioCommitmentModificationsFluentBuilder
pub fn list_bill_scenario_commitment_modifications( &self, ) -> ListBillScenarioCommitmentModificationsFluentBuilder
Constructs a fluent builder for the ListBillScenarioCommitmentModifications operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
bill_scenario_id(impl Into<String>)/set_bill_scenario_id(Option<String>):
required: trueThe unique identifier of the bill scenario to list commitment modifications for.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseA token to retrieve the next page of results.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to return per page.
- On success, responds with
ListBillScenarioCommitmentModificationsOutputwith field(s):items(Option<Vec::<BillScenarioCommitmentModificationItem>>):The list of commitment modifications associated with the bill scenario.
next_token(Option<String>):A token to retrieve the next page of results, if any.
- On failure, responds with
SdkError<ListBillScenarioCommitmentModificationsError>
Source§impl Client
impl Client
Sourcepub fn list_bill_scenario_usage_modifications(
&self,
) -> ListBillScenarioUsageModificationsFluentBuilder
pub fn list_bill_scenario_usage_modifications( &self, ) -> ListBillScenarioUsageModificationsFluentBuilder
Constructs a fluent builder for the ListBillScenarioUsageModifications operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
bill_scenario_id(impl Into<String>)/set_bill_scenario_id(Option<String>):
required: trueThe unique identifier of the bill scenario to list usage modifications for.
filters(ListUsageFilter)/set_filters(Option<Vec::<ListUsageFilter>>):
required: falseFilters to apply to the list of usage modifications.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseA token to retrieve the next page of results.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to return per page.
- On success, responds with
ListBillScenarioUsageModificationsOutputwith field(s):items(Option<Vec::<BillScenarioUsageModificationItem>>):The list of usage modifications associated with the bill scenario.
next_token(Option<String>):A token to retrieve the next page of results, if any.
- On failure, responds with
SdkError<ListBillScenarioUsageModificationsError>
Source§impl Client
impl Client
Sourcepub fn list_bill_scenarios(&self) -> ListBillScenariosFluentBuilder
pub fn list_bill_scenarios(&self) -> ListBillScenariosFluentBuilder
Constructs a fluent builder for the ListBillScenarios operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
filters(ListBillScenariosFilter)/set_filters(Option<Vec::<ListBillScenariosFilter>>):
required: falseFilters to apply to the list of bill scenarios.
created_at_filter(FilterTimestamp)/set_created_at_filter(Option<FilterTimestamp>):
required: falseFilter bill scenarios based on the creation date.
expires_at_filter(FilterTimestamp)/set_expires_at_filter(Option<FilterTimestamp>):
required: falseFilter bill scenarios based on the expiration date.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseA token to retrieve the next page of results.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to return per page.
- On success, responds with
ListBillScenariosOutputwith field(s):items(Option<Vec::<BillScenarioSummary>>):The list of bill scenarios for the account.
next_token(Option<String>):A token to retrieve the next page of results, if any.
- On failure, responds with
SdkError<ListBillScenariosError>
Source§impl Client
impl Client
Constructs a fluent builder for the ListTagsForResource operation.
- The fluent builder is configurable:
arn(impl Into<String>)/set_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the resource to list tags for.
- On success, responds with
ListTagsForResourceOutputwith field(s):tags(Option<HashMap::<String, String>>):The list of tags associated with the specified resource.
- On failure, responds with
SdkError<ListTagsForResourceError>
Source§impl Client
impl Client
Sourcepub fn list_workload_estimate_usage(
&self,
) -> ListWorkloadEstimateUsageFluentBuilder
pub fn list_workload_estimate_usage( &self, ) -> ListWorkloadEstimateUsageFluentBuilder
Constructs a fluent builder for the ListWorkloadEstimateUsage operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
workload_estimate_id(impl Into<String>)/set_workload_estimate_id(Option<String>):
required: trueThe unique identifier of the workload estimate to list usage for.
filters(ListUsageFilter)/set_filters(Option<Vec::<ListUsageFilter>>):
required: falseFilters to apply to the list of usage items.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseA token to retrieve the next page of results.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to return per page.
- On success, responds with
ListWorkloadEstimateUsageOutputwith field(s):items(Option<Vec::<WorkloadEstimateUsageItem>>):The list of usage items associated with the workload estimate.
next_token(Option<String>):A token to retrieve the next page of results, if any.
- On failure, responds with
SdkError<ListWorkloadEstimateUsageError>
Source§impl Client
impl Client
Sourcepub fn list_workload_estimates(&self) -> ListWorkloadEstimatesFluentBuilder
pub fn list_workload_estimates(&self) -> ListWorkloadEstimatesFluentBuilder
Constructs a fluent builder for the ListWorkloadEstimates operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
created_at_filter(FilterTimestamp)/set_created_at_filter(Option<FilterTimestamp>):
required: falseFilter workload estimates based on the creation date.
expires_at_filter(FilterTimestamp)/set_expires_at_filter(Option<FilterTimestamp>):
required: falseFilter workload estimates based on the expiration date.
filters(ListWorkloadEstimatesFilter)/set_filters(Option<Vec::<ListWorkloadEstimatesFilter>>):
required: falseFilters to apply to the list of workload estimates.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseA token to retrieve the next page of results.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to return per page.
- On success, responds with
ListWorkloadEstimatesOutputwith field(s):items(Option<Vec::<WorkloadEstimateSummary>>):The list of workload estimates for the account.
next_token(Option<String>):A token to retrieve the next page of results, if any.
- On failure, responds with
SdkError<ListWorkloadEstimatesError>
Source§impl Client
impl Client
Sourcepub fn tag_resource(&self) -> TagResourceFluentBuilder
pub fn tag_resource(&self) -> TagResourceFluentBuilder
Constructs a fluent builder for the TagResource operation.
- The fluent builder is configurable:
arn(impl Into<String>)/set_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the resource to add tags to.
tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: trueThe tags to add to 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:
arn(impl Into<String>)/set_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the resource to remove tags from.
tag_keys(impl Into<String>)/set_tag_keys(Option<Vec::<String>>):
required: trueThe keys of the tags to remove from the resource.
- On success, responds with
UntagResourceOutput - On failure, responds with
SdkError<UntagResourceError>
Source§impl Client
impl Client
Sourcepub fn update_bill_estimate(&self) -> UpdateBillEstimateFluentBuilder
pub fn update_bill_estimate(&self) -> UpdateBillEstimateFluentBuilder
Constructs a fluent builder for the UpdateBillEstimate operation.
- The fluent builder is configurable:
identifier(impl Into<String>)/set_identifier(Option<String>):
required: trueThe unique identifier of the bill estimate to update.
name(impl Into<String>)/set_name(Option<String>):
required: falseThe new name for the bill estimate.
expires_at(DateTime)/set_expires_at(Option<DateTime>):
required: falseThe new expiration date for the bill estimate.
- On success, responds with
UpdateBillEstimateOutputwith field(s):id(String):The unique identifier of the updated bill estimate.
name(Option<String>):The updated name of the bill estimate.
status(Option<BillEstimateStatus>):The current status of the updated bill estimate.
failure_message(Option<String>):An error message if the bill estimate update failed.
bill_interval(Option<BillInterval>):The time period covered by the updated bill estimate.
cost_summary(Option<BillEstimateCostSummary>):A summary of the updated estimated costs.
created_at(Option<DateTime>):The timestamp when the bill estimate was originally created.
expires_at(Option<DateTime>):The updated expiration timestamp for the bill estimate.
group_sharing_preference(Option<GroupSharingPreferenceEnum>):The setting for the reserved instance and savings plan group sharing used in this estimate.
cost_category_group_sharing_preference_arn(Option<String>):The arn of the cost category used in the reserved and prioritized group sharing.
cost_category_group_sharing_preference_effective_date(Option<DateTime>):Timestamp of the effective date of the cost category used in the group sharing settings.
- On failure, responds with
SdkError<UpdateBillEstimateError>
Source§impl Client
impl Client
Sourcepub fn update_bill_scenario(&self) -> UpdateBillScenarioFluentBuilder
pub fn update_bill_scenario(&self) -> UpdateBillScenarioFluentBuilder
Constructs a fluent builder for the UpdateBillScenario operation.
- The fluent builder is configurable:
identifier(impl Into<String>)/set_identifier(Option<String>):
required: trueThe unique identifier of the bill scenario to update.
name(impl Into<String>)/set_name(Option<String>):
required: falseThe new name for the bill scenario.
expires_at(DateTime)/set_expires_at(Option<DateTime>):
required: falseThe new expiration date for the bill scenario.
group_sharing_preference(GroupSharingPreferenceEnum)/set_group_sharing_preference(Option<GroupSharingPreferenceEnum>):
required: falseThe setting for the reserved instance and savings plan group sharing used in this estimate.
cost_category_group_sharing_preference_arn(impl Into<String>)/set_cost_category_group_sharing_preference_arn(Option<String>):
required: falseThe arn of the cost category used in the reserved and prioritized group sharing.
- On success, responds with
UpdateBillScenarioOutputwith field(s):id(String):The unique identifier of the updated bill scenario.
name(Option<String>):The updated name of the bill scenario.
bill_interval(Option<BillInterval>):The time period covered by the updated bill scenario.
status(Option<BillScenarioStatus>):The current status of the updated bill scenario.
created_at(Option<DateTime>):The timestamp when the bill scenario was originally created.
expires_at(Option<DateTime>):The updated expiration timestamp for the bill scenario.
failure_message(Option<String>):An error message if the bill scenario update failed.
group_sharing_preference(Option<GroupSharingPreferenceEnum>):The setting for the reserved instance and savings plan group sharing used in this estimate.
cost_category_group_sharing_preference_arn(Option<String>):The arn of the cost category used in the reserved and prioritized group sharing.
- On failure, responds with
SdkError<UpdateBillScenarioError>
Source§impl Client
impl Client
Sourcepub fn update_preferences(&self) -> UpdatePreferencesFluentBuilder
pub fn update_preferences(&self) -> UpdatePreferencesFluentBuilder
Constructs a fluent builder for the UpdatePreferences operation.
- The fluent builder is configurable:
management_account_rate_type_selections(RateType)/set_management_account_rate_type_selections(Option<Vec::<RateType>>):
required: falseThe updated preferred rate types for the management account.
member_account_rate_type_selections(RateType)/set_member_account_rate_type_selections(Option<Vec::<RateType>>):
required: falseThe updated preferred rate types for member accounts.
standalone_account_rate_type_selections(RateType)/set_standalone_account_rate_type_selections(Option<Vec::<RateType>>):
required: falseThe updated preferred rate types for a standalone account.
- On success, responds with
UpdatePreferencesOutputwith field(s):management_account_rate_type_selections(Option<Vec::<RateType>>):The updated preferred rate types for the management account.
member_account_rate_type_selections(Option<Vec::<RateType>>):The updated preferred rate types for member accounts.
standalone_account_rate_type_selections(Option<Vec::<RateType>>):The updated preferred rate types for a standalone account.
- On failure, responds with
SdkError<UpdatePreferencesError>
Source§impl Client
impl Client
Sourcepub fn update_workload_estimate(&self) -> UpdateWorkloadEstimateFluentBuilder
pub fn update_workload_estimate(&self) -> UpdateWorkloadEstimateFluentBuilder
Constructs a fluent builder for the UpdateWorkloadEstimate operation.
- The fluent builder is configurable:
identifier(impl Into<String>)/set_identifier(Option<String>):
required: trueThe unique identifier of the workload estimate to update.
name(impl Into<String>)/set_name(Option<String>):
required: falseThe new name for the workload estimate.
expires_at(DateTime)/set_expires_at(Option<DateTime>):
required: falseThe new expiration date for the workload estimate.
- On success, responds with
UpdateWorkloadEstimateOutputwith field(s):id(String):The unique identifier of the updated workload estimate.
name(Option<String>):The updated name of the workload estimate.
created_at(Option<DateTime>):The timestamp when the workload estimate was originally created.
expires_at(Option<DateTime>):The updated expiration timestamp for the workload estimate.
rate_type(Option<WorkloadEstimateRateType>):The type of pricing rates used for the updated estimate.
rate_timestamp(Option<DateTime>):The timestamp of the pricing rates used for the updated estimate.
status(Option<WorkloadEstimateStatus>):The current status of the updated workload estimate.
total_cost(Option<f64>):The updated total estimated cost for the workload.
cost_currency(Option<CurrencyCode>):The currency of the updated estimated cost.
failure_message(Option<String>):An error message if the workload estimate update failed.
- On failure, responds with
SdkError<UpdateWorkloadEstimateError>
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);