# coding=utf-8
# *** WARNING: this file was generated by pulumi-language-python. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import builtins as _builtins
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__ = ['GroupTemplateDeploymentArgs', 'GroupTemplateDeployment']

@pulumi.input_type
class GroupTemplateDeploymentArgs:
    def __init__(__self__, *,
                 management_group_id: pulumi.Input[_builtins.str],
                 debug_level: Optional[pulumi.Input[_builtins.str]] = None,
                 location: Optional[pulumi.Input[_builtins.str]] = None,
                 name: Optional[pulumi.Input[_builtins.str]] = None,
                 parameters_content: Optional[pulumi.Input[_builtins.str]] = None,
                 tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None,
                 template_content: Optional[pulumi.Input[_builtins.str]] = None,
                 template_spec_version_id: Optional[pulumi.Input[_builtins.str]] = None):
        """
        The set of arguments for constructing a GroupTemplateDeployment resource.

        :param pulumi.Input[_builtins.str] management_group_id: The ID of the Management Group to apply the Deployment Template to. Changing this forces a new resource to be created.
        :param pulumi.Input[_builtins.str] debug_level: The Debug Level which should be used for this Resource Group Template Deployment. Possible values are `none`, `requestContent`, `responseContent` and `requestContent, responseContent`.
        :param pulumi.Input[_builtins.str] location: The Azure Region where the Template should exist. Changing this forces a new Template to be created.
        :param pulumi.Input[_builtins.str] name: The name which should be used for this Template Deployment. Changing this forces a new Template Deployment to be created.
        :param pulumi.Input[_builtins.str] parameters_content: The contents of the ARM Template parameters file - containing a JSON list of parameters.
        :param pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]] tags: A mapping of tags which should be assigned to the Template.
        :param pulumi.Input[_builtins.str] template_content: The contents of the ARM Template which should be deployed into this Resource Group. Cannot be specified with `template_spec_version_id`.
        :param pulumi.Input[_builtins.str] template_spec_version_id: The ID of the Template Spec Version to deploy. Cannot be specified with `template_content`.
        """
        pulumi.set(__self__, "management_group_id", management_group_id)
        if debug_level is not None:
            pulumi.set(__self__, "debug_level", debug_level)
        if location is not None:
            pulumi.set(__self__, "location", location)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if parameters_content is not None:
            pulumi.set(__self__, "parameters_content", parameters_content)
        if tags is not None:
            pulumi.set(__self__, "tags", tags)
        if template_content is not None:
            pulumi.set(__self__, "template_content", template_content)
        if template_spec_version_id is not None:
            pulumi.set(__self__, "template_spec_version_id", template_spec_version_id)

    @_builtins.property
    @pulumi.getter(name="managementGroupId")
    def management_group_id(self) -> pulumi.Input[_builtins.str]:
        """
        The ID of the Management Group to apply the Deployment Template to. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "management_group_id")

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

    @_builtins.property
    @pulumi.getter(name="debugLevel")
    def debug_level(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The Debug Level which should be used for this Resource Group Template Deployment. Possible values are `none`, `requestContent`, `responseContent` and `requestContent, responseContent`.
        """
        return pulumi.get(self, "debug_level")

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

    @_builtins.property
    @pulumi.getter
    def location(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The Azure Region where the Template should exist. Changing this forces a new Template to be created.
        """
        return pulumi.get(self, "location")

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

    @_builtins.property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The name which should be used for this Template Deployment. Changing this forces a new Template Deployment to be created.
        """
        return pulumi.get(self, "name")

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

    @_builtins.property
    @pulumi.getter(name="parametersContent")
    def parameters_content(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The contents of the ARM Template parameters file - containing a JSON list of parameters.
        """
        return pulumi.get(self, "parameters_content")

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

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

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

    @_builtins.property
    @pulumi.getter(name="templateContent")
    def template_content(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The contents of the ARM Template which should be deployed into this Resource Group. Cannot be specified with `template_spec_version_id`.
        """
        return pulumi.get(self, "template_content")

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

    @_builtins.property
    @pulumi.getter(name="templateSpecVersionId")
    def template_spec_version_id(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The ID of the Template Spec Version to deploy. Cannot be specified with `template_content`.
        """
        return pulumi.get(self, "template_spec_version_id")

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


@pulumi.input_type
class _GroupTemplateDeploymentState:
    def __init__(__self__, *,
                 debug_level: Optional[pulumi.Input[_builtins.str]] = None,
                 location: Optional[pulumi.Input[_builtins.str]] = None,
                 management_group_id: Optional[pulumi.Input[_builtins.str]] = None,
                 name: Optional[pulumi.Input[_builtins.str]] = None,
                 output_content: Optional[pulumi.Input[_builtins.str]] = None,
                 parameters_content: Optional[pulumi.Input[_builtins.str]] = None,
                 tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None,
                 template_content: Optional[pulumi.Input[_builtins.str]] = None,
                 template_spec_version_id: Optional[pulumi.Input[_builtins.str]] = None):
        """
        Input properties used for looking up and filtering GroupTemplateDeployment resources.

        :param pulumi.Input[_builtins.str] debug_level: The Debug Level which should be used for this Resource Group Template Deployment. Possible values are `none`, `requestContent`, `responseContent` and `requestContent, responseContent`.
        :param pulumi.Input[_builtins.str] location: The Azure Region where the Template should exist. Changing this forces a new Template to be created.
        :param pulumi.Input[_builtins.str] management_group_id: The ID of the Management Group to apply the Deployment Template to. Changing this forces a new resource to be created.
        :param pulumi.Input[_builtins.str] name: The name which should be used for this Template Deployment. Changing this forces a new Template Deployment to be created.
        :param pulumi.Input[_builtins.str] output_content: The JSON Content of the Outputs of the ARM Template Deployment.
        :param pulumi.Input[_builtins.str] parameters_content: The contents of the ARM Template parameters file - containing a JSON list of parameters.
        :param pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]] tags: A mapping of tags which should be assigned to the Template.
        :param pulumi.Input[_builtins.str] template_content: The contents of the ARM Template which should be deployed into this Resource Group. Cannot be specified with `template_spec_version_id`.
        :param pulumi.Input[_builtins.str] template_spec_version_id: The ID of the Template Spec Version to deploy. Cannot be specified with `template_content`.
        """
        if debug_level is not None:
            pulumi.set(__self__, "debug_level", debug_level)
        if location is not None:
            pulumi.set(__self__, "location", location)
        if management_group_id is not None:
            pulumi.set(__self__, "management_group_id", management_group_id)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if output_content is not None:
            pulumi.set(__self__, "output_content", output_content)
        if parameters_content is not None:
            pulumi.set(__self__, "parameters_content", parameters_content)
        if tags is not None:
            pulumi.set(__self__, "tags", tags)
        if template_content is not None:
            pulumi.set(__self__, "template_content", template_content)
        if template_spec_version_id is not None:
            pulumi.set(__self__, "template_spec_version_id", template_spec_version_id)

    @_builtins.property
    @pulumi.getter(name="debugLevel")
    def debug_level(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The Debug Level which should be used for this Resource Group Template Deployment. Possible values are `none`, `requestContent`, `responseContent` and `requestContent, responseContent`.
        """
        return pulumi.get(self, "debug_level")

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

    @_builtins.property
    @pulumi.getter
    def location(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The Azure Region where the Template should exist. Changing this forces a new Template to be created.
        """
        return pulumi.get(self, "location")

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

    @_builtins.property
    @pulumi.getter(name="managementGroupId")
    def management_group_id(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The ID of the Management Group to apply the Deployment Template to. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "management_group_id")

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

    @_builtins.property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The name which should be used for this Template Deployment. Changing this forces a new Template Deployment to be created.
        """
        return pulumi.get(self, "name")

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

    @_builtins.property
    @pulumi.getter(name="outputContent")
    def output_content(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The JSON Content of the Outputs of the ARM Template Deployment.
        """
        return pulumi.get(self, "output_content")

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

    @_builtins.property
    @pulumi.getter(name="parametersContent")
    def parameters_content(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The contents of the ARM Template parameters file - containing a JSON list of parameters.
        """
        return pulumi.get(self, "parameters_content")

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

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

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

    @_builtins.property
    @pulumi.getter(name="templateContent")
    def template_content(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The contents of the ARM Template which should be deployed into this Resource Group. Cannot be specified with `template_spec_version_id`.
        """
        return pulumi.get(self, "template_content")

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

    @_builtins.property
    @pulumi.getter(name="templateSpecVersionId")
    def template_spec_version_id(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The ID of the Template Spec Version to deploy. Cannot be specified with `template_content`.
        """
        return pulumi.get(self, "template_spec_version_id")

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


@pulumi.type_token("azure:management/groupTemplateDeployment:GroupTemplateDeployment")
class GroupTemplateDeployment(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 debug_level: Optional[pulumi.Input[_builtins.str]] = None,
                 location: Optional[pulumi.Input[_builtins.str]] = None,
                 management_group_id: Optional[pulumi.Input[_builtins.str]] = None,
                 name: Optional[pulumi.Input[_builtins.str]] = None,
                 parameters_content: Optional[pulumi.Input[_builtins.str]] = None,
                 tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None,
                 template_content: Optional[pulumi.Input[_builtins.str]] = None,
                 template_spec_version_id: Optional[pulumi.Input[_builtins.str]] = None,
                 __props__=None):
        """
        Manages a Template Deployment at a Management Group Scope.

        > **Note:** Deleting a Deployment at the Management Group Scope will not delete any resources created by the deployment.

        > **Note:** Deployments to a Management Group are always Incrementally applied. Existing resources that are not part of the template will not be removed.

        ## Example Usage

        ```python
        import pulumi
        import pulumi_azure as azure

        example = azure.management.get_group(name="00000000-0000-0000-0000-000000000000")
        example_group_template_deployment = azure.management.GroupTemplateDeployment("example",
            name="example",
            location="West Europe",
            management_group_id=example.id,
            template_content=\"\"\"{
          \\"$schema\\": \\"https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#\\",
          \\"contentVersion\\": \\"1.0.0.0\\",
          \\"parameters\\": {
            \\"policyAssignmentName\\": {
              \\"type\\": \\"string\\",
              \\"defaultValue\\": \\"[guid(parameters('policyDefinitionID'), resourceGroup().name)]\\",
              \\"metadata\\": {
                \\"description\\": \\"Specifies the name of the policy assignment, can be used defined or an idempotent name as the defaultValue provides.\\"
              }
            },
            \\"policyDefinitionID\\": {
              \\"type\\": \\"string\\",
              \\"metadata\\": {
                \\"description\\": \\"Specifies the ID of the policy definition or policy set definition being assigned.\\"
              }
            }
          },
          \\"resources\\": [
            {
              \\"type\\": \\"Microsoft.Authorization/policyAssignments\\",
              \\"name\\": \\"[parameters('policyAssignmentName')]\\",
              \\"apiVersion\\": \\"2019-09-01\\",
              \\"properties\\": {
                \\"scope\\": \\"[subscriptionResourceId('Microsoft.Resources/resourceGroups', resourceGroup().name)]\\",
                \\"policyDefinitionId\\": \\"[parameters('policyDefinitionID')]\\"
              }
            }
          ]
        }
        \"\"\",
            parameters_content=\"\"\"{
          \\"$schema\\": \\"https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#\\",
          \\"contentVersion\\": \\"1.0.0.0\\",
          \\"parameters\\": {
            \\"policyDefinitionID\\": {
              \\"value\\": \\"/providers/Microsoft.Authorization/policyDefinitions/0a914e76-4921-4c19-b460-a2d36003525a\\"
            }
          }
        }
        \"\"\")
        ```

        ```python
        import pulumi
        import pulumi_azure as azure
        import pulumi_std as std

        example = azure.management.get_group(name="00000000-0000-0000-0000-000000000000")
        example_group_template_deployment = azure.management.GroupTemplateDeployment("example",
            name="example",
            location="West Europe",
            management_group_id=example.id,
            template_content=std.file(input="templates/example-deploy-template.json").result,
            parameters_content=std.file(input="templates/example-deploy-params.json").result)
        ```

        ```python
        import pulumi
        import pulumi_azure as azure

        example = azure.management.get_group(name="00000000-0000-0000-0000-000000000000")
        example_get_template_spec_version = azure.core.get_template_spec_version(name="exampleTemplateForManagementGroup",
            resource_group_name="exampleResourceGroup",
            version="v1.0.9")
        example_group_template_deployment = azure.management.GroupTemplateDeployment("example",
            name="example",
            location="West Europe",
            management_group_id=example.id,
            template_spec_version_id=example_get_template_spec_version.id)
        ```

        ## Import

        Management Group Template Deployments can be imported using the `resource id`, e.g.

        ```sh
        $ pulumi import azure:management/groupTemplateDeployment:GroupTemplateDeployment example /providers/Microsoft.Management/managementGroups/my-management-group-id/providers/Microsoft.Resources/deployments/deploy1
        ```


        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[_builtins.str] debug_level: The Debug Level which should be used for this Resource Group Template Deployment. Possible values are `none`, `requestContent`, `responseContent` and `requestContent, responseContent`.
        :param pulumi.Input[_builtins.str] location: The Azure Region where the Template should exist. Changing this forces a new Template to be created.
        :param pulumi.Input[_builtins.str] management_group_id: The ID of the Management Group to apply the Deployment Template to. Changing this forces a new resource to be created.
        :param pulumi.Input[_builtins.str] name: The name which should be used for this Template Deployment. Changing this forces a new Template Deployment to be created.
        :param pulumi.Input[_builtins.str] parameters_content: The contents of the ARM Template parameters file - containing a JSON list of parameters.
        :param pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]] tags: A mapping of tags which should be assigned to the Template.
        :param pulumi.Input[_builtins.str] template_content: The contents of the ARM Template which should be deployed into this Resource Group. Cannot be specified with `template_spec_version_id`.
        :param pulumi.Input[_builtins.str] template_spec_version_id: The ID of the Template Spec Version to deploy. Cannot be specified with `template_content`.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: GroupTemplateDeploymentArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        Manages a Template Deployment at a Management Group Scope.

        > **Note:** Deleting a Deployment at the Management Group Scope will not delete any resources created by the deployment.

        > **Note:** Deployments to a Management Group are always Incrementally applied. Existing resources that are not part of the template will not be removed.

        ## Example Usage

        ```python
        import pulumi
        import pulumi_azure as azure

        example = azure.management.get_group(name="00000000-0000-0000-0000-000000000000")
        example_group_template_deployment = azure.management.GroupTemplateDeployment("example",
            name="example",
            location="West Europe",
            management_group_id=example.id,
            template_content=\"\"\"{
          \\"$schema\\": \\"https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#\\",
          \\"contentVersion\\": \\"1.0.0.0\\",
          \\"parameters\\": {
            \\"policyAssignmentName\\": {
              \\"type\\": \\"string\\",
              \\"defaultValue\\": \\"[guid(parameters('policyDefinitionID'), resourceGroup().name)]\\",
              \\"metadata\\": {
                \\"description\\": \\"Specifies the name of the policy assignment, can be used defined or an idempotent name as the defaultValue provides.\\"
              }
            },
            \\"policyDefinitionID\\": {
              \\"type\\": \\"string\\",
              \\"metadata\\": {
                \\"description\\": \\"Specifies the ID of the policy definition or policy set definition being assigned.\\"
              }
            }
          },
          \\"resources\\": [
            {
              \\"type\\": \\"Microsoft.Authorization/policyAssignments\\",
              \\"name\\": \\"[parameters('policyAssignmentName')]\\",
              \\"apiVersion\\": \\"2019-09-01\\",
              \\"properties\\": {
                \\"scope\\": \\"[subscriptionResourceId('Microsoft.Resources/resourceGroups', resourceGroup().name)]\\",
                \\"policyDefinitionId\\": \\"[parameters('policyDefinitionID')]\\"
              }
            }
          ]
        }
        \"\"\",
            parameters_content=\"\"\"{
          \\"$schema\\": \\"https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#\\",
          \\"contentVersion\\": \\"1.0.0.0\\",
          \\"parameters\\": {
            \\"policyDefinitionID\\": {
              \\"value\\": \\"/providers/Microsoft.Authorization/policyDefinitions/0a914e76-4921-4c19-b460-a2d36003525a\\"
            }
          }
        }
        \"\"\")
        ```

        ```python
        import pulumi
        import pulumi_azure as azure
        import pulumi_std as std

        example = azure.management.get_group(name="00000000-0000-0000-0000-000000000000")
        example_group_template_deployment = azure.management.GroupTemplateDeployment("example",
            name="example",
            location="West Europe",
            management_group_id=example.id,
            template_content=std.file(input="templates/example-deploy-template.json").result,
            parameters_content=std.file(input="templates/example-deploy-params.json").result)
        ```

        ```python
        import pulumi
        import pulumi_azure as azure

        example = azure.management.get_group(name="00000000-0000-0000-0000-000000000000")
        example_get_template_spec_version = azure.core.get_template_spec_version(name="exampleTemplateForManagementGroup",
            resource_group_name="exampleResourceGroup",
            version="v1.0.9")
        example_group_template_deployment = azure.management.GroupTemplateDeployment("example",
            name="example",
            location="West Europe",
            management_group_id=example.id,
            template_spec_version_id=example_get_template_spec_version.id)
        ```

        ## Import

        Management Group Template Deployments can be imported using the `resource id`, e.g.

        ```sh
        $ pulumi import azure:management/groupTemplateDeployment:GroupTemplateDeployment example /providers/Microsoft.Management/managementGroups/my-management-group-id/providers/Microsoft.Resources/deployments/deploy1
        ```


        :param str resource_name: The name of the resource.
        :param GroupTemplateDeploymentArgs 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(GroupTemplateDeploymentArgs, 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,
                 debug_level: Optional[pulumi.Input[_builtins.str]] = None,
                 location: Optional[pulumi.Input[_builtins.str]] = None,
                 management_group_id: Optional[pulumi.Input[_builtins.str]] = None,
                 name: Optional[pulumi.Input[_builtins.str]] = None,
                 parameters_content: Optional[pulumi.Input[_builtins.str]] = None,
                 tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None,
                 template_content: Optional[pulumi.Input[_builtins.str]] = None,
                 template_spec_version_id: Optional[pulumi.Input[_builtins.str]] = None,
                 __props__=None):
        opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        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__ = GroupTemplateDeploymentArgs.__new__(GroupTemplateDeploymentArgs)

            __props__.__dict__["debug_level"] = debug_level
            __props__.__dict__["location"] = location
            if management_group_id is None and not opts.urn:
                raise TypeError("Missing required property 'management_group_id'")
            __props__.__dict__["management_group_id"] = management_group_id
            __props__.__dict__["name"] = name
            __props__.__dict__["parameters_content"] = parameters_content
            __props__.__dict__["tags"] = tags
            __props__.__dict__["template_content"] = template_content
            __props__.__dict__["template_spec_version_id"] = template_spec_version_id
            __props__.__dict__["output_content"] = None
        super(GroupTemplateDeployment, __self__).__init__(
            'azure:management/groupTemplateDeployment:GroupTemplateDeployment',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            debug_level: Optional[pulumi.Input[_builtins.str]] = None,
            location: Optional[pulumi.Input[_builtins.str]] = None,
            management_group_id: Optional[pulumi.Input[_builtins.str]] = None,
            name: Optional[pulumi.Input[_builtins.str]] = None,
            output_content: Optional[pulumi.Input[_builtins.str]] = None,
            parameters_content: Optional[pulumi.Input[_builtins.str]] = None,
            tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None,
            template_content: Optional[pulumi.Input[_builtins.str]] = None,
            template_spec_version_id: Optional[pulumi.Input[_builtins.str]] = None) -> 'GroupTemplateDeployment':
        """
        Get an existing GroupTemplateDeployment 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[_builtins.str] debug_level: The Debug Level which should be used for this Resource Group Template Deployment. Possible values are `none`, `requestContent`, `responseContent` and `requestContent, responseContent`.
        :param pulumi.Input[_builtins.str] location: The Azure Region where the Template should exist. Changing this forces a new Template to be created.
        :param pulumi.Input[_builtins.str] management_group_id: The ID of the Management Group to apply the Deployment Template to. Changing this forces a new resource to be created.
        :param pulumi.Input[_builtins.str] name: The name which should be used for this Template Deployment. Changing this forces a new Template Deployment to be created.
        :param pulumi.Input[_builtins.str] output_content: The JSON Content of the Outputs of the ARM Template Deployment.
        :param pulumi.Input[_builtins.str] parameters_content: The contents of the ARM Template parameters file - containing a JSON list of parameters.
        :param pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]] tags: A mapping of tags which should be assigned to the Template.
        :param pulumi.Input[_builtins.str] template_content: The contents of the ARM Template which should be deployed into this Resource Group. Cannot be specified with `template_spec_version_id`.
        :param pulumi.Input[_builtins.str] template_spec_version_id: The ID of the Template Spec Version to deploy. Cannot be specified with `template_content`.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _GroupTemplateDeploymentState.__new__(_GroupTemplateDeploymentState)

        __props__.__dict__["debug_level"] = debug_level
        __props__.__dict__["location"] = location
        __props__.__dict__["management_group_id"] = management_group_id
        __props__.__dict__["name"] = name
        __props__.__dict__["output_content"] = output_content
        __props__.__dict__["parameters_content"] = parameters_content
        __props__.__dict__["tags"] = tags
        __props__.__dict__["template_content"] = template_content
        __props__.__dict__["template_spec_version_id"] = template_spec_version_id
        return GroupTemplateDeployment(resource_name, opts=opts, __props__=__props__)

    @_builtins.property
    @pulumi.getter(name="debugLevel")
    def debug_level(self) -> pulumi.Output[Optional[_builtins.str]]:
        """
        The Debug Level which should be used for this Resource Group Template Deployment. Possible values are `none`, `requestContent`, `responseContent` and `requestContent, responseContent`.
        """
        return pulumi.get(self, "debug_level")

    @_builtins.property
    @pulumi.getter
    def location(self) -> pulumi.Output[_builtins.str]:
        """
        The Azure Region where the Template should exist. Changing this forces a new Template to be created.
        """
        return pulumi.get(self, "location")

    @_builtins.property
    @pulumi.getter(name="managementGroupId")
    def management_group_id(self) -> pulumi.Output[_builtins.str]:
        """
        The ID of the Management Group to apply the Deployment Template to. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "management_group_id")

    @_builtins.property
    @pulumi.getter
    def name(self) -> pulumi.Output[_builtins.str]:
        """
        The name which should be used for this Template Deployment. Changing this forces a new Template Deployment to be created.
        """
        return pulumi.get(self, "name")

    @_builtins.property
    @pulumi.getter(name="outputContent")
    def output_content(self) -> pulumi.Output[_builtins.str]:
        """
        The JSON Content of the Outputs of the ARM Template Deployment.
        """
        return pulumi.get(self, "output_content")

    @_builtins.property
    @pulumi.getter(name="parametersContent")
    def parameters_content(self) -> pulumi.Output[_builtins.str]:
        """
        The contents of the ARM Template parameters file - containing a JSON list of parameters.
        """
        return pulumi.get(self, "parameters_content")

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

    @_builtins.property
    @pulumi.getter(name="templateContent")
    def template_content(self) -> pulumi.Output[_builtins.str]:
        """
        The contents of the ARM Template which should be deployed into this Resource Group. Cannot be specified with `template_spec_version_id`.
        """
        return pulumi.get(self, "template_content")

    @_builtins.property
    @pulumi.getter(name="templateSpecVersionId")
    def template_spec_version_id(self) -> pulumi.Output[Optional[_builtins.str]]:
        """
        The ID of the Template Spec Version to deploy. Cannot be specified with `template_content`.
        """
        return pulumi.get(self, "template_spec_version_id")

