Amazon Compute Optimizer #X Amz Target=ComputeOptimizerService.GetRecommendationPreferences API

The #X Amz Target=ComputeOptimizerService.GetRecommendationPreferences API from Amazon Compute Optimizer — 1 operation(s) for #x amz target=computeoptimizerservice.getrecommendationpreferences.

Documentation

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

amazon-compute-optimizer-x-amz-target-computeoptimizerservice-getrecommendationpreferences-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  version: '2019-11-01'
  x-release: v4
  title: 'AWS Compute Optimizer #X Amz Target=ComputeOptimizerService.DeleteRecommendationPreferences #X Amz Target=ComputeOptimizerService.DeleteRecommendationPreferences #X Amz Target=ComputeOptimizerService.GetRecommendationPreferences API'
  description: Compute Optimizer is a service that analyzes the configuration and utilization metrics of your Amazon Web Services compute resources, such as Amazon EC2 instances, Amazon EC2 Auto Scaling groups, Lambda functions, Amazon EBS volumes, and Amazon ECS services on Fargate. It reports whether your resources are optimal, and generates optimization recommendations to reduce the cost and improve the performance of your workloads. Compute Optimizer also provides recent utilization metric data, in addition to projected utilization metric data for the recommendations, which you can use to evaluate which recommendation provides the best price-performance trade-off. The analysis of your usage patterns can help you decide when to move or resize your running resources, and still meet your performance and capacity requirements. For more information about Compute Optimizer, including the required permissions to use the service, see the <a href="https://docs.aws.amazon.com/compute-optimizer/latest/ug/">Compute Optimizer User Guide</a>.
  x-logo:
    url: https://twitter.com/awscloud/profile_image?size=original
    backgroundColor: '#FFFFFF'
  termsOfService: https://aws.amazon.com/service-terms/
  contact:
    name: Mike Ralphson
    email: mike.ralphson@gmail.com
    url: https://github.com/mermade/aws2openapi
    x-twitter: PermittedSoc
  license:
    name: Apache 2.0 License
    url: http://www.apache.org/licenses/
  x-providerName: amazonaws.com
  x-serviceName: compute-optimizer
  x-aws-signingName: compute-optimizer
  x-origin:
  - contentType: application/json
    url: https://raw.githubusercontent.com/aws/aws-sdk-js/master/apis/compute-optimizer-2019-11-01.normal.json
    converter:
      url: https://github.com/mermade/aws2openapi
      version: 1.0.0
    x-apisguru-driver: external
  x-apiClientRegistration:
    url: https://portal.aws.amazon.com/gp/aws/developer/registration/index.html?nc2=h_ct
  x-apisguru-categories:
  - cloud
  x-preferred: true
servers:
- url: http://compute-optimizer.{region}.amazonaws.com
  variables:
    region:
      description: The AWS region
      enum:
      - us-east-1
      - us-east-2
      - us-west-1
      - us-west-2
      - us-gov-west-1
      - us-gov-east-1
      - ca-central-1
      - eu-north-1
      - eu-west-1
      - eu-west-2
      - eu-west-3
      - eu-central-1
      - eu-south-1
      - af-south-1
      - ap-northeast-1
      - ap-northeast-2
      - ap-northeast-3
      - ap-southeast-1
      - ap-southeast-2
      - ap-east-1
      - ap-south-1
      - sa-east-1
      - me-south-1
      default: us-east-1
  description: The AWS Compute Optimizer multi-region endpoint
- url: https://compute-optimizer.{region}.amazonaws.com
  variables:
    region:
      description: The AWS region
      enum:
      - us-east-1
      - us-east-2
      - us-west-1
      - us-west-2
      - us-gov-west-1
      - us-gov-east-1
      - ca-central-1
      - eu-north-1
      - eu-west-1
      - eu-west-2
      - eu-west-3
      - eu-central-1
      - eu-south-1
      - af-south-1
      - ap-northeast-1
      - ap-northeast-2
      - ap-northeast-3
      - ap-southeast-1
      - ap-southeast-2
      - ap-east-1
      - ap-south-1
      - sa-east-1
      - me-south-1
      default: us-east-1
  description: The AWS Compute Optimizer multi-region endpoint
- url: http://compute-optimizer.{region}.amazonaws.com.cn
  variables:
    region:
      description: The AWS region
      enum:
      - cn-north-1
      - cn-northwest-1
      default: cn-north-1
  description: The AWS Compute Optimizer endpoint for China (Beijing) and China (Ningxia)
- url: https://compute-optimizer.{region}.amazonaws.com.cn
  variables:
    region:
      description: The AWS region
      enum:
      - cn-north-1
      - cn-northwest-1
      default: cn-north-1
  description: The AWS Compute Optimizer endpoint for China (Beijing) and China (Ningxia)
security:
- hmac: []
tags:
- name: '#X Amz Target=ComputeOptimizerService.GetRecommendationPreferences'
paths:
  /#X-Amz-Target=ComputeOptimizerService.GetRecommendationPreferences:
    parameters:
    - $ref: '#/components/parameters/X-Amz-Content-Sha256'
    - $ref: '#/components/parameters/X-Amz-Date'
    - $ref: '#/components/parameters/X-Amz-Algorithm'
    - $ref: '#/components/parameters/X-Amz-Credential'
    - $ref: '#/components/parameters/X-Amz-Security-Token'
    - $ref: '#/components/parameters/X-Amz-Signature'
    - $ref: '#/components/parameters/X-Amz-SignedHeaders'
    post:
      operationId: GetRecommendationPreferences
      description: <p>Returns existing recommendation preferences, such as enhanced infrastructure metrics.</p> <p>Use the <code>scope</code> parameter to specify which preferences to return. You can specify to return preferences for an organization, a specific account ID, or a specific EC2 instance or Auto Scaling group Amazon Resource Name (ARN).</p> <p>For more information, see <a href="https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html">Activating enhanced infrastructure metrics</a> in the <i>Compute Optimizer User Guide</i>.</p>
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetRecommendationPreferencesResponse'
              examples:
                GetRecommendationPreferences200Example:
                  summary: Default GetRecommendationPreferences 200
                  x-microcks-default: true
                  value:
                    nextToken: example
                    recommendationPreferencesDetails: example
        '480':
          description: OptInRequiredException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OptInRequiredException'
              examples:
                GetRecommendationPreferences480Example:
                  summary: Default GetRecommendationPreferences 480
                  x-microcks-default: true
                  value: example
        '481':
          description: InternalServerException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerException'
              examples:
                GetRecommendationPreferences481Example:
                  summary: Default GetRecommendationPreferences 481
                  x-microcks-default: true
                  value: example
        '482':
          description: ServiceUnavailableException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUnavailableException'
              examples:
                GetRecommendationPreferences482Example:
                  summary: Default GetRecommendationPreferences 482
                  x-microcks-default: true
                  value: example
        '483':
          description: AccessDeniedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessDeniedException'
              examples:
                GetRecommendationPreferences483Example:
                  summary: Default GetRecommendationPreferences 483
                  x-microcks-default: true
                  value: example
        '484':
          description: InvalidParameterValueException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidParameterValueException'
              examples:
                GetRecommendationPreferences484Example:
                  summary: Default GetRecommendationPreferences 484
                  x-microcks-default: true
                  value: example
        '485':
          description: ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundException'
              examples:
                GetRecommendationPreferences485Example:
                  summary: Default GetRecommendationPreferences 485
                  x-microcks-default: true
                  value: example
        '486':
          description: MissingAuthenticationToken
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MissingAuthenticationToken'
              examples:
                GetRecommendationPreferences486Example:
                  summary: Default GetRecommendationPreferences 486
                  x-microcks-default: true
                  value: example
        '487':
          description: ThrottlingException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThrottlingException'
              examples:
                GetRecommendationPreferences487Example:
                  summary: Default GetRecommendationPreferences 487
                  x-microcks-default: true
                  value: example
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetRecommendationPreferencesRequest'
      parameters:
      - name: maxResults
        in: query
        schema:
          type: string
        description: Pagination limit
        required: false
      - name: nextToken
        in: query
        schema:
          type: string
        description: Pagination token
        required: false
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - ComputeOptimizerService.GetRecommendationPreferences
      summary: Amazon Compute Optimizer Get Recommendation Preferences
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
      tags:
      - '#X Amz Target=ComputeOptimizerService.GetRecommendationPreferences'
components:
  schemas:
    ExternalMetricsPreference:
      type: object
      properties:
        source:
          allOf:
          - $ref: '#/components/schemas/ExternalMetricsSource'
          - description: ' Contains the source options for external metrics preferences. '
      description: ' Describes the external metrics preferences for EC2 rightsizing recommendations. '
    InternalServerException: {}
    ThrottlingException: {}
    ServiceUnavailableException: {}
    Scope:
      type: object
      properties:
        name:
          allOf:
          - $ref: '#/components/schemas/ScopeName'
          - description: <p>The name of the scope.</p> <p>The following scopes are possible:</p> <ul> <li> <p> <code>Organization</code> - Specifies that the recommendation preference applies at the organization level, for all member accounts of an organization.</p> </li> <li> <p> <code>AccountId</code> - Specifies that the recommendation preference applies at the account level, for all resources of a given resource type in an account.</p> </li> <li> <p> <code>ResourceArn</code> - Specifies that the recommendation preference applies at the individual resource level.</p> </li> </ul>
        value:
          allOf:
          - $ref: '#/components/schemas/ScopeValue'
          - description: <p>The value of the scope.</p> <p>If you specified the <code>name</code> of the scope as:</p> <ul> <li> <p> <code>Organization</code> - The <code>value</code> must be <code>ALL_ACCOUNTS</code>.</p> </li> <li> <p> <code>AccountId</code> - The <code>value</code> must be a 12-digit Amazon Web Services account ID.</p> </li> <li> <p> <code>ResourceArn</code> - The <code>value</code> must be the Amazon Resource Name (ARN) of an EC2 instance or an Auto Scaling group.</p> </li> </ul> <p>Only EC2 instance and Auto Scaling group ARNs are currently supported.</p>
      description: <p>Describes the scope of a recommendation preference.</p> <p>Recommendation preferences can be created at the organization level (for management accounts of an organization only), account level, and resource level. For more information, see <a href="https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html">Activating enhanced infrastructure metrics</a> in the <i>Compute Optimizer User Guide</i>.</p> <note> <p>You cannot create recommendation preferences for Auto Scaling groups at the organization and account levels. You can create recommendation preferences for Auto Scaling groups only at the resource level by specifying a scope name of <code>ResourceArn</code> and a scope value of the Auto Scaling group Amazon Resource Name (ARN). This will configure the preference for all instances that are part of the specified Auto Scaling group. You also cannot create recommendation preferences at the resource level for instances that are part of an Auto Scaling group. You can create recommendation preferences at the resource level only for standalone instances.</p> </note>
    ScopeValue:
      type: string
    ScopeName:
      type: string
      enum:
      - Organization
      - AccountId
      - ResourceArn
    MissingAuthenticationToken: {}
    RecommendationPreferencesDetails:
      type: array
      items:
        $ref: '#/components/schemas/RecommendationPreferencesDetail'
    ResourceType:
      type: string
      enum:
      - Ec2Instance
      - AutoScalingGroup
      - EbsVolume
      - LambdaFunction
      - NotApplicable
      - EcsService
    OptInRequiredException: {}
    MaxResults:
      type: integer
      minimum: 0
      maximum: 1000
    InvalidParameterValueException: {}
    InferredWorkloadTypesPreference:
      type: string
      enum:
      - Active
      - Inactive
    RecommendationPreferencesDetail:
      type: object
      properties:
        scope:
          allOf:
          - $ref: '#/components/schemas/Scope'
          - description: <p>An object that describes the scope of the recommendation preference.</p> <p>Recommendation preferences can be created at the organization level (for management accounts of an organization only), account level, and resource level. For more information, see <a href="https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html">Activating enhanced infrastructure metrics</a> in the <i>Compute Optimizer User Guide</i>.</p>
        resourceType:
          allOf:
          - $ref: '#/components/schemas/ResourceType'
          - description: <p>The target resource type of the recommendation preference to create.</p> <p>The <code>Ec2Instance</code> option encompasses standalone instances and instances that are part of Auto Scaling groups. The <code>AutoScalingGroup</code> option encompasses only instances that are part of an Auto Scaling group.</p>
        enhancedInfrastructureMetrics:
          allOf:
          - $ref: '#/components/schemas/EnhancedInfrastructureMetrics'
          - description: <p>The status of the enhanced infrastructure metrics recommendation preference.</p> <p>When the recommendations page is refreshed, a status of <code>Active</code> confirms that the preference is applied to the recommendations, and a status of <code>Inactive</code> confirms that the preference isn't yet applied to recommendations.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html">Enhanced infrastructure metrics</a> in the <i>Compute Optimizer User Guide</i>.</p>
        inferredWorkloadTypes:
          allOf:
          - $ref: '#/components/schemas/InferredWorkloadTypesPreference'
          - description: <p>The status of the inferred workload types recommendation preference.</p> <p>When the recommendations page is refreshed, a status of <code>Active</code> confirms that the preference is applied to the recommendations, and a status of <code>Inactive</code> confirms that the preference isn't yet applied to recommendations.</p>
        externalMetricsPreference:
          allOf:
          - $ref: '#/components/schemas/ExternalMetricsPreference'
          - description: <p> An object that describes the external metrics recommendation preference. </p> <p> If the preference is applied in the latest recommendation refresh, an object with a valid <code>source</code> value appears in the response. If the preference isn't applied to the recommendations already, then this object doesn't appear in the response. </p>
      description: Describes a recommendation preference.
    GetRecommendationPreferencesRequest:
      type: object
      required:
      - resourceType
      title: GetRecommendationPreferencesRequest
      properties:
        resourceType:
          allOf:
          - $ref: '#/components/schemas/ResourceType'
          - description: <p>The target resource type of the recommendation preference for which to return preferences.</p> <p>The <code>Ec2Instance</code> option encompasses standalone instances and instances that are part of Auto Scaling groups. The <code>AutoScalingGroup</code> option encompasses only instances that are part of an Auto Scaling group.</p> <note> <p>The valid values for this parameter are <code>Ec2Instance</code> and <code>AutoScalingGroup</code>.</p> </note>
        scope:
          allOf:
          - $ref: '#/components/schemas/Scope'
          - description: <p>An object that describes the scope of the recommendation preference to return.</p> <p>You can return recommendation preferences that are created at the organization level (for management accounts of an organization only), account level, and resource level. For more information, see <a href="https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html">Activating enhanced infrastructure metrics</a> in the <i>Compute Optimizer User Guide</i>.</p>
        nextToken:
          allOf:
          - $ref: '#/components/schemas/NextToken'
          - description: The token to advance to the next page of recommendation preferences.
        maxResults:
          allOf:
          - $ref: '#/components/schemas/MaxResults'
          - description: <p>The maximum number of recommendation preferences to return with a single request.</p> <p>To retrieve the remaining results, make another request with the returned <code>nextToken</code> value.</p>
    ResourceNotFoundException: {}
    AccessDeniedException: {}
    NextToken:
      type: string
    GetRecommendationPreferencesResponse:
      type: object
      properties:
        nextToken:
          allOf:
          - $ref: '#/components/schemas/NextToken'
          - description: <p>The token to use to advance to the next page of recommendation preferences.</p> <p>This value is null when there are no more pages of recommendation preferences to return.</p>
        recommendationPreferencesDetails:
          allOf:
          - $ref: '#/components/schemas/RecommendationPreferencesDetails'
          - description: An array of objects that describe recommendation preferences.
    ExternalMetricsSource:
      type: string
      enum:
      - Datadog
      - Dynatrace
      - NewRelic
      - Instana
    EnhancedInfrastructureMetrics:
      type: string
      enum:
      - Active
      - Inactive
  parameters:
    X-Amz-Credential:
      name: X-Amz-Credential
      in: header
      schema:
        type: string
      required: false
    X-Amz-Algorithm:
      name: X-Amz-Algorithm
      in: header
      schema:
        type: string
      required: false
    X-Amz-Content-Sha256:
      name: X-Amz-Content-Sha256
      in: header
      schema:
        type: string
      required: false
    X-Amz-Security-Token:
      name: X-Amz-Security-Token
      in: header
      schema:
        type: string
      required: false
    X-Amz-SignedHeaders:
      name: X-Amz-SignedHeaders
      in: header
      schema:
        type: string
      required: false
    X-Amz-Date:
      name: X-Amz-Date
      in: header
      schema:
        type: string
      required: false
    X-Amz-Signature:
      name: X-Amz-Signature
      in: header
      schema:
        type: string
      required: false
  securitySchemes:
    hmac:
      type: apiKey
      name: Authorization
      in: header
      description: Amazon Signature authorization v4
      x-amazon-apigateway-authtype: awsSigv4
externalDocs:
  description: Amazon Web Services documentation
  url: https://docs.aws.amazon.com/compute-optimizer/
x-hasEquivalentPaths: true