# 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 json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from . import utilities, tables

class AuthConfigAzureAd(pulumi.CustomResource):
    access_mode: pulumi.Output[str]
    """
    Access mode for auth. `required`, `restricted`, `unrestricted` are supported. Default `unrestricted` (string)
    """
    allowed_principal_ids: pulumi.Output[list]
    """
    Allowed principal ids for auth. Required if `access_mode` is `required` or `restricted`. Ex: `azuread_user://<USER_ID>`  `azuread_group://<GROUP_ID>` (list)
    """
    annotations: pulumi.Output[dict]
    """
    Annotations of the resource (map)
    """
    application_id: pulumi.Output[str]
    """
    AzureAD auth application ID (string)
    """
    application_secret: pulumi.Output[str]
    """
    AzureAD auth application secret (string)
    """
    auth_endpoint: pulumi.Output[str]
    """
    AzureAD auth endpoint (string)
    """
    enabled: pulumi.Output[bool]
    """
    Enable auth config provider. Default `true` (bool)
    """
    endpoint: pulumi.Output[str]
    """
    AzureAD endpoint. Default `https://login.microsoftonline.com/` (string)
    """
    graph_endpoint: pulumi.Output[str]
    """
    AzureAD graph endpoint (string)
    """
    labels: pulumi.Output[dict]
    """
    Labels of the resource (map)
    """
    name: pulumi.Output[str]
    """
    (Computed) The name of the resource (string)
    """
    rancher_url: pulumi.Output[str]
    """
    Rancher URL (string). "<rancher_url>/verify-auth-azure"
    """
    tenant_id: pulumi.Output[str]
    """
    AzureAD tenant ID (string)
    """
    token_endpoint: pulumi.Output[str]
    """
    AzureAD token endpoint (string)
    """
    type: pulumi.Output[str]
    """
    (Computed) The type of the resource (string)
    """
    def __init__(__self__, resource_name, opts=None, access_mode=None, allowed_principal_ids=None, annotations=None, application_id=None, application_secret=None, auth_endpoint=None, enabled=None, endpoint=None, graph_endpoint=None, labels=None, rancher_url=None, tenant_id=None, token_endpoint=None, __props__=None, __name__=None, __opts__=None):
        """
        Provides a Rancher v2 Auth Config AzureAD resource. This can be used to configure and enable Auth Config AzureAD for Rancher v2 RKE clusters and retrieve their information.

        In addition to the built-in local auth, only one external auth config provider can be enabled at a time.



        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[str] access_mode: Access mode for auth. `required`, `restricted`, `unrestricted` are supported. Default `unrestricted` (string)
        :param pulumi.Input[list] allowed_principal_ids: Allowed principal ids for auth. Required if `access_mode` is `required` or `restricted`. Ex: `azuread_user://<USER_ID>`  `azuread_group://<GROUP_ID>` (list)
        :param pulumi.Input[dict] annotations: Annotations of the resource (map)
        :param pulumi.Input[str] application_id: AzureAD auth application ID (string)
        :param pulumi.Input[str] application_secret: AzureAD auth application secret (string)
        :param pulumi.Input[str] auth_endpoint: AzureAD auth endpoint (string)
        :param pulumi.Input[bool] enabled: Enable auth config provider. Default `true` (bool)
        :param pulumi.Input[str] endpoint: AzureAD endpoint. Default `https://login.microsoftonline.com/` (string)
        :param pulumi.Input[str] graph_endpoint: AzureAD graph endpoint (string)
        :param pulumi.Input[dict] labels: Labels of the resource (map)
        :param pulumi.Input[str] rancher_url: Rancher URL (string). "<rancher_url>/verify-auth-azure"
        :param pulumi.Input[str] tenant_id: AzureAD tenant ID (string)
        :param pulumi.Input[str] token_endpoint: AzureAD token endpoint (string)
        """
        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__['access_mode'] = access_mode
            __props__['allowed_principal_ids'] = allowed_principal_ids
            __props__['annotations'] = annotations
            if application_id is None:
                raise TypeError("Missing required property 'application_id'")
            __props__['application_id'] = application_id
            if application_secret is None:
                raise TypeError("Missing required property 'application_secret'")
            __props__['application_secret'] = application_secret
            if auth_endpoint is None:
                raise TypeError("Missing required property 'auth_endpoint'")
            __props__['auth_endpoint'] = auth_endpoint
            __props__['enabled'] = enabled
            __props__['endpoint'] = endpoint
            if graph_endpoint is None:
                raise TypeError("Missing required property 'graph_endpoint'")
            __props__['graph_endpoint'] = graph_endpoint
            __props__['labels'] = labels
            if rancher_url is None:
                raise TypeError("Missing required property 'rancher_url'")
            __props__['rancher_url'] = rancher_url
            if tenant_id is None:
                raise TypeError("Missing required property 'tenant_id'")
            __props__['tenant_id'] = tenant_id
            if token_endpoint is None:
                raise TypeError("Missing required property 'token_endpoint'")
            __props__['token_endpoint'] = token_endpoint
            __props__['name'] = None
            __props__['type'] = None
        super(AuthConfigAzureAd, __self__).__init__(
            'rancher2:index/authConfigAzureAd:AuthConfigAzureAd',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name, id, opts=None, access_mode=None, allowed_principal_ids=None, annotations=None, application_id=None, application_secret=None, auth_endpoint=None, enabled=None, endpoint=None, graph_endpoint=None, labels=None, name=None, rancher_url=None, tenant_id=None, token_endpoint=None, type=None):
        """
        Get an existing AuthConfigAzureAd 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 str id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[str] access_mode: Access mode for auth. `required`, `restricted`, `unrestricted` are supported. Default `unrestricted` (string)
        :param pulumi.Input[list] allowed_principal_ids: Allowed principal ids for auth. Required if `access_mode` is `required` or `restricted`. Ex: `azuread_user://<USER_ID>`  `azuread_group://<GROUP_ID>` (list)
        :param pulumi.Input[dict] annotations: Annotations of the resource (map)
        :param pulumi.Input[str] application_id: AzureAD auth application ID (string)
        :param pulumi.Input[str] application_secret: AzureAD auth application secret (string)
        :param pulumi.Input[str] auth_endpoint: AzureAD auth endpoint (string)
        :param pulumi.Input[bool] enabled: Enable auth config provider. Default `true` (bool)
        :param pulumi.Input[str] endpoint: AzureAD endpoint. Default `https://login.microsoftonline.com/` (string)
        :param pulumi.Input[str] graph_endpoint: AzureAD graph endpoint (string)
        :param pulumi.Input[dict] labels: Labels of the resource (map)
        :param pulumi.Input[str] name: (Computed) The name of the resource (string)
        :param pulumi.Input[str] rancher_url: Rancher URL (string). "<rancher_url>/verify-auth-azure"
        :param pulumi.Input[str] tenant_id: AzureAD tenant ID (string)
        :param pulumi.Input[str] token_endpoint: AzureAD token endpoint (string)
        :param pulumi.Input[str] type: (Computed) The type of the resource (string)
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = dict()

        __props__["access_mode"] = access_mode
        __props__["allowed_principal_ids"] = allowed_principal_ids
        __props__["annotations"] = annotations
        __props__["application_id"] = application_id
        __props__["application_secret"] = application_secret
        __props__["auth_endpoint"] = auth_endpoint
        __props__["enabled"] = enabled
        __props__["endpoint"] = endpoint
        __props__["graph_endpoint"] = graph_endpoint
        __props__["labels"] = labels
        __props__["name"] = name
        __props__["rancher_url"] = rancher_url
        __props__["tenant_id"] = tenant_id
        __props__["token_endpoint"] = token_endpoint
        __props__["type"] = type
        return AuthConfigAzureAd(resource_name, opts=opts, __props__=__props__)
    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

