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

# SavingsPlansClient 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.

# 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 mypy_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)
    ...
  1. See CreateSavingsPlanResponseTypeDef
# create_savings_plan method usage example with argument unpacking

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

# 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: DeleteQueuedSavingsPlanRequestRequestTypeDef = {  # (1)
    "savingsPlanId": ...,
}

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

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)
    ...
  1. See SavingsPlanRateFilterTypeDef
  2. See DescribeSavingsPlanRatesResponseTypeDef
# describe_savings_plan_rates method usage example with argument unpacking

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

# 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)
    ...
  1. See SavingsPlanStateType
  2. See SavingsPlanFilterTypeDef
  3. See DescribeSavingsPlansResponseTypeDef
# describe_savings_plans method usage example with argument unpacking

kwargs: DescribeSavingsPlansRequestRequestTypeDef = {  # (1)
    "savingsPlanArns": ...,
}

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

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)
    ...
  1. See SavingsPlanPaymentOptionType
  2. See SavingsPlanTypeType
  3. See SavingsPlanProductTypeType
  4. See SavingsPlanRateServiceCodeType
  5. See SavingsPlanOfferingRateFilterElementTypeDef
  6. See DescribeSavingsPlansOfferingRatesResponseTypeDef
# describe_savings_plans_offering_rates method usage example with argument unpacking

kwargs: DescribeSavingsPlansOfferingRatesRequestRequestTypeDef = {  # (1)
    "savingsPlanOfferingIds": ...,
}

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

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)
    ...
  1. See SavingsPlanPaymentOptionType
  2. See SavingsPlanProductTypeType
  3. See SavingsPlanTypeType
  4. See CurrencyCodeType
  5. See SavingsPlanOfferingFilterElementTypeDef
  6. See DescribeSavingsPlansOfferingsResponseTypeDef
# describe_savings_plans_offerings method usage example with argument unpacking

kwargs: DescribeSavingsPlansOfferingsRequestRequestTypeDef = {  # (1)
    "offeringIds": ...,
}

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

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)
    ...
  1. See ListTagsForResourceResponseTypeDef
# list_tags_for_resource method usage example with argument unpacking

kwargs: ListTagsForResourceRequestRequestTypeDef = {  # (1)
    "resourceArn": ...,
}

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

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)
    ...
  1. See ReturnSavingsPlanResponseTypeDef
# return_savings_plan method usage example with argument unpacking

kwargs: ReturnSavingsPlanRequestRequestTypeDef = {  # (1)
    "savingsPlanId": ...,
}

parent.return_savings_plan(**kwargs)
  1. See ReturnSavingsPlanRequestRequestTypeDef

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: 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

# 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: UntagResourceRequestRequestTypeDef = {  # (1)
    "resourceArn": ...,
    "tagKeys": ...,
}

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