updateDashboard

Updates an existing dashboard's properties, including its name, description, and widget configurations.

Samples

// Updating a dashboard
bcmDashboardsClient.updateDashboard {
    arn = "arn:aws:bcm-dashboards::123456789012:dashboard/abcd1234-ab12-12ab-1ab2-abcd1234efgh"
    name = "cost-dashboards-updated"
    description = "Dashboard for tracking costs version 2"
    widgets = listOf<Widget>(
        Widget {
            title = "Monthly Cost Trend"
            width = 4
            height = 7
            horizontalOffset = 2
            configs = listOf<WidgetConfig>(
                WidgetConfig {
                    displayConfig = DisplayConfig.Graph(mapOf<String, GraphDisplayConfig>(
                        "costTrend" to GraphDisplayConfig {
                            visualType = VisualType.fromValue("LINE")
                        }
                    )
                    )
                    queryParameters = QueryParameters.CostAndUsage(CostAndUsageQuery {
                        granularity = Granularity.fromValue("MONTHLY")
                        groupBy = listOf<GroupDefinition>(
                            GroupDefinition {
                                key = "SERVICE"
                                type = GroupDefinitionType.fromValue("DIMENSION")
                            }                                
                        )
                        metrics = listOf<MetricName>(
                            MetricName.fromValue("UnblendedCost")
                        )
                        timeRange = DateTimeRange {
                            endTime = DateTimeValue {
                                type = DateTimeType.fromValue("RELATIVE")
                                value = "now"
                            }
                            startTime = DateTimeValue {
                                type = DateTimeType.fromValue("RELATIVE")
                                value = "-3M"
                            }
                        }
                    }
                    )
                }                    
            )
        }            
    )
}