ComputeOptimizer / Client / get_license_recommendations
get_license_recommendations#
- ComputeOptimizer.Client.get_license_recommendations(**kwargs)#
Returns license recommendations for Amazon EC2 instances that run on a specific license.
Compute Optimizer generates recommendations for licenses that meet a specific set of requirements. For more information, see the Supported resources and requirements in the Compute Optimizer User Guide.
See also: AWS API Documentation
Request Syntax
response = client.get_license_recommendations( resourceArns=[ 'string', ], nextToken='string', maxResults=123, filters=[ { 'name': 'Finding'|'FindingReasonCode'|'LicenseName', 'values': [ 'string', ] }, ], accountIds=[ 'string', ] )
- Parameters:
resourceArns (list) –
The ARN that identifies the Amazon EC2 instance.
The following is the format of the ARN:
arn:aws:ec2:region:aws_account_id:instance/instance-id
(string) –
nextToken (string) – The token to advance to the next page of license recommendations.
maxResults (integer) –
The maximum number of license recommendations to return with a single request.
To retrieve the remaining results, make another request with the returned
nextToken
value.filters (list) –
An array of objects to specify a filter that returns a more specific list of license recommendations.
(dict) –
Describes a filter that returns a more specific list of license recommendations. Use this filter with the
GetLicenseRecommendation
action.name (string) –
The name of the filter.
Specify
Finding
to return recommendations with a specific finding classification.Specify
FindingReasonCode
to return recommendations with a specific finding reason code.You can filter your license recommendations by
tag:key
andtag-key
tags.A
tag:key
is a key and value combination of a tag assigned to your license recommendations. Use the tag key in the filter name and the tag value as the filter value. For example, to find all license recommendations that have a tag with the key ofOwner
and the value ofTeamA
, specifytag:Owner
for the filter name andTeamA
for the filter value.A
tag-key
is the key of a tag assigned to your license recommendations. Use this filter to find all of your license recommendations that have a tag with a specific key. This doesn’t consider the tag value. For example, you can find your license recommendations with a tag key value ofOwner
or without any tag keys assigned.values (list) –
The value of the filter.
The valid values for this parameter are as follows, depending on what you specify for the
name
parameter:If you specify the
name
parameter asFinding
, then specifyOptimized
,NotOptimized
, orInsufficentMetrics
.If you specify the
name
parameter asFindingReasonCode
, then specifyOptimized
,LicenseOverprovisioned
,InvalidCloudwatchApplicationInsights
, orCloudwatchApplicationInsightsError
.
(string) –
accountIds (list) –
The ID of the Amazon Web Services account for which to return license recommendations.
If your account is the management account of an organization, use this parameter to specify the member account for which you want to return license recommendations.
Only one account ID can be specified per request.
(string) –
- Return type:
dict
- Returns:
Response Syntax
{ 'nextToken': 'string', 'licenseRecommendations': [ { 'resourceArn': 'string', 'accountId': 'string', 'currentLicenseConfiguration': { 'numberOfCores': 123, 'instanceType': 'string', 'operatingSystem': 'string', 'licenseEdition': 'Enterprise'|'Standard'|'Free'|'NoLicenseEditionFound', 'licenseName': 'SQLServer', 'licenseModel': 'LicenseIncluded'|'BringYourOwnLicense', 'licenseVersion': 'string', 'metricsSource': [ { 'provider': 'CloudWatchApplicationInsights', 'providerArn': 'string' }, ] }, 'lookbackPeriodInDays': 123.0, 'lastRefreshTimestamp': datetime(2015, 1, 1), 'finding': 'InsufficientMetrics'|'Optimized'|'NotOptimized', 'findingReasonCodes': [ 'InvalidCloudWatchApplicationInsightsSetup'|'CloudWatchApplicationInsightsError'|'LicenseOverprovisioned'|'Optimized', ], 'licenseRecommendationOptions': [ { 'rank': 123, 'operatingSystem': 'string', 'licenseEdition': 'Enterprise'|'Standard'|'Free'|'NoLicenseEditionFound', 'licenseModel': 'LicenseIncluded'|'BringYourOwnLicense', 'savingsOpportunity': { 'savingsOpportunityPercentage': 123.0, 'estimatedMonthlySavings': { 'currency': 'USD'|'CNY', 'value': 123.0 } } }, ], 'tags': [ { 'key': 'string', 'value': 'string' }, ] }, ], 'errors': [ { 'identifier': 'string', 'code': 'string', 'message': 'string' }, ] }
Response Structure
(dict) –
nextToken (string) –
The token to use to advance to the next page of license recommendations.
licenseRecommendations (list) –
An array of objects that describe license recommendations.
(dict) –
Describes a license recommendation for an EC2 instance.
resourceArn (string) –
The ARN that identifies the Amazon EC2 instance.
accountId (string) –
The Amazon Web Services account ID of the license.
currentLicenseConfiguration (dict) –
An object that describes the current configuration of an instance that runs on a license.
numberOfCores (integer) –
The current number of cores associated with the instance.
instanceType (string) –
The instance type used in the license.
operatingSystem (string) –
The operating system of the instance.
licenseEdition (string) –
The edition of the license for the application that runs on the instance.
licenseName (string) –
The name of the license for the application that runs on the instance.
licenseModel (string) –
The license type associated with the instance.
licenseVersion (string) –
The version of the license for the application that runs on the instance.
metricsSource (list) –
The list of metric sources required to generate recommendations for commercial software licenses.
(dict) –
The list of metric sources required to generate recommendations for commercial software licenses.
provider (string) –
The name of the metric source provider.
providerArn (string) –
The ARN of the metric source provider.
lookbackPeriodInDays (float) –
The number of days for which utilization metrics were analyzed for an instance that runs on a license.
lastRefreshTimestamp (datetime) –
The timestamp of when the license recommendation was last generated.
finding (string) –
The finding classification for an instance that runs on a license.
Findings include:
InsufficentMetrics
— When Compute Optimizer detects that your CloudWatch Application Insights isn’t enabled or is enabled with insufficient permissions.NotOptimized
— When Compute Optimizer detects that your EC2 infrastructure isn’t using any of the SQL server license features you’re paying for, a license is considered not optimized.Optimized
— When Compute Optimizer detects that all specifications of your license meet the performance requirements of your workload.
findingReasonCodes (list) –
The reason for the finding classification for an instance that runs on a license.
Finding reason codes include:
Optimized
— All specifications of your license meet the performance requirements of your workload.LicenseOverprovisioned
— A license is considered over-provisioned when your license can be downgraded while still meeting the performance requirements of your workload.InvalidCloudwatchApplicationInsights
— CloudWatch Application Insights isn’t configured properly.CloudwatchApplicationInsightsError
— There is a CloudWatch Application Insights error.
(string) –
licenseRecommendationOptions (list) –
An array of objects that describe the license recommendation options.
(dict) –
Describes the recommendation options for licenses.
rank (integer) –
The rank of the license recommendation option.
The top recommendation option is ranked as
1
.operatingSystem (string) –
The operating system of a license recommendation option.
licenseEdition (string) –
The recommended edition of the license for the application that runs on the instance.
licenseModel (string) –
The recommended license type associated with the instance.
savingsOpportunity (dict) –
Describes the savings opportunity for recommendations of a given resource type or for the recommendation option of an individual resource.
Savings opportunity represents the estimated monthly savings you can achieve by implementing a given Compute Optimizer recommendation.
Warning
Savings opportunity data requires that you opt in to Cost Explorer, as well as activate Receive Amazon EC2 resource recommendations in the Cost Explorer preferences page. That creates a connection between Cost Explorer and Compute Optimizer. With this connection, Cost Explorer generates savings estimates considering the price of existing resources, the price of recommended resources, and historical usage data. Estimated monthly savings reflects the projected dollar savings associated with each of the recommendations generated. For more information, see Enabling Cost Explorer and Optimizing your cost with Rightsizing Recommendations in the Cost Management User Guide.
savingsOpportunityPercentage (float) –
The estimated monthly savings possible as a percentage of monthly cost by adopting Compute Optimizer recommendations for a given resource.
estimatedMonthlySavings (dict) –
An object that describes the estimated monthly savings amount possible by adopting Compute Optimizer recommendations for a given resource. This is based on the On-Demand instance pricing..
currency (string) –
The currency of the estimated monthly savings.
value (float) –
The value of the estimated monthly savings.
tags (list) –
A list of tags assigned to an EC2 instance.
(dict) –
A list of tag key and value pairs that you define.
key (string) –
One part of a key-value pair that makes up a tag. A key is a general label that acts like a category for more specific tag values.
value (string) –
One part of a key-value pair that make up a tag. A value acts as a descriptor within a tag category (key). The value can be empty or null.
errors (list) –
An array of objects that describe errors of the request.
(dict) –
Describes an error experienced when getting recommendations.
For example, an error is returned if you request recommendations for an unsupported Auto Scaling group, or if you request recommendations for an instance of an unsupported instance family.
identifier (string) –
The ID of the error.
code (string) –
The error code.
message (string) –
The message, or reason, for the error.
Exceptions
ComputeOptimizer.Client.exceptions.OptInRequiredException
ComputeOptimizer.Client.exceptions.InternalServerException
ComputeOptimizer.Client.exceptions.ServiceUnavailableException
ComputeOptimizer.Client.exceptions.AccessDeniedException
ComputeOptimizer.Client.exceptions.InvalidParameterValueException
ComputeOptimizer.Client.exceptions.ResourceNotFoundException
ComputeOptimizer.Client.exceptions.MissingAuthenticationToken
ComputeOptimizer.Client.exceptions.ThrottlingException