@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
214 lines (213 loc) • 10.2 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* Manages AWS Compute Optimizer recommendation preferences.
*
* ## Example Usage
*
* ### Lookback Period Preference
*
* ```typescript
* 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",
* });
* ```
*
* ### Multiple Preferences
*
* ```typescript
* 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
*
* Using `pulumi import`, import recommendation preferences using the resource type, scope name and scope value. For example:
*
* ```sh
* $ pulumi import aws:computeoptimizer/recommendationPreferences:RecommendationPreferences example Ec2Instance,AccountId,123456789012
* ```
*/
export declare class RecommendationPreferences extends pulumi.CustomResource {
/**
* Get an existing RecommendationPreferences resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: RecommendationPreferencesState, opts?: pulumi.CustomResourceOptions): RecommendationPreferences;
/**
* Returns true if the given object is an instance of RecommendationPreferences. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is RecommendationPreferences;
/**
* The status of the enhanced infrastructure metrics recommendation preference. Valid values: `Active`, `Inactive`.
*/
readonly enhancedInfrastructureMetrics: pulumi.Output<string | undefined>;
/**
* The provider of the external metrics recommendation preference. See External Metrics Preference below.
*/
readonly externalMetricsPreference: pulumi.Output<outputs.computeoptimizer.RecommendationPreferencesExternalMetricsPreference | undefined>;
/**
* The status of the inferred workload types recommendation preference. Valid values: `Active`, `Inactive`.
*/
readonly inferredWorkloadTypes: pulumi.Output<string | undefined>;
/**
* 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`.
*/
readonly lookBackPeriod: pulumi.Output<string>;
/**
* The preference to control which resource type values are considered when generating rightsizing recommendations. See Preferred Resources below.
*/
readonly preferredResources: pulumi.Output<outputs.computeoptimizer.RecommendationPreferencesPreferredResource[] | undefined>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
readonly region: pulumi.Output<string>;
/**
* The target resource type of the recommendation preferences. Valid values: `Ec2Instance`, `AutoScalingGroup`, `RdsDBInstance`, `AuroraDBClusterStorage`.
*/
readonly resourceType: pulumi.Output<string>;
/**
* The status of the savings estimation mode preference. Valid values: `AfterDiscounts`, `BeforeDiscounts`.
*/
readonly savingsEstimationMode: pulumi.Output<string | undefined>;
/**
* The scope of the recommendation preferences. See Scope below.
*/
readonly scope: pulumi.Output<outputs.computeoptimizer.RecommendationPreferencesScope | undefined>;
/**
* The preference to control the resource’s CPU utilization threshold, CPU utilization headroom, and memory utilization headroom. See Utilization Preferences below.
*/
readonly utilizationPreferences: pulumi.Output<outputs.computeoptimizer.RecommendationPreferencesUtilizationPreference[] | undefined>;
/**
* Create a RecommendationPreferences resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: RecommendationPreferencesArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering RecommendationPreferences resources.
*/
export interface RecommendationPreferencesState {
/**
* The status of the enhanced infrastructure metrics recommendation preference. Valid values: `Active`, `Inactive`.
*/
enhancedInfrastructureMetrics?: pulumi.Input<string>;
/**
* The provider of the external metrics recommendation preference. See External Metrics Preference below.
*/
externalMetricsPreference?: pulumi.Input<inputs.computeoptimizer.RecommendationPreferencesExternalMetricsPreference>;
/**
* The status of the inferred workload types recommendation preference. Valid values: `Active`, `Inactive`.
*/
inferredWorkloadTypes?: pulumi.Input<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`.
*/
lookBackPeriod?: pulumi.Input<string>;
/**
* The preference to control which resource type values are considered when generating rightsizing recommendations. See Preferred Resources below.
*/
preferredResources?: pulumi.Input<pulumi.Input<inputs.computeoptimizer.RecommendationPreferencesPreferredResource>[]>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: pulumi.Input<string>;
/**
* The target resource type of the recommendation preferences. Valid values: `Ec2Instance`, `AutoScalingGroup`, `RdsDBInstance`, `AuroraDBClusterStorage`.
*/
resourceType?: pulumi.Input<string>;
/**
* The status of the savings estimation mode preference. Valid values: `AfterDiscounts`, `BeforeDiscounts`.
*/
savingsEstimationMode?: pulumi.Input<string>;
/**
* The scope of the recommendation preferences. See Scope below.
*/
scope?: pulumi.Input<inputs.computeoptimizer.RecommendationPreferencesScope>;
/**
* The preference to control the resource’s CPU utilization threshold, CPU utilization headroom, and memory utilization headroom. See Utilization Preferences below.
*/
utilizationPreferences?: pulumi.Input<pulumi.Input<inputs.computeoptimizer.RecommendationPreferencesUtilizationPreference>[]>;
}
/**
* The set of arguments for constructing a RecommendationPreferences resource.
*/
export interface RecommendationPreferencesArgs {
/**
* The status of the enhanced infrastructure metrics recommendation preference. Valid values: `Active`, `Inactive`.
*/
enhancedInfrastructureMetrics?: pulumi.Input<string>;
/**
* The provider of the external metrics recommendation preference. See External Metrics Preference below.
*/
externalMetricsPreference?: pulumi.Input<inputs.computeoptimizer.RecommendationPreferencesExternalMetricsPreference>;
/**
* The status of the inferred workload types recommendation preference. Valid values: `Active`, `Inactive`.
*/
inferredWorkloadTypes?: pulumi.Input<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`.
*/
lookBackPeriod?: pulumi.Input<string>;
/**
* The preference to control which resource type values are considered when generating rightsizing recommendations. See Preferred Resources below.
*/
preferredResources?: pulumi.Input<pulumi.Input<inputs.computeoptimizer.RecommendationPreferencesPreferredResource>[]>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: pulumi.Input<string>;
/**
* The target resource type of the recommendation preferences. Valid values: `Ec2Instance`, `AutoScalingGroup`, `RdsDBInstance`, `AuroraDBClusterStorage`.
*/
resourceType: pulumi.Input<string>;
/**
* The status of the savings estimation mode preference. Valid values: `AfterDiscounts`, `BeforeDiscounts`.
*/
savingsEstimationMode?: pulumi.Input<string>;
/**
* The scope of the recommendation preferences. See Scope below.
*/
scope?: pulumi.Input<inputs.computeoptimizer.RecommendationPreferencesScope>;
/**
* The preference to control the resource’s CPU utilization threshold, CPU utilization headroom, and memory utilization headroom. See Utilization Preferences below.
*/
utilizationPreferences?: pulumi.Input<pulumi.Input<inputs.computeoptimizer.RecommendationPreferencesUtilizationPreference>[]>;
}