import * as pulumi from "@pulumi/pulumi"; /** * Manages an Amazon CloudWatch Omni view. * * A view is a named, reusable SQL query over CloudWatch telemetry. It stores the query, not the data: each time the view is queried, its definition runs against the underlying data. See the [CloudWatch SQL query reference](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/omni-sql-query-reference.html) for the query syntax. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.cloudwatchomni.View("example", { * name: "view.app_errors", * definition: "SELECT `@timestamp`, `@message` FROM \"logs.default\" WHERE `@logGroupName` = '/my/app'", * }); * ``` * * ### With Description and Tags * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.cloudwatchomni.View("example", { * name: "view.app_errors", * definition: "SELECT `@timestamp`, `@message` FROM \"logs.default\" WHERE `@logGroupName` = '/my/app'", * description: "Error lines from /my/app", * tags: { * team: "payments", * }, * }); * ``` * * ### Querying a View * * Reference a view by name in the `FROM` clause of a telemetry query, quoting the name because it contains a dot (for example, `FROM "view.app_errors"`). Bound `@timestamp` on both sides in the `WHERE` clause; the service rejects queries with an open-ended time range. * * ## Import * * ### Identity Schema * * #### Required * * * `name` (String) Name of the view. * * #### Optional * * * `accountId` (String) AWS Account where this resource is managed. * * `region` (String) Region where this resource is managed. * * Using `pulumi import`, import CloudWatch Omni views using the `name`. For example: * * ```sh * $ pulumi import aws:cloudwatchomni/view:View example view.app_errors * ``` */ export declare class View extends pulumi.CustomResource { /** * Get an existing View 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?: ViewState, opts?: pulumi.CustomResourceOptions): View; /** * Check whether an existing View resource with the given ID exists. * * @param id The _unique_ provider ID of the resource to check. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static exists(id: pulumi.Input, state?: ViewState, opts?: pulumi.CustomResourceOptions): pulumi.Output; /** * Returns true if the given object is an instance of View. 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 View; /** * ARN of the view. Contains an identifier generated by CloudWatch, in the form `arn:aws:cloudwatch:::view//`. */ readonly arn: pulumi.Output; /** * SQL query that defines the view. Must be 1 to 10000 characters. The service validates the query when the view is created or updated. */ readonly definition: pulumi.Output; /** * Description of the view. Must be 1 to 1024 characters. */ readonly description: pulumi.Output; /** * Name of the view. Must start with `view.` followed by a lowercase letter or digit, contain only lowercase letters, digits, underscores and hyphens, and be 6 to 256 characters long. Unique within the account and Region. Changing this value forces replacement. * * The following arguments are optional: */ readonly name: 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; /** * Map of tags assigned to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ readonly tagsAll: pulumi.Output<{ [key: string]: string; }>; /** * Type of the view. Views created with Terraform are `USER` views. */ readonly type: pulumi.Output; /** * Create a View 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: ViewArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering View resources. */ export interface ViewState { /** * ARN of the view. Contains an identifier generated by CloudWatch, in the form `arn:aws:cloudwatch:::view//`. */ arn?: pulumi.Input; /** * SQL query that defines the view. Must be 1 to 10000 characters. The service validates the query when the view is created or updated. */ definition?: pulumi.Input; /** * Description of the view. Must be 1 to 1024 characters. */ description?: pulumi.Input; /** * Name of the view. Must start with `view.` followed by a lowercase letter or digit, contain only lowercase letters, digits, underscores and hyphens, and be 6 to 256 characters long. Unique within the account and Region. Changing this value forces replacement. * * The following arguments are optional: */ name?: 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; /** * Map of tags assigned to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ tagsAll?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * Type of the view. Views created with Terraform are `USER` views. */ type?: pulumi.Input; } /** * The set of arguments for constructing a View resource. */ export interface ViewArgs { /** * SQL query that defines the view. Must be 1 to 10000 characters. The service validates the query when the view is created or updated. */ definition: pulumi.Input; /** * Description of the view. Must be 1 to 1024 characters. */ description?: pulumi.Input; /** * Name of the view. Must start with `view.` followed by a lowercase letter or digit, contain only lowercase letters, digits, underscores and hyphens, and be 6 to 256 characters long. Unique within the account and Region. Changing this value forces replacement. * * The following arguments are optional: */ name?: 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; /** * Map of tags assigned to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; } //# sourceMappingURL=view.d.ts.map