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


class Group(pulumi.CustomResource):
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 containers: Optional[pulumi.Input[List[pulumi.Input[pulumi.InputType['GroupContainerArgs']]]]] = None,
                 diagnostics: Optional[pulumi.Input[pulumi.InputType['GroupDiagnosticsArgs']]] = None,
                 dns_name_label: Optional[pulumi.Input[str]] = None,
                 identity: Optional[pulumi.Input[pulumi.InputType['GroupIdentityArgs']]] = None,
                 image_registry_credentials: Optional[pulumi.Input[List[pulumi.Input[pulumi.InputType['GroupImageRegistryCredentialArgs']]]]] = None,
                 ip_address_type: Optional[pulumi.Input[str]] = None,
                 location: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 network_profile_id: Optional[pulumi.Input[str]] = None,
                 os_type: Optional[pulumi.Input[str]] = None,
                 resource_group_name: Optional[pulumi.Input[str]] = None,
                 restart_policy: Optional[pulumi.Input[str]] = None,
                 tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                 __props__=None,
                 __name__=None,
                 __opts__=None):
        """
        Manages as an Azure Container Group instance.

        ## Example Usage

        This example provisions a Basic Container.

        ```python
        import pulumi
        import pulumi_azure as azure

        example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
        example_group = azure.containerservice.Group("exampleGroup",
            location=example_resource_group.location,
            resource_group_name=example_resource_group.name,
            ip_address_type="public",
            dns_name_label="aci-label",
            os_type="Linux",
            containers=[
                azure.containerservice.GroupContainerArgs(
                    name="hello-world",
                    image="microsoft/aci-helloworld:latest",
                    cpu=0.5,
                    memory=1.5,
                    ports=[azure.containerservice.GroupContainerPortArgs(
                        port=443,
                        protocol="TCP",
                    )],
                ),
                azure.containerservice.GroupContainerArgs(
                    name="sidecar",
                    image="microsoft/aci-tutorial-sidecar",
                    cpu=0.5,
                    memory=1.5,
                ),
            ],
            tags={
                "environment": "testing",
            })
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[List[pulumi.Input[pulumi.InputType['GroupContainerArgs']]]] containers: The definition of a container that is part of the group as documented in the `container` block below. Changing this forces a new resource to be created.
        :param pulumi.Input[pulumi.InputType['GroupDiagnosticsArgs']] diagnostics: A `diagnostics` block as documented below.
        :param pulumi.Input[str] dns_name_label: The DNS label/name for the container groups IP. Changing this forces a new resource to be created.
        :param pulumi.Input[pulumi.InputType['GroupIdentityArgs']] identity: An `identity` block as defined below.
        :param pulumi.Input[List[pulumi.Input[pulumi.InputType['GroupImageRegistryCredentialArgs']]]] image_registry_credentials: A `image_registry_credential` block as documented below. Changing this forces a new resource to be created.
        :param pulumi.Input[str] ip_address_type: Specifies the ip address type of the container. `Public` or `Private`. Changing this forces a new resource to be created. If set to `Private`, `network_profile_id` also needs to be set.
        :param pulumi.Input[str] location: Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
        :param pulumi.Input[str] name: Specifies the name of the Container Group. Changing this forces a new resource to be created.
        :param pulumi.Input[str] network_profile_id: Network profile ID for deploying to virtual network.
        :param pulumi.Input[str] os_type: The OS for the container group. Allowed values are `Linux` and `Windows`. Changing this forces a new resource to be created.
        :param pulumi.Input[str] resource_group_name: The name of the resource group in which to create the Container Group. Changing this forces a new resource to be created.
        :param pulumi.Input[str] restart_policy: Restart policy for the container group. Allowed values are `Always`, `Never`, `OnFailure`. Defaults to `Always`. Changing this forces a new resource to be created.
        :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. Changing this forces a new resource to be created.
        """
        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()

            if containers is None:
                raise TypeError("Missing required property 'containers'")
            __props__['containers'] = containers
            __props__['diagnostics'] = diagnostics
            __props__['dns_name_label'] = dns_name_label
            __props__['identity'] = identity
            __props__['image_registry_credentials'] = image_registry_credentials
            __props__['ip_address_type'] = ip_address_type
            __props__['location'] = location
            __props__['name'] = name
            __props__['network_profile_id'] = network_profile_id
            if os_type is None:
                raise TypeError("Missing required property 'os_type'")
            __props__['os_type'] = os_type
            if resource_group_name is None:
                raise TypeError("Missing required property 'resource_group_name'")
            __props__['resource_group_name'] = resource_group_name
            __props__['restart_policy'] = restart_policy
            __props__['tags'] = tags
            __props__['fqdn'] = None
            __props__['ip_address'] = None
        super(Group, __self__).__init__(
            'azure:containerservice/group:Group',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            containers: Optional[pulumi.Input[List[pulumi.Input[pulumi.InputType['GroupContainerArgs']]]]] = None,
            diagnostics: Optional[pulumi.Input[pulumi.InputType['GroupDiagnosticsArgs']]] = None,
            dns_name_label: Optional[pulumi.Input[str]] = None,
            fqdn: Optional[pulumi.Input[str]] = None,
            identity: Optional[pulumi.Input[pulumi.InputType['GroupIdentityArgs']]] = None,
            image_registry_credentials: Optional[pulumi.Input[List[pulumi.Input[pulumi.InputType['GroupImageRegistryCredentialArgs']]]]] = None,
            ip_address: Optional[pulumi.Input[str]] = None,
            ip_address_type: Optional[pulumi.Input[str]] = None,
            location: Optional[pulumi.Input[str]] = None,
            name: Optional[pulumi.Input[str]] = None,
            network_profile_id: Optional[pulumi.Input[str]] = None,
            os_type: Optional[pulumi.Input[str]] = None,
            resource_group_name: Optional[pulumi.Input[str]] = None,
            restart_policy: Optional[pulumi.Input[str]] = None,
            tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None) -> 'Group':
        """
        Get an existing Group 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[List[pulumi.Input[pulumi.InputType['GroupContainerArgs']]]] containers: The definition of a container that is part of the group as documented in the `container` block below. Changing this forces a new resource to be created.
        :param pulumi.Input[pulumi.InputType['GroupDiagnosticsArgs']] diagnostics: A `diagnostics` block as documented below.
        :param pulumi.Input[str] dns_name_label: The DNS label/name for the container groups IP. Changing this forces a new resource to be created.
        :param pulumi.Input[str] fqdn: The FQDN of the container group derived from `dns_name_label`.
        :param pulumi.Input[pulumi.InputType['GroupIdentityArgs']] identity: An `identity` block as defined below.
        :param pulumi.Input[List[pulumi.Input[pulumi.InputType['GroupImageRegistryCredentialArgs']]]] image_registry_credentials: A `image_registry_credential` block as documented below. Changing this forces a new resource to be created.
        :param pulumi.Input[str] ip_address: The IP address allocated to the container group.
        :param pulumi.Input[str] ip_address_type: Specifies the ip address type of the container. `Public` or `Private`. Changing this forces a new resource to be created. If set to `Private`, `network_profile_id` also needs to be set.
        :param pulumi.Input[str] location: Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
        :param pulumi.Input[str] name: Specifies the name of the Container Group. Changing this forces a new resource to be created.
        :param pulumi.Input[str] network_profile_id: Network profile ID for deploying to virtual network.
        :param pulumi.Input[str] os_type: The OS for the container group. Allowed values are `Linux` and `Windows`. Changing this forces a new resource to be created.
        :param pulumi.Input[str] resource_group_name: The name of the resource group in which to create the Container Group. Changing this forces a new resource to be created.
        :param pulumi.Input[str] restart_policy: Restart policy for the container group. Allowed values are `Always`, `Never`, `OnFailure`. Defaults to `Always`. Changing this forces a new resource to be created.
        :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. Changing this forces a new resource to be created.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = dict()

        __props__["containers"] = containers
        __props__["diagnostics"] = diagnostics
        __props__["dns_name_label"] = dns_name_label
        __props__["fqdn"] = fqdn
        __props__["identity"] = identity
        __props__["image_registry_credentials"] = image_registry_credentials
        __props__["ip_address"] = ip_address
        __props__["ip_address_type"] = ip_address_type
        __props__["location"] = location
        __props__["name"] = name
        __props__["network_profile_id"] = network_profile_id
        __props__["os_type"] = os_type
        __props__["resource_group_name"] = resource_group_name
        __props__["restart_policy"] = restart_policy
        __props__["tags"] = tags
        return Group(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter
    def containers(self) -> pulumi.Output[List['outputs.GroupContainer']]:
        """
        The definition of a container that is part of the group as documented in the `container` block below. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "containers")

    @property
    @pulumi.getter
    def diagnostics(self) -> pulumi.Output[Optional['outputs.GroupDiagnostics']]:
        """
        A `diagnostics` block as documented below.
        """
        return pulumi.get(self, "diagnostics")

    @property
    @pulumi.getter(name="dnsNameLabel")
    def dns_name_label(self) -> pulumi.Output[Optional[str]]:
        """
        The DNS label/name for the container groups IP. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "dns_name_label")

    @property
    @pulumi.getter
    def fqdn(self) -> pulumi.Output[str]:
        """
        The FQDN of the container group derived from `dns_name_label`.
        """
        return pulumi.get(self, "fqdn")

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

    @property
    @pulumi.getter(name="imageRegistryCredentials")
    def image_registry_credentials(self) -> pulumi.Output[Optional[List['outputs.GroupImageRegistryCredential']]]:
        """
        A `image_registry_credential` block as documented below. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "image_registry_credentials")

    @property
    @pulumi.getter(name="ipAddress")
    def ip_address(self) -> pulumi.Output[str]:
        """
        The IP address allocated to the container group.
        """
        return pulumi.get(self, "ip_address")

    @property
    @pulumi.getter(name="ipAddressType")
    def ip_address_type(self) -> pulumi.Output[Optional[str]]:
        """
        Specifies the ip address type of the container. `Public` or `Private`. Changing this forces a new resource to be created. If set to `Private`, `network_profile_id` also needs to be set.
        """
        return pulumi.get(self, "ip_address_type")

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

    @property
    @pulumi.getter
    def name(self) -> pulumi.Output[str]:
        """
        Specifies the name of the Container Group. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter(name="networkProfileId")
    def network_profile_id(self) -> pulumi.Output[Optional[str]]:
        """
        Network profile ID for deploying to virtual network.
        """
        return pulumi.get(self, "network_profile_id")

    @property
    @pulumi.getter(name="osType")
    def os_type(self) -> pulumi.Output[str]:
        """
        The OS for the container group. Allowed values are `Linux` and `Windows`. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "os_type")

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

    @property
    @pulumi.getter(name="restartPolicy")
    def restart_policy(self) -> pulumi.Output[Optional[str]]:
        """
        Restart policy for the container group. Allowed values are `Always`, `Never`, `OnFailure`. Defaults to `Always`. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "restart_policy")

    @property
    @pulumi.getter
    def tags(self) -> pulumi.Output[Optional[Mapping[str, str]]]:
        """
        A mapping of tags to assign to the resource. Changing this forces a new resource to be created.
        """
        return pulumi.get(self, "tags")

    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

