/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include namespace Aws { namespace ComputeOptimizer { namespace Model { /** */ class PutRecommendationPreferencesRequest : public ComputeOptimizerRequest { public: AWS_COMPUTEOPTIMIZER_API PutRecommendationPreferencesRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "PutRecommendationPreferences"; } AWS_COMPUTEOPTIMIZER_API Aws::String SerializePayload() const override; AWS_COMPUTEOPTIMIZER_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The target resource type of the recommendation preference to create.

*

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.

*/ inline const ResourceType& GetResourceType() const{ return m_resourceType; } /** *

The target resource type of the recommendation preference to create.

*

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.

*/ inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; } /** *

The target resource type of the recommendation preference to create.

*

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.

*/ inline void SetResourceType(const ResourceType& value) { m_resourceTypeHasBeenSet = true; m_resourceType = value; } /** *

The target resource type of the recommendation preference to create.

*

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.

*/ inline void SetResourceType(ResourceType&& value) { m_resourceTypeHasBeenSet = true; m_resourceType = std::move(value); } /** *

The target resource type of the recommendation preference to create.

*

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.

*/ inline PutRecommendationPreferencesRequest& WithResourceType(const ResourceType& value) { SetResourceType(value); return *this;} /** *

The target resource type of the recommendation preference to create.

*

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.

*/ inline PutRecommendationPreferencesRequest& WithResourceType(ResourceType&& value) { SetResourceType(std::move(value)); return *this;} /** *

An object that describes the scope of the recommendation preference to * create.

You can create recommendation preferences 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.

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

*/ inline const Scope& GetScope() const{ return m_scope; } /** *

An object that describes the scope of the recommendation preference to * create.

You can create recommendation preferences 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.

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

*/ inline bool ScopeHasBeenSet() const { return m_scopeHasBeenSet; } /** *

An object that describes the scope of the recommendation preference to * create.

You can create recommendation preferences 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.

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

*/ inline void SetScope(const Scope& value) { m_scopeHasBeenSet = true; m_scope = value; } /** *

An object that describes the scope of the recommendation preference to * create.

You can create recommendation preferences 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.

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

*/ inline void SetScope(Scope&& value) { m_scopeHasBeenSet = true; m_scope = std::move(value); } /** *

An object that describes the scope of the recommendation preference to * create.

You can create recommendation preferences 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.

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

*/ inline PutRecommendationPreferencesRequest& WithScope(const Scope& value) { SetScope(value); return *this;} /** *

An object that describes the scope of the recommendation preference to * create.

You can create recommendation preferences 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.

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

*/ inline PutRecommendationPreferencesRequest& WithScope(Scope&& value) { SetScope(std::move(value)); return *this;} /** *

The status of the enhanced infrastructure metrics recommendation preference * to create or update.

Specify the Active status to activate * the preference, or specify Inactive to deactivate the * preference.

For more information, see Enhanced * infrastructure metrics in the Compute Optimizer User Guide.

*/ inline const EnhancedInfrastructureMetrics& GetEnhancedInfrastructureMetrics() const{ return m_enhancedInfrastructureMetrics; } /** *

The status of the enhanced infrastructure metrics recommendation preference * to create or update.

Specify the Active status to activate * the preference, or specify Inactive to deactivate the * preference.

For more information, see Enhanced * infrastructure metrics in the Compute Optimizer User Guide.

*/ inline bool EnhancedInfrastructureMetricsHasBeenSet() const { return m_enhancedInfrastructureMetricsHasBeenSet; } /** *

The status of the enhanced infrastructure metrics recommendation preference * to create or update.

Specify the Active status to activate * the preference, or specify Inactive to deactivate the * preference.

For more information, see Enhanced * infrastructure metrics in the Compute Optimizer User Guide.

*/ inline void SetEnhancedInfrastructureMetrics(const EnhancedInfrastructureMetrics& value) { m_enhancedInfrastructureMetricsHasBeenSet = true; m_enhancedInfrastructureMetrics = value; } /** *

The status of the enhanced infrastructure metrics recommendation preference * to create or update.

Specify the Active status to activate * the preference, or specify Inactive to deactivate the * preference.

For more information, see Enhanced * infrastructure metrics in the Compute Optimizer User Guide.

*/ inline void SetEnhancedInfrastructureMetrics(EnhancedInfrastructureMetrics&& value) { m_enhancedInfrastructureMetricsHasBeenSet = true; m_enhancedInfrastructureMetrics = std::move(value); } /** *

The status of the enhanced infrastructure metrics recommendation preference * to create or update.

Specify the Active status to activate * the preference, or specify Inactive to deactivate the * preference.

For more information, see Enhanced * infrastructure metrics in the Compute Optimizer User Guide.

*/ inline PutRecommendationPreferencesRequest& WithEnhancedInfrastructureMetrics(const EnhancedInfrastructureMetrics& value) { SetEnhancedInfrastructureMetrics(value); return *this;} /** *

The status of the enhanced infrastructure metrics recommendation preference * to create or update.

Specify the Active status to activate * the preference, or specify Inactive to deactivate the * preference.

For more information, see Enhanced * infrastructure metrics in the Compute Optimizer User Guide.

*/ inline PutRecommendationPreferencesRequest& WithEnhancedInfrastructureMetrics(EnhancedInfrastructureMetrics&& value) { SetEnhancedInfrastructureMetrics(std::move(value)); return *this;} /** *

The status of the inferred workload types recommendation preference to create * or update.

The inferred workload type feature is active by * default. To deactivate it, create a recommendation preference.

*

Specify the Inactive status to deactivate the feature, or * specify Active to activate it.

For more information, see Inferred * workload types in the Compute Optimizer User Guide.

*/ inline const InferredWorkloadTypesPreference& GetInferredWorkloadTypes() const{ return m_inferredWorkloadTypes; } /** *

The status of the inferred workload types recommendation preference to create * or update.

The inferred workload type feature is active by * default. To deactivate it, create a recommendation preference.

*

Specify the Inactive status to deactivate the feature, or * specify Active to activate it.

For more information, see Inferred * workload types in the Compute Optimizer User Guide.

*/ inline bool InferredWorkloadTypesHasBeenSet() const { return m_inferredWorkloadTypesHasBeenSet; } /** *

The status of the inferred workload types recommendation preference to create * or update.

The inferred workload type feature is active by * default. To deactivate it, create a recommendation preference.

*

Specify the Inactive status to deactivate the feature, or * specify Active to activate it.

For more information, see Inferred * workload types in the Compute Optimizer User Guide.

*/ inline void SetInferredWorkloadTypes(const InferredWorkloadTypesPreference& value) { m_inferredWorkloadTypesHasBeenSet = true; m_inferredWorkloadTypes = value; } /** *

The status of the inferred workload types recommendation preference to create * or update.

The inferred workload type feature is active by * default. To deactivate it, create a recommendation preference.

*

Specify the Inactive status to deactivate the feature, or * specify Active to activate it.

For more information, see Inferred * workload types in the Compute Optimizer User Guide.

*/ inline void SetInferredWorkloadTypes(InferredWorkloadTypesPreference&& value) { m_inferredWorkloadTypesHasBeenSet = true; m_inferredWorkloadTypes = std::move(value); } /** *

The status of the inferred workload types recommendation preference to create * or update.

The inferred workload type feature is active by * default. To deactivate it, create a recommendation preference.

*

Specify the Inactive status to deactivate the feature, or * specify Active to activate it.

For more information, see Inferred * workload types in the Compute Optimizer User Guide.

*/ inline PutRecommendationPreferencesRequest& WithInferredWorkloadTypes(const InferredWorkloadTypesPreference& value) { SetInferredWorkloadTypes(value); return *this;} /** *

The status of the inferred workload types recommendation preference to create * or update.

The inferred workload type feature is active by * default. To deactivate it, create a recommendation preference.

*

Specify the Inactive status to deactivate the feature, or * specify Active to activate it.

For more information, see Inferred * workload types in the Compute Optimizer User Guide.

*/ inline PutRecommendationPreferencesRequest& WithInferredWorkloadTypes(InferredWorkloadTypesPreference&& value) { SetInferredWorkloadTypes(std::move(value)); return *this;} /** *

The provider of the external metrics recommendation preference to create or * update.

Specify a valid provider in the source field to * activate the preference. To delete this preference, see the * DeleteRecommendationPreferences action.

This preference can only * be set for the Ec2Instance resource type.

For more * information, see External * metrics ingestion in the Compute Optimizer User Guide.

*/ inline const ExternalMetricsPreference& GetExternalMetricsPreference() const{ return m_externalMetricsPreference; } /** *

The provider of the external metrics recommendation preference to create or * update.

Specify a valid provider in the source field to * activate the preference. To delete this preference, see the * DeleteRecommendationPreferences action.

This preference can only * be set for the Ec2Instance resource type.

For more * information, see External * metrics ingestion in the Compute Optimizer User Guide.

*/ inline bool ExternalMetricsPreferenceHasBeenSet() const { return m_externalMetricsPreferenceHasBeenSet; } /** *

The provider of the external metrics recommendation preference to create or * update.

Specify a valid provider in the source field to * activate the preference. To delete this preference, see the * DeleteRecommendationPreferences action.

This preference can only * be set for the Ec2Instance resource type.

For more * information, see External * metrics ingestion in the Compute Optimizer User Guide.

*/ inline void SetExternalMetricsPreference(const ExternalMetricsPreference& value) { m_externalMetricsPreferenceHasBeenSet = true; m_externalMetricsPreference = value; } /** *

The provider of the external metrics recommendation preference to create or * update.

Specify a valid provider in the source field to * activate the preference. To delete this preference, see the * DeleteRecommendationPreferences action.

This preference can only * be set for the Ec2Instance resource type.

For more * information, see External * metrics ingestion in the Compute Optimizer User Guide.

*/ inline void SetExternalMetricsPreference(ExternalMetricsPreference&& value) { m_externalMetricsPreferenceHasBeenSet = true; m_externalMetricsPreference = std::move(value); } /** *

The provider of the external metrics recommendation preference to create or * update.

Specify a valid provider in the source field to * activate the preference. To delete this preference, see the * DeleteRecommendationPreferences action.

This preference can only * be set for the Ec2Instance resource type.

For more * information, see External * metrics ingestion in the Compute Optimizer User Guide.

*/ inline PutRecommendationPreferencesRequest& WithExternalMetricsPreference(const ExternalMetricsPreference& value) { SetExternalMetricsPreference(value); return *this;} /** *

The provider of the external metrics recommendation preference to create or * update.

Specify a valid provider in the source field to * activate the preference. To delete this preference, see the * DeleteRecommendationPreferences action.

This preference can only * be set for the Ec2Instance resource type.

For more * information, see External * metrics ingestion in the Compute Optimizer User Guide.

*/ inline PutRecommendationPreferencesRequest& WithExternalMetricsPreference(ExternalMetricsPreference&& value) { SetExternalMetricsPreference(std::move(value)); return *this;} private: ResourceType m_resourceType; bool m_resourceTypeHasBeenSet = false; Scope m_scope; bool m_scopeHasBeenSet = false; EnhancedInfrastructureMetrics m_enhancedInfrastructureMetrics; bool m_enhancedInfrastructureMetricsHasBeenSet = false; InferredWorkloadTypesPreference m_inferredWorkloadTypes; bool m_inferredWorkloadTypesHasBeenSet = false; ExternalMetricsPreference m_externalMetricsPreference; bool m_externalMetricsPreferenceHasBeenSet = false; }; } // namespace Model } // namespace ComputeOptimizer } // namespace Aws