AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Returns existing recommendation preferences, such as enhanced infrastructure metrics.

Use the scope 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).

For more information, see Activating enhanced infrastructure metrics in the Compute Optimizer User Guide.

Note:

This is an asynchronous operation using the standard naming convention for .NET 4.5 or higher. For .NET 3.5 the operation is implemented as a pair of methods using the standard naming convention of BeginGetRecommendationPreferences and EndGetRecommendationPreferences.

Namespace: Amazon.ComputeOptimizer
Assembly: AWSSDK.ComputeOptimizer.dll
Version: 3.x.y.z

Syntax

C#
public virtual Task<GetRecommendationPreferencesResponse> GetRecommendationPreferencesAsync(
         GetRecommendationPreferencesRequest request,
         CancellationToken cancellationToken
)

Parameters

request
Type: Amazon.ComputeOptimizer.Model.GetRecommendationPreferencesRequest

Container for the necessary parameters to execute the GetRecommendationPreferences service method.

cancellationToken
Type: System.Threading.CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Return Value


The response from the GetRecommendationPreferences service method, as returned by ComputeOptimizer.

Exceptions

ExceptionCondition
AccessDeniedException You do not have sufficient access to perform this action.
InternalServerException An internal error has occurred. Try your call again.
InvalidParameterValueException The value supplied for the input parameter is out of range or not valid.
MissingAuthenticationTokenException The request must contain either a valid (registered) Amazon Web Services access key ID or X.509 certificate.
OptInRequiredException The account is not opted in to Compute Optimizer.
ResourceNotFoundException A resource that is required for the action doesn't exist.
ServiceUnavailableException The request has failed due to a temporary failure of the server.
ThrottlingException The request was denied due to request throttling.

Version Information

.NET:
Supported in: 8.0 and newer, Core 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5 and newer

See Also