pspulumiyaml.azurenative.containerinstance.psm1

using module pspulumiyaml
function Invoke-AzureNativeFunctionContainerinstanceGetContainerGroup
{
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the container group.)')]
        [string]
        $containerGroupName,
        [parameter(mandatory=$False,HelpMessage='The name of the resource group.)')]
        [string]
        $resourceGroupName
    )

    process
    {
        $arguments = @{}
        $arguments["containerGroupName"] = $containerGroupName
        $arguments["resourceGroupName"] = $resourceGroupName

        $functionObject = Invoke-PulumiFunction -Name azure-native:containerinstance:getContainerGroup -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
class DnsConfiguration
{
    [string] $searchDomains
    [string] $options
    [string[]] $nameServers
}
function New-AzureNativeTypeContainerinstanceDnsConfiguration
{
    param (
        [parameter(mandatory=$False,HelpMessage='The DNS search domains for hostname lookup in the container group.)')]
        [string]
        $searchDomains,
        [parameter(mandatory=$False,HelpMessage='The DNS options for the container group.)')]
        [string]
        $options,
        [parameter(mandatory=$False,HelpMessage='The DNS servers for the container group.)')]
        [string[]]
        $nameServers
    )

    process
    {
        return $([DnsConfiguration]$PSBoundParameters)
    }
}
class ContainerGroupIdentity
{
    [ArgumentCompletions('SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None')]
    [object] $type
    [object] $userAssignedIdentities
}
function New-AzureNativeTypeContainerinstanceContainerGroupIdentity
{
    param (
        [parameter(mandatory=$False,HelpMessage='The type of identity used for the container group. The type ''SystemAssigned, UserAssigned'' includes both an implicitly created identity and a set of user assigned identities. The type ''None'' will remove any identities from the container group.)')]
        $type,
        [parameter(mandatory=$False,HelpMessage='The list of user identities associated with the container group. The user identity dictionary key references will be ARM resource ids in the form: ''/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}''.)')]
        [object]
        $userAssignedIdentities
    )

    process
    {
        return $([ContainerGroupIdentity]$PSBoundParameters)
    }
}
class Port
{
    [int] $port
    [ArgumentCompletions('TCP', 'UDP')]
    [string] $protocol
}
function New-AzureNativeTypeContainerinstancePort
{
    param (
        [parameter(mandatory=$False,HelpMessage='The port number.)')]
        [int]
        $port,
        [parameter(mandatory=$False,HelpMessage='The protocol associated with the port.)')]
        [string]
        [ValidateSet('TCP', 'UDP')]
        $protocol
    )

    process
    {
        return $([Port]$PSBoundParameters)
    }
}
class IpAddress
{
    [string] $dnsNameLabel
    [ArgumentCompletions('Public', 'Private')]
    [string] $type
    [Port[]] $ports
    [string] $ip
}
function New-AzureNativeTypeContainerinstanceIpAddress
{
    param (
        [parameter(mandatory=$False,HelpMessage='The Dns name label for the IP.)')]
        [string]
        $dnsNameLabel,
        [parameter(mandatory=$False,HelpMessage='Specifies if the IP is exposed to the public internet or private VNET.)')]
        [string]
        [ValidateSet('Public', 'Private')]
        $type,
        [parameter(mandatory=$False,HelpMessage='The list of ports exposed on the container group.)')]
        $ports,
        [parameter(mandatory=$False,HelpMessage='The IP exposed to the public internet.)')]
        [string]
        $ip
    )

    process
    {
        return $([IpAddress]$PSBoundParameters)
    }
}
class EncryptionProperties
{
    [string] $keyName
    [string] $vaultBaseUrl
    [string] $keyVersion
}
function New-AzureNativeTypeContainerinstanceEncryptionProperties
{
    param (
        [parameter(mandatory=$False,HelpMessage='The encryption key name.)')]
        [string]
        $keyName,
        [parameter(mandatory=$False,HelpMessage='The keyvault base url.)')]
        [string]
        $vaultBaseUrl,
        [parameter(mandatory=$False,HelpMessage='The encryption key version.)')]
        [string]
        $keyVersion
    )

    process
    {
        return $([EncryptionProperties]$PSBoundParameters)
    }
}
class LogAnalytics
{
    [string] $workspaceId
    [ArgumentCompletions('ContainerInsights', 'ContainerInstanceLogs')]
    [string] $logType
    [object] $metadata
    [string] $workspaceKey
    [object] $workspaceResourceId
}
function New-AzureNativeTypeContainerinstanceLogAnalytics
{
    param (
        [parameter(mandatory=$False,HelpMessage='The workspace id for log analytics)')]
        [string]
        $workspaceId,
        [parameter(mandatory=$False,HelpMessage='The log type to be used.)')]
        [string]
        [ValidateSet('ContainerInsights', 'ContainerInstanceLogs')]
        $logType,
        [parameter(mandatory=$False,HelpMessage='Metadata for log analytics.)')]
        [hashtable]
        $metadata,
        [parameter(mandatory=$False,HelpMessage='The workspace key for log analytics)')]
        [string]
        $workspaceKey,
        [parameter(mandatory=$False,HelpMessage='The workspace resource id for log analytics)')]
        [hashtable]
        $workspaceResourceId
    )

    process
    {
        return $([LogAnalytics]$PSBoundParameters)
    }
}
class ContainerGroupDiagnostics
{
    [LogAnalytics] $logAnalytics
}
function New-AzureNativeTypeContainerinstanceContainerGroupDiagnostics
{
    param (
        [parameter(mandatory=$False,HelpMessage='Container group log analytics information.)')]
        [LogAnalytics]
        $logAnalytics
    )

    process
    {
        return $([ContainerGroupDiagnostics]$PSBoundParameters)
    }
}
class ContainerGroupNetworkProfile
{
    [string] $id
}
function New-AzureNativeTypeContainerinstanceContainerGroupNetworkProfile
{
    param (
        [parameter(mandatory=$False,HelpMessage='The identifier for a network profile.)')]
        [string]
        $id
    )

    process
    {
        return $([ContainerGroupNetworkProfile]$PSBoundParameters)
    }
}
function New-AzureNativeContainerinstanceContainerGroup
{
    [Alias('azure_native_containerinstance_containergroup')]
    param (
        [parameter(mandatory=$False,HelpMessage='The DNS config information for a container group.)')]
        [DnsConfiguration]
        $dnsConfig,
        [parameter(mandatory=$False,HelpMessage='The identity of the container group, if configured.)')]
        [ContainerGroupIdentity]
        $identity,
        [parameter(mandatory=$False,HelpMessage='The operating system type required by the containers in the container group.)')]
        [string]
        [ValidateSet('Windows', 'Linux')]
        $osType,
        [parameter(mandatory=$False,HelpMessage='The list of volumes that can be mounted by containers in this container group.)')]
        $volumes,
        [parameter(mandatory=$False,HelpMessage='The resource location.)')]
        [string]
        $location,
        [parameter(mandatory=$False,HelpMessage='The name of the container group.)')]
        [string]
        $containerGroupName,
        [parameter(mandatory=$False,HelpMessage='The IP address type of the container group.)')]
        [IpAddress]
        $ipAddress,
        [parameter(mandatory=$False,HelpMessage='The resource tags.)')]
        [hashtable]
        $tags,
        [parameter(mandatory=$False,HelpMessage='The containers within the container group.)')]
        $containers,
        [parameter(mandatory=$False,HelpMessage='The encryption properties for a container group.)')]
        [EncryptionProperties]
        $encryptionProperties,
        [parameter(mandatory=$False,HelpMessage='The image registry credentials by which the container group is created from.)')]
        $imageRegistryCredentials,
        [parameter(mandatory=$False,HelpMessage='The name of the resource group.)')]
        [string]
        $resourceGroupName,
        [parameter(mandatory=$False,HelpMessage='The SKU for a container group.)')]
        [string]
        [ValidateSet('Standard', 'Dedicated')]
        $sku,
        [parameter(mandatory=$False,HelpMessage='The diagnostic information for a container group.)')]
        [ContainerGroupDiagnostics]
        $diagnostics,
        [parameter(mandatory=$False,HelpMessage='The network profile information for a container group.)')]
        [ContainerGroupNetworkProfile]
        $networkProfile,
        [parameter(mandatory=$False,HelpMessage='The init containers for a container group.)')]
        $initContainers,
        [parameter(mandatory=$False,HelpMessage='Restart policy for all containers within the container group.
- `Always` Always restart
- `OnFailure` Restart on failure
- `Never` Never restart
)'
)]
        [string]
        [ValidateSet('Always', 'OnFailure', 'Never')]
        $restartPolicy,
        [parameter(mandatory,HelpMessage='The reference to call when you want to make a dependency to another resource')]
        [string]
        $pulumiid,
        [parameter(mandatory,HelpMessage='Pass in the resources you make to make this resource dependant on')]
        [object]
        $DependsOn
    )

    process
    {
        $resource = [pulumiresource]::new($pulumiid, "azure-native:containerinstance:ContainerGroup")

        foreach($Dependency in $DependsOn)
        {
            if($Dependency -is [pulumiresource])
            {
                $resource.dependson += $Dependency.Reference()
            } else
            {
                $resource.dependson += $Dependency
            }
        }
        $resource.properties["containers"] = $containers
        $resource.properties["osType"] = $osType
        $resource.properties["resourceGroupName"] = $resourceGroupName

        if($PSBoundParameters.Keys -icontains 'dnsConfig')
        {
            $resource.properties["dnsConfig"] = $dnsConfig
        }

        if($PSBoundParameters.Keys -icontains 'identity')
        {
            $resource.properties["identity"] = $identity
        }

        if($PSBoundParameters.Keys -icontains 'volumes')
        {
            $resource.properties["volumes"] = $volumes
        }

        if($PSBoundParameters.Keys -icontains 'location')
        {
            $resource.properties["location"] = $location
        }

        if($PSBoundParameters.Keys -icontains 'containerGroupName')
        {
            $resource.properties["containerGroupName"] = $containerGroupName
        }

        if($PSBoundParameters.Keys -icontains 'ipAddress')
        {
            $resource.properties["ipAddress"] = $ipAddress
        }

        if($PSBoundParameters.Keys -icontains 'tags')
        {
            $resource.properties["tags"] = $tags
        }

        if($PSBoundParameters.Keys -icontains 'encryptionProperties')
        {
            $resource.properties["encryptionProperties"] = $encryptionProperties
        }

        if($PSBoundParameters.Keys -icontains 'imageRegistryCredentials')
        {
            $resource.properties["imageRegistryCredentials"] = $imageRegistryCredentials
        }

        if($PSBoundParameters.Keys -icontains 'sku')
        {
            $resource.properties["sku"] = $sku
        }

        if($PSBoundParameters.Keys -icontains 'diagnostics')
        {
            $resource.properties["diagnostics"] = $diagnostics
        }

        if($PSBoundParameters.Keys -icontains 'networkProfile')
        {
            $resource.properties["networkProfile"] = $networkProfile
        }

        if($PSBoundParameters.Keys -icontains 'initContainers')
        {
            $resource.properties["initContainers"] = $initContainers
        }

        if($PSBoundParameters.Keys -icontains 'restartPolicy')
        {
            $resource.properties["restartPolicy"] = $restartPolicy
        }

        $global:pulumiresources += $resource
        return $resource
    }
}