Skip to content

ComputeOptimizerClient#

Index > ComputeOptimizer > ComputeOptimizerClient

Auto-generated documentation for ComputeOptimizer type annotations stubs module types-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 types_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 types_boto3_compute_optimizer.client import Exceptions

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

Methods#

can_paginate#

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:
    ...

generate_presigned_url#

Type annotations and code completion for boto3.client("compute-optimizer").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:
    ...

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]:
    ...
  1. See ResourceTypeType
  2. See RecommendationPreferenceNameType
  3. See ScopeTypeDef
# delete_recommendation_preferences method usage example with argument unpacking

kwargs: DeleteRecommendationPreferencesRequestRequestTypeDef = {  # (1)
    "resourceType": ...,
    "recommendationPreferenceNames": ...,
}

parent.delete_recommendation_preferences(**kwargs)
  1. See DeleteRecommendationPreferencesRequestRequestTypeDef

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)
    ...
  1. See JobFilterTypeDef
  2. See DescribeRecommendationExportJobsResponseTypeDef
# describe_recommendation_export_jobs method usage example with argument unpacking

kwargs: DescribeRecommendationExportJobsRequestRequestTypeDef = {  # (1)
    "jobIds": ...,
}

parent.describe_recommendation_export_jobs(**kwargs)
  1. See DescribeRecommendationExportJobsRequestRequestTypeDef

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)
    ...
  1. See S3DestinationConfigTypeDef
  2. See FilterTypeDef
  3. See ExportableAutoScalingGroupFieldType
  4. See FileFormatType
  5. See RecommendationPreferencesTypeDef
  6. See ExportAutoScalingGroupRecommendationsResponseTypeDef
# export_auto_scaling_group_recommendations method usage example with argument unpacking

kwargs: ExportAutoScalingGroupRecommendationsRequestRequestTypeDef = {  # (1)
    "s3DestinationConfig": ...,
}

parent.export_auto_scaling_group_recommendations(**kwargs)
  1. See ExportAutoScalingGroupRecommendationsRequestRequestTypeDef

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)
    ...
  1. See S3DestinationConfigTypeDef
  2. See EBSFilterTypeDef
  3. See ExportableVolumeFieldType
  4. See FileFormatType
  5. See ExportEBSVolumeRecommendationsResponseTypeDef
# export_ebs_volume_recommendations method usage example with argument unpacking

kwargs: ExportEBSVolumeRecommendationsRequestRequestTypeDef = {  # (1)
    "s3DestinationConfig": ...,
}

parent.export_ebs_volume_recommendations(**kwargs)
  1. See ExportEBSVolumeRecommendationsRequestRequestTypeDef

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. boto3 documentation

# export_ec2_instance_recommendations method definition

def export_ec2_instance_recommendations(
    self,
    *,
    s3DestinationConfig: S3DestinationConfigTypeDef,  # (1)
    accountIds: Sequence[str] = ...,
    filters: Sequence[FilterTypeDef] = ...,  # (2)
    fieldsToExport: Sequence[ExportableInstanceFieldType] = ...,  # (3)
    fileFormat: FileFormatType = ...,  # (4)
    includeMemberAccounts: bool = ...,
    recommendationPreferences: RecommendationPreferencesTypeDef = ...,  # (5)
) -> ExportEC2InstanceRecommendationsResponseTypeDef:  # (6)
    ...
  1. See S3DestinationConfigTypeDef
  2. See FilterTypeDef
  3. See ExportableInstanceFieldType
  4. See FileFormatType
  5. See RecommendationPreferencesTypeDef
  6. See ExportEC2InstanceRecommendationsResponseTypeDef
# export_ec2_instance_recommendations method usage example with argument unpacking

kwargs: ExportEC2InstanceRecommendationsRequestRequestTypeDef = {  # (1)
    "s3DestinationConfig": ...,
}

parent.export_ec2_instance_recommendations(**kwargs)
  1. See ExportEC2InstanceRecommendationsRequestRequestTypeDef

export_ecs_service_recommendations#

Exports optimization recommendations for Amazon ECS services on Fargate.

Type annotations and code completion for boto3.client("compute-optimizer").export_ecs_service_recommendations method. boto3 documentation

# export_ecs_service_recommendations method definition

def export_ecs_service_recommendations(
    self,
    *,
    s3DestinationConfig: S3DestinationConfigTypeDef,  # (1)
    accountIds: Sequence[str] = ...,
    filters: Sequence[ECSServiceRecommendationFilterTypeDef] = ...,  # (2)
    fieldsToExport: Sequence[ExportableECSServiceFieldType] = ...,  # (3)
    fileFormat: FileFormatType = ...,  # (4)
    includeMemberAccounts: bool = ...,
) -> ExportECSServiceRecommendationsResponseTypeDef:  # (5)
    ...
  1. See S3DestinationConfigTypeDef
  2. See ECSServiceRecommendationFilterTypeDef
  3. See ExportableECSServiceFieldType
  4. See FileFormatType
  5. See ExportECSServiceRecommendationsResponseTypeDef
# export_ecs_service_recommendations method usage example with argument unpacking

kwargs: ExportECSServiceRecommendationsRequestRequestTypeDef = {  # (1)
    "s3DestinationConfig": ...,
}

parent.export_ecs_service_recommendations(**kwargs)
  1. See ExportECSServiceRecommendationsRequestRequestTypeDef

export_idle_recommendations#

Export optimization recommendations for your idle resources.

Type annotations and code completion for boto3.client("compute-optimizer").export_idle_recommendations method. boto3 documentation

# export_idle_recommendations method definition

def export_idle_recommendations(
    self,
    *,
    s3DestinationConfig: S3DestinationConfigTypeDef,  # (1)
    accountIds: Sequence[str] = ...,
    filters: Sequence[IdleRecommendationFilterTypeDef] = ...,  # (2)
    fieldsToExport: Sequence[ExportableIdleFieldType] = ...,  # (3)
    fileFormat: FileFormatType = ...,  # (4)
    includeMemberAccounts: bool = ...,
) -> ExportIdleRecommendationsResponseTypeDef:  # (5)
    ...
  1. See S3DestinationConfigTypeDef
  2. See IdleRecommendationFilterTypeDef
  3. See ExportableIdleFieldType
  4. See FileFormatType
  5. See ExportIdleRecommendationsResponseTypeDef
# export_idle_recommendations method usage example with argument unpacking

kwargs: ExportIdleRecommendationsRequestRequestTypeDef = {  # (1)
    "s3DestinationConfig": ...,
}

parent.export_idle_recommendations(**kwargs)
  1. See ExportIdleRecommendationsRequestRequestTypeDef

export_lambda_function_recommendations#

Exports optimization recommendations for Lambda functions.

Type annotations and code completion for boto3.client("compute-optimizer").export_lambda_function_recommendations method. boto3 documentation

# export_lambda_function_recommendations method definition

def export_lambda_function_recommendations(
    self,
    *,
    s3DestinationConfig: S3DestinationConfigTypeDef,  # (1)
    accountIds: Sequence[str] = ...,
    filters: Sequence[LambdaFunctionRecommendationFilterTypeDef] = ...,  # (2)
    fieldsToExport: Sequence[ExportableLambdaFunctionFieldType] = ...,  # (3)
    fileFormat: FileFormatType = ...,  # (4)
    includeMemberAccounts: bool = ...,
) -> ExportLambdaFunctionRecommendationsResponseTypeDef:  # (5)
    ...
  1. See S3DestinationConfigTypeDef
  2. See LambdaFunctionRecommendationFilterTypeDef
  3. See ExportableLambdaFunctionFieldType
  4. See FileFormatType
  5. See ExportLambdaFunctionRecommendationsResponseTypeDef
# export_lambda_function_recommendations method usage example with argument unpacking

kwargs: ExportLambdaFunctionRecommendationsRequestRequestTypeDef = {  # (1)
    "s3DestinationConfig": ...,
}

parent.export_lambda_function_recommendations(**kwargs)
  1. See ExportLambdaFunctionRecommendationsRequestRequestTypeDef

export_license_recommendations#

Export optimization recommendations for your licenses.

Type annotations and code completion for boto3.client("compute-optimizer").export_license_recommendations method. boto3 documentation

# export_license_recommendations method definition

def export_license_recommendations(
    self,
    *,
    s3DestinationConfig: S3DestinationConfigTypeDef,  # (1)
    accountIds: Sequence[str] = ...,
    filters: Sequence[LicenseRecommendationFilterTypeDef] = ...,  # (2)
    fieldsToExport: Sequence[ExportableLicenseFieldType] = ...,  # (3)
    fileFormat: FileFormatType = ...,  # (4)
    includeMemberAccounts: bool = ...,
) -> ExportLicenseRecommendationsResponseTypeDef:  # (5)
    ...
  1. See S3DestinationConfigTypeDef
  2. See LicenseRecommendationFilterTypeDef
  3. See ExportableLicenseFieldType
  4. See FileFormatType
  5. See ExportLicenseRecommendationsResponseTypeDef
# export_license_recommendations method usage example with argument unpacking

kwargs: ExportLicenseRecommendationsRequestRequestTypeDef = {  # (1)
    "s3DestinationConfig": ...,
}

parent.export_license_recommendations(**kwargs)
  1. See ExportLicenseRecommendationsRequestRequestTypeDef

export_rds_database_recommendations#

Export optimization recommendations for your Amazon Relational Database Service (Amazon RDS).

Type annotations and code completion for boto3.client("compute-optimizer").export_rds_database_recommendations method. boto3 documentation

# export_rds_database_recommendations method definition

def export_rds_database_recommendations(
    self,
    *,
    s3DestinationConfig: S3DestinationConfigTypeDef,  # (1)
    accountIds: Sequence[str] = ...,
    filters: Sequence[RDSDBRecommendationFilterTypeDef] = ...,  # (2)
    fieldsToExport: Sequence[ExportableRDSDBFieldType] = ...,  # (3)
    fileFormat: FileFormatType = ...,  # (4)
    includeMemberAccounts: bool = ...,
    recommendationPreferences: RecommendationPreferencesTypeDef = ...,  # (5)
) -> ExportRDSDatabaseRecommendationsResponseTypeDef:  # (6)
    ...
  1. See S3DestinationConfigTypeDef
  2. See RDSDBRecommendationFilterTypeDef
  3. See ExportableRDSDBFieldType
  4. See FileFormatType
  5. See RecommendationPreferencesTypeDef
  6. See ExportRDSDatabaseRecommendationsResponseTypeDef
# export_rds_database_recommendations method usage example with argument unpacking

kwargs: ExportRDSDatabaseRecommendationsRequestRequestTypeDef = {  # (1)
    "s3DestinationConfig": ...,
}

parent.export_rds_database_recommendations(**kwargs)
  1. See ExportRDSDatabaseRecommendationsRequestRequestTypeDef

get_auto_scaling_group_recommendations#

Returns Auto Scaling group recommendations.

Type annotations and code completion for boto3.client("compute-optimizer").get_auto_scaling_group_recommendations method. boto3 documentation

# get_auto_scaling_group_recommendations method definition

def get_auto_scaling_group_recommendations(
    self,
    *,
    accountIds: Sequence[str] = ...,
    autoScalingGroupArns: Sequence[str] = ...,
    nextToken: str = ...,
    maxResults: int = ...,
    filters: Sequence[FilterTypeDef] = ...,  # (1)
    recommendationPreferences: RecommendationPreferencesTypeDef = ...,  # (2)
) -> GetAutoScalingGroupRecommendationsResponseTypeDef:  # (3)
    ...
  1. See FilterTypeDef
  2. See RecommendationPreferencesTypeDef
  3. See GetAutoScalingGroupRecommendationsResponseTypeDef
# get_auto_scaling_group_recommendations method usage example with argument unpacking

kwargs: GetAutoScalingGroupRecommendationsRequestRequestTypeDef = {  # (1)
    "accountIds": ...,
}

parent.get_auto_scaling_group_recommendations(**kwargs)
  1. See GetAutoScalingGroupRecommendationsRequestRequestTypeDef

get_ebs_volume_recommendations#

Returns Amazon Elastic Block Store (Amazon EBS) volume recommendations.

Type annotations and code completion for boto3.client("compute-optimizer").get_ebs_volume_recommendations method. boto3 documentation

# get_ebs_volume_recommendations method definition

def get_ebs_volume_recommendations(
    self,
    *,
    volumeArns: Sequence[str] = ...,
    nextToken: str = ...,
    maxResults: int = ...,
    filters: Sequence[EBSFilterTypeDef] = ...,  # (1)
    accountIds: Sequence[str] = ...,
) -> GetEBSVolumeRecommendationsResponseTypeDef:  # (2)
    ...
  1. See EBSFilterTypeDef
  2. See GetEBSVolumeRecommendationsResponseTypeDef
# get_ebs_volume_recommendations method usage example with argument unpacking

kwargs: GetEBSVolumeRecommendationsRequestRequestTypeDef = {  # (1)
    "volumeArns": ...,
}

parent.get_ebs_volume_recommendations(**kwargs)
  1. See GetEBSVolumeRecommendationsRequestRequestTypeDef

get_ec2_instance_recommendations#

Returns Amazon EC2 instance recommendations.

Type annotations and code completion for boto3.client("compute-optimizer").get_ec2_instance_recommendations method. boto3 documentation

# get_ec2_instance_recommendations method definition

def get_ec2_instance_recommendations(
    self,
    *,
    instanceArns: Sequence[str] = ...,
    nextToken: str = ...,
    maxResults: int = ...,
    filters: Sequence[FilterTypeDef] = ...,  # (1)
    accountIds: Sequence[str] = ...,
    recommendationPreferences: RecommendationPreferencesTypeDef = ...,  # (2)
) -> GetEC2InstanceRecommendationsResponseTypeDef:  # (3)
    ...
  1. See FilterTypeDef
  2. See RecommendationPreferencesTypeDef
  3. See GetEC2InstanceRecommendationsResponseTypeDef
# get_ec2_instance_recommendations method usage example with argument unpacking

kwargs: GetEC2InstanceRecommendationsRequestRequestTypeDef = {  # (1)
    "instanceArns": ...,
}

parent.get_ec2_instance_recommendations(**kwargs)
  1. See GetEC2InstanceRecommendationsRequestRequestTypeDef

get_ec2_recommendation_projected_metrics#

Returns the projected utilization metrics of Amazon EC2 instance recommendations.

Type annotations and code completion for boto3.client("compute-optimizer").get_ec2_recommendation_projected_metrics method. boto3 documentation

# get_ec2_recommendation_projected_metrics method definition

def get_ec2_recommendation_projected_metrics(
    self,
    *,
    instanceArn: str,
    stat: MetricStatisticType,  # (1)
    period: int,
    startTime: TimestampTypeDef,
    endTime: TimestampTypeDef,
    recommendationPreferences: RecommendationPreferencesTypeDef = ...,  # (2)
) -> GetEC2RecommendationProjectedMetricsResponseTypeDef:  # (3)
    ...
  1. See MetricStatisticType
  2. See RecommendationPreferencesTypeDef
  3. See GetEC2RecommendationProjectedMetricsResponseTypeDef
# get_ec2_recommendation_projected_metrics method usage example with argument unpacking

kwargs: GetEC2RecommendationProjectedMetricsRequestRequestTypeDef = {  # (1)
    "instanceArn": ...,
    "stat": ...,
    "period": ...,
    "startTime": ...,
    "endTime": ...,
}

parent.get_ec2_recommendation_projected_metrics(**kwargs)
  1. See GetEC2RecommendationProjectedMetricsRequestRequestTypeDef

get_ecs_service_recommendation_projected_metrics#

Returns the projected metrics of Amazon ECS service recommendations.

Type annotations and code completion for boto3.client("compute-optimizer").get_ecs_service_recommendation_projected_metrics method. boto3 documentation

# get_ecs_service_recommendation_projected_metrics method definition

def get_ecs_service_recommendation_projected_metrics(
    self,
    *,
    serviceArn: str,
    stat: MetricStatisticType,  # (1)
    period: int,
    startTime: TimestampTypeDef,
    endTime: TimestampTypeDef,
) -> GetECSServiceRecommendationProjectedMetricsResponseTypeDef:  # (2)
    ...
  1. See MetricStatisticType
  2. See GetECSServiceRecommendationProjectedMetricsResponseTypeDef
# get_ecs_service_recommendation_projected_metrics method usage example with argument unpacking

kwargs: GetECSServiceRecommendationProjectedMetricsRequestRequestTypeDef = {  # (1)
    "serviceArn": ...,
    "stat": ...,
    "period": ...,
    "startTime": ...,
    "endTime": ...,
}

parent.get_ecs_service_recommendation_projected_metrics(**kwargs)
  1. See GetECSServiceRecommendationProjectedMetricsRequestRequestTypeDef

get_ecs_service_recommendations#

Returns Amazon ECS service recommendations.

Type annotations and code completion for boto3.client("compute-optimizer").get_ecs_service_recommendations method. boto3 documentation

# get_ecs_service_recommendations method definition

def get_ecs_service_recommendations(
    self,
    *,
    serviceArns: Sequence[str] = ...,
    nextToken: str = ...,
    maxResults: int = ...,
    filters: Sequence[ECSServiceRecommendationFilterTypeDef] = ...,  # (1)
    accountIds: Sequence[str] = ...,
) -> GetECSServiceRecommendationsResponseTypeDef:  # (2)
    ...
  1. See ECSServiceRecommendationFilterTypeDef
  2. See GetECSServiceRecommendationsResponseTypeDef
# get_ecs_service_recommendations method usage example with argument unpacking

kwargs: GetECSServiceRecommendationsRequestRequestTypeDef = {  # (1)
    "serviceArns": ...,
}

parent.get_ecs_service_recommendations(**kwargs)
  1. See GetECSServiceRecommendationsRequestRequestTypeDef

get_effective_recommendation_preferences#

Returns the recommendation preferences that are in effect for a given resource, such as enhanced infrastructure metrics.

Type annotations and code completion for boto3.client("compute-optimizer").get_effective_recommendation_preferences method. boto3 documentation

# get_effective_recommendation_preferences method definition

def get_effective_recommendation_preferences(
    self,
    *,
    resourceArn: str,
) -> GetEffectiveRecommendationPreferencesResponseTypeDef:  # (1)
    ...
  1. See GetEffectiveRecommendationPreferencesResponseTypeDef
# get_effective_recommendation_preferences method usage example with argument unpacking

kwargs: GetEffectiveRecommendationPreferencesRequestRequestTypeDef = {  # (1)
    "resourceArn": ...,
}

parent.get_effective_recommendation_preferences(**kwargs)
  1. See GetEffectiveRecommendationPreferencesRequestRequestTypeDef

get_enrollment_status#

Returns the enrollment (opt in) status of an account to the Compute Optimizer service.

Type annotations and code completion for boto3.client("compute-optimizer").get_enrollment_status method. boto3 documentation

# get_enrollment_status method definition

def get_enrollment_status(
    self,
) -> GetEnrollmentStatusResponseTypeDef:  # (1)
    ...
  1. See GetEnrollmentStatusResponseTypeDef

get_enrollment_statuses_for_organization#

Returns the Compute Optimizer enrollment (opt-in) status of organization member accounts, if your account is an organization management account.

Type annotations and code completion for boto3.client("compute-optimizer").get_enrollment_statuses_for_organization method. boto3 documentation

# get_enrollment_statuses_for_organization method definition

def get_enrollment_statuses_for_organization(
    self,
    *,
    filters: Sequence[EnrollmentFilterTypeDef] = ...,  # (1)
    nextToken: str = ...,
    maxResults: int = ...,
) -> GetEnrollmentStatusesForOrganizationResponseTypeDef:  # (2)
    ...
  1. See EnrollmentFilterTypeDef
  2. See GetEnrollmentStatusesForOrganizationResponseTypeDef
# get_enrollment_statuses_for_organization method usage example with argument unpacking

kwargs: GetEnrollmentStatusesForOrganizationRequestRequestTypeDef = {  # (1)
    "filters": ...,
}

parent.get_enrollment_statuses_for_organization(**kwargs)
  1. See GetEnrollmentStatusesForOrganizationRequestRequestTypeDef

get_idle_recommendations#

Returns idle resource recommendations.

Type annotations and code completion for boto3.client("compute-optimizer").get_idle_recommendations method. boto3 documentation

# get_idle_recommendations method definition

def get_idle_recommendations(
    self,
    *,
    resourceArns: Sequence[str] = ...,
    nextToken: str = ...,
    maxResults: int = ...,
    filters: Sequence[IdleRecommendationFilterTypeDef] = ...,  # (1)
    accountIds: Sequence[str] = ...,
    orderBy: OrderByTypeDef = ...,  # (2)
) -> GetIdleRecommendationsResponseTypeDef:  # (3)
    ...
  1. See IdleRecommendationFilterTypeDef
  2. See OrderByTypeDef
  3. See GetIdleRecommendationsResponseTypeDef
# get_idle_recommendations method usage example with argument unpacking

kwargs: GetIdleRecommendationsRequestRequestTypeDef = {  # (1)
    "resourceArns": ...,
}

parent.get_idle_recommendations(**kwargs)
  1. See GetIdleRecommendationsRequestRequestTypeDef

get_lambda_function_recommendations#

Returns Lambda function recommendations.

Type annotations and code completion for boto3.client("compute-optimizer").get_lambda_function_recommendations method. boto3 documentation

# get_lambda_function_recommendations method definition

def get_lambda_function_recommendations(
    self,
    *,
    functionArns: Sequence[str] = ...,
    accountIds: Sequence[str] = ...,
    filters: Sequence[LambdaFunctionRecommendationFilterTypeDef] = ...,  # (1)
    nextToken: str = ...,
    maxResults: int = ...,
) -> GetLambdaFunctionRecommendationsResponseTypeDef:  # (2)
    ...
  1. See LambdaFunctionRecommendationFilterTypeDef
  2. See GetLambdaFunctionRecommendationsResponseTypeDef
# get_lambda_function_recommendations method usage example with argument unpacking

kwargs: GetLambdaFunctionRecommendationsRequestRequestTypeDef = {  # (1)
    "functionArns": ...,
}

parent.get_lambda_function_recommendations(**kwargs)
  1. See GetLambdaFunctionRecommendationsRequestRequestTypeDef

get_license_recommendations#

Returns license recommendations for Amazon EC2 instances that run on a specific license.

Type annotations and code completion for boto3.client("compute-optimizer").get_license_recommendations method. boto3 documentation

# get_license_recommendations method definition

def get_license_recommendations(
    self,
    *,
    resourceArns: Sequence[str] = ...,
    nextToken: str = ...,
    maxResults: int = ...,
    filters: Sequence[LicenseRecommendationFilterTypeDef] = ...,  # (1)
    accountIds: Sequence[str] = ...,
) -> GetLicenseRecommendationsResponseTypeDef:  # (2)
    ...
  1. See LicenseRecommendationFilterTypeDef
  2. See GetLicenseRecommendationsResponseTypeDef
# get_license_recommendations method usage example with argument unpacking

kwargs: GetLicenseRecommendationsRequestRequestTypeDef = {  # (1)
    "resourceArns": ...,
}

parent.get_license_recommendations(**kwargs)
  1. See GetLicenseRecommendationsRequestRequestTypeDef

get_rds_database_recommendation_projected_metrics#

Returns the projected metrics of Amazon RDS recommendations.

Type annotations and code completion for boto3.client("compute-optimizer").get_rds_database_recommendation_projected_metrics method. boto3 documentation

# get_rds_database_recommendation_projected_metrics method definition

def get_rds_database_recommendation_projected_metrics(
    self,
    *,
    resourceArn: str,
    stat: MetricStatisticType,  # (1)
    period: int,
    startTime: TimestampTypeDef,
    endTime: TimestampTypeDef,
    recommendationPreferences: RecommendationPreferencesTypeDef = ...,  # (2)
) -> GetRDSDatabaseRecommendationProjectedMetricsResponseTypeDef:  # (3)
    ...
  1. See MetricStatisticType
  2. See RecommendationPreferencesTypeDef
  3. See GetRDSDatabaseRecommendationProjectedMetricsResponseTypeDef
# get_rds_database_recommendation_projected_metrics method usage example with argument unpacking

kwargs: GetRDSDatabaseRecommendationProjectedMetricsRequestRequestTypeDef = {  # (1)
    "resourceArn": ...,
    "stat": ...,
    "period": ...,
    "startTime": ...,
    "endTime": ...,
}

parent.get_rds_database_recommendation_projected_metrics(**kwargs)
  1. See GetRDSDatabaseRecommendationProjectedMetricsRequestRequestTypeDef

get_rds_database_recommendations#

Returns Amazon RDS recommendations.

Type annotations and code completion for boto3.client("compute-optimizer").get_rds_database_recommendations method. boto3 documentation

# get_rds_database_recommendations method definition

def get_rds_database_recommendations(
    self,
    *,
    resourceArns: Sequence[str] = ...,
    nextToken: str = ...,
    maxResults: int = ...,
    filters: Sequence[RDSDBRecommendationFilterTypeDef] = ...,  # (1)
    accountIds: Sequence[str] = ...,
    recommendationPreferences: RecommendationPreferencesTypeDef = ...,  # (2)
) -> GetRDSDatabaseRecommendationsResponseTypeDef:  # (3)
    ...
  1. See RDSDBRecommendationFilterTypeDef
  2. See RecommendationPreferencesTypeDef
  3. See GetRDSDatabaseRecommendationsResponseTypeDef
# get_rds_database_recommendations method usage example with argument unpacking

kwargs: GetRDSDatabaseRecommendationsRequestRequestTypeDef = {  # (1)
    "resourceArns": ...,
}

parent.get_rds_database_recommendations(**kwargs)
  1. See GetRDSDatabaseRecommendationsRequestRequestTypeDef

get_recommendation_preferences#

Returns existing recommendation preferences, such as enhanced infrastructure metrics.

Type annotations and code completion for boto3.client("compute-optimizer").get_recommendation_preferences method. boto3 documentation

# get_recommendation_preferences method definition

def get_recommendation_preferences(
    self,
    *,
    resourceType: ResourceTypeType,  # (1)
    scope: ScopeTypeDef = ...,  # (2)
    nextToken: str = ...,
    maxResults: int = ...,
) -> GetRecommendationPreferencesResponseTypeDef:  # (3)
    ...
  1. See ResourceTypeType
  2. See ScopeTypeDef
  3. See GetRecommendationPreferencesResponseTypeDef
# get_recommendation_preferences method usage example with argument unpacking

kwargs: GetRecommendationPreferencesRequestRequestTypeDef = {  # (1)
    "resourceType": ...,
}

parent.get_recommendation_preferences(**kwargs)
  1. See GetRecommendationPreferencesRequestRequestTypeDef

get_recommendation_summaries#

Returns the optimization findings for an account.

Type annotations and code completion for boto3.client("compute-optimizer").get_recommendation_summaries method. boto3 documentation

# get_recommendation_summaries method definition

def get_recommendation_summaries(
    self,
    *,
    accountIds: Sequence[str] = ...,
    nextToken: str = ...,
    maxResults: int = ...,
) -> GetRecommendationSummariesResponseTypeDef:  # (1)
    ...
  1. See GetRecommendationSummariesResponseTypeDef
# get_recommendation_summaries method usage example with argument unpacking

kwargs: GetRecommendationSummariesRequestRequestTypeDef = {  # (1)
    "accountIds": ...,
}

parent.get_recommendation_summaries(**kwargs)
  1. See GetRecommendationSummariesRequestRequestTypeDef

put_recommendation_preferences#

Creates a new recommendation preference or updates an existing recommendation preference, such as enhanced infrastructure metrics.

Type annotations and code completion for boto3.client("compute-optimizer").put_recommendation_preferences method. boto3 documentation

# put_recommendation_preferences method definition

def put_recommendation_preferences(
    self,
    *,
    resourceType: ResourceTypeType,  # (1)
    scope: ScopeTypeDef = ...,  # (2)
    enhancedInfrastructureMetrics: EnhancedInfrastructureMetricsType = ...,  # (3)
    inferredWorkloadTypes: InferredWorkloadTypesPreferenceType = ...,  # (4)
    externalMetricsPreference: ExternalMetricsPreferenceTypeDef = ...,  # (5)
    lookBackPeriod: LookBackPeriodPreferenceType = ...,  # (6)
    utilizationPreferences: Sequence[UtilizationPreferenceTypeDef] = ...,  # (7)
    preferredResources: Sequence[PreferredResourceTypeDef] = ...,  # (8)
    savingsEstimationMode: SavingsEstimationModeType = ...,  # (9)
) -> dict[str, Any]:
    ...
  1. See ResourceTypeType
  2. See ScopeTypeDef
  3. See EnhancedInfrastructureMetricsType
  4. See InferredWorkloadTypesPreferenceType
  5. See ExternalMetricsPreferenceTypeDef
  6. See LookBackPeriodPreferenceType
  7. See UtilizationPreferenceTypeDef
  8. See PreferredResourceTypeDef
  9. See SavingsEstimationModeType
# put_recommendation_preferences method usage example with argument unpacking

kwargs: PutRecommendationPreferencesRequestRequestTypeDef = {  # (1)
    "resourceType": ...,
}

parent.put_recommendation_preferences(**kwargs)
  1. See PutRecommendationPreferencesRequestRequestTypeDef

update_enrollment_status#

Updates the enrollment (opt in and opt out) status of an account to the Compute Optimizer service.

Type annotations and code completion for boto3.client("compute-optimizer").update_enrollment_status method. boto3 documentation

# update_enrollment_status method definition

def update_enrollment_status(
    self,
    *,
    status: StatusType,  # (1)
    includeMemberAccounts: bool = ...,
) -> UpdateEnrollmentStatusResponseTypeDef:  # (2)
    ...
  1. See StatusType
  2. See UpdateEnrollmentStatusResponseTypeDef
# update_enrollment_status method usage example with argument unpacking

kwargs: UpdateEnrollmentStatusRequestRequestTypeDef = {  # (1)
    "status": ...,
}

parent.update_enrollment_status(**kwargs)
  1. See UpdateEnrollmentStatusRequestRequestTypeDef

get_paginator#

Type annotations and code completion for boto3.client("compute-optimizer").get_paginator method with overloads.