1. Packages
  2. AWS
  3. API Docs
  4. computeoptimizer
  5. RecommendationPreferences
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

aws.computeoptimizer.RecommendationPreferences

Explore with Pulumi AI

aws logo
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Manages AWS Compute Optimizer recommendation preferences.

    Example Usage

    Lookback Period Preference

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.computeoptimizer.RecommendationPreferences("example", {
        resourceType: "Ec2Instance",
        scope: {
            name: "AccountId",
            value: "123456789012",
        },
        lookBackPeriod: "DAYS_32",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.computeoptimizer.RecommendationPreferences("example",
        resource_type="Ec2Instance",
        scope={
            "name": "AccountId",
            "value": "123456789012",
        },
        look_back_period="DAYS_32")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/computeoptimizer"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := computeoptimizer.NewRecommendationPreferences(ctx, "example", &computeoptimizer.RecommendationPreferencesArgs{
    			ResourceType: pulumi.String("Ec2Instance"),
    			Scope: &computeoptimizer.RecommendationPreferencesScopeArgs{
    				Name:  pulumi.String("AccountId"),
    				Value: pulumi.String("123456789012"),
    			},
    			LookBackPeriod: pulumi.String("DAYS_32"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.ComputeOptimizer.RecommendationPreferences("example", new()
        {
            ResourceType = "Ec2Instance",
            Scope = new Aws.ComputeOptimizer.Inputs.RecommendationPreferencesScopeArgs
            {
                Name = "AccountId",
                Value = "123456789012",
            },
            LookBackPeriod = "DAYS_32",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.computeoptimizer.RecommendationPreferences;
    import com.pulumi.aws.computeoptimizer.RecommendationPreferencesArgs;
    import com.pulumi.aws.computeoptimizer.inputs.RecommendationPreferencesScopeArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new RecommendationPreferences("example", RecommendationPreferencesArgs.builder()
                .resourceType("Ec2Instance")
                .scope(RecommendationPreferencesScopeArgs.builder()
                    .name("AccountId")
                    .value("123456789012")
                    .build())
                .lookBackPeriod("DAYS_32")
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:computeoptimizer:RecommendationPreferences
        properties:
          resourceType: Ec2Instance
          scope:
            name: AccountId
            value: '123456789012'
          lookBackPeriod: DAYS_32
    

    Multiple Preferences

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.computeoptimizer.RecommendationPreferences("example", {
        resourceType: "Ec2Instance",
        scope: {
            name: "AccountId",
            value: "123456789012",
        },
        enhancedInfrastructureMetrics: "Active",
        externalMetricsPreference: {
            source: "Datadog",
        },
        preferredResources: [{
            includeLists: [
                "m5.xlarge",
                "r5",
            ],
            name: "Ec2InstanceTypes",
        }],
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.computeoptimizer.RecommendationPreferences("example",
        resource_type="Ec2Instance",
        scope={
            "name": "AccountId",
            "value": "123456789012",
        },
        enhanced_infrastructure_metrics="Active",
        external_metrics_preference={
            "source": "Datadog",
        },
        preferred_resources=[{
            "include_lists": [
                "m5.xlarge",
                "r5",
            ],
            "name": "Ec2InstanceTypes",
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/computeoptimizer"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := computeoptimizer.NewRecommendationPreferences(ctx, "example", &computeoptimizer.RecommendationPreferencesArgs{
    			ResourceType: pulumi.String("Ec2Instance"),
    			Scope: &computeoptimizer.RecommendationPreferencesScopeArgs{
    				Name:  pulumi.String("AccountId"),
    				Value: pulumi.String("123456789012"),
    			},
    			EnhancedInfrastructureMetrics: pulumi.String("Active"),
    			ExternalMetricsPreference: &computeoptimizer.RecommendationPreferencesExternalMetricsPreferenceArgs{
    				Source: pulumi.String("Datadog"),
    			},
    			PreferredResources: computeoptimizer.RecommendationPreferencesPreferredResourceArray{
    				&computeoptimizer.RecommendationPreferencesPreferredResourceArgs{
    					IncludeLists: pulumi.StringArray{
    						pulumi.String("m5.xlarge"),
    						pulumi.String("r5"),
    					},
    					Name: pulumi.String("Ec2InstanceTypes"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.ComputeOptimizer.RecommendationPreferences("example", new()
        {
            ResourceType = "Ec2Instance",
            Scope = new Aws.ComputeOptimizer.Inputs.RecommendationPreferencesScopeArgs
            {
                Name = "AccountId",
                Value = "123456789012",
            },
            EnhancedInfrastructureMetrics = "Active",
            ExternalMetricsPreference = new Aws.ComputeOptimizer.Inputs.RecommendationPreferencesExternalMetricsPreferenceArgs
            {
                Source = "Datadog",
            },
            PreferredResources = new[]
            {
                new Aws.ComputeOptimizer.Inputs.RecommendationPreferencesPreferredResourceArgs
                {
                    IncludeLists = new[]
                    {
                        "m5.xlarge",
                        "r5",
                    },
                    Name = "Ec2InstanceTypes",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.computeoptimizer.RecommendationPreferences;
    import com.pulumi.aws.computeoptimizer.RecommendationPreferencesArgs;
    import com.pulumi.aws.computeoptimizer.inputs.RecommendationPreferencesScopeArgs;
    import com.pulumi.aws.computeoptimizer.inputs.RecommendationPreferencesExternalMetricsPreferenceArgs;
    import com.pulumi.aws.computeoptimizer.inputs.RecommendationPreferencesPreferredResourceArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new RecommendationPreferences("example", RecommendationPreferencesArgs.builder()
                .resourceType("Ec2Instance")
                .scope(RecommendationPreferencesScopeArgs.builder()
                    .name("AccountId")
                    .value("123456789012")
                    .build())
                .enhancedInfrastructureMetrics("Active")
                .externalMetricsPreference(RecommendationPreferencesExternalMetricsPreferenceArgs.builder()
                    .source("Datadog")
                    .build())
                .preferredResources(RecommendationPreferencesPreferredResourceArgs.builder()
                    .includeLists(                
                        "m5.xlarge",
                        "r5")
                    .name("Ec2InstanceTypes")
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:computeoptimizer:RecommendationPreferences
        properties:
          resourceType: Ec2Instance
          scope:
            name: AccountId
            value: '123456789012'
          enhancedInfrastructureMetrics: Active
          externalMetricsPreference:
            source: Datadog
          preferredResources:
            - includeLists:
                - m5.xlarge
                - r5
              name: Ec2InstanceTypes
    

    Create RecommendationPreferences Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new RecommendationPreferences(name: string, args: RecommendationPreferencesArgs, opts?: CustomResourceOptions);
    @overload
    def RecommendationPreferences(resource_name: str,
                                  args: RecommendationPreferencesArgs,
                                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def RecommendationPreferences(resource_name: str,
                                  opts: Optional[ResourceOptions] = None,
                                  resource_type: Optional[str] = None,
                                  enhanced_infrastructure_metrics: Optional[str] = None,
                                  external_metrics_preference: Optional[RecommendationPreferencesExternalMetricsPreferenceArgs] = None,
                                  inferred_workload_types: Optional[str] = None,
                                  look_back_period: Optional[str] = None,
                                  preferred_resources: Optional[Sequence[RecommendationPreferencesPreferredResourceArgs]] = None,
                                  savings_estimation_mode: Optional[str] = None,
                                  scope: Optional[RecommendationPreferencesScopeArgs] = None,
                                  utilization_preferences: Optional[Sequence[RecommendationPreferencesUtilizationPreferenceArgs]] = None)
    func NewRecommendationPreferences(ctx *Context, name string, args RecommendationPreferencesArgs, opts ...ResourceOption) (*RecommendationPreferences, error)
    public RecommendationPreferences(string name, RecommendationPreferencesArgs args, CustomResourceOptions? opts = null)
    public RecommendationPreferences(String name, RecommendationPreferencesArgs args)
    public RecommendationPreferences(String name, RecommendationPreferencesArgs args, CustomResourceOptions options)
    
    type: aws:computeoptimizer:RecommendationPreferences
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args RecommendationPreferencesArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args RecommendationPreferencesArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args RecommendationPreferencesArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RecommendationPreferencesArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RecommendationPreferencesArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var recommendationPreferencesResource = new Aws.ComputeOptimizer.RecommendationPreferences("recommendationPreferencesResource", new()
    {
        ResourceType = "string",
        EnhancedInfrastructureMetrics = "string",
        ExternalMetricsPreference = new Aws.ComputeOptimizer.Inputs.RecommendationPreferencesExternalMetricsPreferenceArgs
        {
            Source = "string",
        },
        InferredWorkloadTypes = "string",
        LookBackPeriod = "string",
        PreferredResources = new[]
        {
            new Aws.ComputeOptimizer.Inputs.RecommendationPreferencesPreferredResourceArgs
            {
                Name = "string",
                ExcludeLists = new[]
                {
                    "string",
                },
                IncludeLists = new[]
                {
                    "string",
                },
            },
        },
        SavingsEstimationMode = "string",
        Scope = new Aws.ComputeOptimizer.Inputs.RecommendationPreferencesScopeArgs
        {
            Name = "string",
            Value = "string",
        },
        UtilizationPreferences = new[]
        {
            new Aws.ComputeOptimizer.Inputs.RecommendationPreferencesUtilizationPreferenceArgs
            {
                MetricName = "string",
                MetricParameters = new Aws.ComputeOptimizer.Inputs.RecommendationPreferencesUtilizationPreferenceMetricParametersArgs
                {
                    Headroom = "string",
                    Threshold = "string",
                },
            },
        },
    });
    
    example, err := computeoptimizer.NewRecommendationPreferences(ctx, "recommendationPreferencesResource", &computeoptimizer.RecommendationPreferencesArgs{
    	ResourceType:                  pulumi.String("string"),
    	EnhancedInfrastructureMetrics: pulumi.String("string"),
    	ExternalMetricsPreference: &computeoptimizer.RecommendationPreferencesExternalMetricsPreferenceArgs{
    		Source: pulumi.String("string"),
    	},
    	InferredWorkloadTypes: pulumi.String("string"),
    	LookBackPeriod:        pulumi.String("string"),
    	PreferredResources: computeoptimizer.RecommendationPreferencesPreferredResourceArray{
    		&computeoptimizer.RecommendationPreferencesPreferredResourceArgs{
    			Name: pulumi.String("string"),
    			ExcludeLists: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			IncludeLists: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    		},
    	},
    	SavingsEstimationMode: pulumi.String("string"),
    	Scope: &computeoptimizer.RecommendationPreferencesScopeArgs{
    		Name:  pulumi.String("string"),
    		Value: pulumi.String("string"),
    	},
    	UtilizationPreferences: computeoptimizer.RecommendationPreferencesUtilizationPreferenceArray{
    		&computeoptimizer.RecommendationPreferencesUtilizationPreferenceArgs{
    			MetricName: pulumi.String("string"),
    			MetricParameters: &computeoptimizer.RecommendationPreferencesUtilizationPreferenceMetricParametersArgs{
    				Headroom:  pulumi.String("string"),
    				Threshold: pulumi.String("string"),
    			},
    		},
    	},
    })
    
    var recommendationPreferencesResource = new RecommendationPreferences("recommendationPreferencesResource", RecommendationPreferencesArgs.builder()
        .resourceType("string")
        .enhancedInfrastructureMetrics("string")
        .externalMetricsPreference(RecommendationPreferencesExternalMetricsPreferenceArgs.builder()
            .source("string")
            .build())
        .inferredWorkloadTypes("string")
        .lookBackPeriod("string")
        .preferredResources(RecommendationPreferencesPreferredResourceArgs.builder()
            .name("string")
            .excludeLists("string")
            .includeLists("string")
            .build())
        .savingsEstimationMode("string")
        .scope(RecommendationPreferencesScopeArgs.builder()
            .name("string")
            .value("string")
            .build())
        .utilizationPreferences(RecommendationPreferencesUtilizationPreferenceArgs.builder()
            .metricName("string")
            .metricParameters(RecommendationPreferencesUtilizationPreferenceMetricParametersArgs.builder()
                .headroom("string")
                .threshold("string")
                .build())
            .build())
        .build());
    
    recommendation_preferences_resource = aws.computeoptimizer.RecommendationPreferences("recommendationPreferencesResource",
        resource_type="string",
        enhanced_infrastructure_metrics="string",
        external_metrics_preference={
            "source": "string",
        },
        inferred_workload_types="string",
        look_back_period="string",
        preferred_resources=[{
            "name": "string",
            "exclude_lists": ["string"],
            "include_lists": ["string"],
        }],
        savings_estimation_mode="string",
        scope={
            "name": "string",
            "value": "string",
        },
        utilization_preferences=[{
            "metric_name": "string",
            "metric_parameters": {
                "headroom": "string",
                "threshold": "string",
            },
        }])
    
    const recommendationPreferencesResource = new aws.computeoptimizer.RecommendationPreferences("recommendationPreferencesResource", {
        resourceType: "string",
        enhancedInfrastructureMetrics: "string",
        externalMetricsPreference: {
            source: "string",
        },
        inferredWorkloadTypes: "string",
        lookBackPeriod: "string",
        preferredResources: [{
            name: "string",
            excludeLists: ["string"],
            includeLists: ["string"],
        }],
        savingsEstimationMode: "string",
        scope: {
            name: "string",
            value: "string",
        },
        utilizationPreferences: [{
            metricName: "string",
            metricParameters: {
                headroom: "string",
                threshold: "string",
            },
        }],
    });
    
    type: aws:computeoptimizer:RecommendationPreferences
    properties:
        enhancedInfrastructureMetrics: string
        externalMetricsPreference:
            source: string
        inferredWorkloadTypes: string
        lookBackPeriod: string
        preferredResources:
            - excludeLists:
                - string
              includeLists:
                - string
              name: string
        resourceType: string
        savingsEstimationMode: string
        scope:
            name: string
            value: string
        utilizationPreferences:
            - metricName: string
              metricParameters:
                headroom: string
                threshold: string
    

    RecommendationPreferences Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The RecommendationPreferences resource accepts the following input properties:

    ResourceType string
    The target resource type of the recommendation preferences. Valid values: Ec2Instance, AutoScalingGroup, RdsDBInstance.
    EnhancedInfrastructureMetrics string
    The status of the enhanced infrastructure metrics recommendation preference. Valid values: Active, Inactive.
    ExternalMetricsPreference RecommendationPreferencesExternalMetricsPreference
    The provider of the external metrics recommendation preference. See External Metrics Preference below.
    InferredWorkloadTypes string
    The status of the inferred workload types recommendation preference. Valid values: Active, Inactive.
    LookBackPeriod string
    The preference to control the number of days the utilization metrics of the AWS resource are analyzed. Valid values: DAYS_14, DAYS_32, DAYS_93.
    PreferredResources List<RecommendationPreferencesPreferredResource>
    The preference to control which resource type values are considered when generating rightsizing recommendations. See Preferred Resources below.
    SavingsEstimationMode string
    The status of the savings estimation mode preference. Valid values: AfterDiscounts, BeforeDiscounts.
    Scope RecommendationPreferencesScope
    The scope of the recommendation preferences. See Scope below.
    UtilizationPreferences List<RecommendationPreferencesUtilizationPreference>
    The preference to control the resource’s CPU utilization threshold, CPU utilization headroom, and memory utilization headroom. See Utilization Preferences below.
    ResourceType string
    The target resource type of the recommendation preferences. Valid values: Ec2Instance, AutoScalingGroup, RdsDBInstance.
    EnhancedInfrastructureMetrics string
    The status of the enhanced infrastructure metrics recommendation preference. Valid values: Active, Inactive.
    ExternalMetricsPreference RecommendationPreferencesExternalMetricsPreferenceArgs
    The provider of the external metrics recommendation preference. See External Metrics Preference below.
    InferredWorkloadTypes string
    The status of the inferred workload types recommendation preference. Valid values: Active, Inactive.
    LookBackPeriod string
    The preference to control the number of days the utilization metrics of the AWS resource are analyzed. Valid values: DAYS_14, DAYS_32, DAYS_93.
    PreferredResources []RecommendationPreferencesPreferredResourceArgs
    The preference to control which resource type values are considered when generating rightsizing recommendations. See Preferred Resources below.
    SavingsEstimationMode string
    The status of the savings estimation mode preference. Valid values: AfterDiscounts, BeforeDiscounts.
    Scope RecommendationPreferencesScopeArgs
    The scope of the recommendation preferences. See Scope below.
    UtilizationPreferences []RecommendationPreferencesUtilizationPreferenceArgs
    The preference to control the resource’s CPU utilization threshold, CPU utilization headroom, and memory utilization headroom. See Utilization Preferences below.
    resourceType String
    The target resource type of the recommendation preferences. Valid values: Ec2Instance, AutoScalingGroup, RdsDBInstance.
    enhancedInfrastructureMetrics String
    The status of the enhanced infrastructure metrics recommendation preference. Valid values: Active, Inactive.
    externalMetricsPreference RecommendationPreferencesExternalMetricsPreference
    The provider of the external metrics recommendation preference. See External Metrics Preference below.
    inferredWorkloadTypes String
    The status of the inferred workload types recommendation preference. Valid values: Active, Inactive.
    lookBackPeriod String
    The preference to control the number of days the utilization metrics of the AWS resource are analyzed. Valid values: DAYS_14, DAYS_32, DAYS_93.
    preferredResources List<RecommendationPreferencesPreferredResource>
    The preference to control which resource type values are considered when generating rightsizing recommendations. See Preferred Resources below.
    savingsEstimationMode String
    The status of the savings estimation mode preference. Valid values: AfterDiscounts, BeforeDiscounts.
    scope RecommendationPreferencesScope
    The scope of the recommendation preferences. See Scope below.
    utilizationPreferences List<RecommendationPreferencesUtilizationPreference>
    The preference to control the resource’s CPU utilization threshold, CPU utilization headroom, and memory utilization headroom. See Utilization Preferences below.
    resourceType string
    The target resource type of the recommendation preferences. Valid values: Ec2Instance, AutoScalingGroup, RdsDBInstance.
    enhancedInfrastructureMetrics string
    The status of the enhanced infrastructure metrics recommendation preference. Valid values: Active, Inactive.
    externalMetricsPreference RecommendationPreferencesExternalMetricsPreference
    The provider of the external metrics recommendation preference. See External Metrics Preference below.
    inferredWorkloadTypes string
    The status of the inferred workload types recommendation preference. Valid values: Active, Inactive.
    lookBackPeriod string
    The preference to control the number of days the utilization metrics of the AWS resource are analyzed. Valid values: DAYS_14, DAYS_32, DAYS_93.
    preferredResources RecommendationPreferencesPreferredResource[]
    The preference to control which resource type values are considered when generating rightsizing recommendations. See Preferred Resources below.
    savingsEstimationMode string
    The status of the savings estimation mode preference. Valid values: AfterDiscounts, BeforeDiscounts.
    scope RecommendationPreferencesScope
    The scope of the recommendation preferences. See Scope below.
    utilizationPreferences RecommendationPreferencesUtilizationPreference[]
    The preference to control the resource’s CPU utilization threshold, CPU utilization headroom, and memory utilization headroom. See Utilization Preferences below.
    resource_type str
    The target resource type of the recommendation preferences. Valid values: Ec2Instance, AutoScalingGroup, RdsDBInstance.
    enhanced_infrastructure_metrics str
    The status of the enhanced infrastructure metrics recommendation preference. Valid values: Active, Inactive.
    external_metrics_preference RecommendationPreferencesExternalMetricsPreferenceArgs
    The provider of the external metrics recommendation preference. See External Metrics Preference below.
    inferred_workload_types str
    The status of the inferred workload types recommendation preference. Valid values: Active, Inactive.
    look_back_period str
    The preference to control the number of days the utilization metrics of the AWS resource are analyzed. Valid values: DAYS_14, DAYS_32, DAYS_93.
    preferred_resources Sequence[RecommendationPreferencesPreferredResourceArgs]
    The preference to control which resource type values are considered when generating rightsizing recommendations. See Preferred Resources below.
    savings_estimation_mode str
    The status of the savings estimation mode preference. Valid values: AfterDiscounts, BeforeDiscounts.
    scope RecommendationPreferencesScopeArgs
    The scope of the recommendation preferences. See Scope below.
    utilization_preferences Sequence[RecommendationPreferencesUtilizationPreferenceArgs]
    The preference to control the resource’s CPU utilization threshold, CPU utilization headroom, and memory utilization headroom. See Utilization Preferences below.
    resourceType String
    The target resource type of the recommendation preferences. Valid values: Ec2Instance, AutoScalingGroup, RdsDBInstance.
    enhancedInfrastructureMetrics String
    The status of the enhanced infrastructure metrics recommendation preference. Valid values: Active, Inactive.
    externalMetricsPreference Property Map
    The provider of the external metrics recommendation preference. See External Metrics Preference below.
    inferredWorkloadTypes String
    The status of the inferred workload types recommendation preference. Valid values: Active, Inactive.
    lookBackPeriod String
    The preference to control the number of days the utilization metrics of the AWS resource are analyzed. Valid values: DAYS_14, DAYS_32, DAYS_93.
    preferredResources List<Property Map>
    The preference to control which resource type values are considered when generating rightsizing recommendations. See Preferred Resources below.
    savingsEstimationMode String
    The status of the savings estimation mode preference. Valid values: AfterDiscounts, BeforeDiscounts.
    scope Property Map
    The scope of the recommendation preferences. See Scope below.
    utilizationPreferences List<Property Map>
    The preference to control the resource’s CPU utilization threshold, CPU utilization headroom, and memory utilization headroom. See Utilization Preferences below.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the RecommendationPreferences resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing RecommendationPreferences Resource

    Get an existing RecommendationPreferences resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: RecommendationPreferencesState, opts?: CustomResourceOptions): RecommendationPreferences
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            enhanced_infrastructure_metrics: Optional[str] = None,
            external_metrics_preference: Optional[RecommendationPreferencesExternalMetricsPreferenceArgs] = None,
            inferred_workload_types: Optional[str] = None,
            look_back_period: Optional[str] = None,
            preferred_resources: Optional[Sequence[RecommendationPreferencesPreferredResourceArgs]] = None,
            resource_type: Optional[str] = None,
            savings_estimation_mode: Optional[str] = None,
            scope: Optional[RecommendationPreferencesScopeArgs] = None,
            utilization_preferences: Optional[Sequence[RecommendationPreferencesUtilizationPreferenceArgs]] = None) -> RecommendationPreferences
    func GetRecommendationPreferences(ctx *Context, name string, id IDInput, state *RecommendationPreferencesState, opts ...ResourceOption) (*RecommendationPreferences, error)
    public static RecommendationPreferences Get(string name, Input<string> id, RecommendationPreferencesState? state, CustomResourceOptions? opts = null)
    public static RecommendationPreferences get(String name, Output<String> id, RecommendationPreferencesState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    EnhancedInfrastructureMetrics string
    The status of the enhanced infrastructure metrics recommendation preference. Valid values: Active, Inactive.
    ExternalMetricsPreference RecommendationPreferencesExternalMetricsPreference
    The provider of the external metrics recommendation preference. See External Metrics Preference below.
    InferredWorkloadTypes string
    The status of the inferred workload types recommendation preference. Valid values: Active, Inactive.
    LookBackPeriod string
    The preference to control the number of days the utilization metrics of the AWS resource are analyzed. Valid values: DAYS_14, DAYS_32, DAYS_93.
    PreferredResources List<RecommendationPreferencesPreferredResource>
    The preference to control which resource type values are considered when generating rightsizing recommendations. See Preferred Resources below.
    ResourceType string
    The target resource type of the recommendation preferences. Valid values: Ec2Instance, AutoScalingGroup, RdsDBInstance.
    SavingsEstimationMode string
    The status of the savings estimation mode preference. Valid values: AfterDiscounts, BeforeDiscounts.
    Scope RecommendationPreferencesScope
    The scope of the recommendation preferences. See Scope below.
    UtilizationPreferences List<RecommendationPreferencesUtilizationPreference>
    The preference to control the resource’s CPU utilization threshold, CPU utilization headroom, and memory utilization headroom. See Utilization Preferences below.
    EnhancedInfrastructureMetrics string
    The status of the enhanced infrastructure metrics recommendation preference. Valid values: Active, Inactive.
    ExternalMetricsPreference RecommendationPreferencesExternalMetricsPreferenceArgs
    The provider of the external metrics recommendation preference. See External Metrics Preference below.
    InferredWorkloadTypes string
    The status of the inferred workload types recommendation preference. Valid values: Active, Inactive.
    LookBackPeriod string
    The preference to control the number of days the utilization metrics of the AWS resource are analyzed. Valid values: DAYS_14, DAYS_32, DAYS_93.
    PreferredResources []RecommendationPreferencesPreferredResourceArgs
    The preference to control which resource type values are considered when generating rightsizing recommendations. See Preferred Resources below.
    ResourceType string
    The target resource type of the recommendation preferences. Valid values: Ec2Instance, AutoScalingGroup, RdsDBInstance.
    SavingsEstimationMode string
    The status of the savings estimation mode preference. Valid values: AfterDiscounts, BeforeDiscounts.
    Scope RecommendationPreferencesScopeArgs
    The scope of the recommendation preferences. See Scope below.
    UtilizationPreferences []RecommendationPreferencesUtilizationPreferenceArgs
    The preference to control the resource’s CPU utilization threshold, CPU utilization headroom, and memory utilization headroom. See Utilization Preferences below.
    enhancedInfrastructureMetrics String
    The status of the enhanced infrastructure metrics recommendation preference. Valid values: Active, Inactive.
    externalMetricsPreference RecommendationPreferencesExternalMetricsPreference
    The provider of the external metrics recommendation preference. See External Metrics Preference below.
    inferredWorkloadTypes String
    The status of the inferred workload types recommendation preference. Valid values: Active, Inactive.
    lookBackPeriod String
    The preference to control the number of days the utilization metrics of the AWS resource are analyzed. Valid values: DAYS_14, DAYS_32, DAYS_93.
    preferredResources List<RecommendationPreferencesPreferredResource>
    The preference to control which resource type values are considered when generating rightsizing recommendations. See Preferred Resources below.
    resourceType String
    The target resource type of the recommendation preferences. Valid values: Ec2Instance, AutoScalingGroup, RdsDBInstance.
    savingsEstimationMode String
    The status of the savings estimation mode preference. Valid values: AfterDiscounts, BeforeDiscounts.
    scope RecommendationPreferencesScope
    The scope of the recommendation preferences. See Scope below.
    utilizationPreferences List<RecommendationPreferencesUtilizationPreference>
    The preference to control the resource’s CPU utilization threshold, CPU utilization headroom, and memory utilization headroom. See Utilization Preferences below.
    enhancedInfrastructureMetrics string
    The status of the enhanced infrastructure metrics recommendation preference. Valid values: Active, Inactive.
    externalMetricsPreference RecommendationPreferencesExternalMetricsPreference
    The provider of the external metrics recommendation preference. See External Metrics Preference below.
    inferredWorkloadTypes string
    The status of the inferred workload types recommendation preference. Valid values: Active, Inactive.
    lookBackPeriod string
    The preference to control the number of days the utilization metrics of the AWS resource are analyzed. Valid values: DAYS_14, DAYS_32, DAYS_93.
    preferredResources RecommendationPreferencesPreferredResource[]
    The preference to control which resource type values are considered when generating rightsizing recommendations. See Preferred Resources below.
    resourceType string
    The target resource type of the recommendation preferences. Valid values: Ec2Instance, AutoScalingGroup, RdsDBInstance.
    savingsEstimationMode string
    The status of the savings estimation mode preference. Valid values: AfterDiscounts, BeforeDiscounts.
    scope RecommendationPreferencesScope
    The scope of the recommendation preferences. See Scope below.
    utilizationPreferences RecommendationPreferencesUtilizationPreference[]
    The preference to control the resource’s CPU utilization threshold, CPU utilization headroom, and memory utilization headroom. See Utilization Preferences below.
    enhanced_infrastructure_metrics str
    The status of the enhanced infrastructure metrics recommendation preference. Valid values: Active, Inactive.
    external_metrics_preference RecommendationPreferencesExternalMetricsPreferenceArgs
    The provider of the external metrics recommendation preference. See External Metrics Preference below.
    inferred_workload_types str
    The status of the inferred workload types recommendation preference. Valid values: Active, Inactive.
    look_back_period str
    The preference to control the number of days the utilization metrics of the AWS resource are analyzed. Valid values: DAYS_14, DAYS_32, DAYS_93.
    preferred_resources Sequence[RecommendationPreferencesPreferredResourceArgs]
    The preference to control which resource type values are considered when generating rightsizing recommendations. See Preferred Resources below.
    resource_type str
    The target resource type of the recommendation preferences. Valid values: Ec2Instance, AutoScalingGroup, RdsDBInstance.
    savings_estimation_mode str
    The status of the savings estimation mode preference. Valid values: AfterDiscounts, BeforeDiscounts.
    scope RecommendationPreferencesScopeArgs
    The scope of the recommendation preferences. See Scope below.
    utilization_preferences Sequence[RecommendationPreferencesUtilizationPreferenceArgs]
    The preference to control the resource’s CPU utilization threshold, CPU utilization headroom, and memory utilization headroom. See Utilization Preferences below.
    enhancedInfrastructureMetrics String
    The status of the enhanced infrastructure metrics recommendation preference. Valid values: Active, Inactive.
    externalMetricsPreference Property Map
    The provider of the external metrics recommendation preference. See External Metrics Preference below.
    inferredWorkloadTypes String
    The status of the inferred workload types recommendation preference. Valid values: Active, Inactive.
    lookBackPeriod String
    The preference to control the number of days the utilization metrics of the AWS resource are analyzed. Valid values: DAYS_14, DAYS_32, DAYS_93.
    preferredResources List<Property Map>
    The preference to control which resource type values are considered when generating rightsizing recommendations. See Preferred Resources below.
    resourceType String
    The target resource type of the recommendation preferences. Valid values: Ec2Instance, AutoScalingGroup, RdsDBInstance.
    savingsEstimationMode String
    The status of the savings estimation mode preference. Valid values: AfterDiscounts, BeforeDiscounts.
    scope Property Map
    The scope of the recommendation preferences. See Scope below.
    utilizationPreferences List<Property Map>
    The preference to control the resource’s CPU utilization threshold, CPU utilization headroom, and memory utilization headroom. See Utilization Preferences below.

    Supporting Types

    RecommendationPreferencesExternalMetricsPreference, RecommendationPreferencesExternalMetricsPreferenceArgs

    Source string
    The source options for external metrics preferences. Valid values: Datadog, Dynatrace, NewRelic, Instana.
    Source string
    The source options for external metrics preferences. Valid values: Datadog, Dynatrace, NewRelic, Instana.
    source String
    The source options for external metrics preferences. Valid values: Datadog, Dynatrace, NewRelic, Instana.
    source string
    The source options for external metrics preferences. Valid values: Datadog, Dynatrace, NewRelic, Instana.
    source str
    The source options for external metrics preferences. Valid values: Datadog, Dynatrace, NewRelic, Instana.
    source String
    The source options for external metrics preferences. Valid values: Datadog, Dynatrace, NewRelic, Instana.

    RecommendationPreferencesPreferredResource, RecommendationPreferencesPreferredResourceArgs

    Name string
    ExcludeLists List<string>
    The preferred resource type values to exclude from the recommendation candidates. If this isn’t specified, all supported resources are included by default.
    IncludeLists List<string>
    The preferred resource type values to include in the recommendation candidates. You can specify the exact resource type value, such as "m5.large", or use wild card expressions, such as "m5". If this isn’t specified, all supported resources are included by default.
    Name string
    ExcludeLists []string
    The preferred resource type values to exclude from the recommendation candidates. If this isn’t specified, all supported resources are included by default.
    IncludeLists []string
    The preferred resource type values to include in the recommendation candidates. You can specify the exact resource type value, such as "m5.large", or use wild card expressions, such as "m5". If this isn’t specified, all supported resources are included by default.
    name String
    excludeLists List<String>
    The preferred resource type values to exclude from the recommendation candidates. If this isn’t specified, all supported resources are included by default.
    includeLists List<String>
    The preferred resource type values to include in the recommendation candidates. You can specify the exact resource type value, such as "m5.large", or use wild card expressions, such as "m5". If this isn’t specified, all supported resources are included by default.
    name string
    excludeLists string[]
    The preferred resource type values to exclude from the recommendation candidates. If this isn’t specified, all supported resources are included by default.
    includeLists string[]
    The preferred resource type values to include in the recommendation candidates. You can specify the exact resource type value, such as "m5.large", or use wild card expressions, such as "m5". If this isn’t specified, all supported resources are included by default.
    name str
    exclude_lists Sequence[str]
    The preferred resource type values to exclude from the recommendation candidates. If this isn’t specified, all supported resources are included by default.
    include_lists Sequence[str]
    The preferred resource type values to include in the recommendation candidates. You can specify the exact resource type value, such as "m5.large", or use wild card expressions, such as "m5". If this isn’t specified, all supported resources are included by default.
    name String
    excludeLists List<String>
    The preferred resource type values to exclude from the recommendation candidates. If this isn’t specified, all supported resources are included by default.
    includeLists List<String>
    The preferred resource type values to include in the recommendation candidates. You can specify the exact resource type value, such as "m5.large", or use wild card expressions, such as "m5". If this isn’t specified, all supported resources are included by default.

    RecommendationPreferencesScope, RecommendationPreferencesScopeArgs

    Name string
    The name of the scope. Valid values: Organization, AccountId, ResourceArn.
    Value string
    The value of the scope. ALL_ACCOUNTS for Organization scopes, AWS account ID for AccountId scopes, ARN of an EC2 instance or an Auto Scaling group for ResourceArn scopes.
    Name string
    The name of the scope. Valid values: Organization, AccountId, ResourceArn.
    Value string
    The value of the scope. ALL_ACCOUNTS for Organization scopes, AWS account ID for AccountId scopes, ARN of an EC2 instance or an Auto Scaling group for ResourceArn scopes.
    name String
    The name of the scope. Valid values: Organization, AccountId, ResourceArn.
    value String
    The value of the scope. ALL_ACCOUNTS for Organization scopes, AWS account ID for AccountId scopes, ARN of an EC2 instance or an Auto Scaling group for ResourceArn scopes.
    name string
    The name of the scope. Valid values: Organization, AccountId, ResourceArn.
    value string
    The value of the scope. ALL_ACCOUNTS for Organization scopes, AWS account ID for AccountId scopes, ARN of an EC2 instance or an Auto Scaling group for ResourceArn scopes.
    name str
    The name of the scope. Valid values: Organization, AccountId, ResourceArn.
    value str
    The value of the scope. ALL_ACCOUNTS for Organization scopes, AWS account ID for AccountId scopes, ARN of an EC2 instance or an Auto Scaling group for ResourceArn scopes.
    name String
    The name of the scope. Valid values: Organization, AccountId, ResourceArn.
    value String
    The value of the scope. ALL_ACCOUNTS for Organization scopes, AWS account ID for AccountId scopes, ARN of an EC2 instance or an Auto Scaling group for ResourceArn scopes.

    RecommendationPreferencesUtilizationPreference, RecommendationPreferencesUtilizationPreferenceArgs

    MetricName string
    The name of the resource utilization metric name to customize. Valid values: CpuUtilization, MemoryUtilization.
    MetricParameters RecommendationPreferencesUtilizationPreferenceMetricParameters
    The parameters to set when customizing the resource utilization thresholds.
    MetricName string
    The name of the resource utilization metric name to customize. Valid values: CpuUtilization, MemoryUtilization.
    MetricParameters RecommendationPreferencesUtilizationPreferenceMetricParameters
    The parameters to set when customizing the resource utilization thresholds.
    metricName String
    The name of the resource utilization metric name to customize. Valid values: CpuUtilization, MemoryUtilization.
    metricParameters RecommendationPreferencesUtilizationPreferenceMetricParameters
    The parameters to set when customizing the resource utilization thresholds.
    metricName string
    The name of the resource utilization metric name to customize. Valid values: CpuUtilization, MemoryUtilization.
    metricParameters RecommendationPreferencesUtilizationPreferenceMetricParameters
    The parameters to set when customizing the resource utilization thresholds.
    metric_name str
    The name of the resource utilization metric name to customize. Valid values: CpuUtilization, MemoryUtilization.
    metric_parameters RecommendationPreferencesUtilizationPreferenceMetricParameters
    The parameters to set when customizing the resource utilization thresholds.
    metricName String
    The name of the resource utilization metric name to customize. Valid values: CpuUtilization, MemoryUtilization.
    metricParameters Property Map
    The parameters to set when customizing the resource utilization thresholds.

    RecommendationPreferencesUtilizationPreferenceMetricParameters, RecommendationPreferencesUtilizationPreferenceMetricParametersArgs

    Headroom string
    The headroom value in percentage used for the specified metric parameter. Valid values: PERCENT_30, PERCENT_20, PERCENT_10, PERCENT_0.
    Threshold string
    The threshold value used for the specified metric parameter. You can only specify the threshold value for CPU utilization. Valid values: P90, P95, P99_5.
    Headroom string
    The headroom value in percentage used for the specified metric parameter. Valid values: PERCENT_30, PERCENT_20, PERCENT_10, PERCENT_0.
    Threshold string
    The threshold value used for the specified metric parameter. You can only specify the threshold value for CPU utilization. Valid values: P90, P95, P99_5.
    headroom String
    The headroom value in percentage used for the specified metric parameter. Valid values: PERCENT_30, PERCENT_20, PERCENT_10, PERCENT_0.
    threshold String
    The threshold value used for the specified metric parameter. You can only specify the threshold value for CPU utilization. Valid values: P90, P95, P99_5.
    headroom string
    The headroom value in percentage used for the specified metric parameter. Valid values: PERCENT_30, PERCENT_20, PERCENT_10, PERCENT_0.
    threshold string
    The threshold value used for the specified metric parameter. You can only specify the threshold value for CPU utilization. Valid values: P90, P95, P99_5.
    headroom str
    The headroom value in percentage used for the specified metric parameter. Valid values: PERCENT_30, PERCENT_20, PERCENT_10, PERCENT_0.
    threshold str
    The threshold value used for the specified metric parameter. You can only specify the threshold value for CPU utilization. Valid values: P90, P95, P99_5.
    headroom String
    The headroom value in percentage used for the specified metric parameter. Valid values: PERCENT_30, PERCENT_20, PERCENT_10, PERCENT_0.
    threshold String
    The threshold value used for the specified metric parameter. You can only specify the threshold value for CPU utilization. Valid values: P90, P95, P99_5.

    Import

    Using pulumi import, import recommendation preferences using the resource type, scope name and scope value. For example:

    $ pulumi import aws:computeoptimizer/recommendationPreferences:RecommendationPreferences example Ec2Instance,AccountId,123456789012
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi