Skip to content

PIClient#

Index > PI > PIClient

Auto-generated documentation for PI type annotations stubs module types-aiobotocore-pi.

PIClient#

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

PIClient usage example

from aiobotocore.session import get_session
from types_aiobotocore_pi.client import PIClient

session = get_session()
async with session.create_client("pi") as client:
    client: PIClient

Exceptions#

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

PIClient.exceptions usage example

async with session.create_client("pi") as client:
    try:
        do_something(client)
    except (
            client.ClientError,
        client.InternalServiceError,
        client.InvalidArgumentException,
        client.NotAuthorizedException,
    ) as e:
        print(e)
PIClient usage type checking example

from types_aiobotocore_pi.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("pi").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("pi").close method. boto3 documentation

# close method definition

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

describe_dimension_keys#

For a specific time period, retrieve the top N dimension keys for a metric.

Type annotations and code completion for session.create_client("pi").describe_dimension_keys method. boto3 documentation

# describe_dimension_keys method definition

await def describe_dimension_keys(
    self,
    *,
    ServiceType: ServiceTypeType,  # (1)
    Identifier: str,
    StartTime: Union[datetime, str],
    EndTime: Union[datetime, str],
    Metric: str,
    GroupBy: DimensionGroupTypeDef,  # (2)
    PeriodInSeconds: int = ...,
    AdditionalMetrics: Sequence[str] = ...,
    PartitionBy: DimensionGroupTypeDef = ...,  # (2)
    Filter: Mapping[str, str] = ...,
    MaxResults: int = ...,
    NextToken: str = ...,
) -> DescribeDimensionKeysResponseTypeDef:  # (4)
    ...
  1. See ServiceTypeType
  2. See DimensionGroupTypeDef
  3. See DimensionGroupTypeDef
  4. See DescribeDimensionKeysResponseTypeDef
# describe_dimension_keys method usage example with argument unpacking

kwargs: DescribeDimensionKeysRequestRequestTypeDef = {  # (1)
    "ServiceType": ...,
    "Identifier": ...,
    "StartTime": ...,
    "EndTime": ...,
    "Metric": ...,
    "GroupBy": ...,
}

parent.describe_dimension_keys(**kwargs)
  1. See DescribeDimensionKeysRequestRequestTypeDef

generate_presigned_url#

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

Type annotations and code completion for session.create_client("pi").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:
    ...

get_dimension_key_details#

Get the attributes of the specified dimension group for a DB instance or data source.

Type annotations and code completion for session.create_client("pi").get_dimension_key_details method. boto3 documentation

# get_dimension_key_details method definition

await def get_dimension_key_details(
    self,
    *,
    ServiceType: ServiceTypeType,  # (1)
    Identifier: str,
    Group: str,
    GroupIdentifier: str,
    RequestedDimensions: Sequence[str] = ...,
) -> GetDimensionKeyDetailsResponseTypeDef:  # (2)
    ...
  1. See ServiceTypeType
  2. See GetDimensionKeyDetailsResponseTypeDef
# get_dimension_key_details method usage example with argument unpacking

kwargs: GetDimensionKeyDetailsRequestRequestTypeDef = {  # (1)
    "ServiceType": ...,
    "Identifier": ...,
    "Group": ...,
    "GroupIdentifier": ...,
}

parent.get_dimension_key_details(**kwargs)
  1. See GetDimensionKeyDetailsRequestRequestTypeDef

get_resource_metadata#

Retrieve the metadata for different features.

Type annotations and code completion for session.create_client("pi").get_resource_metadata method. boto3 documentation

# get_resource_metadata method definition

await def get_resource_metadata(
    self,
    *,
    ServiceType: ServiceTypeType,  # (1)
    Identifier: str,
) -> GetResourceMetadataResponseTypeDef:  # (2)
    ...
  1. See ServiceTypeType
  2. See GetResourceMetadataResponseTypeDef
# get_resource_metadata method usage example with argument unpacking

kwargs: GetResourceMetadataRequestRequestTypeDef = {  # (1)
    "ServiceType": ...,
    "Identifier": ...,
}

parent.get_resource_metadata(**kwargs)
  1. See GetResourceMetadataRequestRequestTypeDef

get_resource_metrics#

Retrieve Performance Insights metrics for a set of data sources over a time period.

Type annotations and code completion for session.create_client("pi").get_resource_metrics method. boto3 documentation

# get_resource_metrics method definition

await def get_resource_metrics(
    self,
    *,
    ServiceType: ServiceTypeType,  # (1)
    Identifier: str,
    MetricQueries: Sequence[MetricQueryTypeDef],  # (2)
    StartTime: Union[datetime, str],
    EndTime: Union[datetime, str],
    PeriodInSeconds: int = ...,
    MaxResults: int = ...,
    NextToken: str = ...,
    PeriodAlignment: PeriodAlignmentType = ...,  # (3)
) -> GetResourceMetricsResponseTypeDef:  # (4)
    ...
  1. See ServiceTypeType
  2. See MetricQueryTypeDef
  3. See PeriodAlignmentType
  4. See GetResourceMetricsResponseTypeDef
# get_resource_metrics method usage example with argument unpacking

kwargs: GetResourceMetricsRequestRequestTypeDef = {  # (1)
    "ServiceType": ...,
    "Identifier": ...,
    "MetricQueries": ...,
    "StartTime": ...,
    "EndTime": ...,
}

parent.get_resource_metrics(**kwargs)
  1. See GetResourceMetricsRequestRequestTypeDef

list_available_resource_dimensions#

Retrieve the dimensions that can be queried for each specified metric type on a specified DB instance.

Type annotations and code completion for session.create_client("pi").list_available_resource_dimensions method. boto3 documentation

# list_available_resource_dimensions method definition

await def list_available_resource_dimensions(
    self,
    *,
    ServiceType: ServiceTypeType,  # (1)
    Identifier: str,
    Metrics: Sequence[str],
    MaxResults: int = ...,
    NextToken: str = ...,
) -> ListAvailableResourceDimensionsResponseTypeDef:  # (2)
    ...
  1. See ServiceTypeType
  2. See ListAvailableResourceDimensionsResponseTypeDef
# list_available_resource_dimensions method usage example with argument unpacking

kwargs: ListAvailableResourceDimensionsRequestRequestTypeDef = {  # (1)
    "ServiceType": ...,
    "Identifier": ...,
    "Metrics": ...,
}

parent.list_available_resource_dimensions(**kwargs)
  1. See ListAvailableResourceDimensionsRequestRequestTypeDef

list_available_resource_metrics#

Retrieve metrics of the specified types that can be queried for a specified DB instance.

Type annotations and code completion for session.create_client("pi").list_available_resource_metrics method. boto3 documentation

# list_available_resource_metrics method definition

await def list_available_resource_metrics(
    self,
    *,
    ServiceType: ServiceTypeType,  # (1)
    Identifier: str,
    MetricTypes: Sequence[str],
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListAvailableResourceMetricsResponseTypeDef:  # (2)
    ...
  1. See ServiceTypeType
  2. See ListAvailableResourceMetricsResponseTypeDef
# list_available_resource_metrics method usage example with argument unpacking

kwargs: ListAvailableResourceMetricsRequestRequestTypeDef = {  # (1)
    "ServiceType": ...,
    "Identifier": ...,
    "MetricTypes": ...,
}

parent.list_available_resource_metrics(**kwargs)
  1. See ListAvailableResourceMetricsRequestRequestTypeDef

__aenter__#

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

# __aenter__ method definition

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

__aexit__#

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

# __aexit__ method definition

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