Skip to content

SavingsPlansClient

Index > SavingsPlans > SavingsPlansClient

Auto-generated documentation for SavingsPlans type annotations stubs module mypy-boto3-savingsplans.

SavingsPlansClient

Type annotations and code completion for boto3.client("savingsplans"). boto3 documentation

Usage example
from boto3.session import Session
from mypy_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.

Usage example
client = boto3.client("savingsplans")

try:
    do_something(client)
except (
    client.ClientError,
    client.InternalServerException,
    client.ResourceNotFoundException,
    client.ServiceQuotaExceededException,
    client.ValidationException,
) as e:
    print(e)
Type checking example
from mypy_boto3_savingsplans.client import Exceptions

def handle_error(exc: Exceptions.ClientError) -> None:
    ...

Methods

can_paginate

Check if an operation can be paginated.

Type annotations and code completion for boto3.client("savingsplans").can_paginate method. boto3 documentation

Method definition
def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

close

Closes underlying endpoint connections.

Type annotations and code completion for boto3.client("savingsplans").close method. boto3 documentation

Method definition
def close(
    self,
) -> None:
    ...

create_savings_plan

Creates a Savings Plan.

Type annotations and code completion for boto3.client("savingsplans").create_savings_plan method. boto3 documentation

Method definition
def create_savings_plan(
    self,
    *,
    savingsPlanOfferingId: str,
    commitment: str,
    upfrontPaymentAmount: str = ...,
    purchaseTime: Union[datetime, str] = ...,
    clientToken: str = ...,
    tags: Mapping[str, str] = ...,
) -> CreateSavingsPlanResponseTypeDef:  # (1)
    ...
  1. See CreateSavingsPlanResponseTypeDef
Usage example with kwargs
kwargs: CreateSavingsPlanRequestRequestTypeDef = {  # (1)
    "savingsPlanOfferingId": ...,
    "commitment": ...,
}

parent.create_savings_plan(**kwargs)
  1. See CreateSavingsPlanRequestRequestTypeDef

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

Method definition
def delete_queued_savings_plan(
    self,
    *,
    savingsPlanId: str,
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: DeleteQueuedSavingsPlanRequestRequestTypeDef = {  # (1)
    "savingsPlanId": ...,
}

parent.delete_queued_savings_plan(**kwargs)
  1. See DeleteQueuedSavingsPlanRequestRequestTypeDef

describe_savings_plan_rates

Describes the specified Savings Plans rates.

Type annotations and code completion for boto3.client("savingsplans").describe_savings_plan_rates method. boto3 documentation

Method definition
def describe_savings_plan_rates(
    self,
    *,
    savingsPlanId: str,
    filters: Sequence[SavingsPlanRateFilterTypeDef] = ...,  # (1)
    nextToken: str = ...,
    maxResults: int = ...,
) -> DescribeSavingsPlanRatesResponseTypeDef:  # (2)
    ...
  1. See SavingsPlanRateFilterTypeDef
  2. See DescribeSavingsPlanRatesResponseTypeDef
Usage example with kwargs
kwargs: DescribeSavingsPlanRatesRequestRequestTypeDef = {  # (1)
    "savingsPlanId": ...,
}

parent.describe_savings_plan_rates(**kwargs)
  1. See DescribeSavingsPlanRatesRequestRequestTypeDef

describe_savings_plans

Describes the specified Savings Plans.

Type annotations and code completion for boto3.client("savingsplans").describe_savings_plans method. boto3 documentation

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)
    ...
  1. See SavingsPlanStateType
  2. See SavingsPlanFilterTypeDef
  3. See DescribeSavingsPlansResponseTypeDef
Usage example with kwargs
kwargs: DescribeSavingsPlansRequestRequestTypeDef = {  # (1)
    "savingsPlanArns": ...,
}

parent.describe_savings_plans(**kwargs)
  1. See DescribeSavingsPlansRequestRequestTypeDef

describe_savings_plans_offering_rates

Describes the specified Savings Plans offering rates.

Type annotations and code completion for boto3.client("savingsplans").describe_savings_plans_offering_rates method. boto3 documentation

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)
    ...
  1. See SavingsPlanPaymentOptionType
  2. See SavingsPlanTypeType
  3. See SavingsPlanProductTypeType
  4. See SavingsPlanRateServiceCodeType
  5. See SavingsPlanOfferingRateFilterElementTypeDef
  6. See DescribeSavingsPlansOfferingRatesResponseTypeDef
Usage example with kwargs
kwargs: DescribeSavingsPlansOfferingRatesRequestRequestTypeDef = {  # (1)
    "savingsPlanOfferingIds": ...,
}

parent.describe_savings_plans_offering_rates(**kwargs)
  1. See DescribeSavingsPlansOfferingRatesRequestRequestTypeDef

describe_savings_plans_offerings

Describes the specified Savings Plans offerings.

Type annotations and code completion for boto3.client("savingsplans").describe_savings_plans_offerings method. boto3 documentation

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)
    ...
  1. See SavingsPlanPaymentOptionType
  2. See SavingsPlanProductTypeType
  3. See SavingsPlanTypeType
  4. See CurrencyCodeType
  5. See SavingsPlanOfferingFilterElementTypeDef
  6. See DescribeSavingsPlansOfferingsResponseTypeDef
Usage example with kwargs
kwargs: DescribeSavingsPlansOfferingsRequestRequestTypeDef = {  # (1)
    "offeringIds": ...,
}

parent.describe_savings_plans_offerings(**kwargs)
  1. See DescribeSavingsPlansOfferingsRequestRequestTypeDef

generate_presigned_url

Generate a presigned url given a client, its method, and arguments.

Type annotations and code completion for boto3.client("savingsplans").generate_presigned_url method. boto3 documentation

Method definition
def generate_presigned_url(
    self,
    ClientMethod: str,
    Params: Mapping[str, Any] = ...,
    ExpiresIn: int = 3600,
    HttpMethod: str = ...,
) -> str:
    ...

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

Method definition
def list_tags_for_resource(
    self,
    *,
    resourceArn: str,
) -> ListTagsForResourceResponseTypeDef:  # (1)
    ...
  1. See ListTagsForResourceResponseTypeDef
Usage example with kwargs
kwargs: ListTagsForResourceRequestRequestTypeDef = {  # (1)
    "resourceArn": ...,
}

parent.list_tags_for_resource(**kwargs)
  1. See ListTagsForResourceRequestRequestTypeDef

tag_resource

Adds the specified tags to the specified resource.

Type annotations and code completion for boto3.client("savingsplans").tag_resource method. boto3 documentation

Method definition
def tag_resource(
    self,
    *,
    resourceArn: str,
    tags: Mapping[str, str],
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: TagResourceRequestRequestTypeDef = {  # (1)
    "resourceArn": ...,
    "tags": ...,
}

parent.tag_resource(**kwargs)
  1. See TagResourceRequestRequestTypeDef

untag_resource

Removes the specified tags from the specified resource.

Type annotations and code completion for boto3.client("savingsplans").untag_resource method. boto3 documentation

Method definition
def untag_resource(
    self,
    *,
    resourceArn: str,
    tagKeys: Sequence[str],
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: UntagResourceRequestRequestTypeDef = {  # (1)
    "resourceArn": ...,
    "tagKeys": ...,
}

parent.untag_resource(**kwargs)
  1. See UntagResourceRequestRequestTypeDef