# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import warnings
import pulumi
import pulumi.runtime
from typing import Any, Dict, List, Mapping, Optional, Tuple, Union
from . import _utilities, _tables
from . import outputs
from ._inputs import *

__all__ = ['Dashboard']


class Dashboard(pulumi.CustomResource):
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 authorized_writer_teams: Optional[pulumi.Input[List[pulumi.Input[str]]]] = None,
                 authorized_writer_users: Optional[pulumi.Input[List[pulumi.Input[str]]]] = None,
                 charts: Optional[pulumi.Input[List[pulumi.Input[pulumi.InputType['DashboardChartArgs']]]]] = None,
                 charts_resolution: Optional[pulumi.Input[str]] = None,
                 columns: Optional[pulumi.Input[List[pulumi.Input[pulumi.InputType['DashboardColumnArgs']]]]] = None,
                 dashboard_group: Optional[pulumi.Input[str]] = None,
                 description: Optional[pulumi.Input[str]] = None,
                 discovery_options_query: Optional[pulumi.Input[str]] = None,
                 discovery_options_selectors: Optional[pulumi.Input[List[pulumi.Input[str]]]] = None,
                 end_time: Optional[pulumi.Input[float]] = None,
                 event_overlays: Optional[pulumi.Input[List[pulumi.Input[pulumi.InputType['DashboardEventOverlayArgs']]]]] = None,
                 filters: Optional[pulumi.Input[List[pulumi.Input[pulumi.InputType['DashboardFilterArgs']]]]] = None,
                 grids: Optional[pulumi.Input[List[pulumi.Input[pulumi.InputType['DashboardGridArgs']]]]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 selected_event_overlays: Optional[pulumi.Input[List[pulumi.Input[pulumi.InputType['DashboardSelectedEventOverlayArgs']]]]] = None,
                 start_time: Optional[pulumi.Input[float]] = None,
                 time_range: Optional[pulumi.Input[str]] = None,
                 variables: Optional[pulumi.Input[List[pulumi.Input[pulumi.InputType['DashboardVariableArgs']]]]] = None,
                 __props__=None,
                 __name__=None,
                 __opts__=None):
        """
        Create a Dashboard resource with the given unique name, props, and options.
        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[List[pulumi.Input[str]]] authorized_writer_teams: Team IDs that have write access to this dashboard group. Remember to use an admin's token if using this feature and to include that admin's team (or user id in `authorized_writer_teams`).
        :param pulumi.Input[List[pulumi.Input[str]]] authorized_writer_users: User IDs that have write access to this dashboard group. Remember to use an admin's token if using this feature and to include that admin's user id (or team id in `authorized_writer_teams`).
        :param pulumi.Input[List[pulumi.Input[pulumi.InputType['DashboardChartArgs']]]] charts: Chart ID and layout information for the charts in the dashboard.
        :param pulumi.Input[str] charts_resolution: Specifies the chart data display resolution for charts in this dashboard. Value can be one of `"default"`,  `"low"`, `"high"`, or  `"highest"`.
        :param pulumi.Input[List[pulumi.Input[pulumi.InputType['DashboardColumnArgs']]]] columns: Column number for the layout.
        :param pulumi.Input[str] dashboard_group: The ID of the dashboard group that contains the dashboard.
        :param pulumi.Input[str] description: Variable description.
        :param pulumi.Input[float] end_time: Seconds since epoch. Used for visualization.
        :param pulumi.Input[List[pulumi.Input[pulumi.InputType['DashboardEventOverlayArgs']]]] event_overlays: Specify a list of event overlays to include in the dashboard. Note: These overlays correspond to the *suggested* event overlays specified in the web UI, and they're not automatically applied as active overlays. To set default active event overlays, use the `selected_event_overlay` property instead.
        :param pulumi.Input[List[pulumi.Input[pulumi.InputType['DashboardFilterArgs']]]] filters: Filter to apply to the charts when displaying the dashboard.
        :param pulumi.Input[List[pulumi.Input[pulumi.InputType['DashboardGridArgs']]]] grids: Grid dashboard layout. Charts listed will be placed in a grid by row with the same width and height. If a chart cannot fit in a row, it will be placed automatically in the next row.
        :param pulumi.Input[str] name: Name of the dashboard.
        :param pulumi.Input[List[pulumi.Input[pulumi.InputType['DashboardSelectedEventOverlayArgs']]]] selected_event_overlays: Defines event overlays which are enabled by **default**. Any overlay specified here should have an accompanying entry in `event_overlay`, which are similar to the properties here.
        :param pulumi.Input[float] start_time: Seconds since epoch. Used for visualization.
        :param pulumi.Input[str] time_range: The time range prior to now to visualize. SignalFx time syntax (e.g. `"-5m"`, `"-1h"`).
        :param pulumi.Input[List[pulumi.Input[pulumi.InputType['DashboardVariableArgs']]]] variables: Dashboard variable to apply to each chart in the dashboard.
        """
        if __name__ is not None:
            warnings.warn("explicit use of __name__ is deprecated", DeprecationWarning)
            resource_name = __name__
        if __opts__ is not None:
            warnings.warn("explicit use of __opts__ is deprecated, use 'opts' instead", DeprecationWarning)
            opts = __opts__
        if opts is None:
            opts = pulumi.ResourceOptions()
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.version is None:
            opts.version = _utilities.get_version()
        if opts.id is None:
            if __props__ is not None:
                raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
            __props__ = dict()

            __props__['authorized_writer_teams'] = authorized_writer_teams
            __props__['authorized_writer_users'] = authorized_writer_users
            __props__['charts'] = charts
            __props__['charts_resolution'] = charts_resolution
            __props__['columns'] = columns
            if dashboard_group is None:
                raise TypeError("Missing required property 'dashboard_group'")
            __props__['dashboard_group'] = dashboard_group
            __props__['description'] = description
            __props__['discovery_options_query'] = discovery_options_query
            __props__['discovery_options_selectors'] = discovery_options_selectors
            __props__['end_time'] = end_time
            __props__['event_overlays'] = event_overlays
            __props__['filters'] = filters
            __props__['grids'] = grids
            __props__['name'] = name
            __props__['selected_event_overlays'] = selected_event_overlays
            __props__['start_time'] = start_time
            __props__['time_range'] = time_range
            __props__['variables'] = variables
            __props__['url'] = None
        super(Dashboard, __self__).__init__(
            'signalfx:index/dashboard:Dashboard',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            authorized_writer_teams: Optional[pulumi.Input[List[pulumi.Input[str]]]] = None,
            authorized_writer_users: Optional[pulumi.Input[List[pulumi.Input[str]]]] = None,
            charts: Optional[pulumi.Input[List[pulumi.Input[pulumi.InputType['DashboardChartArgs']]]]] = None,
            charts_resolution: Optional[pulumi.Input[str]] = None,
            columns: Optional[pulumi.Input[List[pulumi.Input[pulumi.InputType['DashboardColumnArgs']]]]] = None,
            dashboard_group: Optional[pulumi.Input[str]] = None,
            description: Optional[pulumi.Input[str]] = None,
            discovery_options_query: Optional[pulumi.Input[str]] = None,
            discovery_options_selectors: Optional[pulumi.Input[List[pulumi.Input[str]]]] = None,
            end_time: Optional[pulumi.Input[float]] = None,
            event_overlays: Optional[pulumi.Input[List[pulumi.Input[pulumi.InputType['DashboardEventOverlayArgs']]]]] = None,
            filters: Optional[pulumi.Input[List[pulumi.Input[pulumi.InputType['DashboardFilterArgs']]]]] = None,
            grids: Optional[pulumi.Input[List[pulumi.Input[pulumi.InputType['DashboardGridArgs']]]]] = None,
            name: Optional[pulumi.Input[str]] = None,
            selected_event_overlays: Optional[pulumi.Input[List[pulumi.Input[pulumi.InputType['DashboardSelectedEventOverlayArgs']]]]] = None,
            start_time: Optional[pulumi.Input[float]] = None,
            time_range: Optional[pulumi.Input[str]] = None,
            url: Optional[pulumi.Input[str]] = None,
            variables: Optional[pulumi.Input[List[pulumi.Input[pulumi.InputType['DashboardVariableArgs']]]]] = None) -> 'Dashboard':
        """
        Get an existing Dashboard resource's state with the given name, id, and optional extra
        properties used to qualify the lookup.

        :param str resource_name: The unique name of the resulting resource.
        :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[List[pulumi.Input[str]]] authorized_writer_teams: Team IDs that have write access to this dashboard group. Remember to use an admin's token if using this feature and to include that admin's team (or user id in `authorized_writer_teams`).
        :param pulumi.Input[List[pulumi.Input[str]]] authorized_writer_users: User IDs that have write access to this dashboard group. Remember to use an admin's token if using this feature and to include that admin's user id (or team id in `authorized_writer_teams`).
        :param pulumi.Input[List[pulumi.Input[pulumi.InputType['DashboardChartArgs']]]] charts: Chart ID and layout information for the charts in the dashboard.
        :param pulumi.Input[str] charts_resolution: Specifies the chart data display resolution for charts in this dashboard. Value can be one of `"default"`,  `"low"`, `"high"`, or  `"highest"`.
        :param pulumi.Input[List[pulumi.Input[pulumi.InputType['DashboardColumnArgs']]]] columns: Column number for the layout.
        :param pulumi.Input[str] dashboard_group: The ID of the dashboard group that contains the dashboard.
        :param pulumi.Input[str] description: Variable description.
        :param pulumi.Input[float] end_time: Seconds since epoch. Used for visualization.
        :param pulumi.Input[List[pulumi.Input[pulumi.InputType['DashboardEventOverlayArgs']]]] event_overlays: Specify a list of event overlays to include in the dashboard. Note: These overlays correspond to the *suggested* event overlays specified in the web UI, and they're not automatically applied as active overlays. To set default active event overlays, use the `selected_event_overlay` property instead.
        :param pulumi.Input[List[pulumi.Input[pulumi.InputType['DashboardFilterArgs']]]] filters: Filter to apply to the charts when displaying the dashboard.
        :param pulumi.Input[List[pulumi.Input[pulumi.InputType['DashboardGridArgs']]]] grids: Grid dashboard layout. Charts listed will be placed in a grid by row with the same width and height. If a chart cannot fit in a row, it will be placed automatically in the next row.
        :param pulumi.Input[str] name: Name of the dashboard.
        :param pulumi.Input[List[pulumi.Input[pulumi.InputType['DashboardSelectedEventOverlayArgs']]]] selected_event_overlays: Defines event overlays which are enabled by **default**. Any overlay specified here should have an accompanying entry in `event_overlay`, which are similar to the properties here.
        :param pulumi.Input[float] start_time: Seconds since epoch. Used for visualization.
        :param pulumi.Input[str] time_range: The time range prior to now to visualize. SignalFx time syntax (e.g. `"-5m"`, `"-1h"`).
        :param pulumi.Input[str] url: The URL of the dashboard.
        :param pulumi.Input[List[pulumi.Input[pulumi.InputType['DashboardVariableArgs']]]] variables: Dashboard variable to apply to each chart in the dashboard.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = dict()

        __props__["authorized_writer_teams"] = authorized_writer_teams
        __props__["authorized_writer_users"] = authorized_writer_users
        __props__["charts"] = charts
        __props__["charts_resolution"] = charts_resolution
        __props__["columns"] = columns
        __props__["dashboard_group"] = dashboard_group
        __props__["description"] = description
        __props__["discovery_options_query"] = discovery_options_query
        __props__["discovery_options_selectors"] = discovery_options_selectors
        __props__["end_time"] = end_time
        __props__["event_overlays"] = event_overlays
        __props__["filters"] = filters
        __props__["grids"] = grids
        __props__["name"] = name
        __props__["selected_event_overlays"] = selected_event_overlays
        __props__["start_time"] = start_time
        __props__["time_range"] = time_range
        __props__["url"] = url
        __props__["variables"] = variables
        return Dashboard(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter(name="authorizedWriterTeams")
    def authorized_writer_teams(self) -> pulumi.Output[Optional[List[str]]]:
        """
        Team IDs that have write access to this dashboard group. Remember to use an admin's token if using this feature and to include that admin's team (or user id in `authorized_writer_teams`).
        """
        return pulumi.get(self, "authorized_writer_teams")

    @property
    @pulumi.getter(name="authorizedWriterUsers")
    def authorized_writer_users(self) -> pulumi.Output[Optional[List[str]]]:
        """
        User IDs that have write access to this dashboard group. Remember to use an admin's token if using this feature and to include that admin's user id (or team id in `authorized_writer_teams`).
        """
        return pulumi.get(self, "authorized_writer_users")

    @property
    @pulumi.getter
    def charts(self) -> pulumi.Output[Optional[List['outputs.DashboardChart']]]:
        """
        Chart ID and layout information for the charts in the dashboard.
        """
        return pulumi.get(self, "charts")

    @property
    @pulumi.getter(name="chartsResolution")
    def charts_resolution(self) -> pulumi.Output[Optional[str]]:
        """
        Specifies the chart data display resolution for charts in this dashboard. Value can be one of `"default"`,  `"low"`, `"high"`, or  `"highest"`.
        """
        return pulumi.get(self, "charts_resolution")

    @property
    @pulumi.getter
    def columns(self) -> pulumi.Output[Optional[List['outputs.DashboardColumn']]]:
        """
        Column number for the layout.
        """
        return pulumi.get(self, "columns")

    @property
    @pulumi.getter(name="dashboardGroup")
    def dashboard_group(self) -> pulumi.Output[str]:
        """
        The ID of the dashboard group that contains the dashboard.
        """
        return pulumi.get(self, "dashboard_group")

    @property
    @pulumi.getter
    def description(self) -> pulumi.Output[Optional[str]]:
        """
        Variable description.
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter(name="discoveryOptionsQuery")
    def discovery_options_query(self) -> pulumi.Output[Optional[str]]:
        return pulumi.get(self, "discovery_options_query")

    @property
    @pulumi.getter(name="discoveryOptionsSelectors")
    def discovery_options_selectors(self) -> pulumi.Output[Optional[List[str]]]:
        return pulumi.get(self, "discovery_options_selectors")

    @property
    @pulumi.getter(name="endTime")
    def end_time(self) -> pulumi.Output[Optional[float]]:
        """
        Seconds since epoch. Used for visualization.
        """
        return pulumi.get(self, "end_time")

    @property
    @pulumi.getter(name="eventOverlays")
    def event_overlays(self) -> pulumi.Output[Optional[List['outputs.DashboardEventOverlay']]]:
        """
        Specify a list of event overlays to include in the dashboard. Note: These overlays correspond to the *suggested* event overlays specified in the web UI, and they're not automatically applied as active overlays. To set default active event overlays, use the `selected_event_overlay` property instead.
        """
        return pulumi.get(self, "event_overlays")

    @property
    @pulumi.getter
    def filters(self) -> pulumi.Output[Optional[List['outputs.DashboardFilter']]]:
        """
        Filter to apply to the charts when displaying the dashboard.
        """
        return pulumi.get(self, "filters")

    @property
    @pulumi.getter
    def grids(self) -> pulumi.Output[Optional[List['outputs.DashboardGrid']]]:
        """
        Grid dashboard layout. Charts listed will be placed in a grid by row with the same width and height. If a chart cannot fit in a row, it will be placed automatically in the next row.
        """
        return pulumi.get(self, "grids")

    @property
    @pulumi.getter
    def name(self) -> pulumi.Output[str]:
        """
        Name of the dashboard.
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter(name="selectedEventOverlays")
    def selected_event_overlays(self) -> pulumi.Output[Optional[List['outputs.DashboardSelectedEventOverlay']]]:
        """
        Defines event overlays which are enabled by **default**. Any overlay specified here should have an accompanying entry in `event_overlay`, which are similar to the properties here.
        """
        return pulumi.get(self, "selected_event_overlays")

    @property
    @pulumi.getter(name="startTime")
    def start_time(self) -> pulumi.Output[Optional[float]]:
        """
        Seconds since epoch. Used for visualization.
        """
        return pulumi.get(self, "start_time")

    @property
    @pulumi.getter(name="timeRange")
    def time_range(self) -> pulumi.Output[Optional[str]]:
        """
        The time range prior to now to visualize. SignalFx time syntax (e.g. `"-5m"`, `"-1h"`).
        """
        return pulumi.get(self, "time_range")

    @property
    @pulumi.getter
    def url(self) -> pulumi.Output[str]:
        """
        The URL of the dashboard.
        """
        return pulumi.get(self, "url")

    @property
    @pulumi.getter
    def variables(self) -> pulumi.Output[Optional[List['outputs.DashboardVariable']]]:
        """
        Dashboard variable to apply to each chart in the dashboard.
        """
        return pulumi.get(self, "variables")

    def translate_output_property(self, prop):
        return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop

    def translate_input_property(self, prop):
        return _tables.SNAKE_TO_CAMEL_CASE_TABLE.get(prop) or prop

