import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
 * Describes a query that has been saved by a user.
 *
 * To get more information about SavedQuery, see:
 *
 * * [API documentation](https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.locations.savedQueries)
 * * How-to Guides
 *     * [Official Documentation](https://cloud.google.com/logging/docs/apis)
 *     * [Save and share SQL queries](https://docs.cloud.google.com/logging/docs/analyze/save-share-query)
 *     * [Save and share queries](https://docs.cloud.google.com/logging/docs/view/building-queries#saved-queries)
 *
 * ## Example Usage
 *
 * ### Logging Saved Query Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const savedQuery = new gcp.logging.SavedQuery("saved_query", {
 *     name: "my-saved-query",
 *     displayName: "My Saved Query",
 *     parent: "projects/my-project-name",
 *     location: "global",
 *     description: "A saved query",
 *     loggingQuery: {
 *         filter: "resource.type=gce_instance",
 *     },
 *     visibility: "SHARED",
 * });
 * ```
 * ### Logging Saved Query Private
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const savedQuery = new gcp.logging.SavedQuery("saved_query", {
 *     name: "my-saved-query-private",
 *     displayName: "My Saved Query",
 *     parent: "projects/my-project-name",
 *     location: "global",
 *     description: "A saved query",
 *     loggingQuery: {
 *         filter: "resource.type=gce_instance",
 *     },
 *     visibility: "PRIVATE",
 * });
 * ```
 * ### Logging Saved Query Summary Fields
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const savedQuery = new gcp.logging.SavedQuery("saved_query", {
 *     name: "my-saved-query-summary-fields",
 *     displayName: "My Saved Query",
 *     parent: "projects/my-project-name",
 *     location: "global",
 *     description: "A saved query",
 *     loggingQuery: {
 *         filter: "resource.type=gce_instance",
 *         summaryFields: [
 *             {
 *                 field: "jsonPayload.paymentId",
 *             },
 *             {
 *                 field: "jsonPayload.errorMessage",
 *             },
 *         ],
 *         summaryFieldStart: 100,
 *     },
 *     visibility: "SHARED",
 * });
 * ```
 * ### Logging Saved Query Sql Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const savedQuery = new gcp.logging.SavedQuery("saved_query", {
 *     name: "my-saved-query-sql",
 *     displayName: "My Saved Query",
 *     parent: "projects/my-project-name",
 *     location: "global",
 *     description: "A saved query",
 *     opsAnalyticsQuery: {
 *         sqlQueryText: `SELECT
 *   timestamp, log_name, severity, json_payload, resource, labels
 * FROM
 *   VIEW
 * WHERE
 *   timestamp > TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 1 HOUR)
 * ORDER BY timestamp ASC
 * LIMIT 100
 * `,
 *     },
 *     visibility: "SHARED",
 * });
 * ```
 *
 * ## Import
 *
 * SavedQuery can be imported using any of these accepted formats:
 *
 * * `{{parent}}/locations/{{location}}/savedQueries/{{name}}`
 *
 * When using the `pulumi import` command, SavedQuery can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:logging/savedQuery:SavedQuery default {{parent}}/locations/{{location}}/savedQueries/{{name}}
 * ```
 */
export declare class SavedQuery extends pulumi.CustomResource {
    /**
     * Get an existing SavedQuery 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?: SavedQueryState, opts?: pulumi.CustomResourceOptions): SavedQuery;
    /**
     * Returns true if the given object is an instance of SavedQuery.  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 SavedQuery;
    /**
     * Output only. The creation timestamp of the saved query.
     */
    readonly createTime: pulumi.Output<string>;
    /**
     * 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>;
    /**
     * A description of the saved query.
     */
    readonly description: pulumi.Output<string | undefined>;
    /**
     * The user-visible display name of the saved query.
     */
    readonly displayName: pulumi.Output<string>;
    /**
     * The location of the resource see
     * [supported regions](https://docs.cloud.google.com/logging/docs/region-support#bucket-regions).
     */
    readonly location: pulumi.Output<string>;
    /**
     * The contents of the saved query.
     * Structure is documented below.
     */
    readonly loggingQuery: pulumi.Output<outputs.logging.SavedQueryLoggingQuery | undefined>;
    /**
     * The name of the saved query. For example: `my-saved-query`
     */
    readonly name: pulumi.Output<string>;
    /**
     * The contents of the saved query.
     * Structure is documented below.
     */
    readonly opsAnalyticsQuery: pulumi.Output<outputs.logging.SavedQueryOpsAnalyticsQuery | undefined>;
    /**
     * The parent of the resource.
     */
    readonly parent: pulumi.Output<string>;
    /**
     * Output only. The last update timestamp of the saved query.
     */
    readonly updateTime: pulumi.Output<string>;
    /**
     * The visibility of the saved query.
     * Possible values are: `SHARED`, `PRIVATE`.
     */
    readonly visibility: pulumi.Output<string>;
    /**
     * Create a SavedQuery 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: SavedQueryArgs, opts?: pulumi.CustomResourceOptions);
}
/**
 * Input properties used for looking up and filtering SavedQuery resources.
 */
export interface SavedQueryState {
    /**
     * Output only. The creation timestamp of the saved query.
     */
    createTime?: pulumi.Input<string | undefined>;
    /**
     * 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>;
    /**
     * A description of the saved query.
     */
    description?: pulumi.Input<string | undefined>;
    /**
     * The user-visible display name of the saved query.
     */
    displayName?: pulumi.Input<string | undefined>;
    /**
     * The location of the resource see
     * [supported regions](https://docs.cloud.google.com/logging/docs/region-support#bucket-regions).
     */
    location?: pulumi.Input<string | undefined>;
    /**
     * The contents of the saved query.
     * Structure is documented below.
     */
    loggingQuery?: pulumi.Input<inputs.logging.SavedQueryLoggingQuery | undefined>;
    /**
     * The name of the saved query. For example: `my-saved-query`
     */
    name?: pulumi.Input<string | undefined>;
    /**
     * The contents of the saved query.
     * Structure is documented below.
     */
    opsAnalyticsQuery?: pulumi.Input<inputs.logging.SavedQueryOpsAnalyticsQuery | undefined>;
    /**
     * The parent of the resource.
     */
    parent?: pulumi.Input<string | undefined>;
    /**
     * Output only. The last update timestamp of the saved query.
     */
    updateTime?: pulumi.Input<string | undefined>;
    /**
     * The visibility of the saved query.
     * Possible values are: `SHARED`, `PRIVATE`.
     */
    visibility?: pulumi.Input<string | undefined>;
}
/**
 * The set of arguments for constructing a SavedQuery resource.
 */
export interface SavedQueryArgs {
    /**
     * 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>;
    /**
     * A description of the saved query.
     */
    description?: pulumi.Input<string | undefined>;
    /**
     * The user-visible display name of the saved query.
     */
    displayName: pulumi.Input<string>;
    /**
     * The location of the resource see
     * [supported regions](https://docs.cloud.google.com/logging/docs/region-support#bucket-regions).
     */
    location: pulumi.Input<string>;
    /**
     * The contents of the saved query.
     * Structure is documented below.
     */
    loggingQuery?: pulumi.Input<inputs.logging.SavedQueryLoggingQuery | undefined>;
    /**
     * The name of the saved query. For example: `my-saved-query`
     */
    name?: pulumi.Input<string | undefined>;
    /**
     * The contents of the saved query.
     * Structure is documented below.
     */
    opsAnalyticsQuery?: pulumi.Input<inputs.logging.SavedQueryOpsAnalyticsQuery | undefined>;
    /**
     * The parent of the resource.
     */
    parent: pulumi.Input<string>;
    /**
     * The visibility of the saved query.
     * Possible values are: `SHARED`, `PRIVATE`.
     */
    visibility: pulumi.Input<string>;
}
//# sourceMappingURL=savedQuery.d.ts.map