@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
373 lines • 14.4 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* A chart resource used within a NativeDashboard. Its lifecycle (Create, Update, Delete) is managed via custom methods on the NativeDashboard resource.
*
* To get more information about DashboardChart, see:
*
* * [API documentation](https://cloud.google.com/chronicle/docs/reference/rest/v1/projects.locations.instances.dashboardCharts)
* * How-to Guides
* * [Google SecOps Guides](https://cloud.google.com/chronicle/docs/secops/secops-overview)
*
* ## Example Usage
*
* ### Chronicle Dashboardchart Full
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* // A Native Dashboard is required to create a Dashboard Chart.
* const myDashboard = new gcp.chronicle.NativeDashboard("my_dashboard", {
* location: "us",
* instance: "00000000-0000-0000-0000-000000000000",
* displayName: "dashboard_1",
* description: "dashboard_description",
* access: "DASHBOARD_PRIVATE",
* type: "CUSTOM",
* filters: [{
* id: "GlobalTimeFilter",
* displayName: "Global Time Filter",
* dataSource: "GLOBAL",
* isStandardTimeRangeFilter: true,
* isStandardTimeRangeFilterEnabled: true,
* filterOperatorAndFieldValues: [{
* filterOperator: "PAST",
* fieldValues: [
* "1",
* "DAY",
* ],
* }],
* }],
* });
* const myChart = new gcp.chronicle.DashboardChart("my_chart", {
* location: myDashboard.location,
* instance: myDashboard.instance,
* nativeDashboard: myDashboard.name,
* chartLayout: {
* startX: 0,
* spanX: 50,
* startY: 12,
* spanY: 18,
* },
* dashboardChart: {
* displayName: "Data Source Health Overview",
* description: "Health of data sources over time",
* tileType: "TILE_TYPE_VISUALIZATION",
* chartDatasource: {
* dataSources: ["IOC_MATCHES"],
* },
* visualization: {
* series: [{
* seriesType: "LINE",
* encode: {
* x: "timestamp",
* y: "total_count",
* },
* dataLabel: {
* show: true,
* },
* }],
* xAxes: [{
* axisType: "CATEGORY",
* displayName: "Date",
* }],
* yAxes: [{
* axisType: "CATEGORY",
* displayName: "Sources",
* }],
* legends: [{
* top: 12,
* legendOrient: "HORIZONTAL",
* show: true,
* id: "test_map_legend_01",
* bottom: 10,
* left: 10,
* right: 5,
* legendAlign: "LEFT",
* paddings: [10],
* z: 2,
* zLevel: 1,
* }],
* seriesColumns: ["health_status"],
* groupingType: "Grouped",
* },
* drillDownConfig: {
* leftDrillDowns: [{
* id: "D89B834D-977A-4E0C-83B0-12AB1D05E76B",
* displayName: "Link to the google",
* customSettings: {
* newTab: true,
* externalLink: {
* description: "This is an external link",
* link: "www.google.com",
* },
* },
* }],
* },
* },
* dashboardQuery: {
* query: `IOC_Type = ioc.ioc_type
*
* match:
* IOC_Type
*
* outcome:
* IOC_Count = count(ioc.ioc_value)
*
* order:
* IOC_Count desc
* `,
* input: {
* relativeTime: {
* timeUnit: "DAY",
* startTimeVal: "1",
* },
* },
* },
* });
* const buttonTile = new gcp.chronicle.DashboardChart("button_tile", {
* location: myDashboard.location,
* instance: myDashboard.instance,
* nativeDashboard: myDashboard.name,
* chartLayout: {
* startX: 0,
* spanX: 12,
* startY: 66,
* spanY: 4,
* },
* dashboardChart: {
* displayName: "Navigation Button",
* tileType: "TILE_TYPE_BUTTON",
* visualization: {
* button: {
* description: "This is a button tile",
* label: "View Custom Detection Rules",
* hyperlink: "/rulesDashboard",
* newTab: true,
* properties: {
* color: "#1a73e8",
* buttonStyle: "BUTTON_STYLE_TRANSPARENT",
* },
* },
* },
* },
* });
* const markdownTile = new gcp.chronicle.DashboardChart("markdown_tile", {
* location: myDashboard.location,
* instance: myDashboard.instance,
* nativeDashboard: myDashboard.name,
* chartLayout: {
* startX: 0,
* spanX: 24,
* startY: 48,
* spanY: 4,
* },
* dashboardChart: {
* displayName: "markdown",
* tileType: "TILE_TYPE_MARKDOWN",
* visualization: {
* markdown: {
* content: `### Dashboard Header
* This is a markdown block used for descriptions or section headers.`,
* properties: {
* backgroundColor: "#09326C",
* },
* },
* },
* },
* });
* ```
*
* ## Import
*
* DashboardChart can be imported using any of these accepted formats:
*
* * `projects/{{project}}/locations/{{location}}/instances/{{instance}}/dashboardCharts/{{chart_id}}`
* * `{{project}}/{{location}}/{{instance}}/{{chart_id}}`
* * `{{location}}/{{instance}}/{{chart_id}}`
*
* When using the `pulumi import` command, DashboardChart can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:chronicle/dashboardChart:DashboardChart default projects/{{project}}/locations/{{location}}/instances/{{instance}}/dashboardCharts/{{chart_id}}
* $ pulumi import gcp:chronicle/dashboardChart:DashboardChart default {{project}}/{{location}}/{{instance}}/{{chart_id}}
* $ pulumi import gcp:chronicle/dashboardChart:DashboardChart default {{location}}/{{instance}}/{{chart_id}}
* ```
*/
export declare class DashboardChart extends pulumi.CustomResource {
/**
* Get an existing DashboardChart 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?: DashboardChartState, opts?: pulumi.CustomResourceOptions): DashboardChart;
/**
* Returns true if the given object is an instance of DashboardChart. 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 DashboardChart;
/**
* The unique identifier of the chart, automatically extracted from the full resource name.
*/
readonly chartId: pulumi.Output<string>;
/**
* The layout of this chart within the NativeDashboard.
* Structure is documented below.
*/
readonly chartLayout: pulumi.Output<outputs.chronicle.DashboardChartChartLayout | undefined>;
/**
* Core configuration details for the DashboardChart.
* Structure is documented below.
*/
readonly dashboardChart: pulumi.Output<outputs.chronicle.DashboardChartDashboardChart>;
/**
* The complete specification of the query for this chart. This includes the raw query string, execution parameters (like time windows), and server-generated metadata.
* Structure is documented below.
*/
readonly dashboardQuery: pulumi.Output<outputs.chronicle.DashboardChartDashboardQuery | 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.
*/
readonly deletionPolicy: pulumi.Output<string>;
/**
* The ID of the Chronicle instance.
*/
readonly instance: pulumi.Output<string>;
/**
* The location of the Chronicle instance.
*/
readonly location: pulumi.Output<string>;
/**
* The full resource name of the DashboardChart.
*/
readonly name: pulumi.Output<string>;
/**
* The parent NativeDashboard resource name, formatted as projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard_id}
*/
readonly nativeDashboard: pulumi.Output<string | undefined>;
/**
* 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>;
/**
* Create a DashboardChart 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: DashboardChartArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering DashboardChart resources.
*/
export interface DashboardChartState {
/**
* The unique identifier of the chart, automatically extracted from the full resource name.
*/
chartId?: pulumi.Input<string | undefined>;
/**
* The layout of this chart within the NativeDashboard.
* Structure is documented below.
*/
chartLayout?: pulumi.Input<inputs.chronicle.DashboardChartChartLayout | undefined>;
/**
* Core configuration details for the DashboardChart.
* Structure is documented below.
*/
dashboardChart?: pulumi.Input<inputs.chronicle.DashboardChartDashboardChart | undefined>;
/**
* The complete specification of the query for this chart. This includes the raw query string, execution parameters (like time windows), and server-generated metadata.
* Structure is documented below.
*/
dashboardQuery?: pulumi.Input<inputs.chronicle.DashboardChartDashboardQuery | 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>;
/**
* The ID of the Chronicle instance.
*/
instance?: pulumi.Input<string | undefined>;
/**
* The location of the Chronicle instance.
*/
location?: pulumi.Input<string | undefined>;
/**
* The full resource name of the DashboardChart.
*/
name?: pulumi.Input<string | undefined>;
/**
* The parent NativeDashboard resource name, formatted as projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard_id}
*/
nativeDashboard?: 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>;
}
/**
* The set of arguments for constructing a DashboardChart resource.
*/
export interface DashboardChartArgs {
/**
* The layout of this chart within the NativeDashboard.
* Structure is documented below.
*/
chartLayout?: pulumi.Input<inputs.chronicle.DashboardChartChartLayout | undefined>;
/**
* Core configuration details for the DashboardChart.
* Structure is documented below.
*/
dashboardChart: pulumi.Input<inputs.chronicle.DashboardChartDashboardChart>;
/**
* The complete specification of the query for this chart. This includes the raw query string, execution parameters (like time windows), and server-generated metadata.
* Structure is documented below.
*/
dashboardQuery?: pulumi.Input<inputs.chronicle.DashboardChartDashboardQuery | 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>;
/**
* The ID of the Chronicle instance.
*/
instance: pulumi.Input<string>;
/**
* The location of the Chronicle instance.
*/
location: pulumi.Input<string>;
/**
* The parent NativeDashboard resource name, formatted as projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard_id}
*/
nativeDashboard?: 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>;
}
//# sourceMappingURL=dashboardChart.d.ts.map