pub struct GetRecommendationPreferences { /* private fields */ }
Expand description
Fluent builder constructing a request to GetRecommendationPreferences
.
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.
Implementations
sourceimpl GetRecommendationPreferences
impl GetRecommendationPreferences
sourcepub async fn customize(
self
) -> Result<CustomizableOperation<GetRecommendationPreferences, AwsResponseRetryClassifier>, SdkError<GetRecommendationPreferencesError>>
pub async fn customize(
self
) -> Result<CustomizableOperation<GetRecommendationPreferences, AwsResponseRetryClassifier>, SdkError<GetRecommendationPreferencesError>>
Consume this builder, creating a customizable operation that can be modified before being sent. The operation’s inner http::Request can be modified as well.
sourcepub async fn send(
self
) -> Result<GetRecommendationPreferencesOutput, SdkError<GetRecommendationPreferencesError>>
pub async fn send(
self
) -> Result<GetRecommendationPreferencesOutput, SdkError<GetRecommendationPreferencesError>>
Sends the request and returns the response.
If an error occurs, an SdkError
will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub fn resource_type(self, input: ResourceType) -> Self
pub fn resource_type(self, input: ResourceType) -> Self
The target resource type of the recommendation preference for which to return preferences.
The Ec2Instance
option encompasses standalone instances and instances that are part of Auto Scaling groups. The AutoScalingGroup
option encompasses only instances that are part of an Auto Scaling group.
The valid values for this parameter are Ec2Instance
and AutoScalingGroup
.
sourcepub fn set_resource_type(self, input: Option<ResourceType>) -> Self
pub fn set_resource_type(self, input: Option<ResourceType>) -> Self
The target resource type of the recommendation preference for which to return preferences.
The Ec2Instance
option encompasses standalone instances and instances that are part of Auto Scaling groups. The AutoScalingGroup
option encompasses only instances that are part of an Auto Scaling group.
The valid values for this parameter are Ec2Instance
and AutoScalingGroup
.
sourcepub fn scope(self, input: Scope) -> Self
pub fn scope(self, input: Scope) -> Self
An object that describes the scope of the recommendation preference to return.
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 Activating enhanced infrastructure metrics in the Compute Optimizer User Guide.
sourcepub fn set_scope(self, input: Option<Scope>) -> Self
pub fn set_scope(self, input: Option<Scope>) -> Self
An object that describes the scope of the recommendation preference to return.
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 Activating enhanced infrastructure metrics in the Compute Optimizer User Guide.
sourcepub fn next_token(self, input: impl Into<String>) -> Self
pub fn next_token(self, input: impl Into<String>) -> Self
The token to advance to the next page of recommendation preferences.
sourcepub fn set_next_token(self, input: Option<String>) -> Self
pub fn set_next_token(self, input: Option<String>) -> Self
The token to advance to the next page of recommendation preferences.
sourcepub fn max_results(self, input: i32) -> Self
pub fn max_results(self, input: i32) -> Self
The maximum number of recommendation preferences to return with a single request.
To retrieve the remaining results, make another request with the returned nextToken
value.
sourcepub fn set_max_results(self, input: Option<i32>) -> Self
pub fn set_max_results(self, input: Option<i32>) -> Self
The maximum number of recommendation preferences to return with a single request.
To retrieve the remaining results, make another request with the returned nextToken
value.
Trait Implementations
sourceimpl Clone for GetRecommendationPreferences
impl Clone for GetRecommendationPreferences
sourcefn clone(&self) -> GetRecommendationPreferences
fn clone(&self) -> GetRecommendationPreferences
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more