SavingsPlansClient#
Index > SavingsPlans > SavingsPlansClient
Auto-generated documentation for SavingsPlans type annotations stubs module types-boto3-savingsplans.
SavingsPlansClient#
Type annotations and code completion for boto3.client("savingsplans").
 boto3 documentation
# SavingsPlansClient usage example
from boto3.session import Session
from types_boto3_savingsplans.client import SavingsPlansClient
def get_savingsplans_client() -> SavingsPlansClient:
    return Session().client("savingsplans")Exceptions#
boto3 client exceptions are generated in runtime.
This class provides code completion for boto3.client("savingsplans").exceptions structure.
# Exceptions.exceptions usage example
client = boto3.client("savingsplans")
try:
    do_something(client)
except (
    client.exceptions.ClientError,
    client.exceptions.InternalServerException,
    client.exceptions.ResourceNotFoundException,
    client.exceptions.ServiceQuotaExceededException,
    client.exceptions.ValidationException,
) as e:
    print(e)# Exceptions.exceptions type checking example
from types_boto3_savingsplans.client import Exceptions
def handle_error(exc: Exceptions.ClientError) -> None:
    ...Methods#
can_paginate#
Type annotations and code completion for boto3.client("savingsplans").can_paginate method.
 boto3 documentation
# can_paginate method definition
def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...generate_presigned_url#
Type annotations and code completion for boto3.client("savingsplans").generate_presigned_url method.
 boto3 documentation
# generate_presigned_url method definition
def generate_presigned_url(
    self,
    ClientMethod: str,
    Params: Mapping[str, Any] = ...,
    ExpiresIn: int = 3600,
    HttpMethod: str = ...,
) -> str:
    ...create_savings_plan#
Creates a Savings Plan.
Type annotations and code completion for boto3.client("savingsplans").create_savings_plan method.
 boto3 documentation
# create_savings_plan method definition
def create_savings_plan(
    self,
    *,
    savingsPlanOfferingId: str,
    commitment: str,
    upfrontPaymentAmount: str = ...,
    purchaseTime: TimestampTypeDef = ...,
    clientToken: str = ...,
    tags: Mapping[str, str] = ...,
) -> CreateSavingsPlanResponseTypeDef:  # (1)
    ...# create_savings_plan method usage example with argument unpacking
kwargs: CreateSavingsPlanRequestTypeDef = {  # (1)
    "savingsPlanOfferingId": ...,
    "commitment": ...,
}
parent.create_savings_plan(**kwargs)delete_queued_savings_plan#
Deletes the queued purchase for the specified Savings Plan.
Type annotations and code completion for boto3.client("savingsplans").delete_queued_savings_plan method.
 boto3 documentation
# delete_queued_savings_plan method definition
def delete_queued_savings_plan(
    self,
    *,
    savingsPlanId: str,
) -> Dict[str, Any]:
    ...# delete_queued_savings_plan method usage example with argument unpacking
kwargs: DeleteQueuedSavingsPlanRequestTypeDef = {  # (1)
    "savingsPlanId": ...,
}
parent.delete_queued_savings_plan(**kwargs)describe_savings_plan_rates#
Describes the rates for the specified Savings Plan.
Type annotations and code completion for boto3.client("savingsplans").describe_savings_plan_rates method.
 boto3 documentation
# describe_savings_plan_rates method definition
def describe_savings_plan_rates(
    self,
    *,
    savingsPlanId: str,
    filters: Sequence[SavingsPlanRateFilterTypeDef] = ...,  # (1)
    nextToken: str = ...,
    maxResults: int = ...,
) -> DescribeSavingsPlanRatesResponseTypeDef:  # (2)
    ...- See Sequence[SavingsPlanRateFilterTypeDef]
- See DescribeSavingsPlanRatesResponseTypeDef
# describe_savings_plan_rates method usage example with argument unpacking
kwargs: DescribeSavingsPlanRatesRequestTypeDef = {  # (1)
    "savingsPlanId": ...,
}
parent.describe_savings_plan_rates(**kwargs)describe_savings_plans#
Describes the specified Savings Plans.
Type annotations and code completion for boto3.client("savingsplans").describe_savings_plans method.
 boto3 documentation
# describe_savings_plans method definition
def describe_savings_plans(
    self,
    *,
    savingsPlanArns: Sequence[str] = ...,
    savingsPlanIds: Sequence[str] = ...,
    nextToken: str = ...,
    maxResults: int = ...,
    states: Sequence[SavingsPlanStateType] = ...,  # (1)
    filters: Sequence[SavingsPlanFilterTypeDef] = ...,  # (2)
) -> DescribeSavingsPlansResponseTypeDef:  # (3)
    ...- See Sequence[SavingsPlanStateType]
- See Sequence[SavingsPlanFilterTypeDef]
- See DescribeSavingsPlansResponseTypeDef
# describe_savings_plans method usage example with argument unpacking
kwargs: DescribeSavingsPlansRequestTypeDef = {  # (1)
    "savingsPlanArns": ...,
}
parent.describe_savings_plans(**kwargs)describe_savings_plans_offering_rates#
Describes the offering rates for the specified Savings Plans.
Type annotations and code completion for boto3.client("savingsplans").describe_savings_plans_offering_rates method.
 boto3 documentation
# describe_savings_plans_offering_rates method definition
def describe_savings_plans_offering_rates(
    self,
    *,
    savingsPlanOfferingIds: Sequence[str] = ...,
    savingsPlanPaymentOptions: Sequence[SavingsPlanPaymentOptionType] = ...,  # (1)
    savingsPlanTypes: Sequence[SavingsPlanTypeType] = ...,  # (2)
    products: Sequence[SavingsPlanProductTypeType] = ...,  # (3)
    serviceCodes: Sequence[SavingsPlanRateServiceCodeType] = ...,  # (4)
    usageTypes: Sequence[str] = ...,
    operations: Sequence[str] = ...,
    filters: Sequence[SavingsPlanOfferingRateFilterElementTypeDef] = ...,  # (5)
    nextToken: str = ...,
    maxResults: int = ...,
) -> DescribeSavingsPlansOfferingRatesResponseTypeDef:  # (6)
    ...- See Sequence[SavingsPlanPaymentOptionType]
- See Sequence[SavingsPlanTypeType]
- See Sequence[SavingsPlanProductTypeType]
- See Sequence[SavingsPlanRateServiceCodeType]
- See Sequence[SavingsPlanOfferingRateFilterElementTypeDef]
- See DescribeSavingsPlansOfferingRatesResponseTypeDef
# describe_savings_plans_offering_rates method usage example with argument unpacking
kwargs: DescribeSavingsPlansOfferingRatesRequestTypeDef = {  # (1)
    "savingsPlanOfferingIds": ...,
}
parent.describe_savings_plans_offering_rates(**kwargs)describe_savings_plans_offerings#
Describes the offerings for the specified Savings Plans.
Type annotations and code completion for boto3.client("savingsplans").describe_savings_plans_offerings method.
 boto3 documentation
# describe_savings_plans_offerings method definition
def describe_savings_plans_offerings(
    self,
    *,
    offeringIds: Sequence[str] = ...,
    paymentOptions: Sequence[SavingsPlanPaymentOptionType] = ...,  # (1)
    productType: SavingsPlanProductTypeType = ...,  # (2)
    planTypes: Sequence[SavingsPlanTypeType] = ...,  # (3)
    durations: Sequence[int] = ...,
    currencies: Sequence[CurrencyCodeType] = ...,  # (4)
    descriptions: Sequence[str] = ...,
    serviceCodes: Sequence[str] = ...,
    usageTypes: Sequence[str] = ...,
    operations: Sequence[str] = ...,
    filters: Sequence[SavingsPlanOfferingFilterElementTypeDef] = ...,  # (5)
    nextToken: str = ...,
    maxResults: int = ...,
) -> DescribeSavingsPlansOfferingsResponseTypeDef:  # (6)
    ...- See Sequence[SavingsPlanPaymentOptionType]
- See SavingsPlanProductTypeType
- See Sequence[SavingsPlanTypeType]
- See Sequence[CurrencyCodeType]
- See Sequence[SavingsPlanOfferingFilterElementTypeDef]
- See DescribeSavingsPlansOfferingsResponseTypeDef
# describe_savings_plans_offerings method usage example with argument unpacking
kwargs: DescribeSavingsPlansOfferingsRequestTypeDef = {  # (1)
    "offeringIds": ...,
}
parent.describe_savings_plans_offerings(**kwargs)list_tags_for_resource#
Lists the tags for the specified resource.
Type annotations and code completion for boto3.client("savingsplans").list_tags_for_resource method.
 boto3 documentation
# list_tags_for_resource method definition
def list_tags_for_resource(
    self,
    *,
    resourceArn: str,
) -> ListTagsForResourceResponseTypeDef:  # (1)
    ...# list_tags_for_resource method usage example with argument unpacking
kwargs: ListTagsForResourceRequestTypeDef = {  # (1)
    "resourceArn": ...,
}
parent.list_tags_for_resource(**kwargs)return_savings_plan#
Returns the specified Savings Plan.
Type annotations and code completion for boto3.client("savingsplans").return_savings_plan method.
 boto3 documentation
# return_savings_plan method definition
def return_savings_plan(
    self,
    *,
    savingsPlanId: str,
    clientToken: str = ...,
) -> ReturnSavingsPlanResponseTypeDef:  # (1)
    ...# return_savings_plan method usage example with argument unpacking
kwargs: ReturnSavingsPlanRequestTypeDef = {  # (1)
    "savingsPlanId": ...,
}
parent.return_savings_plan(**kwargs)tag_resource#
Adds the specified tags to the specified resource.
Type annotations and code completion for boto3.client("savingsplans").tag_resource method.
 boto3 documentation
# tag_resource method definition
def tag_resource(
    self,
    *,
    resourceArn: str,
    tags: Mapping[str, str],
) -> Dict[str, Any]:
    ...# tag_resource method usage example with argument unpacking
kwargs: TagResourceRequestTypeDef = {  # (1)
    "resourceArn": ...,
    "tags": ...,
}
parent.tag_resource(**kwargs)untag_resource#
Removes the specified tags from the specified resource.
Type annotations and code completion for boto3.client("savingsplans").untag_resource method.
 boto3 documentation
# untag_resource method definition
def untag_resource(
    self,
    *,
    resourceArn: str,
    tagKeys: Sequence[str],
) -> Dict[str, Any]:
    ...# untag_resource method usage example with argument unpacking
kwargs: UntagResourceRequestTypeDef = {  # (1)
    "resourceArn": ...,
    "tagKeys": ...,
}
parent.untag_resource(**kwargs)