1. Packages
  2. Opensearch Provider
  3. API Docs
  4. DashboardObject
opensearch 2.3.1 published on Monday, Apr 14, 2025 by opensearch-project

opensearch.DashboardObject

Explore with Pulumi AI

opensearch logo
opensearch 2.3.1 published on Monday, Apr 14, 2025 by opensearch-project

    Provides an OpenSearch Dashboards object resource. This resource interacts directly with the underlying OpenSearch index backing Dashboards, so the format must match what Dashboards the version of Dashboards is expecting. Dashboards with older versions - directly pulling the JSON from a Dashboards index of the same version of OpenSearch targeted by the provider is a workaround.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as opensearch from "@pulumi/opensearch";
    
    const testVisualizationV6 = new opensearch.DashboardObject("testVisualizationV6", {
        body: `[
      {
        "_id": "visualization:response-time-percentile",
        "_type": "doc",
        "_source": {
          "type": "visualization",
          "visualization": {
            "title": "Total response time percentiles",
            "visState": "{\\"title\\":\\"Total response time percentiles\\",\\"type\\":\\"line\\",\\"params\\":{\\"addTooltip\\":true,\\"addLegend\\":true,\\"legendPosition\\":\\"right\\",\\"showCircles\\":true,\\"interpolate\\":\\"linear\\",\\"scale\\":\\"linear\\",\\"drawLinesBetweenPoints\\":true,\\"radiusRatio\\":9,\\"times\\":[],\\"addTimeMarker\\":false,\\"defaultYExtents\\":false,\\"setYExtents\\":false},\\"aggs\\":[{\\"id\\":\\"1\\",\\"enabled\\":true,\\"type\\":\\"percentiles\\",\\"schema\\":\\"metric\\",\\"params\\":{\\"field\\":\\"app.total_time\\",\\"percents\\":[50,90,95]}},{\\"id\\":\\"2\\",\\"enabled\\":true,\\"type\\":\\"date_histogram\\",\\"schema\\":\\"segment\\",\\"params\\":{\\"field\\":\\"@timestamp\\",\\"interval\\":\\"auto\\",\\"customInterval\\":\\"2h\\",\\"min_doc_count\\":1,\\"extended_bounds\\":{}}},{\\"id\\":\\"3\\",\\"enabled\\":true,\\"type\\":\\"terms\\",\\"schema\\":\\"group\\",\\"params\\":{\\"field\\":\\"system.syslog.program\\",\\"size\\":5,\\"order\\":\\"desc\\",\\"orderBy\\":\\"_term\\"}}],\\"listeners\\":{}}",
            "uiStateJSON": "{}",
            "description": "",
            "version": 1
          }
        }
      }
    ]
    
    `,
        tenantName: "tenant",
    });
    const testVisualizationV7 = new opensearch.DashboardObject("testVisualizationV7", {
        body: `[
      {
        "_id": "response-time-percentile",
        "_source": {
          "type": "visualization",
          "visualization": {
            "title": "Total response time percentiles",
            "visState": "{\\"title\\":\\"Total response time percentiles\\",\\"type\\":\\"line\\",\\"params\\":{\\"addTooltip\\":true,\\"addLegend\\":true,\\"legendPosition\\":\\"right\\",\\"showCircles\\":true,\\"interpolate\\":\\"linear\\",\\"scale\\":\\"linear\\",\\"drawLinesBetweenPoints\\":true,\\"radiusRatio\\":9,\\"times\\":[],\\"addTimeMarker\\":false,\\"defaultYExtents\\":false,\\"setYExtents\\":false},\\"aggs\\":[{\\"id\\":\\"1\\",\\"enabled\\":true,\\"type\\":\\"percentiles\\",\\"schema\\":\\"metric\\",\\"params\\":{\\"field\\":\\"app.total_time\\",\\"percents\\":[50,90,95]}},{\\"id\\":\\"2\\",\\"enabled\\":true,\\"type\\":\\"date_histogram\\",\\"schema\\":\\"segment\\",\\"params\\":{\\"field\\":\\"@timestamp\\",\\"interval\\":\\"auto\\",\\"customInterval\\":\\"2h\\",\\"min_doc_count\\":1,\\"extended_bounds\\":{}}},{\\"id\\":\\"3\\",\\"enabled\\":true,\\"type\\":\\"terms\\",\\"schema\\":\\"group\\",\\"params\\":{\\"field\\":\\"system.syslog.program\\",\\"size\\":5,\\"order\\":\\"desc\\",\\"orderBy\\":\\"_term\\"}}],\\"listeners\\":{}}",
            "uiStateJSON": "{}",
            "description": "",
            "version": 1
          }
        }
      }
    ]
    
    `,
        tenantName: "tenant",
    });
    const testIndexPatternV6 = new opensearch.DashboardObject("testIndexPatternV6", {
        body: `[
      {
        "_id": "index-pattern:cloudwatch",
        "_type": "doc",
        "_source": {
          "type": "index-pattern",
          "index-pattern": {
            "title": "cloudwatch-*",
            "timeFieldName": "timestamp"
          }
        }
      }
    ]
    
    `,
        tenantName: "tenant",
    });
    const testIndexPatternV7 = new opensearch.DashboardObject("testIndexPatternV7", {
        body: `[
      {
        "_id": "index-pattern:cloudwatch",
        "_type": "doc",
        "_source": {
          "type": "index-pattern",
          "index-pattern": {
            "title": "cloudwatch-*",
            "timeFieldName": "timestamp"
          }
        }
      }
    ]
    
    `,
        tenantName: "tenant",
    });
    
    import pulumi
    import pulumi_opensearch as opensearch
    
    test_visualization_v6 = opensearch.DashboardObject("testVisualizationV6",
        body="""[
      {
        "_id": "visualization:response-time-percentile",
        "_type": "doc",
        "_source": {
          "type": "visualization",
          "visualization": {
            "title": "Total response time percentiles",
            "visState": "{\"title\":\"Total response time percentiles\",\"type\":\"line\",\"params\":{\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"showCircles\":true,\"interpolate\":\"linear\",\"scale\":\"linear\",\"drawLinesBetweenPoints\":true,\"radiusRatio\":9,\"times\":[],\"addTimeMarker\":false,\"defaultYExtents\":false,\"setYExtents\":false},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"percentiles\",\"schema\":\"metric\",\"params\":{\"field\":\"app.total_time\",\"percents\":[50,90,95]}},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"schema\":\"segment\",\"params\":{\"field\":\"@timestamp\",\"interval\":\"auto\",\"customInterval\":\"2h\",\"min_doc_count\":1,\"extended_bounds\":{}}},{\"id\":\"3\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"group\",\"params\":{\"field\":\"system.syslog.program\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"_term\"}}],\"listeners\":{}}",
            "uiStateJSON": "{}",
            "description": "",
            "version": 1
          }
        }
      }
    ]
    
    """,
        tenant_name="tenant")
    test_visualization_v7 = opensearch.DashboardObject("testVisualizationV7",
        body="""[
      {
        "_id": "response-time-percentile",
        "_source": {
          "type": "visualization",
          "visualization": {
            "title": "Total response time percentiles",
            "visState": "{\"title\":\"Total response time percentiles\",\"type\":\"line\",\"params\":{\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"showCircles\":true,\"interpolate\":\"linear\",\"scale\":\"linear\",\"drawLinesBetweenPoints\":true,\"radiusRatio\":9,\"times\":[],\"addTimeMarker\":false,\"defaultYExtents\":false,\"setYExtents\":false},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"percentiles\",\"schema\":\"metric\",\"params\":{\"field\":\"app.total_time\",\"percents\":[50,90,95]}},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"schema\":\"segment\",\"params\":{\"field\":\"@timestamp\",\"interval\":\"auto\",\"customInterval\":\"2h\",\"min_doc_count\":1,\"extended_bounds\":{}}},{\"id\":\"3\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"group\",\"params\":{\"field\":\"system.syslog.program\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"_term\"}}],\"listeners\":{}}",
            "uiStateJSON": "{}",
            "description": "",
            "version": 1
          }
        }
      }
    ]
    
    """,
        tenant_name="tenant")
    test_index_pattern_v6 = opensearch.DashboardObject("testIndexPatternV6",
        body="""[
      {
        "_id": "index-pattern:cloudwatch",
        "_type": "doc",
        "_source": {
          "type": "index-pattern",
          "index-pattern": {
            "title": "cloudwatch-*",
            "timeFieldName": "timestamp"
          }
        }
      }
    ]
    
    """,
        tenant_name="tenant")
    test_index_pattern_v7 = opensearch.DashboardObject("testIndexPatternV7",
        body="""[
      {
        "_id": "index-pattern:cloudwatch",
        "_type": "doc",
        "_source": {
          "type": "index-pattern",
          "index-pattern": {
            "title": "cloudwatch-*",
            "timeFieldName": "timestamp"
          }
        }
      }
    ]
    
    """,
        tenant_name="tenant")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opensearch/v2/opensearch"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := opensearch.NewDashboardObject(ctx, "testVisualizationV6", &opensearch.DashboardObjectArgs{
    			Body: pulumi.String(`[
      {
        "_id": "visualization:response-time-percentile",
        "_type": "doc",
        "_source": {
          "type": "visualization",
          "visualization": {
            "title": "Total response time percentiles",
            "visState": "{\"title\":\"Total response time percentiles\",\"type\":\"line\",\"params\":{\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"showCircles\":true,\"interpolate\":\"linear\",\"scale\":\"linear\",\"drawLinesBetweenPoints\":true,\"radiusRatio\":9,\"times\":[],\"addTimeMarker\":false,\"defaultYExtents\":false,\"setYExtents\":false},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"percentiles\",\"schema\":\"metric\",\"params\":{\"field\":\"app.total_time\",\"percents\":[50,90,95]}},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"schema\":\"segment\",\"params\":{\"field\":\"@timestamp\",\"interval\":\"auto\",\"customInterval\":\"2h\",\"min_doc_count\":1,\"extended_bounds\":{}}},{\"id\":\"3\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"group\",\"params\":{\"field\":\"system.syslog.program\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"_term\"}}],\"listeners\":{}}",
            "uiStateJSON": "{}",
            "description": "",
            "version": 1
          }
        }
      }
    ]
    
    `),
    			TenantName: pulumi.String("tenant"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = opensearch.NewDashboardObject(ctx, "testVisualizationV7", &opensearch.DashboardObjectArgs{
    			Body: pulumi.String(`[
      {
        "_id": "response-time-percentile",
        "_source": {
          "type": "visualization",
          "visualization": {
            "title": "Total response time percentiles",
            "visState": "{\"title\":\"Total response time percentiles\",\"type\":\"line\",\"params\":{\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"showCircles\":true,\"interpolate\":\"linear\",\"scale\":\"linear\",\"drawLinesBetweenPoints\":true,\"radiusRatio\":9,\"times\":[],\"addTimeMarker\":false,\"defaultYExtents\":false,\"setYExtents\":false},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"percentiles\",\"schema\":\"metric\",\"params\":{\"field\":\"app.total_time\",\"percents\":[50,90,95]}},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"schema\":\"segment\",\"params\":{\"field\":\"@timestamp\",\"interval\":\"auto\",\"customInterval\":\"2h\",\"min_doc_count\":1,\"extended_bounds\":{}}},{\"id\":\"3\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"group\",\"params\":{\"field\":\"system.syslog.program\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"_term\"}}],\"listeners\":{}}",
            "uiStateJSON": "{}",
            "description": "",
            "version": 1
          }
        }
      }
    ]
    
    `),
    			TenantName: pulumi.String("tenant"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = opensearch.NewDashboardObject(ctx, "testIndexPatternV6", &opensearch.DashboardObjectArgs{
    			Body: pulumi.String(`[
      {
        "_id": "index-pattern:cloudwatch",
        "_type": "doc",
        "_source": {
          "type": "index-pattern",
          "index-pattern": {
            "title": "cloudwatch-*",
            "timeFieldName": "timestamp"
          }
        }
      }
    ]
    
    `),
    			TenantName: pulumi.String("tenant"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = opensearch.NewDashboardObject(ctx, "testIndexPatternV7", &opensearch.DashboardObjectArgs{
    			Body: pulumi.String(`[
      {
        "_id": "index-pattern:cloudwatch",
        "_type": "doc",
        "_source": {
          "type": "index-pattern",
          "index-pattern": {
            "title": "cloudwatch-*",
            "timeFieldName": "timestamp"
          }
        }
      }
    ]
    
    `),
    			TenantName: pulumi.String("tenant"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opensearch = Pulumi.Opensearch;
    
    return await Deployment.RunAsync(() => 
    {
        var testVisualizationV6 = new Opensearch.DashboardObject("testVisualizationV6", new()
        {
            Body = @"[
      {
        ""_id"": ""visualization:response-time-percentile"",
        ""_type"": ""doc"",
        ""_source"": {
          ""type"": ""visualization"",
          ""visualization"": {
            ""title"": ""Total response time percentiles"",
            ""visState"": ""{\""title\"":\""Total response time percentiles\"",\""type\"":\""line\"",\""params\"":{\""addTooltip\"":true,\""addLegend\"":true,\""legendPosition\"":\""right\"",\""showCircles\"":true,\""interpolate\"":\""linear\"",\""scale\"":\""linear\"",\""drawLinesBetweenPoints\"":true,\""radiusRatio\"":9,\""times\"":[],\""addTimeMarker\"":false,\""defaultYExtents\"":false,\""setYExtents\"":false},\""aggs\"":[{\""id\"":\""1\"",\""enabled\"":true,\""type\"":\""percentiles\"",\""schema\"":\""metric\"",\""params\"":{\""field\"":\""app.total_time\"",\""percents\"":[50,90,95]}},{\""id\"":\""2\"",\""enabled\"":true,\""type\"":\""date_histogram\"",\""schema\"":\""segment\"",\""params\"":{\""field\"":\""@timestamp\"",\""interval\"":\""auto\"",\""customInterval\"":\""2h\"",\""min_doc_count\"":1,\""extended_bounds\"":{}}},{\""id\"":\""3\"",\""enabled\"":true,\""type\"":\""terms\"",\""schema\"":\""group\"",\""params\"":{\""field\"":\""system.syslog.program\"",\""size\"":5,\""order\"":\""desc\"",\""orderBy\"":\""_term\""}}],\""listeners\"":{}}"",
            ""uiStateJSON"": ""{}"",
            ""description"": """",
            ""version"": 1
          }
        }
      }
    ]
    
    ",
            TenantName = "tenant",
        });
    
        var testVisualizationV7 = new Opensearch.DashboardObject("testVisualizationV7", new()
        {
            Body = @"[
      {
        ""_id"": ""response-time-percentile"",
        ""_source"": {
          ""type"": ""visualization"",
          ""visualization"": {
            ""title"": ""Total response time percentiles"",
            ""visState"": ""{\""title\"":\""Total response time percentiles\"",\""type\"":\""line\"",\""params\"":{\""addTooltip\"":true,\""addLegend\"":true,\""legendPosition\"":\""right\"",\""showCircles\"":true,\""interpolate\"":\""linear\"",\""scale\"":\""linear\"",\""drawLinesBetweenPoints\"":true,\""radiusRatio\"":9,\""times\"":[],\""addTimeMarker\"":false,\""defaultYExtents\"":false,\""setYExtents\"":false},\""aggs\"":[{\""id\"":\""1\"",\""enabled\"":true,\""type\"":\""percentiles\"",\""schema\"":\""metric\"",\""params\"":{\""field\"":\""app.total_time\"",\""percents\"":[50,90,95]}},{\""id\"":\""2\"",\""enabled\"":true,\""type\"":\""date_histogram\"",\""schema\"":\""segment\"",\""params\"":{\""field\"":\""@timestamp\"",\""interval\"":\""auto\"",\""customInterval\"":\""2h\"",\""min_doc_count\"":1,\""extended_bounds\"":{}}},{\""id\"":\""3\"",\""enabled\"":true,\""type\"":\""terms\"",\""schema\"":\""group\"",\""params\"":{\""field\"":\""system.syslog.program\"",\""size\"":5,\""order\"":\""desc\"",\""orderBy\"":\""_term\""}}],\""listeners\"":{}}"",
            ""uiStateJSON"": ""{}"",
            ""description"": """",
            ""version"": 1
          }
        }
      }
    ]
    
    ",
            TenantName = "tenant",
        });
    
        var testIndexPatternV6 = new Opensearch.DashboardObject("testIndexPatternV6", new()
        {
            Body = @"[
      {
        ""_id"": ""index-pattern:cloudwatch"",
        ""_type"": ""doc"",
        ""_source"": {
          ""type"": ""index-pattern"",
          ""index-pattern"": {
            ""title"": ""cloudwatch-*"",
            ""timeFieldName"": ""timestamp""
          }
        }
      }
    ]
    
    ",
            TenantName = "tenant",
        });
    
        var testIndexPatternV7 = new Opensearch.DashboardObject("testIndexPatternV7", new()
        {
            Body = @"[
      {
        ""_id"": ""index-pattern:cloudwatch"",
        ""_type"": ""doc"",
        ""_source"": {
          ""type"": ""index-pattern"",
          ""index-pattern"": {
            ""title"": ""cloudwatch-*"",
            ""timeFieldName"": ""timestamp""
          }
        }
      }
    ]
    
    ",
            TenantName = "tenant",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.opensearch.DashboardObject;
    import com.pulumi.opensearch.DashboardObjectArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var testVisualizationV6 = new DashboardObject("testVisualizationV6", DashboardObjectArgs.builder()
                .body("""
    [
      {
        "_id": "visualization:response-time-percentile",
        "_type": "doc",
        "_source": {
          "type": "visualization",
          "visualization": {
            "title": "Total response time percentiles",
            "visState": "{\"title\":\"Total response time percentiles\",\"type\":\"line\",\"params\":{\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"showCircles\":true,\"interpolate\":\"linear\",\"scale\":\"linear\",\"drawLinesBetweenPoints\":true,\"radiusRatio\":9,\"times\":[],\"addTimeMarker\":false,\"defaultYExtents\":false,\"setYExtents\":false},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"percentiles\",\"schema\":\"metric\",\"params\":{\"field\":\"app.total_time\",\"percents\":[50,90,95]}},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"schema\":\"segment\",\"params\":{\"field\":\"@timestamp\",\"interval\":\"auto\",\"customInterval\":\"2h\",\"min_doc_count\":1,\"extended_bounds\":{}}},{\"id\":\"3\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"group\",\"params\":{\"field\":\"system.syslog.program\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"_term\"}}],\"listeners\":{}}",
            "uiStateJSON": "{}",
            "description": "",
            "version": 1
          }
        }
      }
    ]
    
                """)
                .tenantName("tenant")
                .build());
    
            var testVisualizationV7 = new DashboardObject("testVisualizationV7", DashboardObjectArgs.builder()
                .body("""
    [
      {
        "_id": "response-time-percentile",
        "_source": {
          "type": "visualization",
          "visualization": {
            "title": "Total response time percentiles",
            "visState": "{\"title\":\"Total response time percentiles\",\"type\":\"line\",\"params\":{\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"showCircles\":true,\"interpolate\":\"linear\",\"scale\":\"linear\",\"drawLinesBetweenPoints\":true,\"radiusRatio\":9,\"times\":[],\"addTimeMarker\":false,\"defaultYExtents\":false,\"setYExtents\":false},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"percentiles\",\"schema\":\"metric\",\"params\":{\"field\":\"app.total_time\",\"percents\":[50,90,95]}},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"schema\":\"segment\",\"params\":{\"field\":\"@timestamp\",\"interval\":\"auto\",\"customInterval\":\"2h\",\"min_doc_count\":1,\"extended_bounds\":{}}},{\"id\":\"3\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"group\",\"params\":{\"field\":\"system.syslog.program\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"_term\"}}],\"listeners\":{}}",
            "uiStateJSON": "{}",
            "description": "",
            "version": 1
          }
        }
      }
    ]
    
                """)
                .tenantName("tenant")
                .build());
    
            var testIndexPatternV6 = new DashboardObject("testIndexPatternV6", DashboardObjectArgs.builder()
                .body("""
    [
      {
        "_id": "index-pattern:cloudwatch",
        "_type": "doc",
        "_source": {
          "type": "index-pattern",
          "index-pattern": {
            "title": "cloudwatch-*",
            "timeFieldName": "timestamp"
          }
        }
      }
    ]
    
                """)
                .tenantName("tenant")
                .build());
    
            var testIndexPatternV7 = new DashboardObject("testIndexPatternV7", DashboardObjectArgs.builder()
                .body("""
    [
      {
        "_id": "index-pattern:cloudwatch",
        "_type": "doc",
        "_source": {
          "type": "index-pattern",
          "index-pattern": {
            "title": "cloudwatch-*",
            "timeFieldName": "timestamp"
          }
        }
      }
    ]
    
                """)
                .tenantName("tenant")
                .build());
    
        }
    }
    
    resources:
      testVisualizationV6:
        type: opensearch:DashboardObject
        properties:
          body: |+
            [
              {
                "_id": "visualization:response-time-percentile",
                "_type": "doc",
                "_source": {
                  "type": "visualization",
                  "visualization": {
                    "title": "Total response time percentiles",
                    "visState": "{\"title\":\"Total response time percentiles\",\"type\":\"line\",\"params\":{\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"showCircles\":true,\"interpolate\":\"linear\",\"scale\":\"linear\",\"drawLinesBetweenPoints\":true,\"radiusRatio\":9,\"times\":[],\"addTimeMarker\":false,\"defaultYExtents\":false,\"setYExtents\":false},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"percentiles\",\"schema\":\"metric\",\"params\":{\"field\":\"app.total_time\",\"percents\":[50,90,95]}},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"schema\":\"segment\",\"params\":{\"field\":\"@timestamp\",\"interval\":\"auto\",\"customInterval\":\"2h\",\"min_doc_count\":1,\"extended_bounds\":{}}},{\"id\":\"3\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"group\",\"params\":{\"field\":\"system.syslog.program\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"_term\"}}],\"listeners\":{}}",
                    "uiStateJSON": "{}",
                    "description": "",
                    "version": 1
                  }
                }
              }
            ]        
    
          tenantName: tenant
      testVisualizationV7:
        type: opensearch:DashboardObject
        properties:
          body: |+
            [
              {
                "_id": "response-time-percentile",
                "_source": {
                  "type": "visualization",
                  "visualization": {
                    "title": "Total response time percentiles",
                    "visState": "{\"title\":\"Total response time percentiles\",\"type\":\"line\",\"params\":{\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"showCircles\":true,\"interpolate\":\"linear\",\"scale\":\"linear\",\"drawLinesBetweenPoints\":true,\"radiusRatio\":9,\"times\":[],\"addTimeMarker\":false,\"defaultYExtents\":false,\"setYExtents\":false},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"percentiles\",\"schema\":\"metric\",\"params\":{\"field\":\"app.total_time\",\"percents\":[50,90,95]}},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"schema\":\"segment\",\"params\":{\"field\":\"@timestamp\",\"interval\":\"auto\",\"customInterval\":\"2h\",\"min_doc_count\":1,\"extended_bounds\":{}}},{\"id\":\"3\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"group\",\"params\":{\"field\":\"system.syslog.program\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"_term\"}}],\"listeners\":{}}",
                    "uiStateJSON": "{}",
                    "description": "",
                    "version": 1
                  }
                }
              }
            ]        
    
          tenantName: tenant
      testIndexPatternV6:
        type: opensearch:DashboardObject
        properties:
          body: |+
            [
              {
                "_id": "index-pattern:cloudwatch",
                "_type": "doc",
                "_source": {
                  "type": "index-pattern",
                  "index-pattern": {
                    "title": "cloudwatch-*",
                    "timeFieldName": "timestamp"
                  }
                }
              }
            ]        
    
          tenantName: tenant
      testIndexPatternV7:
        type: opensearch:DashboardObject
        properties:
          body: |+
            [
              {
                "_id": "index-pattern:cloudwatch",
                "_type": "doc",
                "_source": {
                  "type": "index-pattern",
                  "index-pattern": {
                    "title": "cloudwatch-*",
                    "timeFieldName": "timestamp"
                  }
                }
              }
            ]        
    
          tenantName: tenant
    

    Create DashboardObject Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new DashboardObject(name: string, args: DashboardObjectArgs, opts?: CustomResourceOptions);
    @overload
    def DashboardObject(resource_name: str,
                        args: DashboardObjectArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def DashboardObject(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        body: Optional[str] = None,
                        dashboard_object_id: Optional[str] = None,
                        index: Optional[str] = None,
                        tenant_name: Optional[str] = None)
    func NewDashboardObject(ctx *Context, name string, args DashboardObjectArgs, opts ...ResourceOption) (*DashboardObject, error)
    public DashboardObject(string name, DashboardObjectArgs args, CustomResourceOptions? opts = null)
    public DashboardObject(String name, DashboardObjectArgs args)
    public DashboardObject(String name, DashboardObjectArgs args, CustomResourceOptions options)
    
    type: opensearch:DashboardObject
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args DashboardObjectArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args DashboardObjectArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args DashboardObjectArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DashboardObjectArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DashboardObjectArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var dashboardObjectResource = new Opensearch.DashboardObject("dashboardObjectResource", new()
    {
        Body = "string",
        DashboardObjectId = "string",
        Index = "string",
        TenantName = "string",
    });
    
    example, err := opensearch.NewDashboardObject(ctx, "dashboardObjectResource", &opensearch.DashboardObjectArgs{
    	Body:              pulumi.String("string"),
    	DashboardObjectId: pulumi.String("string"),
    	Index:             pulumi.String("string"),
    	TenantName:        pulumi.String("string"),
    })
    
    var dashboardObjectResource = new DashboardObject("dashboardObjectResource", DashboardObjectArgs.builder()
        .body("string")
        .dashboardObjectId("string")
        .index("string")
        .tenantName("string")
        .build());
    
    dashboard_object_resource = opensearch.DashboardObject("dashboardObjectResource",
        body="string",
        dashboard_object_id="string",
        index="string",
        tenant_name="string")
    
    const dashboardObjectResource = new opensearch.DashboardObject("dashboardObjectResource", {
        body: "string",
        dashboardObjectId: "string",
        index: "string",
        tenantName: "string",
    });
    
    type: opensearch:DashboardObject
    properties:
        body: string
        dashboardObjectId: string
        index: string
        tenantName: string
    

    DashboardObject Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The DashboardObject resource accepts the following input properties:

    Body string
    The JSON body of the dashboard object.
    DashboardObjectId string
    The ID of this resource.
    Index string
    The name of the index where dashboard data is stored. Does not work with tenant_name.
    TenantName string
    The name of the tenant to which dashboard data associate. Empty string defaults to global tenant.
    Body string
    The JSON body of the dashboard object.
    DashboardObjectId string
    The ID of this resource.
    Index string
    The name of the index where dashboard data is stored. Does not work with tenant_name.
    TenantName string
    The name of the tenant to which dashboard data associate. Empty string defaults to global tenant.
    body String
    The JSON body of the dashboard object.
    dashboardObjectId String
    The ID of this resource.
    index String
    The name of the index where dashboard data is stored. Does not work with tenant_name.
    tenantName String
    The name of the tenant to which dashboard data associate. Empty string defaults to global tenant.
    body string
    The JSON body of the dashboard object.
    dashboardObjectId string
    The ID of this resource.
    index string
    The name of the index where dashboard data is stored. Does not work with tenant_name.
    tenantName string
    The name of the tenant to which dashboard data associate. Empty string defaults to global tenant.
    body str
    The JSON body of the dashboard object.
    dashboard_object_id str
    The ID of this resource.
    index str
    The name of the index where dashboard data is stored. Does not work with tenant_name.
    tenant_name str
    The name of the tenant to which dashboard data associate. Empty string defaults to global tenant.
    body String
    The JSON body of the dashboard object.
    dashboardObjectId String
    The ID of this resource.
    index String
    The name of the index where dashboard data is stored. Does not work with tenant_name.
    tenantName String
    The name of the tenant to which dashboard data associate. Empty string defaults to global tenant.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DashboardObject resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing DashboardObject Resource

    Get an existing DashboardObject resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: DashboardObjectState, opts?: CustomResourceOptions): DashboardObject
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            body: Optional[str] = None,
            dashboard_object_id: Optional[str] = None,
            index: Optional[str] = None,
            tenant_name: Optional[str] = None) -> DashboardObject
    func GetDashboardObject(ctx *Context, name string, id IDInput, state *DashboardObjectState, opts ...ResourceOption) (*DashboardObject, error)
    public static DashboardObject Get(string name, Input<string> id, DashboardObjectState? state, CustomResourceOptions? opts = null)
    public static DashboardObject get(String name, Output<String> id, DashboardObjectState state, CustomResourceOptions options)
    resources:  _:    type: opensearch:DashboardObject    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Body string
    The JSON body of the dashboard object.
    DashboardObjectId string
    The ID of this resource.
    Index string
    The name of the index where dashboard data is stored. Does not work with tenant_name.
    TenantName string
    The name of the tenant to which dashboard data associate. Empty string defaults to global tenant.
    Body string
    The JSON body of the dashboard object.
    DashboardObjectId string
    The ID of this resource.
    Index string
    The name of the index where dashboard data is stored. Does not work with tenant_name.
    TenantName string
    The name of the tenant to which dashboard data associate. Empty string defaults to global tenant.
    body String
    The JSON body of the dashboard object.
    dashboardObjectId String
    The ID of this resource.
    index String
    The name of the index where dashboard data is stored. Does not work with tenant_name.
    tenantName String
    The name of the tenant to which dashboard data associate. Empty string defaults to global tenant.
    body string
    The JSON body of the dashboard object.
    dashboardObjectId string
    The ID of this resource.
    index string
    The name of the index where dashboard data is stored. Does not work with tenant_name.
    tenantName string
    The name of the tenant to which dashboard data associate. Empty string defaults to global tenant.
    body str
    The JSON body of the dashboard object.
    dashboard_object_id str
    The ID of this resource.
    index str
    The name of the index where dashboard data is stored. Does not work with tenant_name.
    tenant_name str
    The name of the tenant to which dashboard data associate. Empty string defaults to global tenant.
    body String
    The JSON body of the dashboard object.
    dashboardObjectId String
    The ID of this resource.
    index String
    The name of the index where dashboard data is stored. Does not work with tenant_name.
    tenantName String
    The name of the tenant to which dashboard data associate. Empty string defaults to global tenant.

    Package Details

    Repository
    opensearch opensearch-project/terraform-provider-opensearch
    License
    Notes
    This Pulumi package is based on the opensearch Terraform Provider.
    opensearch logo
    opensearch 2.3.1 published on Monday, Apr 14, 2025 by opensearch-project