import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
 * A policy that can be attached to a resource to specify or schedule actions on that resource.
 *
 * To get more information about ResourcePolicy, see:
 *
 * * [API documentation](https://cloud.google.com/compute/docs/reference/rest/v1/resourcePolicies)
 *
 * ## Example Usage
 *
 * ### Resource Policy Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const foo = new gcp.compute.ResourcePolicy("foo", {
 *     name: "gce-policy",
 *     region: "us-central1",
 *     snapshotSchedulePolicy: {
 *         schedule: {
 *             dailySchedule: {
 *                 daysInCycle: 1,
 *                 startTime: "04:00",
 *             },
 *         },
 *     },
 * });
 * ```
 * ### Resource Policy Full
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const bar = new gcp.compute.ResourcePolicy("bar", {
 *     name: "gce-policy",
 *     region: "us-central1",
 *     snapshotSchedulePolicy: {
 *         schedule: {
 *             hourlySchedule: {
 *                 hoursInCycle: 20,
 *                 startTime: "23:00",
 *             },
 *         },
 *         retentionPolicy: {
 *             maxRetentionDays: 10,
 *             onSourceDiskDelete: "KEEP_AUTO_SNAPSHOTS",
 *         },
 *         snapshotProperties: {
 *             labels: {
 *                 my_label: "value",
 *             },
 *             storageLocations: "us",
 *             guestFlush: true,
 *         },
 *     },
 * });
 * ```
 * ### Resource Policy Placement Policy
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const baz = new gcp.compute.ResourcePolicy("baz", {
 *     name: "gce-policy",
 *     region: "us-central1",
 *     groupPlacementPolicy: {
 *         vmCount: 2,
 *         collocation: "COLLOCATED",
 *     },
 * });
 * ```
 * ### Resource Policy Placement Policy Max Distance
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const baz = new gcp.compute.ResourcePolicy("baz", {
 *     name: "gce-policy",
 *     region: "us-central1",
 *     groupPlacementPolicy: {
 *         vmCount: 2,
 *         collocation: "COLLOCATED",
 *         maxDistance: 2,
 *     },
 * });
 * ```
 * ### Resource Policy Instance Schedule Policy
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const hourly = new gcp.compute.ResourcePolicy("hourly", {
 *     name: "gce-policy",
 *     region: "us-central1",
 *     description: "Start and stop instances",
 *     instanceSchedulePolicy: {
 *         vmStartSchedule: {
 *             schedule: "0 * * * *",
 *         },
 *         vmStopSchedule: {
 *             schedule: "15 * * * *",
 *         },
 *         timeZone: "US/Central",
 *     },
 * });
 * ```
 * ### Resource Policy Snapshot Schedule Chain Name
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const hourly = new gcp.compute.ResourcePolicy("hourly", {
 *     name: "gce-policy",
 *     region: "us-central1",
 *     description: "chain name snapshot",
 *     snapshotSchedulePolicy: {
 *         schedule: {
 *             hourlySchedule: {
 *                 hoursInCycle: 20,
 *                 startTime: "23:00",
 *             },
 *         },
 *         retentionPolicy: {
 *             maxRetentionDays: 14,
 *             onSourceDiskDelete: "KEEP_AUTO_SNAPSHOTS",
 *         },
 *         snapshotProperties: {
 *             labels: {
 *                 my_label: "value",
 *             },
 *             storageLocations: "us",
 *             guestFlush: true,
 *             chainName: "test-schedule-chain-name",
 *         },
 *     },
 * });
 * ```
 * ### Resource Policy Consistency Group
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const cgroup = new gcp.compute.ResourcePolicy("cgroup", {
 *     name: "gce-policy",
 *     region: "europe-west1",
 *     diskConsistencyGroupPolicy: {
 *         enabled: true,
 *     },
 * });
 * ```
 * ### Resource Policy Workload Policy
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const bar = new gcp.compute.ResourcePolicy("bar", {
 *     name: "gce-policy",
 *     region: "europe-west1",
 *     workloadPolicy: {
 *         type: "HIGH_AVAILABILITY",
 *     },
 * });
 * ```
 * ### Resource Policy Workload Policy Accelerator Topology
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const bar = new gcp.compute.ResourcePolicy("bar", {
 *     name: "gce-policy",
 *     region: "europe-west1",
 *     workloadPolicy: {
 *         type: "HIGH_THROUGHPUT",
 *         acceleratorTopology: "2x2",
 *     },
 * });
 * ```
 * ### Resource Policy Workload Policy Accelerator Topology Mode
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const bar = new gcp.compute.ResourcePolicy("bar", {
 *     name: "gce-policy",
 *     region: "europe-west1",
 *     workloadPolicy: {
 *         type: "HIGH_THROUGHPUT",
 *         acceleratorTopology: "2x2",
 *         acceleratorTopologyMode: "AUTO_CONNECT",
 *     },
 * });
 * ```
 * ### Resource Policy Workload Policy Max Topology Distance
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const bar = new gcp.compute.ResourcePolicy("bar", {
 *     name: "gce-policy",
 *     region: "europe-west1",
 *     workloadPolicy: {
 *         type: "HIGH_THROUGHPUT",
 *         maxTopologyDistance: "BLOCK",
 *     },
 * });
 * ```
 * ### Resource Policy Placement Policy Gpu Topology
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const baz = new gcp.compute.ResourcePolicy("baz", {
 *     name: "gce-policy",
 *     region: "europe-west9",
 *     groupPlacementPolicy: {
 *         collocation: "COLLOCATED",
 *         gpuTopology: "1x72",
 *     },
 * });
 * ```
 * ### Resource Policy Placement Policy Tpu Topology
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const baz = new gcp.compute.ResourcePolicy("baz", {
 *     name: "gce-policy",
 *     region: "us-central1",
 *     groupPlacementPolicy: {
 *         vmCount: 2,
 *         collocation: "COLLOCATED",
 *         tpuTopology: "4x4",
 *     },
 * });
 * ```
 *
 * ## Import
 *
 * ResourcePolicy can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/regions/{{region}}/resourcePolicies/{{name}}`
 * * `{{project}}/{{region}}/{{name}}`
 * * `{{region}}/{{name}}`
 * * `{{name}}`
 *
 * When using the `pulumi import` command, ResourcePolicy can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:compute/resourcePolicy:ResourcePolicy default projects/{{project}}/regions/{{region}}/resourcePolicies/{{name}}
 * $ pulumi import gcp:compute/resourcePolicy:ResourcePolicy default {{project}}/{{region}}/{{name}}
 * $ pulumi import gcp:compute/resourcePolicy:ResourcePolicy default {{region}}/{{name}}
 * $ pulumi import gcp:compute/resourcePolicy:ResourcePolicy default {{name}}
 * ```
 */
export declare class ResourcePolicy extends pulumi.CustomResource {
    /**
     * Get an existing ResourcePolicy 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?: ResourcePolicyState, opts?: pulumi.CustomResourceOptions): ResourcePolicy;
    /**
     * Returns true if the given object is an instance of ResourcePolicy.  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 ResourcePolicy;
    /**
     * Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
     * When a 'terraform destroy' or 'pulumi up' would delete the resource,
     * the command will fail if this field is set to "PREVENT" in Terraform state.
     * When set to "ABANDON", the command will remove the resource from Terraform
     * management without updating or deleting the resource in the API.
     * When set to "DELETE", deleting the resource is allowed.
     */
    readonly deletionPolicy: pulumi.Output<string>;
    /**
     * An optional description of this resource. Provide this property when you create the resource.
     */
    readonly description: pulumi.Output<string | undefined>;
    /**
     * Replication consistency group for asynchronous disk replication.
     * Structure is documented below.
     */
    readonly diskConsistencyGroupPolicy: pulumi.Output<outputs.compute.ResourcePolicyDiskConsistencyGroupPolicy | undefined>;
    /**
     * Resource policy for instances used for placement configuration.
     * Structure is documented below.
     */
    readonly groupPlacementPolicy: pulumi.Output<outputs.compute.ResourcePolicyGroupPlacementPolicy | undefined>;
    /**
     * Resource policy for scheduling instance operations.
     * Structure is documented below.
     */
    readonly instanceSchedulePolicy: pulumi.Output<outputs.compute.ResourcePolicyInstanceSchedulePolicy | undefined>;
    /**
     * The name of the resource, provided by the client when initially creating
     * the resource. The resource name must be 1-63 characters long, and comply
     * with RFC1035. Specifically, the name must be 1-63 characters long and
     * match the regular expression `a-z`? which means the
     * first character must be a lowercase letter, and all following characters
     * must be a dash, lowercase letter, or digit, except the last character,
     * which cannot be a dash.
     */
    readonly name: pulumi.Output<string>;
    /**
     * The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    readonly project: pulumi.Output<string>;
    /**
     * Region where resource policy resides.
     */
    readonly region: pulumi.Output<string>;
    /**
     * The URI of the created resource.
     */
    readonly selfLink: pulumi.Output<string>;
    /**
     * Policy for creating snapshots of persistent disks.
     * Structure is documented below.
     */
    readonly snapshotSchedulePolicy: pulumi.Output<outputs.compute.ResourcePolicySnapshotSchedulePolicy | undefined>;
    /**
     * Represents the workload policy.
     * Structure is documented below.
     */
    readonly workloadPolicy: pulumi.Output<outputs.compute.ResourcePolicyWorkloadPolicy | undefined>;
    /**
     * Create a ResourcePolicy 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?: ResourcePolicyArgs, opts?: pulumi.CustomResourceOptions);
}
/**
 * Input properties used for looking up and filtering ResourcePolicy resources.
 */
export interface ResourcePolicyState {
    /**
     * Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
     * When a 'terraform destroy' or 'pulumi up' would delete the resource,
     * the command will fail if this field is set to "PREVENT" in Terraform state.
     * When set to "ABANDON", the command will remove the resource from Terraform
     * management without updating or deleting the resource in the API.
     * When set to "DELETE", deleting the resource is allowed.
     */
    deletionPolicy?: pulumi.Input<string | undefined>;
    /**
     * An optional description of this resource. Provide this property when you create the resource.
     */
    description?: pulumi.Input<string | undefined>;
    /**
     * Replication consistency group for asynchronous disk replication.
     * Structure is documented below.
     */
    diskConsistencyGroupPolicy?: pulumi.Input<inputs.compute.ResourcePolicyDiskConsistencyGroupPolicy | undefined>;
    /**
     * Resource policy for instances used for placement configuration.
     * Structure is documented below.
     */
    groupPlacementPolicy?: pulumi.Input<inputs.compute.ResourcePolicyGroupPlacementPolicy | undefined>;
    /**
     * Resource policy for scheduling instance operations.
     * Structure is documented below.
     */
    instanceSchedulePolicy?: pulumi.Input<inputs.compute.ResourcePolicyInstanceSchedulePolicy | undefined>;
    /**
     * The name of the resource, provided by the client when initially creating
     * the resource. The resource name must be 1-63 characters long, and comply
     * with RFC1035. Specifically, the name must be 1-63 characters long and
     * match the regular expression `a-z`? which means the
     * first character must be a lowercase letter, and all following characters
     * must be a dash, lowercase letter, or digit, except the last character,
     * which cannot be a dash.
     */
    name?: pulumi.Input<string | undefined>;
    /**
     * The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    project?: pulumi.Input<string | undefined>;
    /**
     * Region where resource policy resides.
     */
    region?: pulumi.Input<string | undefined>;
    /**
     * The URI of the created resource.
     */
    selfLink?: pulumi.Input<string | undefined>;
    /**
     * Policy for creating snapshots of persistent disks.
     * Structure is documented below.
     */
    snapshotSchedulePolicy?: pulumi.Input<inputs.compute.ResourcePolicySnapshotSchedulePolicy | undefined>;
    /**
     * Represents the workload policy.
     * Structure is documented below.
     */
    workloadPolicy?: pulumi.Input<inputs.compute.ResourcePolicyWorkloadPolicy | undefined>;
}
/**
 * The set of arguments for constructing a ResourcePolicy resource.
 */
export interface ResourcePolicyArgs {
    /**
     * Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
     * When a 'terraform destroy' or 'pulumi up' would delete the resource,
     * the command will fail if this field is set to "PREVENT" in Terraform state.
     * When set to "ABANDON", the command will remove the resource from Terraform
     * management without updating or deleting the resource in the API.
     * When set to "DELETE", deleting the resource is allowed.
     */
    deletionPolicy?: pulumi.Input<string | undefined>;
    /**
     * An optional description of this resource. Provide this property when you create the resource.
     */
    description?: pulumi.Input<string | undefined>;
    /**
     * Replication consistency group for asynchronous disk replication.
     * Structure is documented below.
     */
    diskConsistencyGroupPolicy?: pulumi.Input<inputs.compute.ResourcePolicyDiskConsistencyGroupPolicy | undefined>;
    /**
     * Resource policy for instances used for placement configuration.
     * Structure is documented below.
     */
    groupPlacementPolicy?: pulumi.Input<inputs.compute.ResourcePolicyGroupPlacementPolicy | undefined>;
    /**
     * Resource policy for scheduling instance operations.
     * Structure is documented below.
     */
    instanceSchedulePolicy?: pulumi.Input<inputs.compute.ResourcePolicyInstanceSchedulePolicy | undefined>;
    /**
     * The name of the resource, provided by the client when initially creating
     * the resource. The resource name must be 1-63 characters long, and comply
     * with RFC1035. Specifically, the name must be 1-63 characters long and
     * match the regular expression `a-z`? which means the
     * first character must be a lowercase letter, and all following characters
     * must be a dash, lowercase letter, or digit, except the last character,
     * which cannot be a dash.
     */
    name?: pulumi.Input<string | undefined>;
    /**
     * The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    project?: pulumi.Input<string | undefined>;
    /**
     * Region where resource policy resides.
     */
    region?: pulumi.Input<string | undefined>;
    /**
     * Policy for creating snapshots of persistent disks.
     * Structure is documented below.
     */
    snapshotSchedulePolicy?: pulumi.Input<inputs.compute.ResourcePolicySnapshotSchedulePolicy | undefined>;
    /**
     * Represents the workload policy.
     * Structure is documented below.
     */
    workloadPolicy?: pulumi.Input<inputs.compute.ResourcePolicyWorkloadPolicy | undefined>;
}
//# sourceMappingURL=resourcePolicy.d.ts.map