# 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__ = ['OrgToken']


class OrgToken(pulumi.CustomResource):
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 description: Optional[pulumi.Input[str]] = None,
                 disabled: Optional[pulumi.Input[bool]] = None,
                 dpm_limits: Optional[pulumi.Input[pulumi.InputType['OrgTokenDpmLimitsArgs']]] = None,
                 host_or_usage_limits: Optional[pulumi.Input[pulumi.InputType['OrgTokenHostOrUsageLimitsArgs']]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 notifications: Optional[pulumi.Input[List[pulumi.Input[str]]]] = None,
                 __props__=None,
                 __name__=None,
                 __opts__=None):
        """
        Manage SignalFx org tokens.

        ## Example Usage

        ```python
        import pulumi
        import pulumi_signalfx as signalfx

        myteamkey0 = signalfx.OrgToken("myteamkey0",
            description="My team's rad key",
            host_or_usage_limits=signalfx.OrgTokenHostOrUsageLimitsArgs(
                container_limit=200,
                container_notification_threshold=180,
                custom_metrics_limit=1000,
                custom_metrics_notification_threshold=900,
                high_res_metrics_limit=1000,
                high_res_metrics_notification_threshold=900,
                host_limit=100,
                host_notification_threshold=90,
            ),
            notifications=["Email,foo-alerts@bar.com"])
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[str] description: Description of the token.
        :param pulumi.Input[bool] disabled: Flag that controls enabling the token. If set to `true`, the token is disabled, and you can't use it for authentication. Defaults to `false`.
        :param pulumi.Input[pulumi.InputType['OrgTokenDpmLimitsArgs']] dpm_limits: Specify DPM-based limits for this token.
        :param pulumi.Input[pulumi.InputType['OrgTokenHostOrUsageLimitsArgs']] host_or_usage_limits: Specify Usage-based limits for this token.
        :param pulumi.Input[str] name: Name of the token.
        :param pulumi.Input[List[pulumi.Input[str]]] notifications: List of strings specifying where notifications will be sent when an incident occurs. See
               https://developers.signalfx.com/v2/docs/detector-model#notifications-models for more info
        """
        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__['description'] = description
            __props__['disabled'] = disabled
            __props__['dpm_limits'] = dpm_limits
            __props__['host_or_usage_limits'] = host_or_usage_limits
            __props__['name'] = name
            __props__['notifications'] = notifications
            __props__['secret'] = None
        super(OrgToken, __self__).__init__(
            'signalfx:index/orgToken:OrgToken',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            description: Optional[pulumi.Input[str]] = None,
            disabled: Optional[pulumi.Input[bool]] = None,
            dpm_limits: Optional[pulumi.Input[pulumi.InputType['OrgTokenDpmLimitsArgs']]] = None,
            host_or_usage_limits: Optional[pulumi.Input[pulumi.InputType['OrgTokenHostOrUsageLimitsArgs']]] = None,
            name: Optional[pulumi.Input[str]] = None,
            notifications: Optional[pulumi.Input[List[pulumi.Input[str]]]] = None,
            secret: Optional[pulumi.Input[str]] = None) -> 'OrgToken':
        """
        Get an existing OrgToken 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[str] description: Description of the token.
        :param pulumi.Input[bool] disabled: Flag that controls enabling the token. If set to `true`, the token is disabled, and you can't use it for authentication. Defaults to `false`.
        :param pulumi.Input[pulumi.InputType['OrgTokenDpmLimitsArgs']] dpm_limits: Specify DPM-based limits for this token.
        :param pulumi.Input[pulumi.InputType['OrgTokenHostOrUsageLimitsArgs']] host_or_usage_limits: Specify Usage-based limits for this token.
        :param pulumi.Input[str] name: Name of the token.
        :param pulumi.Input[List[pulumi.Input[str]]] notifications: List of strings specifying where notifications will be sent when an incident occurs. See
               https://developers.signalfx.com/v2/docs/detector-model#notifications-models for more info
        :param pulumi.Input[str] secret: The secret token created by the API. You cannot set this value.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = dict()

        __props__["description"] = description
        __props__["disabled"] = disabled
        __props__["dpm_limits"] = dpm_limits
        __props__["host_or_usage_limits"] = host_or_usage_limits
        __props__["name"] = name
        __props__["notifications"] = notifications
        __props__["secret"] = secret
        return OrgToken(resource_name, opts=opts, __props__=__props__)

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

    @property
    @pulumi.getter
    def disabled(self) -> pulumi.Output[Optional[bool]]:
        """
        Flag that controls enabling the token. If set to `true`, the token is disabled, and you can't use it for authentication. Defaults to `false`.
        """
        return pulumi.get(self, "disabled")

    @property
    @pulumi.getter(name="dpmLimits")
    def dpm_limits(self) -> pulumi.Output[Optional['outputs.OrgTokenDpmLimits']]:
        """
        Specify DPM-based limits for this token.
        """
        return pulumi.get(self, "dpm_limits")

    @property
    @pulumi.getter(name="hostOrUsageLimits")
    def host_or_usage_limits(self) -> pulumi.Output[Optional['outputs.OrgTokenHostOrUsageLimits']]:
        """
        Specify Usage-based limits for this token.
        """
        return pulumi.get(self, "host_or_usage_limits")

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

    @property
    @pulumi.getter
    def notifications(self) -> pulumi.Output[Optional[List[str]]]:
        """
        List of strings specifying where notifications will be sent when an incident occurs. See
        https://developers.signalfx.com/v2/docs/detector-model#notifications-models for more info
        """
        return pulumi.get(self, "notifications")

    @property
    @pulumi.getter
    def secret(self) -> pulumi.Output[str]:
        """
        The secret token created by the API. You cannot set this value.
        """
        return pulumi.get(self, "secret")

    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

