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

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

# Exceptions.exceptions usage example

client = boto3.client("pi")

try:
    do_something(client)
except (
    client.exceptions.ClientError,
    client.exceptions.InternalServiceError,
    client.exceptions.InvalidArgumentException,
    client.exceptions.NotAuthorizedException,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from mypy_boto3_pi.client import Exceptions

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

Methods#

can_paginate#

Type annotations and code completion for boto3.client("pi").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("pi").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_performance_analysis_report#

Creates a new performance analysis report for a specific time period for the DB instance.

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

# create_performance_analysis_report method definition

def create_performance_analysis_report(
    self,
    *,
    ServiceType: ServiceTypeType,  # (1)
    Identifier: str,
    StartTime: TimestampTypeDef,
    EndTime: TimestampTypeDef,
    Tags: Sequence[TagTypeDef] = ...,  # (2)
) -> CreatePerformanceAnalysisReportResponseTypeDef:  # (3)
    ...
  1. See ServiceTypeType
  2. See TagTypeDef
  3. See CreatePerformanceAnalysisReportResponseTypeDef
# create_performance_analysis_report method usage example with argument unpacking

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

parent.create_performance_analysis_report(**kwargs)
  1. See CreatePerformanceAnalysisReportRequestRequestTypeDef

delete_performance_analysis_report#

Deletes a performance analysis report.

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

# delete_performance_analysis_report method definition

def delete_performance_analysis_report(
    self,
    *,
    ServiceType: ServiceTypeType,  # (1)
    Identifier: str,
    AnalysisReportId: str,
) -> dict[str, Any]:
    ...
  1. See ServiceTypeType
# delete_performance_analysis_report method usage example with argument unpacking

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

parent.delete_performance_analysis_report(**kwargs)
  1. See DeletePerformanceAnalysisReportRequestRequestTypeDef

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

# describe_dimension_keys method definition

def describe_dimension_keys(
    self,
    *,
    ServiceType: ServiceTypeType,  # (1)
    Identifier: str,
    StartTime: TimestampTypeDef,
    EndTime: TimestampTypeDef,
    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

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

# get_dimension_key_details 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
# 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_performance_analysis_report#

Retrieves the report including the report ID, status, time details, and the insights with recommendations.

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

# get_performance_analysis_report method definition

def get_performance_analysis_report(
    self,
    *,
    ServiceType: ServiceTypeType,  # (1)
    Identifier: str,
    AnalysisReportId: str,
    TextFormat: TextFormatType = ...,  # (2)
    AcceptLanguage: AcceptLanguageType = ...,  # (3)
) -> GetPerformanceAnalysisReportResponseTypeDef:  # (4)
    ...
  1. See ServiceTypeType
  2. See TextFormatType
  3. See AcceptLanguageType
  4. See GetPerformanceAnalysisReportResponseTypeDef
# get_performance_analysis_report method usage example with argument unpacking

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

parent.get_performance_analysis_report(**kwargs)
  1. See GetPerformanceAnalysisReportRequestRequestTypeDef

get_resource_metadata#

Retrieve the metadata for different features.

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

# get_resource_metadata method definition

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

# get_resource_metrics method definition

def get_resource_metrics(
    self,
    *,
    ServiceType: ServiceTypeType,  # (1)
    Identifier: str,
    MetricQueries: Sequence[MetricQueryTypeDef],  # (2)
    StartTime: TimestampTypeDef,
    EndTime: TimestampTypeDef,
    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 boto3.client("pi").list_available_resource_dimensions method. boto3 documentation

# list_available_resource_dimensions method definition

def list_available_resource_dimensions(
    self,
    *,
    ServiceType: ServiceTypeType,  # (1)
    Identifier: str,
    Metrics: Sequence[str],
    MaxResults: int = ...,
    NextToken: str = ...,
    AuthorizedActions: Sequence[FineGrainedActionType] = ...,  # (2)
) -> ListAvailableResourceDimensionsResponseTypeDef:  # (3)
    ...
  1. See ServiceTypeType
  2. See FineGrainedActionType
  3. 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 boto3.client("pi").list_available_resource_metrics method. boto3 documentation

# list_available_resource_metrics 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
# 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

list_performance_analysis_reports#

Lists all the analysis reports created for the DB instance.

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

# list_performance_analysis_reports method definition

def list_performance_analysis_reports(
    self,
    *,
    ServiceType: ServiceTypeType,  # (1)
    Identifier: str,
    NextToken: str = ...,
    MaxResults: int = ...,
    ListTags: bool = ...,
) -> ListPerformanceAnalysisReportsResponseTypeDef:  # (2)
    ...
  1. See ServiceTypeType
  2. See ListPerformanceAnalysisReportsResponseTypeDef
# list_performance_analysis_reports method usage example with argument unpacking

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

parent.list_performance_analysis_reports(**kwargs)
  1. See ListPerformanceAnalysisReportsRequestRequestTypeDef

list_tags_for_resource#

Retrieves all the metadata tags associated with Amazon RDS Performance Insights resource.

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

# list_tags_for_resource method definition

def list_tags_for_resource(
    self,
    *,
    ServiceType: ServiceTypeType,  # (1)
    ResourceARN: str,
) -> ListTagsForResourceResponseTypeDef:  # (2)
    ...
  1. See ServiceTypeType
  2. See ListTagsForResourceResponseTypeDef
# list_tags_for_resource method usage example with argument unpacking

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

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

tag_resource#

Adds metadata tags to the Amazon RDS Performance Insights resource.

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

# tag_resource method definition

def tag_resource(
    self,
    *,
    ServiceType: ServiceTypeType,  # (1)
    ResourceARN: str,
    Tags: Sequence[TagTypeDef],  # (2)
) -> dict[str, Any]:
    ...
  1. See ServiceTypeType
  2. See TagTypeDef
# tag_resource method usage example with argument unpacking

kwargs: TagResourceRequestRequestTypeDef = {  # (1)
    "ServiceType": ...,
    "ResourceARN": ...,
    "Tags": ...,
}

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

untag_resource#

Deletes the metadata tags from the Amazon RDS Performance Insights resource.

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

# untag_resource method definition

def untag_resource(
    self,
    *,
    ServiceType: ServiceTypeType,  # (1)
    ResourceARN: str,
    TagKeys: Sequence[str],
) -> dict[str, Any]:
    ...
  1. See ServiceTypeType
# untag_resource method usage example with argument unpacking

kwargs: UntagResourceRequestRequestTypeDef = {  # (1)
    "ServiceType": ...,
    "ResourceARN": ...,
    "TagKeys": ...,
}

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