pub struct Client { /* private fields */ }Expand description
Client for AWSBillingConductor
Client for invoking operations on AWSBillingConductor. Each operation on AWSBillingConductor 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_billingconductor::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_billingconductor::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 AssociateAccounts operation has
a Client::associate_accounts, function which returns a builder for that operation.
The fluent builder ultimately has a send() function that returns an async future that
returns a result, as illustrated below:
let result = client.associate_accounts()
.arn("example")
.send()
.await;The underlying HTTP requests that get made by this can be modified with the customize_operation
function on the fluent builder. See the customize module for more
information.
Implementations§
Source§impl Client
impl Client
Sourcepub fn associate_accounts(&self) -> AssociateAccountsFluentBuilder
pub fn associate_accounts(&self) -> AssociateAccountsFluentBuilder
Constructs a fluent builder for the AssociateAccounts operation.
- The fluent builder is configurable:
arn(impl Into<String>)/set_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the billing group that associates the array of account IDs.
account_ids(impl Into<String>)/set_account_ids(Option<Vec::<String>>):
required: trueThe associating array of account IDs.
- On success, responds with
AssociateAccountsOutputwith field(s):arn(Option<String>):The Amazon Resource Name (ARN) of the billing group that associates the array of account IDs.
- On failure, responds with
SdkError<AssociateAccountsError>
Source§impl Client
impl Client
Sourcepub fn associate_pricing_rules(&self) -> AssociatePricingRulesFluentBuilder
pub fn associate_pricing_rules(&self) -> AssociatePricingRulesFluentBuilder
Constructs a fluent builder for the AssociatePricingRules operation.
- The fluent builder is configurable:
arn(impl Into<String>)/set_arn(Option<String>):
required: trueThe
PricingPlanArnthat thePricingRuleArnsare associated with.pricing_rule_arns(impl Into<String>)/set_pricing_rule_arns(Option<Vec::<String>>):
required: trueThe
PricingRuleArnsthat are associated with the Pricing Plan.
- On success, responds with
AssociatePricingRulesOutputwith field(s):arn(Option<String>):The
PricingPlanArnthat thePricingRuleArnsare associated with.
- On failure, responds with
SdkError<AssociatePricingRulesError>
Source§impl Client
impl Client
Sourcepub fn batch_associate_resources_to_custom_line_item(
&self,
) -> BatchAssociateResourcesToCustomLineItemFluentBuilder
pub fn batch_associate_resources_to_custom_line_item( &self, ) -> BatchAssociateResourcesToCustomLineItemFluentBuilder
Constructs a fluent builder for the BatchAssociateResourcesToCustomLineItem operation.
- The fluent builder is configurable:
target_arn(impl Into<String>)/set_target_arn(Option<String>):
required: trueA percentage custom line item ARN to associate the resources to.
resource_arns(impl Into<String>)/set_resource_arns(Option<Vec::<String>>):
required: trueA list containing the ARNs of the resources to be associated.
billing_period_range(CustomLineItemBillingPeriodRange)/set_billing_period_range(Option<CustomLineItemBillingPeriodRange>):
required: falseThe billing period range in which the custom line item request will be applied.
- On success, responds with
BatchAssociateResourcesToCustomLineItemOutputwith field(s):successfully_associated_resources(Option<Vec::<AssociateResourceResponseElement>>):A list of
AssociateResourceResponseElementfor each resource that’s been associated to a percentage custom line item successfully.failed_associated_resources(Option<Vec::<AssociateResourceResponseElement>>):A list of
AssociateResourceResponseElementfor each resource that failed association to a percentage custom line item.
- On failure, responds with
SdkError<BatchAssociateResourcesToCustomLineItemError>
Source§impl Client
impl Client
Sourcepub fn batch_disassociate_resources_from_custom_line_item(
&self,
) -> BatchDisassociateResourcesFromCustomLineItemFluentBuilder
pub fn batch_disassociate_resources_from_custom_line_item( &self, ) -> BatchDisassociateResourcesFromCustomLineItemFluentBuilder
Constructs a fluent builder for the BatchDisassociateResourcesFromCustomLineItem operation.
- The fluent builder is configurable:
target_arn(impl Into<String>)/set_target_arn(Option<String>):
required: trueA percentage custom line item ARN to disassociate the resources from.
resource_arns(impl Into<String>)/set_resource_arns(Option<Vec::<String>>):
required: trueA list containing the ARNs of resources to be disassociated.
billing_period_range(CustomLineItemBillingPeriodRange)/set_billing_period_range(Option<CustomLineItemBillingPeriodRange>):
required: falseThe billing period range in which the custom line item request will be applied.
- On success, responds with
BatchDisassociateResourcesFromCustomLineItemOutputwith field(s):successfully_disassociated_resources(Option<Vec::<DisassociateResourceResponseElement>>):A list of
DisassociateResourceResponseElementfor each resource that’s been disassociated from a percentage custom line item successfully.failed_disassociated_resources(Option<Vec::<DisassociateResourceResponseElement>>):A list of
DisassociateResourceResponseElementfor each resource that failed disassociation from a percentage custom line item.
- On failure, responds with
SdkError<BatchDisassociateResourcesFromCustomLineItemError>
Source§impl Client
impl Client
Sourcepub fn create_billing_group(&self) -> CreateBillingGroupFluentBuilder
pub fn create_billing_group(&self) -> CreateBillingGroupFluentBuilder
Constructs a fluent builder for the CreateBillingGroup operation.
- The fluent builder is configurable:
client_token(impl Into<String>)/set_client_token(Option<String>):
required: falseA unique, case-sensitive identifier that you specify to ensure idempotency of the request. Idempotency ensures that an API request completes no more than one time. With an idempotent request, if the original request completes successfully, any subsequent retries complete successfully without performing any further actions.
name(impl Into<String>)/set_name(Option<String>):
required: trueThe billing group name. The names must be unique.
account_grouping(AccountGrouping)/set_account_grouping(Option<AccountGrouping>):
required: trueThe set of accounts that will be under the billing group. The set of accounts resemble the linked accounts in a consolidated billing family.
computation_preference(ComputationPreference)/set_computation_preference(Option<ComputationPreference>):
required: trueThe preferences and settings that will be used to compute the Amazon Web Services charges for a billing group.
primary_account_id(impl Into<String>)/set_primary_account_id(Option<String>):
required: falseThe account ID that serves as the main account in a billing group.
description(impl Into<String>)/set_description(Option<String>):
required: falseThe description of the billing group.
tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: falseA map that contains tag keys and tag values that are attached to a billing group. This feature isn’t available during the beta.
- On success, responds with
CreateBillingGroupOutputwith field(s):arn(Option<String>):The Amazon Resource Name (ARN) of the created billing group.
- On failure, responds with
SdkError<CreateBillingGroupError>
Source§impl Client
impl Client
Sourcepub fn create_custom_line_item(&self) -> CreateCustomLineItemFluentBuilder
pub fn create_custom_line_item(&self) -> CreateCustomLineItemFluentBuilder
Constructs a fluent builder for the CreateCustomLineItem operation.
- The fluent builder is configurable:
client_token(impl Into<String>)/set_client_token(Option<String>):
required: falseA unique, case-sensitive identifier that you specify to ensure idempotency of the request. Idempotency ensures that an API request completes no more than one time. With an idempotent request, if the original request completes successfully, any subsequent retries complete successfully without performing any further actions.
name(impl Into<String>)/set_name(Option<String>):
required: trueThe name of the custom line item.
description(impl Into<String>)/set_description(Option<String>):
required: trueThe description of the custom line item. This is shown on the Bills page in association with the charge value.
billing_group_arn(impl Into<String>)/set_billing_group_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) that references the billing group where the custom line item applies to.
billing_period_range(CustomLineItemBillingPeriodRange)/set_billing_period_range(Option<CustomLineItemBillingPeriodRange>):
required: falseA time range for which the custom line item is effective.
tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: falseA map that contains tag keys and tag values that are attached to a custom line item.
charge_details(CustomLineItemChargeDetails)/set_charge_details(Option<CustomLineItemChargeDetails>):
required: trueA
CustomLineItemChargeDetailsthat describes the charge details for a custom line item.account_id(impl Into<String>)/set_account_id(Option<String>):
required: falseThe Amazon Web Services account in which this custom line item will be applied to.
computation_rule(ComputationRuleEnum)/set_computation_rule(Option<ComputationRuleEnum>):
required: falseSpecifies how the custom line item charges are computed.
presentation_details(PresentationObject)/set_presentation_details(Option<PresentationObject>):
required: falseDetails controlling how the custom line item charges are presented in the bill. Contains specifications for which service the charges will be shown under.
- On success, responds with
CreateCustomLineItemOutputwith field(s):arn(Option<String>):The Amazon Resource Name (ARN) of the created custom line item.
- On failure, responds with
SdkError<CreateCustomLineItemError>
Source§impl Client
impl Client
Sourcepub fn create_pricing_plan(&self) -> CreatePricingPlanFluentBuilder
pub fn create_pricing_plan(&self) -> CreatePricingPlanFluentBuilder
Constructs a fluent builder for the CreatePricingPlan operation.
- The fluent builder is configurable:
client_token(impl Into<String>)/set_client_token(Option<String>):
required: falseA unique, case-sensitive identifier that you specify to ensure idempotency of the request. Idempotency ensures that an API request completes no more than one time. With an idempotent request, if the original request completes successfully, any subsequent retries complete successfully without performing any further actions.
name(impl Into<String>)/set_name(Option<String>):
required: trueThe name of the pricing plan. The names must be unique to each pricing plan.
description(impl Into<String>)/set_description(Option<String>):
required: falseThe description of the pricing plan.
pricing_rule_arns(impl Into<String>)/set_pricing_rule_arns(Option<Vec::<String>>):
required: falseA list of Amazon Resource Names (ARNs) that define the pricing plan parameters.
tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: falseA map that contains tag keys and tag values that are attached to a pricing plan.
- On success, responds with
CreatePricingPlanOutputwith field(s):arn(Option<String>):The Amazon Resource Name (ARN) of the created pricing plan.
- On failure, responds with
SdkError<CreatePricingPlanError>
Source§impl Client
impl Client
Sourcepub fn create_pricing_rule(&self) -> CreatePricingRuleFluentBuilder
pub fn create_pricing_rule(&self) -> CreatePricingRuleFluentBuilder
Constructs a fluent builder for the CreatePricingRule operation.
- The fluent builder is configurable:
client_token(impl Into<String>)/set_client_token(Option<String>):
required: falseA unique, case-sensitive identifier that you specify to ensure idempotency of the request. Idempotency ensures that an API request completes no more than one time. With an idempotent request, if the original request completes successfully, any subsequent retries complete successfully without performing any further actions.
name(impl Into<String>)/set_name(Option<String>):
required: trueThe pricing rule name. The names must be unique to each pricing rule.
description(impl Into<String>)/set_description(Option<String>):
required: falseThe pricing rule description.
scope(PricingRuleScope)/set_scope(Option<PricingRuleScope>):
required: trueThe scope of pricing rule that indicates if it’s globally applicable, or it’s service-specific.
r#type(PricingRuleType)/set_type(Option<PricingRuleType>):
required: trueThe type of pricing rule.
modifier_percentage(f64)/set_modifier_percentage(Option<f64>):
required: falseA percentage modifier that’s applied on the public pricing rates. Your entry will be rounded to the nearest 2 decimal places.
service(impl Into<String>)/set_service(Option<String>):
required: falseIf the
Scopeattribute is set toSERVICEorSKU, the attribute indicates which service thePricingRuleis applicable for.tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: falseA map that contains tag keys and tag values that are attached to a pricing rule.
billing_entity(impl Into<String>)/set_billing_entity(Option<String>):
required: falseThe seller of services provided by Amazon Web Services, their affiliates, or third-party providers selling services via Amazon Web Services Marketplace.
tiering(CreateTieringInput)/set_tiering(Option<CreateTieringInput>):
required: falseThe set of tiering configurations for the pricing rule.
usage_type(impl Into<String>)/set_usage_type(Option<String>):
required: falseUsage type is the unit that each service uses to measure the usage of a specific type of resource.
If the
Scopeattribute is set toSKU, this attribute indicates which usage type thePricingRuleis modifying. For example,USW2-BoxUsage:m2.2xlargedescribes anM2 High Memory Double Extra Largeinstance in the US West (Oregon) Region.operation(impl Into<String>)/set_operation(Option<String>):
required: falseOperation is the specific Amazon Web Services action covered by this line item. This describes the specific usage of the line item.
If the
Scopeattribute is set toSKU, this attribute indicates which operation thePricingRuleis modifying. For example, a value ofRunInstances:0202indicates the operation of running an Amazon EC2 instance.
- On success, responds with
CreatePricingRuleOutputwith field(s):arn(Option<String>):The Amazon Resource Name (ARN) of the created pricing rule.
- On failure, responds with
SdkError<CreatePricingRuleError>
Source§impl Client
impl Client
Sourcepub fn delete_billing_group(&self) -> DeleteBillingGroupFluentBuilder
pub fn delete_billing_group(&self) -> DeleteBillingGroupFluentBuilder
Constructs a fluent builder for the DeleteBillingGroup operation.
- The fluent builder is configurable:
arn(impl Into<String>)/set_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the billing group that you’re deleting.
- On success, responds with
DeleteBillingGroupOutputwith field(s):arn(Option<String>):The Amazon Resource Name (ARN) of the deleted billing group.
- On failure, responds with
SdkError<DeleteBillingGroupError>
Source§impl Client
impl Client
Sourcepub fn delete_custom_line_item(&self) -> DeleteCustomLineItemFluentBuilder
pub fn delete_custom_line_item(&self) -> DeleteCustomLineItemFluentBuilder
Constructs a fluent builder for the DeleteCustomLineItem operation.
- The fluent builder is configurable:
arn(impl Into<String>)/set_arn(Option<String>):
required: trueThe ARN of the custom line item to be deleted.
billing_period_range(CustomLineItemBillingPeriodRange)/set_billing_period_range(Option<CustomLineItemBillingPeriodRange>):
required: falseThe billing period range in which the custom line item request will be applied.
- On success, responds with
DeleteCustomLineItemOutputwith field(s):arn(Option<String>):The ARN of the deleted custom line item.
- On failure, responds with
SdkError<DeleteCustomLineItemError>
Source§impl Client
impl Client
Sourcepub fn delete_pricing_plan(&self) -> DeletePricingPlanFluentBuilder
pub fn delete_pricing_plan(&self) -> DeletePricingPlanFluentBuilder
Constructs a fluent builder for the DeletePricingPlan operation.
- The fluent builder is configurable:
arn(impl Into<String>)/set_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the pricing plan that you’re deleting.
- On success, responds with
DeletePricingPlanOutputwith field(s):arn(Option<String>):The Amazon Resource Name (ARN) of the deleted pricing plan.
- On failure, responds with
SdkError<DeletePricingPlanError>
Source§impl Client
impl Client
Sourcepub fn delete_pricing_rule(&self) -> DeletePricingRuleFluentBuilder
pub fn delete_pricing_rule(&self) -> DeletePricingRuleFluentBuilder
Constructs a fluent builder for the DeletePricingRule operation.
- The fluent builder is configurable:
arn(impl Into<String>)/set_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the pricing rule that you are deleting.
- On success, responds with
DeletePricingRuleOutputwith field(s):arn(Option<String>):The Amazon Resource Name (ARN) of the deleted pricing rule.
- On failure, responds with
SdkError<DeletePricingRuleError>
Source§impl Client
impl Client
Sourcepub fn disassociate_accounts(&self) -> DisassociateAccountsFluentBuilder
pub fn disassociate_accounts(&self) -> DisassociateAccountsFluentBuilder
Constructs a fluent builder for the DisassociateAccounts operation.
- The fluent builder is configurable:
arn(impl Into<String>)/set_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the billing group that the array of account IDs will disassociate from.
account_ids(impl Into<String>)/set_account_ids(Option<Vec::<String>>):
required: trueThe array of account IDs to disassociate.
- On success, responds with
DisassociateAccountsOutputwith field(s):arn(Option<String>):The Amazon Resource Name (ARN) of the billing group that the array of account IDs is disassociated from.
- On failure, responds with
SdkError<DisassociateAccountsError>
Source§impl Client
impl Client
Sourcepub fn disassociate_pricing_rules(
&self,
) -> DisassociatePricingRulesFluentBuilder
pub fn disassociate_pricing_rules( &self, ) -> DisassociatePricingRulesFluentBuilder
Constructs a fluent builder for the DisassociatePricingRules operation.
- The fluent builder is configurable:
arn(impl Into<String>)/set_arn(Option<String>):
required: trueThe pricing plan Amazon Resource Name (ARN) to disassociate pricing rules from.
pricing_rule_arns(impl Into<String>)/set_pricing_rule_arns(Option<Vec::<String>>):
required: trueA list containing the Amazon Resource Name (ARN) of the pricing rules that will be disassociated.
- On success, responds with
DisassociatePricingRulesOutputwith field(s):arn(Option<String>):The Amazon Resource Name (ARN) of the pricing plan that the pricing rules successfully disassociated from.
- On failure, responds with
SdkError<DisassociatePricingRulesError>
Source§impl Client
impl Client
Sourcepub fn get_billing_group_cost_report(
&self,
) -> GetBillingGroupCostReportFluentBuilder
pub fn get_billing_group_cost_report( &self, ) -> GetBillingGroupCostReportFluentBuilder
Constructs a fluent builder for the GetBillingGroupCostReport operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
arn(impl Into<String>)/set_arn(Option<String>):
required: trueThe Amazon Resource Number (ARN) that uniquely identifies the billing group.
billing_period_range(BillingPeriodRange)/set_billing_period_range(Option<BillingPeriodRange>):
required: falseA time range for which the margin summary is effective. You can specify up to 12 months.
group_by(GroupByAttributeName)/set_group_by(Option<Vec::<GroupByAttributeName>>):
required: falseA list of strings that specify the attributes that are used to break down costs in the margin summary reports for the billing group. For example, you can view your costs by the Amazon Web Services service name or the billing period.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of margin summary reports to retrieve.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseThe pagination token used on subsequent calls to get reports.
- On success, responds with
GetBillingGroupCostReportOutputwith field(s):billing_group_cost_report_results(Option<Vec::<BillingGroupCostReportResultElement>>):The list of margin summary reports.
next_token(Option<String>):The pagination token used on subsequent calls to get reports.
- On failure, responds with
SdkError<GetBillingGroupCostReportError>
Source§impl Client
impl Client
Sourcepub fn list_account_associations(&self) -> ListAccountAssociationsFluentBuilder
pub fn list_account_associations(&self) -> ListAccountAssociationsFluentBuilder
Constructs a fluent builder for the ListAccountAssociations operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
billing_period(impl Into<String>)/set_billing_period(Option<String>):
required: falseThe preferred billing period to get account associations.
filters(ListAccountAssociationsFilter)/set_filters(Option<ListAccountAssociationsFilter>):
required: falseThe filter on the account ID of the linked account, or any of the following:
MONITORED: linked accounts that are associated to billing groups.UNMONITORED: linked accounts that aren’t associated to billing groups.Billing Group Arn: linked accounts that are associated to the provided billing group Arn.next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseThe pagination token that’s used on subsequent calls to retrieve accounts.
- On success, responds with
ListAccountAssociationsOutputwith field(s):linked_accounts(Option<Vec::<AccountAssociationsListElement>>):The list of linked accounts in the payer account.
next_token(Option<String>):The pagination token that’s used on subsequent calls to get accounts.
- On failure, responds with
SdkError<ListAccountAssociationsError>
Source§impl Client
impl Client
Sourcepub fn list_billing_group_cost_reports(
&self,
) -> ListBillingGroupCostReportsFluentBuilder
pub fn list_billing_group_cost_reports( &self, ) -> ListBillingGroupCostReportsFluentBuilder
Constructs a fluent builder for the ListBillingGroupCostReports operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
billing_period(impl Into<String>)/set_billing_period(Option<String>):
required: falseThe preferred billing period for your report.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of reports to retrieve.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseThe pagination token that’s used on subsequent calls to get reports.
filters(ListBillingGroupCostReportsFilter)/set_filters(Option<ListBillingGroupCostReportsFilter>):
required: falseA
ListBillingGroupCostReportsFilterto specify billing groups to retrieve reports from.
- On success, responds with
ListBillingGroupCostReportsOutputwith field(s):billing_group_cost_reports(Option<Vec::<BillingGroupCostReportElement>>):A list of
BillingGroupCostReportElementretrieved.next_token(Option<String>):The pagination token that’s used on subsequent calls to get reports.
- On failure, responds with
SdkError<ListBillingGroupCostReportsError>
Source§impl Client
impl Client
Sourcepub fn list_billing_groups(&self) -> ListBillingGroupsFluentBuilder
pub fn list_billing_groups(&self) -> ListBillingGroupsFluentBuilder
Constructs a fluent builder for the ListBillingGroups operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
billing_period(impl Into<String>)/set_billing_period(Option<String>):
required: falseThe preferred billing period to get billing groups.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of billing groups to retrieve.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseThe pagination token that’s used on subsequent calls to get billing groups.
filters(ListBillingGroupsFilter)/set_filters(Option<ListBillingGroupsFilter>):
required: falseA
ListBillingGroupsFilterthat specifies the billing group and pricing plan to retrieve billing group information.
- On success, responds with
ListBillingGroupsOutputwith field(s):billing_groups(Option<Vec::<BillingGroupListElement>>):A list of
BillingGroupListElementretrieved.next_token(Option<String>):The pagination token that’s used on subsequent calls to get billing groups.
- On failure, responds with
SdkError<ListBillingGroupsError>
Source§impl Client
impl Client
Sourcepub fn list_custom_line_item_versions(
&self,
) -> ListCustomLineItemVersionsFluentBuilder
pub fn list_custom_line_item_versions( &self, ) -> ListCustomLineItemVersionsFluentBuilder
Constructs a fluent builder for the ListCustomLineItemVersions operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
arn(impl Into<String>)/set_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) for the custom line item.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of custom line item versions to retrieve.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseThe pagination token that’s used on subsequent calls to retrieve custom line item versions.
filters(ListCustomLineItemVersionsFilter)/set_filters(Option<ListCustomLineItemVersionsFilter>):
required: falseA
ListCustomLineItemVersionsFilterthat specifies the billing period range in which the custom line item versions are applied.
- On success, responds with
ListCustomLineItemVersionsOutputwith field(s):custom_line_item_versions(Option<Vec::<CustomLineItemVersionListElement>>):A list of
CustomLineItemVersionListElementsthat are received.next_token(Option<String>):The pagination token that’s used on subsequent calls to retrieve custom line item versions.
- On failure, responds with
SdkError<ListCustomLineItemVersionsError>
Source§impl Client
impl Client
Sourcepub fn list_custom_line_items(&self) -> ListCustomLineItemsFluentBuilder
pub fn list_custom_line_items(&self) -> ListCustomLineItemsFluentBuilder
Constructs a fluent builder for the ListCustomLineItems operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
billing_period(impl Into<String>)/set_billing_period(Option<String>):
required: falseThe preferred billing period to get custom line items (FFLIs).
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of billing groups to retrieve.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseThe pagination token that’s used on subsequent calls to get custom line items (FFLIs).
filters(ListCustomLineItemsFilter)/set_filters(Option<ListCustomLineItemsFilter>):
required: falseA
ListCustomLineItemsFilterthat specifies the custom line item names and/or billing group Amazon Resource Names (ARNs) to retrieve FFLI information.
- On success, responds with
ListCustomLineItemsOutputwith field(s):custom_line_items(Option<Vec::<CustomLineItemListElement>>):A list of
FreeFormLineItemListElementsreceived.next_token(Option<String>):The pagination token that’s used on subsequent calls to get custom line items (FFLIs).
- On failure, responds with
SdkError<ListCustomLineItemsError>
Source§impl Client
impl Client
Sourcepub fn list_pricing_plans(&self) -> ListPricingPlansFluentBuilder
pub fn list_pricing_plans(&self) -> ListPricingPlansFluentBuilder
Constructs a fluent builder for the ListPricingPlans operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
billing_period(impl Into<String>)/set_billing_period(Option<String>):
required: falseThe preferred billing period to get pricing plan.
filters(ListPricingPlansFilter)/set_filters(Option<ListPricingPlansFilter>):
required: falseA
ListPricingPlansFilterthat specifies the Amazon Resource Name (ARNs) of pricing plans to retrieve pricing plans information.max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of pricing plans to retrieve.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseThe pagination token that’s used on subsequent call to get pricing plans.
- On success, responds with
ListPricingPlansOutputwith field(s):billing_period(Option<String>):The billing period for which the described pricing plans are applicable.
pricing_plans(Option<Vec::<PricingPlanListElement>>):A list of
PricingPlanListElementretrieved.next_token(Option<String>):The pagination token that’s used on subsequent calls to get pricing plans.
- On failure, responds with
SdkError<ListPricingPlansError>
Source§impl Client
impl Client
Sourcepub fn list_pricing_plans_associated_with_pricing_rule(
&self,
) -> ListPricingPlansAssociatedWithPricingRuleFluentBuilder
pub fn list_pricing_plans_associated_with_pricing_rule( &self, ) -> ListPricingPlansAssociatedWithPricingRuleFluentBuilder
Constructs a fluent builder for the ListPricingPlansAssociatedWithPricingRule operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
billing_period(impl Into<String>)/set_billing_period(Option<String>):
required: falseThe pricing plan billing period for which associations will be listed.
pricing_rule_arn(impl Into<String>)/set_pricing_rule_arn(Option<String>):
required: trueThe pricing rule Amazon Resource Name (ARN) for which associations will be listed.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe optional maximum number of pricing rule associations to retrieve.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseThe optional pagination token returned by a previous call.
- On success, responds with
ListPricingPlansAssociatedWithPricingRuleOutputwith field(s):billing_period(Option<String>):The pricing plan billing period for which associations will be listed.
pricing_rule_arn(Option<String>):The pricing rule Amazon Resource Name (ARN) for which associations will be listed.
pricing_plan_arns(Option<Vec::<String>>):The list containing pricing plans that are associated with the requested pricing rule.
next_token(Option<String>):The pagination token to be used on subsequent calls.
- On failure, responds with
SdkError<ListPricingPlansAssociatedWithPricingRuleError>
Source§impl Client
impl Client
Sourcepub fn list_pricing_rules(&self) -> ListPricingRulesFluentBuilder
pub fn list_pricing_rules(&self) -> ListPricingRulesFluentBuilder
Constructs a fluent builder for the ListPricingRules operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
billing_period(impl Into<String>)/set_billing_period(Option<String>):
required: falseThe preferred billing period to get the pricing plan.
filters(ListPricingRulesFilter)/set_filters(Option<ListPricingRulesFilter>):
required: falseA
DescribePricingRuleFilterthat specifies the Amazon Resource Name (ARNs) of pricing rules to retrieve pricing rules information.max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of pricing rules to retrieve.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseThe pagination token that’s used on subsequent call to get pricing rules.
- On success, responds with
ListPricingRulesOutputwith field(s):billing_period(Option<String>):The billing period for which the described pricing rules are applicable.
pricing_rules(Option<Vec::<PricingRuleListElement>>):A list containing the described pricing rules.
next_token(Option<String>):The pagination token that’s used on subsequent calls to get pricing rules.
- On failure, responds with
SdkError<ListPricingRulesError>
Source§impl Client
impl Client
Sourcepub fn list_pricing_rules_associated_to_pricing_plan(
&self,
) -> ListPricingRulesAssociatedToPricingPlanFluentBuilder
pub fn list_pricing_rules_associated_to_pricing_plan( &self, ) -> ListPricingRulesAssociatedToPricingPlanFluentBuilder
Constructs a fluent builder for the ListPricingRulesAssociatedToPricingPlan operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
billing_period(impl Into<String>)/set_billing_period(Option<String>):
required: falseThe billing period for which the pricing rule associations are to be listed.
pricing_plan_arn(impl Into<String>)/set_pricing_plan_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the pricing plan for which associations are to be listed.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe optional maximum number of pricing rule associations to retrieve.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseThe optional pagination token returned by a previous call.
- On success, responds with
ListPricingRulesAssociatedToPricingPlanOutputwith field(s):billing_period(Option<String>):The billing period for which the pricing rule associations are listed.
pricing_plan_arn(Option<String>):The Amazon Resource Name (ARN) of the pricing plan for which associations are listed.
pricing_rule_arns(Option<Vec::<String>>):A list containing pricing rules that are associated with the requested pricing plan.
next_token(Option<String>):The pagination token to be used on subsequent calls.
- On failure, responds with
SdkError<ListPricingRulesAssociatedToPricingPlanError>
Source§impl Client
impl Client
Sourcepub fn list_resources_associated_to_custom_line_item(
&self,
) -> ListResourcesAssociatedToCustomLineItemFluentBuilder
pub fn list_resources_associated_to_custom_line_item( &self, ) -> ListResourcesAssociatedToCustomLineItemFluentBuilder
Constructs a fluent builder for the ListResourcesAssociatedToCustomLineItem operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
billing_period(impl Into<String>)/set_billing_period(Option<String>):
required: falseThe billing period for which the resource associations will be listed.
arn(impl Into<String>)/set_arn(Option<String>):
required: trueThe ARN of the custom line item for which the resource associations will be listed.
max_results(i32)/set_max_results(Option<i32>):
required: false(Optional) The maximum number of resource associations to be retrieved.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: false(Optional) The pagination token that’s returned by a previous request.
filters(ListResourcesAssociatedToCustomLineItemFilter)/set_filters(Option<ListResourcesAssociatedToCustomLineItemFilter>):
required: false(Optional) A
ListResourcesAssociatedToCustomLineItemFilterthat can specify the types of resources that should be retrieved.
- On success, responds with
ListResourcesAssociatedToCustomLineItemOutputwith field(s):arn(Option<String>):The custom line item ARN for which the resource associations are listed.
associated_resources(Option<Vec::<ListResourcesAssociatedToCustomLineItemResponseElement>>):A list of
ListResourcesAssociatedToCustomLineItemResponseElementfor each resource association retrieved.next_token(Option<String>):The pagination token to be used in subsequent requests to retrieve additional results.
- On failure, responds with
SdkError<ListResourcesAssociatedToCustomLineItemError>
Source§impl Client
impl Client
Constructs a fluent builder for the ListTagsForResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) that identifies the resource to list the tags.
- On success, responds with
ListTagsForResourceOutputwith field(s):tags(Option<HashMap::<String, String>>):The tags for 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 Amazon Resource Name (ARN) of the resource to which to add tags.
tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: trueThe tags to add to the resource as a list of key-value pairs.
- On success, responds with
TagResourceOutput - On failure, responds with
SdkError<TagResourceError>
Source§impl Client
impl Client
Sourcepub fn untag_resource(&self) -> UntagResourceFluentBuilder
pub fn untag_resource(&self) -> UntagResourceFluentBuilder
Constructs a fluent builder for the UntagResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the resource to which to delete tags.
tag_keys(impl Into<String>)/set_tag_keys(Option<Vec::<String>>):
required: trueThe tags to delete from the resource as a list of key-value pairs.
- On success, responds with
UntagResourceOutput - On failure, responds with
SdkError<UntagResourceError>
Source§impl Client
impl Client
Sourcepub fn update_billing_group(&self) -> UpdateBillingGroupFluentBuilder
pub fn update_billing_group(&self) -> UpdateBillingGroupFluentBuilder
Constructs a fluent builder for the UpdateBillingGroup operation.
- The fluent builder is configurable:
arn(impl Into<String>)/set_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the billing group being updated.
name(impl Into<String>)/set_name(Option<String>):
required: falseThe name of the billing group. The names must be unique to each billing group.
status(BillingGroupStatus)/set_status(Option<BillingGroupStatus>):
required: falseThe status of the billing group. Only one of the valid values can be used.
computation_preference(ComputationPreference)/set_computation_preference(Option<ComputationPreference>):
required: falseThe preferences and settings that will be used to compute the Amazon Web Services charges for a billing group.
description(impl Into<String>)/set_description(Option<String>):
required: falseA description of the billing group.
account_grouping(UpdateBillingGroupAccountGrouping)/set_account_grouping(Option<UpdateBillingGroupAccountGrouping>):
required: falseSpecifies if the billing group has automatic account association (
AutoAssociate) enabled.
- On success, responds with
UpdateBillingGroupOutputwith field(s):arn(Option<String>):The Amazon Resource Name (ARN) of the billing group that was updated.
name(Option<String>):The name of the billing group. The names must be unique to each billing group.
description(Option<String>):A description of the billing group.
primary_account_id(Option<String>):The account ID that serves as the main account in a billing group.
pricing_plan_arn(Option<String>):The Amazon Resource Name (ARN) of the pricing plan to compute Amazon Web Services charges for the billing group.
size(i64):The number of accounts in the particular billing group.
last_modified_time(i64):The most recent time when the billing group was modified.
status(Option<BillingGroupStatus>):The status of the billing group. Only one of the valid values can be used.
status_reason(Option<String>):The reason why the billing group is in its current status.
account_grouping(Option<UpdateBillingGroupAccountGrouping>):Specifies if the billing group has automatic account association (
AutoAssociate) enabled.
- On failure, responds with
SdkError<UpdateBillingGroupError>
Source§impl Client
impl Client
Sourcepub fn update_custom_line_item(&self) -> UpdateCustomLineItemFluentBuilder
pub fn update_custom_line_item(&self) -> UpdateCustomLineItemFluentBuilder
Constructs a fluent builder for the UpdateCustomLineItem operation.
- The fluent builder is configurable:
arn(impl Into<String>)/set_arn(Option<String>):
required: trueThe ARN of the custom line item to be updated.
name(impl Into<String>)/set_name(Option<String>):
required: falseThe new name for the custom line item.
description(impl Into<String>)/set_description(Option<String>):
required: falseThe new line item description of the custom line item.
charge_details(UpdateCustomLineItemChargeDetails)/set_charge_details(Option<UpdateCustomLineItemChargeDetails>):
required: falseA
ListCustomLineItemChargeDetailscontaining the new charge details for the custom line item.billing_period_range(CustomLineItemBillingPeriodRange)/set_billing_period_range(Option<CustomLineItemBillingPeriodRange>):
required: falseThe billing period range in which the custom line item request will be applied.
- On success, responds with
UpdateCustomLineItemOutputwith field(s):arn(Option<String>):The ARN of the successfully updated custom line item.
billing_group_arn(Option<String>):The ARN of the billing group that the custom line item is applied to.
name(Option<String>):The name of the successfully updated custom line item.
description(Option<String>):The description of the successfully updated custom line item.
charge_details(Option<ListCustomLineItemChargeDetails>):A
ListCustomLineItemChargeDetailscontaining the charge details of the successfully updated custom line item.last_modified_time(i64):The most recent time when the custom line item was modified.
association_size(i64):The number of resources that are associated to the custom line item.
- On failure, responds with
SdkError<UpdateCustomLineItemError>
Source§impl Client
impl Client
Sourcepub fn update_pricing_plan(&self) -> UpdatePricingPlanFluentBuilder
pub fn update_pricing_plan(&self) -> UpdatePricingPlanFluentBuilder
Constructs a fluent builder for the UpdatePricingPlan operation.
- The fluent builder is configurable:
arn(impl Into<String>)/set_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the pricing plan that you’re updating.
name(impl Into<String>)/set_name(Option<String>):
required: falseThe name of the pricing plan. The name must be unique to each pricing plan.
description(impl Into<String>)/set_description(Option<String>):
required: falseThe description of the pricing plan.
- On success, responds with
UpdatePricingPlanOutputwith field(s):arn(Option<String>):The Amazon Resource Name (ARN) of the updated pricing plan.
name(Option<String>):The name of the pricing plan. The name must be unique to each pricing plan.
description(Option<String>):The new description for the pricing rule.
size(i64):The pricing rules count that’s currently associated with this pricing plan list.
last_modified_time(i64):The most recent time when the pricing plan was modified.
- On failure, responds with
SdkError<UpdatePricingPlanError>
Source§impl Client
impl Client
Sourcepub fn update_pricing_rule(&self) -> UpdatePricingRuleFluentBuilder
pub fn update_pricing_rule(&self) -> UpdatePricingRuleFluentBuilder
Constructs a fluent builder for the UpdatePricingRule operation.
- The fluent builder is configurable:
arn(impl Into<String>)/set_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the pricing rule to update.
name(impl Into<String>)/set_name(Option<String>):
required: falseThe new name of the pricing rule. The name must be unique to each pricing rule.
description(impl Into<String>)/set_description(Option<String>):
required: falseThe new description for the pricing rule.
r#type(PricingRuleType)/set_type(Option<PricingRuleType>):
required: falseThe new pricing rule type.
modifier_percentage(f64)/set_modifier_percentage(Option<f64>):
required: falseThe new modifier to show pricing plan rates as a percentage. Your entry will be rounded to the nearest 2 decimal places.
tiering(UpdateTieringInput)/set_tiering(Option<UpdateTieringInput>):
required: falseThe set of tiering configurations for the pricing rule.
- On success, responds with
UpdatePricingRuleOutputwith field(s):arn(Option<String>):The Amazon Resource Name (ARN) of the successfully updated pricing rule.
name(Option<String>):The new name of the pricing rule. The name must be unique to each pricing rule.
description(Option<String>):The new description for the pricing rule.
scope(Option<PricingRuleScope>):The scope of pricing rule that indicates if it’s globally applicable, or it’s service-specific.
r#type(Option<PricingRuleType>):The new pricing rule type.
modifier_percentage(Option<f64>):The new modifier to show pricing plan rates as a percentage.
service(Option<String>):If the
Scopeattribute is set toSERVICE, the attribute indicates which service thePricingRuleis applicable for.associated_pricing_plan_count(i64):The pricing plans count that this pricing rule is associated with.
last_modified_time(i64):The most recent time the pricing rule was modified.
billing_entity(Option<String>):The seller of services provided by Amazon Web Services, their affiliates, or third-party providers selling services via Amazon Web Services Marketplace.
tiering(Option<UpdateTieringInput>):The set of tiering configurations for the pricing rule.
usage_type(Option<String>):Usage type is the unit that each service uses to measure the usage of a specific type of resource.
If the
Scopeattribute is set toSKU, this attribute indicates which usage type thePricingRuleis modifying. For example,USW2-BoxUsage:m2.2xlargedescribes anM2 High Memory Double Extra Largeinstance in the US West (Oregon) Region.operation(Option<String>):Operation refers to the specific Amazon Web Services covered by this line item. This describes the specific usage of the line item.
If the
Scopeattribute is set toSKU, this attribute indicates which operation thePricingRuleis modifying. For example, a value ofRunInstances:0202indicates the operation of running an Amazon EC2 instance.
- On failure, responds with
SdkError<UpdatePricingRuleError>
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);