# 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 copy
import warnings
import sys
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
if sys.version_info >= (3, 11):
    from typing import NotRequired, TypedDict, TypeAlias
else:
    from typing_extensions import NotRequired, TypedDict, TypeAlias
from .. import _utilities

__all__ = [
    'DataSourcePermissionPermissionArgs',
    'DataSourcePermissionPermissionArgsDict',
    'ReportDashboardArgs',
    'ReportDashboardArgsDict',
    'ReportDashboardTimeRangeArgs',
    'ReportDashboardTimeRangeArgsDict',
    'ReportScheduleArgs',
    'ReportScheduleArgsDict',
    'RolePermissionArgs',
    'RolePermissionArgsDict',
]

MYPY = False

if not MYPY:
    class DataSourcePermissionPermissionArgsDict(TypedDict):
        permission: pulumi.Input[str]
        """
        Permission to associate with item. Options: `Query`, `Edit` or `Admin` (`Admin` can only be used with Grafana v10.3.0+).
        """
        built_in_role: NotRequired[pulumi.Input[str]]
        """
        Name of the basic role to manage permissions for. Options: `Viewer`, `Editor` or `Admin`.
        """
        team_id: NotRequired[pulumi.Input[str]]
        """
        ID of the team to manage permissions for. Defaults to `0`.
        """
        user_id: NotRequired[pulumi.Input[str]]
        """
        ID of the user or service account to manage permissions for. Defaults to `0`.
        """
elif False:
    DataSourcePermissionPermissionArgsDict: TypeAlias = Mapping[str, Any]

@pulumi.input_type
class DataSourcePermissionPermissionArgs:
    def __init__(__self__, *,
                 permission: pulumi.Input[str],
                 built_in_role: Optional[pulumi.Input[str]] = None,
                 team_id: Optional[pulumi.Input[str]] = None,
                 user_id: Optional[pulumi.Input[str]] = None):
        """
        :param pulumi.Input[str] permission: Permission to associate with item. Options: `Query`, `Edit` or `Admin` (`Admin` can only be used with Grafana v10.3.0+).
        :param pulumi.Input[str] built_in_role: Name of the basic role to manage permissions for. Options: `Viewer`, `Editor` or `Admin`.
        :param pulumi.Input[str] team_id: ID of the team to manage permissions for. Defaults to `0`.
        :param pulumi.Input[str] user_id: ID of the user or service account to manage permissions for. Defaults to `0`.
        """
        pulumi.set(__self__, "permission", permission)
        if built_in_role is not None:
            pulumi.set(__self__, "built_in_role", built_in_role)
        if team_id is not None:
            pulumi.set(__self__, "team_id", team_id)
        if user_id is not None:
            pulumi.set(__self__, "user_id", user_id)

    @property
    @pulumi.getter
    def permission(self) -> pulumi.Input[str]:
        """
        Permission to associate with item. Options: `Query`, `Edit` or `Admin` (`Admin` can only be used with Grafana v10.3.0+).
        """
        return pulumi.get(self, "permission")

    @permission.setter
    def permission(self, value: pulumi.Input[str]):
        pulumi.set(self, "permission", value)

    @property
    @pulumi.getter(name="builtInRole")
    def built_in_role(self) -> Optional[pulumi.Input[str]]:
        """
        Name of the basic role to manage permissions for. Options: `Viewer`, `Editor` or `Admin`.
        """
        return pulumi.get(self, "built_in_role")

    @built_in_role.setter
    def built_in_role(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "built_in_role", value)

    @property
    @pulumi.getter(name="teamId")
    def team_id(self) -> Optional[pulumi.Input[str]]:
        """
        ID of the team to manage permissions for. Defaults to `0`.
        """
        return pulumi.get(self, "team_id")

    @team_id.setter
    def team_id(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "team_id", value)

    @property
    @pulumi.getter(name="userId")
    def user_id(self) -> Optional[pulumi.Input[str]]:
        """
        ID of the user or service account to manage permissions for. Defaults to `0`.
        """
        return pulumi.get(self, "user_id")

    @user_id.setter
    def user_id(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "user_id", value)


if not MYPY:
    class ReportDashboardArgsDict(TypedDict):
        uid: pulumi.Input[str]
        """
        Dashboard uid.
        """
        report_variables: NotRequired[pulumi.Input[Mapping[str, pulumi.Input[str]]]]
        """
        Add report variables to the dashboard. Values should be separated by commas.
        """
        time_range: NotRequired[pulumi.Input['ReportDashboardTimeRangeArgsDict']]
        """
        Time range of the report.
        """
elif False:
    ReportDashboardArgsDict: TypeAlias = Mapping[str, Any]

@pulumi.input_type
class ReportDashboardArgs:
    def __init__(__self__, *,
                 uid: pulumi.Input[str],
                 report_variables: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                 time_range: Optional[pulumi.Input['ReportDashboardTimeRangeArgs']] = None):
        """
        :param pulumi.Input[str] uid: Dashboard uid.
        :param pulumi.Input[Mapping[str, pulumi.Input[str]]] report_variables: Add report variables to the dashboard. Values should be separated by commas.
        :param pulumi.Input['ReportDashboardTimeRangeArgs'] time_range: Time range of the report.
        """
        pulumi.set(__self__, "uid", uid)
        if report_variables is not None:
            pulumi.set(__self__, "report_variables", report_variables)
        if time_range is not None:
            pulumi.set(__self__, "time_range", time_range)

    @property
    @pulumi.getter
    def uid(self) -> pulumi.Input[str]:
        """
        Dashboard uid.
        """
        return pulumi.get(self, "uid")

    @uid.setter
    def uid(self, value: pulumi.Input[str]):
        pulumi.set(self, "uid", value)

    @property
    @pulumi.getter(name="reportVariables")
    def report_variables(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
        """
        Add report variables to the dashboard. Values should be separated by commas.
        """
        return pulumi.get(self, "report_variables")

    @report_variables.setter
    def report_variables(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
        pulumi.set(self, "report_variables", value)

    @property
    @pulumi.getter(name="timeRange")
    def time_range(self) -> Optional[pulumi.Input['ReportDashboardTimeRangeArgs']]:
        """
        Time range of the report.
        """
        return pulumi.get(self, "time_range")

    @time_range.setter
    def time_range(self, value: Optional[pulumi.Input['ReportDashboardTimeRangeArgs']]):
        pulumi.set(self, "time_range", value)


if not MYPY:
    class ReportDashboardTimeRangeArgsDict(TypedDict):
        from_: NotRequired[pulumi.Input[str]]
        """
        Start of the time range.
        """
        to: NotRequired[pulumi.Input[str]]
        """
        End of the time range.
        """
elif False:
    ReportDashboardTimeRangeArgsDict: TypeAlias = Mapping[str, Any]

@pulumi.input_type
class ReportDashboardTimeRangeArgs:
    def __init__(__self__, *,
                 from_: Optional[pulumi.Input[str]] = None,
                 to: Optional[pulumi.Input[str]] = None):
        """
        :param pulumi.Input[str] from_: Start of the time range.
        :param pulumi.Input[str] to: End of the time range.
        """
        if from_ is not None:
            pulumi.set(__self__, "from_", from_)
        if to is not None:
            pulumi.set(__self__, "to", to)

    @property
    @pulumi.getter(name="from")
    def from_(self) -> Optional[pulumi.Input[str]]:
        """
        Start of the time range.
        """
        return pulumi.get(self, "from_")

    @from_.setter
    def from_(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "from_", value)

    @property
    @pulumi.getter
    def to(self) -> Optional[pulumi.Input[str]]:
        """
        End of the time range.
        """
        return pulumi.get(self, "to")

    @to.setter
    def to(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "to", value)


if not MYPY:
    class ReportScheduleArgsDict(TypedDict):
        frequency: pulumi.Input[str]
        """
        Frequency of the report. Allowed values: `never`, `once`, `hourly`, `daily`, `weekly`, `monthly`, `custom`.
        """
        custom_interval: NotRequired[pulumi.Input[str]]
        """
        Custom interval of the report.
        **Note:** This field is only available when frequency is set to `custom`.
        """
        end_time: NotRequired[pulumi.Input[str]]
        """
        End time of the report. If empty, the report will be sent indefinitely (according to frequency). Note that times will be saved as UTC in Grafana. Use 2006-01-02T15:04:05 format if you want to set a custom timezone
        """
        last_day_of_month: NotRequired[pulumi.Input[bool]]
        """
        Send the report on the last day of the month Defaults to `false`.
        """
        start_time: NotRequired[pulumi.Input[str]]
        """
        Start time of the report. If empty, the start date will be set to the creation time. Note that times will be saved as UTC in Grafana. Use 2006-01-02T15:04:05 format if you want to set a custom timezone
        """
        timezone: NotRequired[pulumi.Input[str]]
        """
        Set the report time zone. Defaults to `GMT`.
        """
        workdays_only: NotRequired[pulumi.Input[bool]]
        """
        Whether to send the report only on work days. Defaults to `false`.
        """
elif False:
    ReportScheduleArgsDict: TypeAlias = Mapping[str, Any]

@pulumi.input_type
class ReportScheduleArgs:
    def __init__(__self__, *,
                 frequency: pulumi.Input[str],
                 custom_interval: Optional[pulumi.Input[str]] = None,
                 end_time: Optional[pulumi.Input[str]] = None,
                 last_day_of_month: Optional[pulumi.Input[bool]] = None,
                 start_time: Optional[pulumi.Input[str]] = None,
                 timezone: Optional[pulumi.Input[str]] = None,
                 workdays_only: Optional[pulumi.Input[bool]] = None):
        """
        :param pulumi.Input[str] frequency: Frequency of the report. Allowed values: `never`, `once`, `hourly`, `daily`, `weekly`, `monthly`, `custom`.
        :param pulumi.Input[str] custom_interval: Custom interval of the report.
               **Note:** This field is only available when frequency is set to `custom`.
        :param pulumi.Input[str] end_time: End time of the report. If empty, the report will be sent indefinitely (according to frequency). Note that times will be saved as UTC in Grafana. Use 2006-01-02T15:04:05 format if you want to set a custom timezone
        :param pulumi.Input[bool] last_day_of_month: Send the report on the last day of the month Defaults to `false`.
        :param pulumi.Input[str] start_time: Start time of the report. If empty, the start date will be set to the creation time. Note that times will be saved as UTC in Grafana. Use 2006-01-02T15:04:05 format if you want to set a custom timezone
        :param pulumi.Input[str] timezone: Set the report time zone. Defaults to `GMT`.
        :param pulumi.Input[bool] workdays_only: Whether to send the report only on work days. Defaults to `false`.
        """
        pulumi.set(__self__, "frequency", frequency)
        if custom_interval is not None:
            pulumi.set(__self__, "custom_interval", custom_interval)
        if end_time is not None:
            pulumi.set(__self__, "end_time", end_time)
        if last_day_of_month is not None:
            pulumi.set(__self__, "last_day_of_month", last_day_of_month)
        if start_time is not None:
            pulumi.set(__self__, "start_time", start_time)
        if timezone is not None:
            pulumi.set(__self__, "timezone", timezone)
        if workdays_only is not None:
            pulumi.set(__self__, "workdays_only", workdays_only)

    @property
    @pulumi.getter
    def frequency(self) -> pulumi.Input[str]:
        """
        Frequency of the report. Allowed values: `never`, `once`, `hourly`, `daily`, `weekly`, `monthly`, `custom`.
        """
        return pulumi.get(self, "frequency")

    @frequency.setter
    def frequency(self, value: pulumi.Input[str]):
        pulumi.set(self, "frequency", value)

    @property
    @pulumi.getter(name="customInterval")
    def custom_interval(self) -> Optional[pulumi.Input[str]]:
        """
        Custom interval of the report.
        **Note:** This field is only available when frequency is set to `custom`.
        """
        return pulumi.get(self, "custom_interval")

    @custom_interval.setter
    def custom_interval(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "custom_interval", value)

    @property
    @pulumi.getter(name="endTime")
    def end_time(self) -> Optional[pulumi.Input[str]]:
        """
        End time of the report. If empty, the report will be sent indefinitely (according to frequency). Note that times will be saved as UTC in Grafana. Use 2006-01-02T15:04:05 format if you want to set a custom timezone
        """
        return pulumi.get(self, "end_time")

    @end_time.setter
    def end_time(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "end_time", value)

    @property
    @pulumi.getter(name="lastDayOfMonth")
    def last_day_of_month(self) -> Optional[pulumi.Input[bool]]:
        """
        Send the report on the last day of the month Defaults to `false`.
        """
        return pulumi.get(self, "last_day_of_month")

    @last_day_of_month.setter
    def last_day_of_month(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "last_day_of_month", value)

    @property
    @pulumi.getter(name="startTime")
    def start_time(self) -> Optional[pulumi.Input[str]]:
        """
        Start time of the report. If empty, the start date will be set to the creation time. Note that times will be saved as UTC in Grafana. Use 2006-01-02T15:04:05 format if you want to set a custom timezone
        """
        return pulumi.get(self, "start_time")

    @start_time.setter
    def start_time(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "start_time", value)

    @property
    @pulumi.getter
    def timezone(self) -> Optional[pulumi.Input[str]]:
        """
        Set the report time zone. Defaults to `GMT`.
        """
        return pulumi.get(self, "timezone")

    @timezone.setter
    def timezone(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "timezone", value)

    @property
    @pulumi.getter(name="workdaysOnly")
    def workdays_only(self) -> Optional[pulumi.Input[bool]]:
        """
        Whether to send the report only on work days. Defaults to `false`.
        """
        return pulumi.get(self, "workdays_only")

    @workdays_only.setter
    def workdays_only(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "workdays_only", value)


if not MYPY:
    class RolePermissionArgsDict(TypedDict):
        action: pulumi.Input[str]
        """
        Specific action users granted with the role will be allowed to perform (for example: `users:read`)
        """
        scope: NotRequired[pulumi.Input[str]]
        """
        Scope to restrict the action to a set of resources (for example: `users:*` or `roles:customrole1`) Defaults to ``.
        """
elif False:
    RolePermissionArgsDict: TypeAlias = Mapping[str, Any]

@pulumi.input_type
class RolePermissionArgs:
    def __init__(__self__, *,
                 action: pulumi.Input[str],
                 scope: Optional[pulumi.Input[str]] = None):
        """
        :param pulumi.Input[str] action: Specific action users granted with the role will be allowed to perform (for example: `users:read`)
        :param pulumi.Input[str] scope: Scope to restrict the action to a set of resources (for example: `users:*` or `roles:customrole1`) Defaults to ``.
        """
        pulumi.set(__self__, "action", action)
        if scope is not None:
            pulumi.set(__self__, "scope", scope)

    @property
    @pulumi.getter
    def action(self) -> pulumi.Input[str]:
        """
        Specific action users granted with the role will be allowed to perform (for example: `users:read`)
        """
        return pulumi.get(self, "action")

    @action.setter
    def action(self, value: pulumi.Input[str]):
        pulumi.set(self, "action", value)

    @property
    @pulumi.getter
    def scope(self) -> Optional[pulumi.Input[str]]:
        """
        Scope to restrict the action to a set of resources (for example: `users:*` or `roles:customrole1`) Defaults to ``.
        """
        return pulumi.get(self, "scope")

    @scope.setter
    def scope(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "scope", value)


