pspulumiyaml.azurenative.virtualmachineimages.psm1

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

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

        $functionObject = Invoke-PulumiFunction -Name azure-native:virtualmachineimages:getVirtualMachineImageTemplate -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
class ImageTemplateSharedImageVersionSource
{
    [string] $type
    [string] $imageVersionId
}
function New-AzureNativeTypeVirtualmachineimagesImageTemplateSharedImageVersionSource
{
    param (
        [parameter(mandatory=$False,HelpMessage='Specifies the type of source image you want to start with.
Expected value is ''SharedImageVersion''.)'
)]
        [string]
        $type,
        [parameter(mandatory=$False,HelpMessage='ARM resource id of the image version in the shared image gallery)')]
        [string]
        $imageVersionId
    )

    process
    {
        return $([ImageTemplateSharedImageVersionSource]$PSBoundParameters)
    }
}
class ImageTemplateIdentity
{
    [ArgumentCompletions('UserAssigned', 'None')]
    [object] $type
    [object] $userAssignedIdentities
}
function New-AzureNativeTypeVirtualmachineimagesImageTemplateIdentity
{
    param (
        [parameter(mandatory=$False,HelpMessage='The type of identity used for the image template. The type ''None'' will remove any identities from the image template.)')]
        $type,
        [parameter(mandatory=$False,HelpMessage='The list of user identities associated with the image template. 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 $([ImageTemplateIdentity]$PSBoundParameters)
    }
}
class VirtualNetworkConfig
{
    [string] $subnetId
}
function New-AzureNativeTypeVirtualmachineimagesVirtualNetworkConfig
{
    param (
        [parameter(mandatory=$False,HelpMessage='Resource id of a pre-existing subnet.)')]
        [string]
        $subnetId
    )

    process
    {
        return $([VirtualNetworkConfig]$PSBoundParameters)
    }
}
class ImageTemplateVmProfile
{
    [string] $vmSize
    [int] $osDiskSizeGB
    [VirtualNetworkConfig] $vnetConfig
}
function New-AzureNativeTypeVirtualmachineimagesImageTemplateVmProfile
{
    param (
        [parameter(mandatory=$False,HelpMessage='Size of the virtual machine used to build, customize and capture images. Omit or specify empty string to use the default (Standard_D1_v2 for Gen1 images and Standard_D2ds_v4 for Gen2 images).)')]
        [string]
        $vmSize,
        [parameter(mandatory=$False,HelpMessage='Size of the OS disk in GB. Omit or specify 0 to use Azure''s default OS disk size.)')]
        [int]
        $osDiskSizeGB,
        [parameter(mandatory=$False,HelpMessage='Optional configuration of the virtual network to use to deploy the build virtual machine in. Omit if no specific virtual network needs to be used.)')]
        [VirtualNetworkConfig]
        $vnetConfig
    )

    process
    {
        return $([ImageTemplateVmProfile]$PSBoundParameters)
    }
}
function New-AzureNativeVirtualmachineimagesVirtualMachineImageTemplate
{
    [Alias('azure_native_virtualmachineimages_virtualmachineimagetemplate')]
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the image Template)')]
        [string]
        $imageTemplateName,
        [parameter(mandatory=$False,HelpMessage='Specifies the properties used to describe the customization steps of the image, like Image source etc)')]
        $customize,
        [parameter(mandatory=$False,HelpMessage='Specifies the properties used to describe the source image.)')]
        [ImageTemplateSharedImageVersionSource]
        $source,
        [parameter(mandatory=$False,HelpMessage='The identity of the image template, if configured.)')]
        [ImageTemplateIdentity]
        $identity,
        [parameter(mandatory=$False,HelpMessage='The distribution targets where the image output needs to go to.)')]
        $distribute,
        [parameter(mandatory=$False,HelpMessage='Resource tags)')]
        [hashtable]
        $tags,
        [parameter(mandatory=$False,HelpMessage='Maximum duration to wait while building the image template. Omit or specify 0 to use the default (4 hours).)')]
        [int]
        $buildTimeoutInMinutes,
        [parameter(mandatory=$False,HelpMessage='Resource location)')]
        [string]
        $location,
        [parameter(mandatory=$False,HelpMessage='Describes how virtual machine is set up to build images)')]
        [ImageTemplateVmProfile]
        $vmProfile,
        [parameter(mandatory=$False,HelpMessage='The name of the resource group.)')]
        [string]
        $resourceGroupName,
        [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:virtualmachineimages:VirtualMachineImageTemplate")

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

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

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

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

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

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

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

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