# 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, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs
from ._inputs import *

__all__ = ['ServiceArgs', 'Service']

@pulumi.input_type
class ServiceArgs:
    def __init__(__self__, *,
                 domain_name: pulumi.Input[str],
                 initial_replica_set: pulumi.Input['ServiceInitialReplicaSetArgs'],
                 resource_group_name: pulumi.Input[str],
                 sku: pulumi.Input[str],
                 domain_configuration_type: Optional[pulumi.Input[str]] = None,
                 filtered_sync_enabled: Optional[pulumi.Input[bool]] = None,
                 location: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 notifications: Optional[pulumi.Input['ServiceNotificationsArgs']] = None,
                 secure_ldap: Optional[pulumi.Input['ServiceSecureLdapArgs']] = None,
                 security: Optional[pulumi.Input['ServiceSecurityArgs']] = None,
                 tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None):
        """
        The set of arguments for constructing a Service resource.
        :param pulumi.Input[str] domain_name: The Active Directory domain to use. See [official documentation](https://docs.microsoft.com/azure/active-directory-domain-services/tutorial-create-instance#create-a-managed-domain) for constraints and recommendations.
        :param pulumi.Input['ServiceInitialReplicaSetArgs'] initial_replica_set: An `initial_replica_set` block as defined below. The initial replica set inherits the same location as the Domain Service resource.
        :param pulumi.Input[str] resource_group_name: The name of the Resource Group in which the Domain Service should exist. Changing this forces a new resource to be created.
        :param pulumi.Input[str] sku: The SKU to use when provisioning the Domain Service resource. One of `Standard`, `Enterprise` or `Premium`.
        :param pulumi.Input[str] domain_configuration_type: The configuration type of this Active Directory Domain. Possible values are `FullySynced` and `ResourceTrusting`. Changing this forces a new resource to be created.
        :param pulumi.Input[bool] filtered_sync_enabled: Whether to enable group-based filtered sync (also called scoped synchronisation). Defaults to `false`.
        :param pulumi.Input[str] location: The Azure location where the Domain Service exists. Changing this forces a new resource to be created.
        :param pulumi.Input[str] name: The display name for your managed Active Directory Domain Service resource. Changing this forces a new resource to be created.
        :param pulumi.Input['ServiceNotificationsArgs'] notifications: A `notifications` block as defined below.
        :param pulumi.Input['ServiceSecureLdapArgs'] secure_ldap: A `secure_ldap` block as defined below.
        :param pulumi.Input['ServiceSecurityArgs'] security: A `security` block as defined below.
        :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags assigned to the resource.
        """
        pulumi.set(__self__, "domain_name", domain_name)
        pulumi.set(__self__, "initial_replica_set", initial_replica_set)
        pulumi.set(__self__, "resource_group_name", resource_group_name)
        pulumi.set(__self__, "sku", sku)
        if domain_configuration_type is not None:
            pulumi.set(__self__, "domain_configuration_type", domain_configuration_type)
        if filtered_sync_enabled is not None:
            pulumi.set(__self__, "filtered_sync_enabled", filtered_sync_enabled)
        if location is not None:
            pulumi.set(__self__, "location", location)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if notifications is not None:
            pulumi.set(__self__, "notifications", notifications)
        if secure_ldap is not None:
            pulumi.set(__self__, "secure_ldap", secure_ldap)
        if security is not None:
            pulumi.set(__self__, "security", security)
        if tags is not None:
            pulumi.set(__self__, "tags", tags)

    @property
    @pulumi.getter(name="domainName")
    def domain_name(self) -> pulumi.Input[str]:
        """
        The Active Directory domain to use. See [official documentation](https://docs.microsoft.com/azure/active-directory-domain-services/tutorial-create-instance#create-a-managed-domain) for constraints and recommendations.
        """
        return pulumi.get(self, "domain_name")

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

    @property
    @pulumi.getter(name="initialReplicaSet")
    def initial_replica_set(self) -> pulumi.Input['ServiceInitialReplicaSetArgs']:
        """
        An `initial_replica_set` block as defined below. The initial replica set inherits the same location as the Domain Service resource.
        """
        return pulumi.get(self, "initial_replica_set")

    @initial_replica_set.setter
    def initial_replica_set(self, value: pulumi.Input['ServiceInitialReplicaSetArgs']):
        pulumi.set(self, "initial_replica_set", value)

    @property
    @pulumi.getter(name="resourceGroupName")
    def resource_group_name(self) -> pulumi.Input[str]:
        """
        The name of the Resource Group in which the Domain Service should exist. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "resource_group_name")

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

    @property
    @pulumi.getter
    def sku(self) -> pulumi.Input[str]:
        """
        The SKU to use when provisioning the Domain Service resource. One of `Standard`, `Enterprise` or `Premium`.
        """
        return pulumi.get(self, "sku")

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

    @property
    @pulumi.getter(name="domainConfigurationType")
    def domain_configuration_type(self) -> Optional[pulumi.Input[str]]:
        """
        The configuration type of this Active Directory Domain. Possible values are `FullySynced` and `ResourceTrusting`. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "domain_configuration_type")

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

    @property
    @pulumi.getter(name="filteredSyncEnabled")
    def filtered_sync_enabled(self) -> Optional[pulumi.Input[bool]]:
        """
        Whether to enable group-based filtered sync (also called scoped synchronisation). Defaults to `false`.
        """
        return pulumi.get(self, "filtered_sync_enabled")

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

    @property
    @pulumi.getter
    def location(self) -> Optional[pulumi.Input[str]]:
        """
        The Azure location where the Domain Service exists. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "location")

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

    @property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[str]]:
        """
        The display name for your managed Active Directory Domain Service resource. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "name")

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

    @property
    @pulumi.getter
    def notifications(self) -> Optional[pulumi.Input['ServiceNotificationsArgs']]:
        """
        A `notifications` block as defined below.
        """
        return pulumi.get(self, "notifications")

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

    @property
    @pulumi.getter(name="secureLdap")
    def secure_ldap(self) -> Optional[pulumi.Input['ServiceSecureLdapArgs']]:
        """
        A `secure_ldap` block as defined below.
        """
        return pulumi.get(self, "secure_ldap")

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

    @property
    @pulumi.getter
    def security(self) -> Optional[pulumi.Input['ServiceSecurityArgs']]:
        """
        A `security` block as defined below.
        """
        return pulumi.get(self, "security")

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

    @property
    @pulumi.getter
    def tags(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
        """
        A mapping of tags assigned to the resource.
        """
        return pulumi.get(self, "tags")

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


@pulumi.input_type
class _ServiceState:
    def __init__(__self__, *,
                 deployment_id: Optional[pulumi.Input[str]] = None,
                 domain_configuration_type: Optional[pulumi.Input[str]] = None,
                 domain_name: Optional[pulumi.Input[str]] = None,
                 filtered_sync_enabled: Optional[pulumi.Input[bool]] = None,
                 initial_replica_set: Optional[pulumi.Input['ServiceInitialReplicaSetArgs']] = None,
                 location: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 notifications: Optional[pulumi.Input['ServiceNotificationsArgs']] = None,
                 resource_group_name: Optional[pulumi.Input[str]] = None,
                 resource_id: Optional[pulumi.Input[str]] = None,
                 secure_ldap: Optional[pulumi.Input['ServiceSecureLdapArgs']] = None,
                 security: Optional[pulumi.Input['ServiceSecurityArgs']] = None,
                 sku: Optional[pulumi.Input[str]] = None,
                 sync_owner: Optional[pulumi.Input[str]] = None,
                 tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                 tenant_id: Optional[pulumi.Input[str]] = None,
                 version: Optional[pulumi.Input[int]] = None):
        """
        Input properties used for looking up and filtering Service resources.
        :param pulumi.Input[str] deployment_id: A unique ID for the managed domain deployment.
        :param pulumi.Input[str] domain_configuration_type: The configuration type of this Active Directory Domain. Possible values are `FullySynced` and `ResourceTrusting`. Changing this forces a new resource to be created.
        :param pulumi.Input[str] domain_name: The Active Directory domain to use. See [official documentation](https://docs.microsoft.com/azure/active-directory-domain-services/tutorial-create-instance#create-a-managed-domain) for constraints and recommendations.
        :param pulumi.Input[bool] filtered_sync_enabled: Whether to enable group-based filtered sync (also called scoped synchronisation). Defaults to `false`.
        :param pulumi.Input['ServiceInitialReplicaSetArgs'] initial_replica_set: An `initial_replica_set` block as defined below. The initial replica set inherits the same location as the Domain Service resource.
        :param pulumi.Input[str] location: The Azure location where the Domain Service exists. Changing this forces a new resource to be created.
        :param pulumi.Input[str] name: The display name for your managed Active Directory Domain Service resource. Changing this forces a new resource to be created.
        :param pulumi.Input['ServiceNotificationsArgs'] notifications: A `notifications` block as defined below.
        :param pulumi.Input[str] resource_group_name: The name of the Resource Group in which the Domain Service should exist. Changing this forces a new resource to be created.
        :param pulumi.Input[str] resource_id: The Azure resource ID for the domain service.
        :param pulumi.Input['ServiceSecureLdapArgs'] secure_ldap: A `secure_ldap` block as defined below.
        :param pulumi.Input['ServiceSecurityArgs'] security: A `security` block as defined below.
        :param pulumi.Input[str] sku: The SKU to use when provisioning the Domain Service resource. One of `Standard`, `Enterprise` or `Premium`.
        :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags assigned to the resource.
        """
        if deployment_id is not None:
            pulumi.set(__self__, "deployment_id", deployment_id)
        if domain_configuration_type is not None:
            pulumi.set(__self__, "domain_configuration_type", domain_configuration_type)
        if domain_name is not None:
            pulumi.set(__self__, "domain_name", domain_name)
        if filtered_sync_enabled is not None:
            pulumi.set(__self__, "filtered_sync_enabled", filtered_sync_enabled)
        if initial_replica_set is not None:
            pulumi.set(__self__, "initial_replica_set", initial_replica_set)
        if location is not None:
            pulumi.set(__self__, "location", location)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if notifications is not None:
            pulumi.set(__self__, "notifications", notifications)
        if resource_group_name is not None:
            pulumi.set(__self__, "resource_group_name", resource_group_name)
        if resource_id is not None:
            pulumi.set(__self__, "resource_id", resource_id)
        if secure_ldap is not None:
            pulumi.set(__self__, "secure_ldap", secure_ldap)
        if security is not None:
            pulumi.set(__self__, "security", security)
        if sku is not None:
            pulumi.set(__self__, "sku", sku)
        if sync_owner is not None:
            pulumi.set(__self__, "sync_owner", sync_owner)
        if tags is not None:
            pulumi.set(__self__, "tags", tags)
        if tenant_id is not None:
            pulumi.set(__self__, "tenant_id", tenant_id)
        if version is not None:
            pulumi.set(__self__, "version", version)

    @property
    @pulumi.getter(name="deploymentId")
    def deployment_id(self) -> Optional[pulumi.Input[str]]:
        """
        A unique ID for the managed domain deployment.
        """
        return pulumi.get(self, "deployment_id")

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

    @property
    @pulumi.getter(name="domainConfigurationType")
    def domain_configuration_type(self) -> Optional[pulumi.Input[str]]:
        """
        The configuration type of this Active Directory Domain. Possible values are `FullySynced` and `ResourceTrusting`. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "domain_configuration_type")

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

    @property
    @pulumi.getter(name="domainName")
    def domain_name(self) -> Optional[pulumi.Input[str]]:
        """
        The Active Directory domain to use. See [official documentation](https://docs.microsoft.com/azure/active-directory-domain-services/tutorial-create-instance#create-a-managed-domain) for constraints and recommendations.
        """
        return pulumi.get(self, "domain_name")

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

    @property
    @pulumi.getter(name="filteredSyncEnabled")
    def filtered_sync_enabled(self) -> Optional[pulumi.Input[bool]]:
        """
        Whether to enable group-based filtered sync (also called scoped synchronisation). Defaults to `false`.
        """
        return pulumi.get(self, "filtered_sync_enabled")

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

    @property
    @pulumi.getter(name="initialReplicaSet")
    def initial_replica_set(self) -> Optional[pulumi.Input['ServiceInitialReplicaSetArgs']]:
        """
        An `initial_replica_set` block as defined below. The initial replica set inherits the same location as the Domain Service resource.
        """
        return pulumi.get(self, "initial_replica_set")

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

    @property
    @pulumi.getter
    def location(self) -> Optional[pulumi.Input[str]]:
        """
        The Azure location where the Domain Service exists. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "location")

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

    @property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[str]]:
        """
        The display name for your managed Active Directory Domain Service resource. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "name")

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

    @property
    @pulumi.getter
    def notifications(self) -> Optional[pulumi.Input['ServiceNotificationsArgs']]:
        """
        A `notifications` block as defined below.
        """
        return pulumi.get(self, "notifications")

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

    @property
    @pulumi.getter(name="resourceGroupName")
    def resource_group_name(self) -> Optional[pulumi.Input[str]]:
        """
        The name of the Resource Group in which the Domain Service should exist. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "resource_group_name")

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

    @property
    @pulumi.getter(name="resourceId")
    def resource_id(self) -> Optional[pulumi.Input[str]]:
        """
        The Azure resource ID for the domain service.
        """
        return pulumi.get(self, "resource_id")

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

    @property
    @pulumi.getter(name="secureLdap")
    def secure_ldap(self) -> Optional[pulumi.Input['ServiceSecureLdapArgs']]:
        """
        A `secure_ldap` block as defined below.
        """
        return pulumi.get(self, "secure_ldap")

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

    @property
    @pulumi.getter
    def security(self) -> Optional[pulumi.Input['ServiceSecurityArgs']]:
        """
        A `security` block as defined below.
        """
        return pulumi.get(self, "security")

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

    @property
    @pulumi.getter
    def sku(self) -> Optional[pulumi.Input[str]]:
        """
        The SKU to use when provisioning the Domain Service resource. One of `Standard`, `Enterprise` or `Premium`.
        """
        return pulumi.get(self, "sku")

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

    @property
    @pulumi.getter(name="syncOwner")
    def sync_owner(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "sync_owner")

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

    @property
    @pulumi.getter
    def tags(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
        """
        A mapping of tags assigned to the resource.
        """
        return pulumi.get(self, "tags")

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

    @property
    @pulumi.getter(name="tenantId")
    def tenant_id(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "tenant_id")

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

    @property
    @pulumi.getter
    def version(self) -> Optional[pulumi.Input[int]]:
        return pulumi.get(self, "version")

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


class Service(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 domain_configuration_type: Optional[pulumi.Input[str]] = None,
                 domain_name: Optional[pulumi.Input[str]] = None,
                 filtered_sync_enabled: Optional[pulumi.Input[bool]] = None,
                 initial_replica_set: Optional[pulumi.Input[pulumi.InputType['ServiceInitialReplicaSetArgs']]] = None,
                 location: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 notifications: Optional[pulumi.Input[pulumi.InputType['ServiceNotificationsArgs']]] = None,
                 resource_group_name: Optional[pulumi.Input[str]] = None,
                 secure_ldap: Optional[pulumi.Input[pulumi.InputType['ServiceSecureLdapArgs']]] = None,
                 security: Optional[pulumi.Input[pulumi.InputType['ServiceSecurityArgs']]] = None,
                 sku: Optional[pulumi.Input[str]] = None,
                 tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                 __props__=None):
        """
        ## Import

        Domain Services can be imported using the resource ID, together with the Replica Set ID that you wish to designate as the initial replica set, e.g.

        ```sh
         $ pulumi import azure:domainservices/service:Service example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.AAD/domainServices/instance1/initialReplicaSetId/00000000-0000-0000-0000-000000000000
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[str] domain_configuration_type: The configuration type of this Active Directory Domain. Possible values are `FullySynced` and `ResourceTrusting`. Changing this forces a new resource to be created.
        :param pulumi.Input[str] domain_name: The Active Directory domain to use. See [official documentation](https://docs.microsoft.com/azure/active-directory-domain-services/tutorial-create-instance#create-a-managed-domain) for constraints and recommendations.
        :param pulumi.Input[bool] filtered_sync_enabled: Whether to enable group-based filtered sync (also called scoped synchronisation). Defaults to `false`.
        :param pulumi.Input[pulumi.InputType['ServiceInitialReplicaSetArgs']] initial_replica_set: An `initial_replica_set` block as defined below. The initial replica set inherits the same location as the Domain Service resource.
        :param pulumi.Input[str] location: The Azure location where the Domain Service exists. Changing this forces a new resource to be created.
        :param pulumi.Input[str] name: The display name for your managed Active Directory Domain Service resource. Changing this forces a new resource to be created.
        :param pulumi.Input[pulumi.InputType['ServiceNotificationsArgs']] notifications: A `notifications` block as defined below.
        :param pulumi.Input[str] resource_group_name: The name of the Resource Group in which the Domain Service should exist. Changing this forces a new resource to be created.
        :param pulumi.Input[pulumi.InputType['ServiceSecureLdapArgs']] secure_ldap: A `secure_ldap` block as defined below.
        :param pulumi.Input[pulumi.InputType['ServiceSecurityArgs']] security: A `security` block as defined below.
        :param pulumi.Input[str] sku: The SKU to use when provisioning the Domain Service resource. One of `Standard`, `Enterprise` or `Premium`.
        :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags assigned to the resource.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: ServiceArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        ## Import

        Domain Services can be imported using the resource ID, together with the Replica Set ID that you wish to designate as the initial replica set, e.g.

        ```sh
         $ pulumi import azure:domainservices/service:Service example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.AAD/domainServices/instance1/initialReplicaSetId/00000000-0000-0000-0000-000000000000
        ```

        :param str resource_name: The name of the resource.
        :param ServiceArgs args: The arguments to use to populate this resource's properties.
        :param pulumi.ResourceOptions opts: Options for the resource.
        """
        ...
    def __init__(__self__, resource_name: str, *args, **kwargs):
        resource_args, opts = _utilities.get_resource_args_opts(ServiceArgs, pulumi.ResourceOptions, *args, **kwargs)
        if resource_args is not None:
            __self__._internal_init(resource_name, opts, **resource_args.__dict__)
        else:
            __self__._internal_init(resource_name, *args, **kwargs)

    def _internal_init(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 domain_configuration_type: Optional[pulumi.Input[str]] = None,
                 domain_name: Optional[pulumi.Input[str]] = None,
                 filtered_sync_enabled: Optional[pulumi.Input[bool]] = None,
                 initial_replica_set: Optional[pulumi.Input[pulumi.InputType['ServiceInitialReplicaSetArgs']]] = None,
                 location: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 notifications: Optional[pulumi.Input[pulumi.InputType['ServiceNotificationsArgs']]] = None,
                 resource_group_name: Optional[pulumi.Input[str]] = None,
                 secure_ldap: Optional[pulumi.Input[pulumi.InputType['ServiceSecureLdapArgs']]] = None,
                 security: Optional[pulumi.Input[pulumi.InputType['ServiceSecurityArgs']]] = None,
                 sku: Optional[pulumi.Input[str]] = None,
                 tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                 __props__=None):
        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__ = ServiceArgs.__new__(ServiceArgs)

            __props__.__dict__["domain_configuration_type"] = domain_configuration_type
            if domain_name is None and not opts.urn:
                raise TypeError("Missing required property 'domain_name'")
            __props__.__dict__["domain_name"] = domain_name
            __props__.__dict__["filtered_sync_enabled"] = filtered_sync_enabled
            if initial_replica_set is None and not opts.urn:
                raise TypeError("Missing required property 'initial_replica_set'")
            __props__.__dict__["initial_replica_set"] = initial_replica_set
            __props__.__dict__["location"] = location
            __props__.__dict__["name"] = name
            __props__.__dict__["notifications"] = notifications
            if resource_group_name is None and not opts.urn:
                raise TypeError("Missing required property 'resource_group_name'")
            __props__.__dict__["resource_group_name"] = resource_group_name
            __props__.__dict__["secure_ldap"] = secure_ldap
            __props__.__dict__["security"] = security
            if sku is None and not opts.urn:
                raise TypeError("Missing required property 'sku'")
            __props__.__dict__["sku"] = sku
            __props__.__dict__["tags"] = tags
            __props__.__dict__["deployment_id"] = None
            __props__.__dict__["resource_id"] = None
            __props__.__dict__["sync_owner"] = None
            __props__.__dict__["tenant_id"] = None
            __props__.__dict__["version"] = None
        super(Service, __self__).__init__(
            'azure:domainservices/service:Service',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            deployment_id: Optional[pulumi.Input[str]] = None,
            domain_configuration_type: Optional[pulumi.Input[str]] = None,
            domain_name: Optional[pulumi.Input[str]] = None,
            filtered_sync_enabled: Optional[pulumi.Input[bool]] = None,
            initial_replica_set: Optional[pulumi.Input[pulumi.InputType['ServiceInitialReplicaSetArgs']]] = None,
            location: Optional[pulumi.Input[str]] = None,
            name: Optional[pulumi.Input[str]] = None,
            notifications: Optional[pulumi.Input[pulumi.InputType['ServiceNotificationsArgs']]] = None,
            resource_group_name: Optional[pulumi.Input[str]] = None,
            resource_id: Optional[pulumi.Input[str]] = None,
            secure_ldap: Optional[pulumi.Input[pulumi.InputType['ServiceSecureLdapArgs']]] = None,
            security: Optional[pulumi.Input[pulumi.InputType['ServiceSecurityArgs']]] = None,
            sku: Optional[pulumi.Input[str]] = None,
            sync_owner: Optional[pulumi.Input[str]] = None,
            tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
            tenant_id: Optional[pulumi.Input[str]] = None,
            version: Optional[pulumi.Input[int]] = None) -> 'Service':
        """
        Get an existing Service 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] deployment_id: A unique ID for the managed domain deployment.
        :param pulumi.Input[str] domain_configuration_type: The configuration type of this Active Directory Domain. Possible values are `FullySynced` and `ResourceTrusting`. Changing this forces a new resource to be created.
        :param pulumi.Input[str] domain_name: The Active Directory domain to use. See [official documentation](https://docs.microsoft.com/azure/active-directory-domain-services/tutorial-create-instance#create-a-managed-domain) for constraints and recommendations.
        :param pulumi.Input[bool] filtered_sync_enabled: Whether to enable group-based filtered sync (also called scoped synchronisation). Defaults to `false`.
        :param pulumi.Input[pulumi.InputType['ServiceInitialReplicaSetArgs']] initial_replica_set: An `initial_replica_set` block as defined below. The initial replica set inherits the same location as the Domain Service resource.
        :param pulumi.Input[str] location: The Azure location where the Domain Service exists. Changing this forces a new resource to be created.
        :param pulumi.Input[str] name: The display name for your managed Active Directory Domain Service resource. Changing this forces a new resource to be created.
        :param pulumi.Input[pulumi.InputType['ServiceNotificationsArgs']] notifications: A `notifications` block as defined below.
        :param pulumi.Input[str] resource_group_name: The name of the Resource Group in which the Domain Service should exist. Changing this forces a new resource to be created.
        :param pulumi.Input[str] resource_id: The Azure resource ID for the domain service.
        :param pulumi.Input[pulumi.InputType['ServiceSecureLdapArgs']] secure_ldap: A `secure_ldap` block as defined below.
        :param pulumi.Input[pulumi.InputType['ServiceSecurityArgs']] security: A `security` block as defined below.
        :param pulumi.Input[str] sku: The SKU to use when provisioning the Domain Service resource. One of `Standard`, `Enterprise` or `Premium`.
        :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags assigned to the resource.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _ServiceState.__new__(_ServiceState)

        __props__.__dict__["deployment_id"] = deployment_id
        __props__.__dict__["domain_configuration_type"] = domain_configuration_type
        __props__.__dict__["domain_name"] = domain_name
        __props__.__dict__["filtered_sync_enabled"] = filtered_sync_enabled
        __props__.__dict__["initial_replica_set"] = initial_replica_set
        __props__.__dict__["location"] = location
        __props__.__dict__["name"] = name
        __props__.__dict__["notifications"] = notifications
        __props__.__dict__["resource_group_name"] = resource_group_name
        __props__.__dict__["resource_id"] = resource_id
        __props__.__dict__["secure_ldap"] = secure_ldap
        __props__.__dict__["security"] = security
        __props__.__dict__["sku"] = sku
        __props__.__dict__["sync_owner"] = sync_owner
        __props__.__dict__["tags"] = tags
        __props__.__dict__["tenant_id"] = tenant_id
        __props__.__dict__["version"] = version
        return Service(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter(name="deploymentId")
    def deployment_id(self) -> pulumi.Output[str]:
        """
        A unique ID for the managed domain deployment.
        """
        return pulumi.get(self, "deployment_id")

    @property
    @pulumi.getter(name="domainConfigurationType")
    def domain_configuration_type(self) -> pulumi.Output[Optional[str]]:
        """
        The configuration type of this Active Directory Domain. Possible values are `FullySynced` and `ResourceTrusting`. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "domain_configuration_type")

    @property
    @pulumi.getter(name="domainName")
    def domain_name(self) -> pulumi.Output[str]:
        """
        The Active Directory domain to use. See [official documentation](https://docs.microsoft.com/azure/active-directory-domain-services/tutorial-create-instance#create-a-managed-domain) for constraints and recommendations.
        """
        return pulumi.get(self, "domain_name")

    @property
    @pulumi.getter(name="filteredSyncEnabled")
    def filtered_sync_enabled(self) -> pulumi.Output[Optional[bool]]:
        """
        Whether to enable group-based filtered sync (also called scoped synchronisation). Defaults to `false`.
        """
        return pulumi.get(self, "filtered_sync_enabled")

    @property
    @pulumi.getter(name="initialReplicaSet")
    def initial_replica_set(self) -> pulumi.Output['outputs.ServiceInitialReplicaSet']:
        """
        An `initial_replica_set` block as defined below. The initial replica set inherits the same location as the Domain Service resource.
        """
        return pulumi.get(self, "initial_replica_set")

    @property
    @pulumi.getter
    def location(self) -> pulumi.Output[str]:
        """
        The Azure location where the Domain Service exists. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "location")

    @property
    @pulumi.getter
    def name(self) -> pulumi.Output[str]:
        """
        The display name for your managed Active Directory Domain Service resource. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter
    def notifications(self) -> pulumi.Output['outputs.ServiceNotifications']:
        """
        A `notifications` block as defined below.
        """
        return pulumi.get(self, "notifications")

    @property
    @pulumi.getter(name="resourceGroupName")
    def resource_group_name(self) -> pulumi.Output[str]:
        """
        The name of the Resource Group in which the Domain Service should exist. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "resource_group_name")

    @property
    @pulumi.getter(name="resourceId")
    def resource_id(self) -> pulumi.Output[str]:
        """
        The Azure resource ID for the domain service.
        """
        return pulumi.get(self, "resource_id")

    @property
    @pulumi.getter(name="secureLdap")
    def secure_ldap(self) -> pulumi.Output['outputs.ServiceSecureLdap']:
        """
        A `secure_ldap` block as defined below.
        """
        return pulumi.get(self, "secure_ldap")

    @property
    @pulumi.getter
    def security(self) -> pulumi.Output['outputs.ServiceSecurity']:
        """
        A `security` block as defined below.
        """
        return pulumi.get(self, "security")

    @property
    @pulumi.getter
    def sku(self) -> pulumi.Output[str]:
        """
        The SKU to use when provisioning the Domain Service resource. One of `Standard`, `Enterprise` or `Premium`.
        """
        return pulumi.get(self, "sku")

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

    @property
    @pulumi.getter
    def tags(self) -> pulumi.Output[Optional[Mapping[str, str]]]:
        """
        A mapping of tags assigned to the resource.
        """
        return pulumi.get(self, "tags")

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

    @property
    @pulumi.getter
    def version(self) -> pulumi.Output[int]:
        return pulumi.get(self, "version")

