Skip to content

PIClient

Index > PI > PIClient

Auto-generated documentation for PI type annotations stubs module mypy-boto3-pi.

PIClient

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

Usage example
from boto3.session import Session
from mypy_boto3_pi.client import PIClient

def get_pi_client() -> PIClient:
    return Session().client("pi")

Exceptions

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

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

try:
    do_something(client)
except (
    client.ClientError,
    client.InternalServiceError,
    client.InvalidArgumentException,
    client.NotAuthorizedException,
) as e:
    print(e)
Type checking example
from mypy_boto3_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 boto3.client("pi").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("pi").close method. boto3 documentation

Method definition
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 boto3.client("pi").describe_dimension_keys method. boto3 documentation

Method definition
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
Usage example with kwargs
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 boto3.client("pi").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:
    ...

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 boto3.client("pi").get_dimension_key_details method. boto3 documentation

Method definition
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
Usage example with kwargs
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 boto3.client("pi").get_resource_metadata method. boto3 documentation

Method definition
def get_resource_metadata(
    self,
    *,
    ServiceType: ServiceTypeType,  # (1)
    Identifier: str,
) -> GetResourceMetadataResponseTypeDef:  # (2)
    ...
  1. See ServiceTypeType
  2. See GetResourceMetadataResponseTypeDef
Usage example with kwargs
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 boto3.client("pi").get_resource_metrics method. boto3 documentation

Method definition
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
Usage example with kwargs
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 boto3.client("pi").list_available_resource_dimensions method. boto3 documentation

Method definition
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
Usage example with kwargs
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 boto3.client("pi").list_available_resource_metrics method. boto3 documentation

Method definition
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
Usage example with kwargs
kwargs: ListAvailableResourceMetricsRequestRequestTypeDef = {  # (1)
    "ServiceType": ...,
    "Identifier": ...,
    "MetricTypes": ...,
}

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