import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Describes an autoscaling policy for Dataproc cluster autoscaler. * * ## Example Usage * * ### Dataproc Autoscaling Policy * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const asp = new gcp.dataproc.AutoscalingPolicy("asp", { * policyId: "dataproc-policy", * location: "us-central1", * workerConfig: { * maxInstances: 3, * }, * basicAlgorithm: { * yarnConfig: { * gracefulDecommissionTimeout: "30s", * scaleUpFactor: 0.5, * scaleDownFactor: 0.5, * }, * }, * }); * const basic = new gcp.dataproc.Cluster("basic", { * name: "dataproc-policy", * region: "us-central1", * clusterConfig: { * autoscalingConfig: { * policyUri: asp.name, * }, * }, * }); * ``` * * ## Import * * AutoscalingPolicy can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/autoscalingPolicies/{{policy_id}}` * * * `{{project}}/{{location}}/{{policy_id}}` * * * `{{location}}/{{policy_id}}` * * When using the `pulumi import` command, AutoscalingPolicy can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:dataproc/autoscalingPolicy:AutoscalingPolicy default projects/{{project}}/locations/{{location}}/autoscalingPolicies/{{policy_id}} * ``` * * ```sh * $ pulumi import gcp:dataproc/autoscalingPolicy:AutoscalingPolicy default {{project}}/{{location}}/{{policy_id}} * ``` * * ```sh * $ pulumi import gcp:dataproc/autoscalingPolicy:AutoscalingPolicy default {{location}}/{{policy_id}} * ``` */ export declare class AutoscalingPolicy extends pulumi.CustomResource { /** * Get an existing AutoscalingPolicy 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, state?: AutoscalingPolicyState, opts?: pulumi.CustomResourceOptions): AutoscalingPolicy; /** * Returns true if the given object is an instance of AutoscalingPolicy. 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 AutoscalingPolicy; /** * Basic algorithm for autoscaling. * Structure is documented below. */ readonly basicAlgorithm: pulumi.Output; /** * The location where the autoscaling policy should reside. * The default value is `global`. */ readonly location: pulumi.Output; /** * The "resource name" of the autoscaling policy. */ readonly name: pulumi.Output; /** * The policy id. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), * and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between * 3 and 50 characters. */ readonly policyId: pulumi.Output; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ readonly project: pulumi.Output; /** * Describes how the autoscaler will operate for secondary workers. * Structure is documented below. */ readonly secondaryWorkerConfig: pulumi.Output; /** * Describes how the autoscaler will operate for primary workers. * Structure is documented below. */ readonly workerConfig: pulumi.Output; /** * Create a AutoscalingPolicy 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: AutoscalingPolicyArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering AutoscalingPolicy resources. */ export interface AutoscalingPolicyState { /** * Basic algorithm for autoscaling. * Structure is documented below. */ basicAlgorithm?: pulumi.Input; /** * The location where the autoscaling policy should reside. * The default value is `global`. */ location?: pulumi.Input; /** * The "resource name" of the autoscaling policy. */ name?: pulumi.Input; /** * The policy id. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), * and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between * 3 and 50 characters. */ policyId?: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; /** * Describes how the autoscaler will operate for secondary workers. * Structure is documented below. */ secondaryWorkerConfig?: pulumi.Input; /** * Describes how the autoscaler will operate for primary workers. * Structure is documented below. */ workerConfig?: pulumi.Input; } /** * The set of arguments for constructing a AutoscalingPolicy resource. */ export interface AutoscalingPolicyArgs { /** * Basic algorithm for autoscaling. * Structure is documented below. */ basicAlgorithm?: pulumi.Input; /** * The location where the autoscaling policy should reside. * The default value is `global`. */ location?: pulumi.Input; /** * The policy id. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), * and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between * 3 and 50 characters. */ policyId: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; /** * Describes how the autoscaler will operate for secondary workers. * Structure is documented below. */ secondaryWorkerConfig?: pulumi.Input; /** * Describes how the autoscaler will operate for primary workers. * Structure is documented below. */ workerConfig?: pulumi.Input; }