@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
136 lines (135 loc) • 5.39 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Provides a CloudWatch Dashboard resource.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const main = new aws.cloudwatch.Dashboard("main", {
* dashboardName: "my-dashboard",
* dashboardBody: JSON.stringify({
* widgets: [
* {
* type: "metric",
* x: 0,
* y: 0,
* width: 12,
* height: 6,
* properties: {
* metrics: [[
* "AWS/EC2",
* "CPUUtilization",
* "InstanceId",
* "i-012345",
* ]],
* period: 300,
* stat: "Average",
* region: "us-east-1",
* title: "EC2 Instance CPU",
* },
* },
* {
* type: "text",
* x: 0,
* y: 7,
* width: 3,
* height: 3,
* properties: {
* markdown: "Hello world",
* },
* },
* ],
* }),
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import CloudWatch dashboards using the `dashboard_name`. For example:
*
* ```sh
* $ pulumi import aws:cloudwatch/dashboard:Dashboard sample dashboard_name
* ```
*/
export declare class Dashboard extends pulumi.CustomResource {
/**
* Get an existing Dashboard 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?: DashboardState, opts?: pulumi.CustomResourceOptions): Dashboard;
/**
* Returns true if the given object is an instance of Dashboard. 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 Dashboard;
/**
* The Amazon Resource Name (ARN) of the dashboard.
*/
readonly dashboardArn: pulumi.Output<string>;
/**
* The detailed information about the dashboard, including what widgets are included and their location on the dashboard. You can read more about the body structure in the [documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/CloudWatch-Dashboard-Body-Structure.html).
*/
readonly dashboardBody: pulumi.Output<string>;
/**
* The name of the dashboard.
*/
readonly dashboardName: pulumi.Output<string>;
/**
* 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<string>;
/**
* Create a Dashboard 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: DashboardArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Dashboard resources.
*/
export interface DashboardState {
/**
* The Amazon Resource Name (ARN) of the dashboard.
*/
dashboardArn?: pulumi.Input<string>;
/**
* The detailed information about the dashboard, including what widgets are included and their location on the dashboard. You can read more about the body structure in the [documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/CloudWatch-Dashboard-Body-Structure.html).
*/
dashboardBody?: pulumi.Input<string>;
/**
* The name of the dashboard.
*/
dashboardName?: pulumi.Input<string>;
/**
* 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<string>;
}
/**
* The set of arguments for constructing a Dashboard resource.
*/
export interface DashboardArgs {
/**
* The detailed information about the dashboard, including what widgets are included and their location on the dashboard. You can read more about the body structure in the [documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/CloudWatch-Dashboard-Body-Structure.html).
*/
dashboardBody: pulumi.Input<string>;
/**
* The name of the dashboard.
*/
dashboardName: pulumi.Input<string>;
/**
* 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<string>;
}