ComputeOptimizerClient#
Index > ComputeOptimizer > ComputeOptimizerClient
Auto-generated documentation for ComputeOptimizer type annotations stubs module mypy-boto3-compute-optimizer.
ComputeOptimizerClient#
Type annotations and code completion for boto3.client("compute-optimizer")
.
boto3 documentation
# ComputeOptimizerClient usage example
from boto3.session import Session
from mypy_boto3_compute_optimizer.client import ComputeOptimizerClient
def get_compute-optimizer_client() -> ComputeOptimizerClient:
return Session().client("compute-optimizer")
Exceptions#
boto3
client exceptions are generated in runtime.
This class provides code completion for boto3.client("compute-optimizer").exceptions
structure.
# Exceptions.exceptions usage example
client = boto3.client("compute-optimizer")
try:
do_something(client)
except (
client.exceptions.AccessDeniedException,
client.exceptions.ClientError,
client.exceptions.InternalServerException,
client.exceptions.InvalidParameterValueException,
client.exceptions.LimitExceededException,
client.exceptions.MissingAuthenticationToken,
client.exceptions.OptInRequiredException,
client.exceptions.ResourceNotFoundException,
client.exceptions.ServiceUnavailableException,
client.exceptions.ThrottlingException,
) as e:
print(e)
# Exceptions.exceptions type checking example
from mypy_boto3_compute_optimizer.client import Exceptions
def handle_error(exc: Exceptions.AccessDeniedException) -> None:
...
Methods#
can_paginate#
Check if an operation can be paginated.
Type annotations and code completion for boto3.client("compute-optimizer").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 boto3.client("compute-optimizer").close
method.
boto3 documentation
# close method definition
def close(
self,
) -> None:
...
delete_recommendation_preferences#
Deletes a recommendation preference, such as enhanced infrastructure metrics.
Type annotations and code completion for boto3.client("compute-optimizer").delete_recommendation_preferences
method.
boto3 documentation
# delete_recommendation_preferences method definition
def delete_recommendation_preferences(
self,
*,
resourceType: ResourceTypeType, # (1)
recommendationPreferenceNames: Sequence[RecommendationPreferenceNameType], # (2)
scope: ScopeTypeDef = ..., # (3)
) -> Dict[str, Any]:
...
# delete_recommendation_preferences method usage example with argument unpacking
kwargs: DeleteRecommendationPreferencesRequestRequestTypeDef = { # (1)
"resourceType": ...,
"recommendationPreferenceNames": ...,
}
parent.delete_recommendation_preferences(**kwargs)
describe_recommendation_export_jobs#
Describes recommendation export jobs created in the last seven days.
Type annotations and code completion for boto3.client("compute-optimizer").describe_recommendation_export_jobs
method.
boto3 documentation
# describe_recommendation_export_jobs method definition
def describe_recommendation_export_jobs(
self,
*,
jobIds: Sequence[str] = ...,
filters: Sequence[JobFilterTypeDef] = ..., # (1)
nextToken: str = ...,
maxResults: int = ...,
) -> DescribeRecommendationExportJobsResponseTypeDef: # (2)
...
# describe_recommendation_export_jobs method usage example with argument unpacking
kwargs: DescribeRecommendationExportJobsRequestRequestTypeDef = { # (1)
"jobIds": ...,
}
parent.describe_recommendation_export_jobs(**kwargs)
export_auto_scaling_group_recommendations#
Exports optimization recommendations for Auto Scaling groups.
Type annotations and code completion for boto3.client("compute-optimizer").export_auto_scaling_group_recommendations
method.
boto3 documentation
# export_auto_scaling_group_recommendations method definition
def export_auto_scaling_group_recommendations(
self,
*,
s3DestinationConfig: S3DestinationConfigTypeDef, # (1)
accountIds: Sequence[str] = ...,
filters: Sequence[FilterTypeDef] = ..., # (2)
fieldsToExport: Sequence[ExportableAutoScalingGroupFieldType] = ..., # (3)
fileFormat: FileFormatType = ..., # (4)
includeMemberAccounts: bool = ...,
recommendationPreferences: RecommendationPreferencesTypeDef = ..., # (5)
) -> ExportAutoScalingGroupRecommendationsResponseTypeDef: # (6)
...
- See S3DestinationConfigTypeDef
- See FilterTypeDef
- See ExportableAutoScalingGroupFieldType
- See FileFormatType
- See RecommendationPreferencesTypeDef
- See ExportAutoScalingGroupRecommendationsResponseTypeDef
# export_auto_scaling_group_recommendations method usage example with argument unpacking
kwargs: ExportAutoScalingGroupRecommendationsRequestRequestTypeDef = { # (1)
"s3DestinationConfig": ...,
}
parent.export_auto_scaling_group_recommendations(**kwargs)
export_ebs_volume_recommendations#
Exports optimization recommendations for Amazon EBS volumes.
Type annotations and code completion for boto3.client("compute-optimizer").export_ebs_volume_recommendations
method.
boto3 documentation
# export_ebs_volume_recommendations method definition
def export_ebs_volume_recommendations(
self,
*,
s3DestinationConfig: S3DestinationConfigTypeDef, # (1)
accountIds: Sequence[str] = ...,
filters: Sequence[EBSFilterTypeDef] = ..., # (2)
fieldsToExport: Sequence[ExportableVolumeFieldType] = ..., # (3)
fileFormat: FileFormatType = ..., # (4)
includeMemberAccounts: bool = ...,
) -> ExportEBSVolumeRecommendationsResponseTypeDef: # (5)
...
- See S3DestinationConfigTypeDef
- See EBSFilterTypeDef
- See ExportableVolumeFieldType
- See FileFormatType
- See ExportEBSVolumeRecommendationsResponseTypeDef
# export_ebs_volume_recommendations method usage example with argument unpacking
kwargs: ExportEBSVolumeRecommendationsRequestRequestTypeDef = { # (1)
"s3DestinationConfig": ...,
}
parent.export_ebs_volume_recommendations(**kwargs)
export_ec2_instance_recommendations#
Exports optimization recommendations for Amazon EC2 instances.
Type annotations and code completion for boto3.client("compute-optimizer").export_ec2_instance_recommendations
method.