Struct aws_sdk_savingsplans::Client
source · [−]pub struct Client { /* private fields */ }
Expand description
Client for AWS Savings Plans
Client for invoking operations on AWS Savings Plans. Each operation on AWS Savings Plans is a method on this
this struct. .send()
MUST be invoked on the generated operations to dispatch the request to the service.
Examples
Constructing a client and invoking an operation
// create a shared configuration. This can be used & shared between multiple service clients.
let shared_config = aws_config::load_from_env().await;
let client = aws_sdk_savingsplans::Client::new(&shared_config);
// invoke an operation
/* let rsp = client
.<operation_name>().
.<param>("some value")
.send().await; */
Constructing a client with custom configuration
use aws_config::RetryConfig;
let shared_config = aws_config::load_from_env().await;
let config = aws_sdk_savingsplans::config::Builder::from(&shared_config)
.retry_config(RetryConfig::disabled())
.build();
let client = aws_sdk_savingsplans::Client::from_conf(config);
Implementations
sourceimpl Client
impl Client
sourcepub fn with_config(
client: Client<DynConnector, DynMiddleware<DynConnector>>,
conf: Config
) -> Self
pub fn with_config(
client: Client<DynConnector, DynMiddleware<DynConnector>>,
conf: Config
) -> Self
Creates a client with the given service configuration.
sourceimpl Client
impl Client
sourcepub fn create_savings_plan(&self) -> CreateSavingsPlan
pub fn create_savings_plan(&self) -> CreateSavingsPlan
Constructs a fluent builder for the CreateSavingsPlan
operation.
- The fluent builder is configurable:
savings_plan_offering_id(impl Into<String>)
/set_savings_plan_offering_id(Option<String>)
:The ID of the offering.
commitment(impl Into<String>)
/set_commitment(Option<String>)
:The hourly commitment, in USD. This is a value between 0.001 and 1 million. You cannot specify more than five digits after the decimal point.
upfront_payment_amount(impl Into<String>)
/set_upfront_payment_amount(Option<String>)
:The up-front payment amount. This is a whole number between 50 and 99 percent of the total value of the Savings Plan. This parameter is supported only if the payment option is
Partial Upfront
.purchase_time(DateTime)
/set_purchase_time(Option<DateTime>)
:The time at which to purchase the Savings Plan, in UTC format (YYYY-MM-DDTHH:MM:SSZ).
client_token(impl Into<String>)
/set_client_token(Option<String>)
:Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
tags(HashMap<String, String>)
/set_tags(Option<HashMap<String, String>>)
:One or more tags.
- On success, responds with
CreateSavingsPlanOutput
with field(s):savings_plan_id(Option<String>)
:The ID of the Savings Plan.
- On failure, responds with
SdkError<CreateSavingsPlanError>
sourcepub fn delete_queued_savings_plan(&self) -> DeleteQueuedSavingsPlan
pub fn delete_queued_savings_plan(&self) -> DeleteQueuedSavingsPlan
Constructs a fluent builder for the DeleteQueuedSavingsPlan
operation.
- The fluent builder is configurable:
savings_plan_id(impl Into<String>)
/set_savings_plan_id(Option<String>)
:The ID of the Savings Plan.
- On success, responds with
DeleteQueuedSavingsPlanOutput
- On failure, responds with
SdkError<DeleteQueuedSavingsPlanError>
sourcepub fn describe_savings_plan_rates(&self) -> DescribeSavingsPlanRates
pub fn describe_savings_plan_rates(&self) -> DescribeSavingsPlanRates
Constructs a fluent builder for the DescribeSavingsPlanRates
operation.
- The fluent builder is configurable:
savings_plan_id(impl Into<String>)
/set_savings_plan_id(Option<String>)
:The ID of the Savings Plan.
filters(Vec<SavingsPlanRateFilter>)
/set_filters(Option<Vec<SavingsPlanRateFilter>>)
:The filters.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:The token for the next page of results.
max_results(i32)
/set_max_results(Option<i32>)
:The maximum number of results to return with a single call. To retrieve additional results, make another call with the returned token value.
- On success, responds with
DescribeSavingsPlanRatesOutput
with field(s):savings_plan_id(Option<String>)
:The ID of the Savings Plan.
search_results(Option<Vec<SavingsPlanRate>>)
:Information about the Savings Plans rates.
next_token(Option<String>)
:The token to use to retrieve the next page of results. This value is null when there are no more results to return.
- On failure, responds with
SdkError<DescribeSavingsPlanRatesError>
sourcepub fn describe_savings_plans(&self) -> DescribeSavingsPlans
pub fn describe_savings_plans(&self) -> DescribeSavingsPlans
Constructs a fluent builder for the DescribeSavingsPlans
operation.
- The fluent builder is configurable:
savings_plan_arns(Vec<String>)
/set_savings_plan_arns(Option<Vec<String>>)
:The Amazon Resource Names (ARN) of the Savings Plans.
savings_plan_ids(Vec<String>)
/set_savings_plan_ids(Option<Vec<String>>)
:The IDs of the Savings Plans.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:The token for the next page of results.
max_results(i32)
/set_max_results(Option<i32>)
:The maximum number of results to return with a single call. To retrieve additional results, make another call with the returned token value.
states(Vec<SavingsPlanState>)
/set_states(Option<Vec<SavingsPlanState>>)
:The states.
filters(Vec<SavingsPlanFilter>)
/set_filters(Option<Vec<SavingsPlanFilter>>)
:The filters.
- On success, responds with
DescribeSavingsPlansOutput
with field(s):savings_plans(Option<Vec<SavingsPlan>>)
:Information about the Savings Plans.
next_token(Option<String>)
:The token to use to retrieve the next page of results. This value is null when there are no more results to return.
- On failure, responds with
SdkError<DescribeSavingsPlansError>
sourcepub fn describe_savings_plans_offering_rates(
&self
) -> DescribeSavingsPlansOfferingRates
pub fn describe_savings_plans_offering_rates(
&self
) -> DescribeSavingsPlansOfferingRates
Constructs a fluent builder for the DescribeSavingsPlansOfferingRates
operation.
- The fluent builder is configurable:
savings_plan_offering_ids(Vec<String>)
/set_savings_plan_offering_ids(Option<Vec<String>>)
:The IDs of the offerings.
savings_plan_payment_options(Vec<SavingsPlanPaymentOption>)
/set_savings_plan_payment_options(Option<Vec<SavingsPlanPaymentOption>>)
:The payment options.
savings_plan_types(Vec<SavingsPlanType>)
/set_savings_plan_types(Option<Vec<SavingsPlanType>>)
:The plan types.
products(Vec<SavingsPlanProductType>)
/set_products(Option<Vec<SavingsPlanProductType>>)
:The AWS products.
service_codes(Vec<SavingsPlanRateServiceCode>)
/set_service_codes(Option<Vec<SavingsPlanRateServiceCode>>)
:The services.
usage_types(Vec<String>)
/set_usage_types(Option<Vec<String>>)
:The usage details of the line item in the billing report.
operations(Vec<String>)
/set_operations(Option<Vec<String>>)
:The specific AWS operation for the line item in the billing report.
filters(Vec<SavingsPlanOfferingRateFilterElement>)
/set_filters(Option<Vec<SavingsPlanOfferingRateFilterElement>>)
:The filters.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:The token for the next page of results.
max_results(i32)
/set_max_results(i32)
:The maximum number of results to return with a single call. To retrieve additional results, make another call with the returned token value.
- On success, responds with
DescribeSavingsPlansOfferingRatesOutput
with field(s):search_results(Option<Vec<SavingsPlanOfferingRate>>)
:Information about the Savings Plans offering rates.
next_token(Option<String>)
:The token to use to retrieve the next page of results. This value is null when there are no more results to return.
- On failure, responds with
SdkError<DescribeSavingsPlansOfferingRatesError>
sourcepub fn describe_savings_plans_offerings(&self) -> DescribeSavingsPlansOfferings
pub fn describe_savings_plans_offerings(&self) -> DescribeSavingsPlansOfferings
Constructs a fluent builder for the DescribeSavingsPlansOfferings
operation.
- The fluent builder is configurable:
offering_ids(Vec<String>)
/set_offering_ids(Option<Vec<String>>)
:The IDs of the offerings.
payment_options(Vec<SavingsPlanPaymentOption>)
/set_payment_options(Option<Vec<SavingsPlanPaymentOption>>)
:The payment options.
product_type(SavingsPlanProductType)
/set_product_type(Option<SavingsPlanProductType>)
:The product type.
plan_types(Vec<SavingsPlanType>)
/set_plan_types(Option<Vec<SavingsPlanType>>)
:The plan type.
durations(Vec<i64>)
/set_durations(Option<Vec<i64>>)
:The durations, in seconds.
currencies(Vec<CurrencyCode>)
/set_currencies(Option<Vec<CurrencyCode>>)
:The currencies.
descriptions(Vec<String>)
/set_descriptions(Option<Vec<String>>)
:The descriptions.
service_codes(Vec<String>)
/set_service_codes(Option<Vec<String>>)
:The services.
usage_types(Vec<String>)
/set_usage_types(Option<Vec<String>>)
:The usage details of the line item in the billing report.
operations(Vec<String>)
/set_operations(Option<Vec<String>>)
:The specific AWS operation for the line item in the billing report.
filters(Vec<SavingsPlanOfferingFilterElement>)
/set_filters(Option<Vec<SavingsPlanOfferingFilterElement>>)
:The filters.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:The token for the next page of results.
max_results(i32)
/set_max_results(i32)
:The maximum number of results to return with a single call. To retrieve additional results, make another call with the returned token value.
- On success, responds with
DescribeSavingsPlansOfferingsOutput
with field(s):search_results(Option<Vec<SavingsPlanOffering>>)
:Information about the Savings Plans offerings.
next_token(Option<String>)
:The token to use to retrieve the next page of results. This value is null when there are no more results to return.
- On failure, responds with
SdkError<DescribeSavingsPlansOfferingsError>
Constructs a fluent builder for the ListTagsForResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:The Amazon Resource Name (ARN) of the resource.
- On success, responds with
ListTagsForResourceOutput
with field(s):tags(Option<HashMap<String, String>>)
:Information about the tags.
- On failure, responds with
SdkError<ListTagsForResourceError>
sourcepub fn tag_resource(&self) -> TagResource
pub fn tag_resource(&self) -> TagResource
Constructs a fluent builder for the TagResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:The Amazon Resource Name (ARN) of the resource.
tags(HashMap<String, String>)
/set_tags(Option<HashMap<String, String>>)
:One or more tags. For example, { “tags”: {“key1”:“value1”, “key2”:“value2”} }.
- On success, responds with
TagResourceOutput
- On failure, responds with
SdkError<TagResourceError>
sourcepub fn untag_resource(&self) -> UntagResource
pub fn untag_resource(&self) -> UntagResource
Constructs a fluent builder for the UntagResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:The Amazon Resource Name (ARN) of the resource.
tag_keys(Vec<String>)
/set_tag_keys(Option<Vec<String>>)
:The tag keys.
- On success, responds with
UntagResourceOutput
- On failure, responds with
SdkError<UntagResourceError>
sourceimpl Client
impl Client
sourcepub fn from_conf_conn<C, E>(conf: Config, conn: C) -> Self where
C: SmithyConnector<Error = E> + Send + 'static,
E: Into<ConnectorError>,
pub fn from_conf_conn<C, E>(conf: Config, conn: C) -> Self where
C: SmithyConnector<Error = E> + Send + 'static,
E: Into<ConnectorError>,
Creates a client with the given service config and connector override.
Trait Implementations
sourceimpl From<Client<DynConnector, DynMiddleware<DynConnector>, Standard>> for Client
impl From<Client<DynConnector, DynMiddleware<DynConnector>, Standard>> for Client
sourcefn from(client: Client<DynConnector, DynMiddleware<DynConnector>>) -> Self
fn from(client: Client<DynConnector, DynMiddleware<DynConnector>>) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more