Skip to content

SavingsPlansClient#

Index > SavingsPlans > SavingsPlansClient

Auto-generated documentation for SavingsPlans type annotations stubs module types-aiobotocore-savingsplans.

SavingsPlansClient#

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

SavingsPlansClient usage example

from aiobotocore.session import get_session
from types_aiobotocore_savingsplans.client import SavingsPlansClient

session = get_session()
async with session.create_client("savingsplans") as client:
    client: SavingsPlansClient

Exceptions#

aiobotocore client exceptions are generated in runtime. This class provides code completion for session.create_client("savingsplans").exceptions structure.

SavingsPlansClient.exceptions usage example

async with session.create_client("savingsplans") as client:
    try:
        do_something(client)
    except (
            client.ClientError,
        client.InternalServerException,
        client.ResourceNotFoundException,
        client.ServiceQuotaExceededException,
        client.ValidationException,
    ) as e:
        print(e)
SavingsPlansClient usage type checking example

from types_aiobotocore_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 session.create_client("savingsplans").can_paginate method. boto3 documentation

# can_paginate method definition

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

close#

Closes underlying endpoint connections.

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

# close method definition

await def close(
    self,
) -> None:
    ...

create_savings_plan#

Creates a Savings Plan.

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

# create_savings_plan method definition

await 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
# 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 session.create_client("savingsplans").delete_queued_savings_plan method. boto3 documentation

# delete_queued_savings_plan method definition

await 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 specified Savings Plans rates.

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

# describe_savings_plan_rates method definition

await 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 session.create_client("savingsplans").describe_savings_plans method. boto3 documentation

# describe_savings_plans method definition

await 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 specified Savings Plans offering rates.

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

# describe_savings_plans_offering_rates method definition

await 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 specified Savings Plans offerings.

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

# describe_savings_plans_offerings method definition

await 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

generate_presigned_url#

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

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

# generate_presigned_url method definition

await 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 session.create_client("savingsplans").list_tags_for_resource method. boto3 documentation

# list_tags_for_resource method definition

await 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

tag_resource#

Adds the specified tags to the specified resource.

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

# tag_resource method definition

await 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 session.create_client("savingsplans").untag_resource method. boto3 documentation

# untag_resource method definition

await 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

__aenter__#

Type annotations and code completion for session.create_client("savingsplans").__aenter__ method. boto3 documentation

# __aenter__ method definition

await def __aenter__(
    self,
) -> SavingsPlansClient:
    ...

__aexit__#

Type annotations and code completion for session.create_client("savingsplans").__aexit__ method. boto3 documentation

# __aexit__ method definition

await def __aexit__(
    self,
    exc_type: Any,
    exc_val: Any,
    exc_tb: Any,
) -> Any:
    ...