import * as pulumi from "@pulumi/pulumi"; /** * Provides a CloudWatch Logs query definition resource. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.cloudwatch.QueryDefinition("example", { * name: "custom_query", * logGroupNames: [ * "/aws/logGroup1", * "/aws/logGroup2", * ], * queryString: `fields @timestamp, @message * | sort @timestamp desc * | limit 25 * `, * }); * ``` * * ## Import * * ### Identity Schema * * #### Required * * * `queryDefinitionId` (String) ID of the query definition. * * #### Optional * * * `accountId` (String) AWS Account where this resource is managed. * * `region` (String) Region where this resource is managed. * * Using `pulumi import`, import Query Definitions using `arn`. The ARN can be found on the "Edit Query" page for the query in the AWS Console. For example: * * ```sh * $ pulumi import aws:cloudwatch/queryDefinition:QueryDefinition example arn:aws:logs:us-west-2:123456789012:query-definition:269951d7-6f75-496d-9d7b-6b7a5486bdbd * ``` */ export declare class QueryDefinition extends pulumi.CustomResource { /** * Get an existing QueryDefinition 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?: QueryDefinitionState, opts?: pulumi.CustomResourceOptions): QueryDefinition; /** * Returns true if the given object is an instance of QueryDefinition. 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 QueryDefinition; /** * The query definition ARN. */ readonly arn: pulumi.Output; /** * Specific log groups to use with the query. */ readonly logGroupNames: pulumi.Output; /** * The name of the query. */ readonly name: pulumi.Output; /** * The query definition ID. */ readonly queryDefinitionId: pulumi.Output; /** * The query to save. You can read more about CloudWatch Logs Query Syntax in the [documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html). */ readonly queryString: pulumi.Output; /** * 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; /** * Create a QueryDefinition 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: QueryDefinitionArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering QueryDefinition resources. */ export interface QueryDefinitionState { /** * The query definition ARN. */ arn?: pulumi.Input; /** * Specific log groups to use with the query. */ logGroupNames?: pulumi.Input[] | undefined>; /** * The name of the query. */ name?: pulumi.Input; /** * The query definition ID. */ queryDefinitionId?: pulumi.Input; /** * The query to save. You can read more about CloudWatch Logs Query Syntax in the [documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html). */ queryString?: pulumi.Input; /** * 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; } /** * The set of arguments for constructing a QueryDefinition resource. */ export interface QueryDefinitionArgs { /** * Specific log groups to use with the query. */ logGroupNames?: pulumi.Input[] | undefined>; /** * The name of the query. */ name?: pulumi.Input; /** * The query to save. You can read more about CloudWatch Logs Query Syntax in the [documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html). */ queryString: pulumi.Input; /** * 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; } //# sourceMappingURL=queryDefinition.d.ts.map