pspulumiyaml.azurenative.sqlvirtualmachine.psm1

using module @{ ModuleName = "PSPulumiYaml"; ModuleVersion = "0.0.3"; GUID = "909344e0-a08f-45f6-8177-80e36bb2ba58" }
function Invoke-AzureNativeFunctionSqlvirtualmachineGetAvailabilityGroupListener
{
    param (
        [parameter(mandatory=$False,HelpMessage='Name of the availability group listener.)')]
        [string]
        $availabilityGroupListenerName,
        [parameter(mandatory=$False,HelpMessage='Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.)')]
        [string]
        $resourceGroupName,
        [parameter(mandatory=$False,HelpMessage='Name of the SQL virtual machine group.)')]
        [string]
        $sqlVirtualMachineGroupName
    )

    process
    {
        $arguments = @{}
        $arguments["availabilityGroupListenerName"] = $availabilityGroupListenerName
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["sqlVirtualMachineGroupName"] = $sqlVirtualMachineGroupName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sqlvirtualmachine:getAvailabilityGroupListener -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlvirtualmachineGetSqlVirtualMachineGroup
{
    param (
        [parameter(mandatory=$False,HelpMessage='Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.)')]
        [string]
        $resourceGroupName,
        [parameter(mandatory=$False,HelpMessage='Name of the SQL virtual machine group.)')]
        [string]
        $sqlVirtualMachineGroupName
    )

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

        $functionObject = Invoke-PulumiFunction -Name azure-native:sqlvirtualmachine:getSqlVirtualMachineGroup -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlvirtualmachineGetSqlVirtualMachine
{
    param (
        [parameter(mandatory=$False,HelpMessage='The child resources to include in the response.)')]
        [string]
        $expand,
        [parameter(mandatory=$False,HelpMessage='Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.)')]
        [string]
        $resourceGroupName,
        [parameter(mandatory=$False,HelpMessage='Name of the SQL virtual machine.)')]
        [string]
        $sqlVirtualMachineName
    )

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

        if($PSBoundParameters.Keys -icontains 'expand')
        {
            $arguments["expand"] = $expand
        }

        $functionObject = Invoke-PulumiFunction -Name azure-native:sqlvirtualmachine:getSqlVirtualMachine -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
class SQLStorageSettings
{
    [string] $defaultFilePath
    [int[]] $luns
}
function New-AzureNativeTypeSqlvirtualmachineSQLStorageSettings
{
    param (
        [parameter(mandatory=$False,HelpMessage='SQL Server default file path)')]
        [string]
        $defaultFilePath,
        [parameter(mandatory=$False,HelpMessage='Logical Unit Numbers for the disks.)')]
        [int[]]
        $luns
    )

    process
    {
        return $([SQLStorageSettings]$PSBoundParameters)
    }
}
class StorageConfigurationSettings
{
    [SQLStorageSettings] $sqlTempDbSettings
    [SQLStorageSettings] $sqlDataSettings
    [ArgumentCompletions('GENERAL', 'OLTP', 'DW')]
    [string] $storageWorkloadType
    [ArgumentCompletions('NEW', 'EXTEND', 'ADD')]
    [string] $diskConfigurationType
    [SQLStorageSettings] $sqlLogSettings
}
function New-AzureNativeTypeSqlvirtualmachineStorageConfigurationSettings
{
    param (
        [parameter(mandatory=$False,HelpMessage='SQL Server TempDb Storage Settings.)')]
        [SQLStorageSettings]
        $sqlTempDbSettings,
        [parameter(mandatory=$False,HelpMessage='SQL Server Data Storage Settings.)')]
        [SQLStorageSettings]
        $sqlDataSettings,
        [parameter(mandatory=$False,HelpMessage='Storage workload type.)')]
        [string]
        [ArgumentCompletions('GENERAL', 'OLTP', 'DW')]
        $storageWorkloadType,
        [parameter(mandatory=$False,HelpMessage='Disk configuration to apply to SQL Server.)')]
        [string]
        [ArgumentCompletions('NEW', 'EXTEND', 'ADD')]
        $diskConfigurationType,
        [parameter(mandatory=$False,HelpMessage='SQL Server Log Storage Settings.)')]
        [SQLStorageSettings]
        $sqlLogSettings
    )

    process
    {
        return $([StorageConfigurationSettings]$PSBoundParameters)
    }
}
class AutoBackupSettings
{
    [int] $fullBackupWindowHours
    [int] $logBackupFrequency
    [ArgumentCompletions('Daily', 'Weekly')]
    [string] $fullBackupFrequency
    [ArgumentCompletions('Manual', 'Automated')]
    [string] $backupScheduleType
    [string] $storageAccessKey
    [bool] $enable
    [bool] $enableEncryption
    [int] $retentionPeriod
    [int] $fullBackupStartTime
    [bool] $backupSystemDbs
    [string] $storageAccountUrl
    [string] $password
}
function New-AzureNativeTypeSqlvirtualmachineAutoBackupSettings
{
    param (
        [parameter(mandatory=$False,HelpMessage='Duration of the time window of a given day during which full backups can take place. 1-23 hours.)')]
        [int]
        $fullBackupWindowHours,
        [parameter(mandatory=$False,HelpMessage='Frequency of log backups. 5-60 minutes.)')]
        [int]
        $logBackupFrequency,
        [parameter(mandatory=$False,HelpMessage='Frequency of full backups. In both cases, full backups begin during the next scheduled time window.)')]
        [string]
        [ArgumentCompletions('Daily', 'Weekly')]
        $fullBackupFrequency,
        [parameter(mandatory=$False,HelpMessage='Backup schedule type.)')]
        [string]
        [ArgumentCompletions('Manual', 'Automated')]
        $backupScheduleType,
        [parameter(mandatory=$False,HelpMessage='Storage account key where backup will be taken to.)')]
        [string]
        $storageAccessKey,
        [parameter(mandatory=$False,HelpMessage='Enable or disable autobackup on SQL virtual machine.)')]
        [bool]
        $enable,
        [parameter(mandatory=$False,HelpMessage='Enable or disable encryption for backup on SQL virtual machine.)')]
        [bool]
        $enableEncryption,
        [parameter(mandatory=$False,HelpMessage='Retention period of backup: 1-30 days.)')]
        [int]
        $retentionPeriod,
        [parameter(mandatory=$False,HelpMessage='Start time of a given day during which full backups can take place. 0-23 hours.)')]
        [int]
        $fullBackupStartTime,
        [parameter(mandatory=$False,HelpMessage='Include or exclude system databases from auto backup.)')]
        [bool]
        $backupSystemDbs,
        [parameter(mandatory=$False,HelpMessage='Storage account url where backup will be taken to.)')]
        [string]
        $storageAccountUrl,
        [parameter(mandatory=$False,HelpMessage='Password for encryption on backup.)')]
        [string]
        $password
    )

    process
    {
        return $([AutoBackupSettings]$PSBoundParameters)
    }
}
class AutoPatchingSettings
{
    [ArgumentCompletions('Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday')]
    [object] $dayOfWeek
    [int] $maintenanceWindowDuration
    [bool] $enable
    [int] $maintenanceWindowStartingHour
}
function New-AzureNativeTypeSqlvirtualmachineAutoPatchingSettings
{
    param (
        [parameter(mandatory=$False,HelpMessage='Day of week to apply the patch on.)')]
        $dayOfWeek,
        [parameter(mandatory=$False,HelpMessage='Duration of patching.)')]
        [int]
        $maintenanceWindowDuration,
        [parameter(mandatory=$False,HelpMessage='Enable or disable autopatching on SQL virtual machine.)')]
        [bool]
        $enable,
        [parameter(mandatory=$False,HelpMessage='Hour of the day when patching is initiated. Local VM time.)')]
        [int]
        $maintenanceWindowStartingHour
    )

    process
    {
        return $([AutoPatchingSettings]$PSBoundParameters)
    }
}
class WsfcDomainCredentials
{
    [string] $clusterOperatorAccountPassword
    [string] $sqlServiceAccountPassword
    [string] $clusterBootstrapAccountPassword
}
function New-AzureNativeTypeSqlvirtualmachineWsfcDomainCredentials
{
    param (
        [parameter(mandatory=$False,HelpMessage='Cluster operator account password.)')]
        [string]
        $clusterOperatorAccountPassword,
        [parameter(mandatory=$False,HelpMessage='SQL service account password.)')]
        [string]
        $sqlServiceAccountPassword,
        [parameter(mandatory=$False,HelpMessage='Cluster bootstrap account password.)')]
        [string]
        $clusterBootstrapAccountPassword
    )

    process
    {
        return $([WsfcDomainCredentials]$PSBoundParameters)
    }
}
class ResourceIdentity
{
    [ArgumentCompletions('SystemAssigned')]
    [string] $type
}
function New-AzureNativeTypeSqlvirtualmachineResourceIdentity
{
    param (
        [parameter(mandatory=$False,HelpMessage='The identity type. Set this to ''SystemAssigned'' in order to automatically create and assign an Azure Active Directory principal for the resource.)')]
        [string]
        [ArgumentCompletions('SystemAssigned')]
        $type
    )

    process
    {
        return $([ResourceIdentity]$PSBoundParameters)
    }
}
class KeyVaultCredentialSettings
{
    [string] $credentialName
    [string] $servicePrincipalSecret
    [string] $servicePrincipalName
    [bool] $enable
    [string] $azureKeyVaultUrl
}
function New-AzureNativeTypeSqlvirtualmachineKeyVaultCredentialSettings
{
    param (
        [parameter(mandatory=$False,HelpMessage='Credential name.)')]
        [string]
        $credentialName,
        [parameter(mandatory=$False,HelpMessage='Service principal name secret to access key vault.)')]
        [string]
        $servicePrincipalSecret,
        [parameter(mandatory=$False,HelpMessage='Service principal name to access key vault.)')]
        [string]
        $servicePrincipalName,
        [parameter(mandatory=$False,HelpMessage='Enable or disable key vault credential setting.)')]
        [bool]
        $enable,
        [parameter(mandatory=$False,HelpMessage='Azure Key Vault url.)')]
        [string]
        $azureKeyVaultUrl
    )

    process
    {
        return $([KeyVaultCredentialSettings]$PSBoundParameters)
    }
}
class AdditionalFeaturesServerConfigurations
{
    [bool] $isRServicesEnabled
}
function New-AzureNativeTypeSqlvirtualmachineAdditionalFeaturesServerConfigurations
{
    param (
        [parameter(mandatory=$False,HelpMessage='Enable or disable R services (SQL 2016 onwards).)')]
        [bool]
        $isRServicesEnabled
    )

    process
    {
        return $([AdditionalFeaturesServerConfigurations]$PSBoundParameters)
    }
}
class SqlConnectivityUpdateSettings
{
    [int] $port
    [ArgumentCompletions('LOCAL', 'PRIVATE', 'PUBLIC')]
    [string] $connectivityType
    [string] $sqlAuthUpdatePassword
    [string] $sqlAuthUpdateUserName
}
function New-AzureNativeTypeSqlvirtualmachineSqlConnectivityUpdateSettings
{
    param (
        [parameter(mandatory=$False,HelpMessage='SQL Server port.)')]
        [int]
        $port,
        [parameter(mandatory=$False,HelpMessage='SQL Server connectivity option.)')]
        [string]
        [ArgumentCompletions('LOCAL', 'PRIVATE', 'PUBLIC')]
        $connectivityType,
        [parameter(mandatory=$False,HelpMessage='SQL Server sysadmin login password.)')]
        [string]
        $sqlAuthUpdatePassword,
        [parameter(mandatory=$False,HelpMessage='SQL Server sysadmin login to create.)')]
        [string]
        $sqlAuthUpdateUserName
    )

    process
    {
        return $([SqlConnectivityUpdateSettings]$PSBoundParameters)
    }
}
class SqlWorkloadTypeUpdateSettings
{
    [ArgumentCompletions('GENERAL', 'OLTP', 'DW')]
    [string] $sqlWorkloadType
}
function New-AzureNativeTypeSqlvirtualmachineSqlWorkloadTypeUpdateSettings
{
    param (
        [parameter(mandatory=$False,HelpMessage='SQL Server workload type.)')]
        [string]
        [ArgumentCompletions('GENERAL', 'OLTP', 'DW')]
        $sqlWorkloadType
    )

    process
    {
        return $([SqlWorkloadTypeUpdateSettings]$PSBoundParameters)
    }
}
class SqlStorageUpdateSettings
{
    [int] $diskCount
    [int] $startingDeviceId
    [ArgumentCompletions('NEW', 'EXTEND', 'ADD')]
    [string] $diskConfigurationType
}
function New-AzureNativeTypeSqlvirtualmachineSqlStorageUpdateSettings
{
    param (
        [parameter(mandatory=$False,HelpMessage='Virtual machine disk count.)')]
        [int]
        $diskCount,
        [parameter(mandatory=$False,HelpMessage='Device id of the first disk to be updated.)')]
        [int]
        $startingDeviceId,
        [parameter(mandatory=$False,HelpMessage='Disk configuration to apply to SQL Server.)')]
        [string]
        [ArgumentCompletions('NEW', 'EXTEND', 'ADD')]
        $diskConfigurationType
    )

    process
    {
        return $([SqlStorageUpdateSettings]$PSBoundParameters)
    }
}
class ServerConfigurationsManagementSettings
{
    [AdditionalFeaturesServerConfigurations] $additionalFeaturesServerConfigurations
    [SqlConnectivityUpdateSettings] $sqlConnectivityUpdateSettings
    [SqlWorkloadTypeUpdateSettings] $sqlWorkloadTypeUpdateSettings
    [SqlStorageUpdateSettings] $sqlStorageUpdateSettings
}
function New-AzureNativeTypeSqlvirtualmachineServerConfigurationsManagementSettings
{
    param (
        [parameter(mandatory=$False,HelpMessage='Additional SQL feature settings.)')]
        [AdditionalFeaturesServerConfigurations]
        $additionalFeaturesServerConfigurations,
        [parameter(mandatory=$False,HelpMessage='SQL connectivity type settings.)')]
        [SqlConnectivityUpdateSettings]
        $sqlConnectivityUpdateSettings,
        [parameter(mandatory=$False,HelpMessage='SQL workload type settings.)')]
        [SqlWorkloadTypeUpdateSettings]
        $sqlWorkloadTypeUpdateSettings,
        [parameter(mandatory=$False,HelpMessage='SQL storage update settings.)')]
        [SqlStorageUpdateSettings]
        $sqlStorageUpdateSettings
    )

    process
    {
        return $([ServerConfigurationsManagementSettings]$PSBoundParameters)
    }
}
function New-AzureNativeSqlvirtualmachineSqlVirtualMachine
{
    [Alias('azure_native_sqlvirtualmachine_sqlvirtualmachine')]
    param (
        [parameter(mandatory=$False,HelpMessage='SQL Server edition type.)')]
        [string]
        [ArgumentCompletions('Developer', 'Express', 'Standard', 'Enterprise', 'Web')]
        $sqlImageSku,
        [parameter(mandatory=$False,HelpMessage='Resource tags.)')]
        [hashtable]
        $tags,
        [parameter(mandatory=$False,HelpMessage='SQL Server license type.)')]
        [string]
        [ArgumentCompletions('PAYG', 'AHUB', 'DR')]
        $sqlServerLicenseType,
        [parameter(mandatory=$False,HelpMessage='Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.)')]
        [string]
        $resourceGroupName,
        [parameter(mandatory=$False,HelpMessage='ARM Resource id of underlying virtual machine created from SQL marketplace image.)')]
        [string]
        $virtualMachineResourceId,
        [parameter(mandatory=$False,HelpMessage='Storage Configuration Settings.)')]
        [StorageConfigurationSettings]
        $storageConfigurationSettings,
        [parameter(mandatory=$False,HelpMessage='Name of the SQL virtual machine.)')]
        [string]
        $sqlVirtualMachineName,
        [parameter(mandatory=$False,HelpMessage='Resource location.)')]
        [string]
        $location,
        [parameter(mandatory=$False,HelpMessage='Auto backup settings for SQL Server.)')]
        [AutoBackupSettings]
        $autoBackupSettings,
        [parameter(mandatory=$False,HelpMessage='SQL Server Management type.)')]
        [string]
        [ArgumentCompletions('Full', 'LightWeight', 'NoAgent')]
        $sqlManagement,
        [parameter(mandatory=$False,HelpMessage='Auto patching settings for applying critical security updates to SQL virtual machine.)')]
        [AutoPatchingSettings]
        $autoPatchingSettings,
        [parameter(mandatory=$False,HelpMessage='ARM resource id of the SQL virtual machine group this SQL virtual machine is or will be part of.)')]
        [string]
        $sqlVirtualMachineGroupResourceId,
        [parameter(mandatory=$False,HelpMessage='Domain credentials for setting up Windows Server Failover Cluster for SQL availability group.)')]
        [WsfcDomainCredentials]
        $wsfcDomainCredentials,
        [parameter(mandatory=$False,HelpMessage='SQL image offer. Examples include SQL2016-WS2016, SQL2017-WS2016.)')]
        [string]
        $sqlImageOffer,
        [parameter(mandatory=$False,HelpMessage='Azure Active Directory identity of the server.)')]
        [ResourceIdentity]
        $identity,
        [parameter(mandatory=$False,HelpMessage='Key vault credential settings.)')]
        [KeyVaultCredentialSettings]
        $keyVaultCredentialSettings,
        [parameter(mandatory=$False,HelpMessage='SQL Server configuration management settings.)')]
        [ServerConfigurationsManagementSettings]
        $serverConfigurationsManagementSettings,
        [parameter(mandatory,HelpMessage='The reference to call when you want to make a dependency to another resource')]
        [string]
        $pulumiid,
        [parameter(HelpMessage='Specifies a list of named output properties that should be treated as secrets, which means they will be encrypted. It augments the list of values that Pulumi detects, based on secret inputs to the resource.')]
        [string[]]
        $PulumiSecretOutputs,
        [parameter(HelpMessage='The aliases parameter provides a list of aliases for a resource or component resource. If youre changing the name, type, or parent path of a resource or component resource, you can add the old name to the list of aliases for a resource to ensure that existing resources will be migrated to the new name instead of being deleted and replaced with the new named resource.')]
        [string[]]
        $PulumiAliases,
        [parameter(HelpMessage='The customTimeouts parameter provides a set of custom timeouts for create, update, and delete operations on a resource. These timeouts are specified using a duration string such as 5m (5 minutes), 40s (40 seconds), or 1d (1 day). Supported duration units are ns, us (or µs), ms, s, m, and h (nanoseconds, microseconds, milliseconds, seconds, minutes, and hours, respectively).')]
        [pulumicustomtimeouts]
        $PulumiCustomTimeouts,
        [parameter(HelpMessage='Setting the PulumiDeleteBeforeReplace parameter to true means that Pulumi will delete the existing resource before creating its replacement. Be aware that this behavior has a cascading impact on dependencies so more resources may be replaced, which can lead to downtime. However, this option may be necessary for some resources that manage scarce resources behind the scenes, and/or resources that cannot exist side-by-side.')]
        [bool]
        $PulumiDeleteBeforeReplace,
        [parameter(HelpMessage='Creates a list of explicit dependencies between resources.The DependsOn parameter ensures that resource creation, update, and deletion operations are done in the correct order.')]
        [object[]]
        $PulumiDependsOn,
        [parameter(HelpMessage='Specifies a list of properties that Pulumi will ignore when it updates existing resources. Any properties specified in this list that are also specified in the resources arguments will only be used when creating the resource.')]
        [string[]]
        $PulumiIgnoreChanges,
        [parameter(HelpMessage='Imports an existing cloud resource so that Pulumi can manage it. To import a resource, first specify the PulumiImport parameter with the resources ID')]
        [string]
        $PulumiImport = [NullString]::Value,
        [parameter(HelpMessage='Specifies a parent for a resource. It is used to associate children with the parents that encapsulate or are responsible for them.')]
        [object]
        $PulumiParent = [NullString]::Value,
        [parameter(HelpMessage='Marks a resource as protected. A protected resource cannot be deleted directly, and it will be an error to do a Pulumi deployment which tries to delete a protected resource for any reason.')]
        [bool]
        $PulumiProtect,
        [parameter(HelpMessage='Sets a provider for the resource. The default is to inherit this value from the parent resource, and to use the ambient provider specified by Pulumi configuration for resources without a parent.')]
        [object]
        $PulumiProvider = [NullString]::Value,
        [parameter(HelpMessage='Sets a list of providers for the resource and its children. This list is combined with resource parents providers lists. If no value is provided, the providers list is identical to the parent. When determining which provider to use for a resource, the providers list is used if provider is not supplied.')]
        [object[]]
        $PulumiProviders,
        [parameter(HelpMessage='Used to indicate that changes to certain properties on a resource should force a replacement of the resource instead of an in-place update. Typically users rely on the resource provider to make this decision based on whether the input property is one that the provider knows how to update in place, or if not, requires a replacement to modify. However, there are cases where users want to replace a resource on a change to an input property even if the resource provider itself doesnt believe it has to replace the resource.')]
        [string[]]
        $PulumiReplaceOnChanges,
        [parameter(HelpMessage='Marks a resource to be retained. If this option is set then Pulumi will not call through to the resource providers Delete method when deleting or replacing the resource during pulumi up or pulumi destroy. As a result, the resource will not be deleted from the backing cloud provider, but will be removed from the Pulumi state.')]
        [bool]
        $PulumiRetainOnDelete,
        [parameter(HelpMessage='Specifies a provider version to use when operating on a resource. This version overrides the version information inferred from the current package. This option should be used rarely.')]
        [string]
        $PulumiProviderVersion = [NullString]::Value
    )

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

        $resource.options.additionalSecretOutputs = $PulumiSecretOutputs
        $resource.options.aliases = $PulumiAliases
        $resource.options.customTimeouts = $PulumiCustomTimeouts
        $resource.options.deleteBeforeReplace = $PulumiDeleteBeforeReplace
        $resource.options.ignoreChanges = $PulumiIgnoreChanges
        $resource.options.import = if([string]::IsNullOrEmpty($PulumiImport)) { [NullString]::Value } else { $PulumiImport }
        $resource.options.protect = $PulumiProtect
        $resource.options.replaceOnChanges = $PulumiReplaceOnChanges
        $resource.options.retainOnDelete = $PulumiRetainOnDelete
        $resource.options.version = if([string]::IsNullOrEmpty($PulumiProviderVersion)) { [NullString]::Value } else { $PulumiProviderVersion }

        foreach($Dependency in $DependsOn)
        {
            if($Dependency -is [pulumiresource])
            {
                $resource.options.dependson += $Dependency.Reference()
            } else
            {
                $resource.options.dependson += $Dependency
            }
        }
        if($PulumiParent -is [pulumiresource])
        {
            $resource.options.parent = $PulumiParent.Reference()
        } else
        {
            $resource.options.parent = $PulumiParent
        }
        foreach($provider in $PulumiProviders)
        {
            if($provider -is [pulumiprovider])
            {
                $resource.options.providers += $provider.Reference()
            } else
            {
                $resource.options.providers += $provider
            }
        }
        if($PulumiProvider -is [pulumiprovider])
        {
            $resource.options.provider = $PulumiProvider.Reference()
        } else
        {
            $resource.options.provider = $PulumiProvider
        }
        $resource.properties["resourceGroupName"] = $resourceGroupName

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
class WsfcDomainProfile
{
    [string] $fileShareWitnessPath
    [string] $sqlServiceAccount
    [string] $storageAccountPrimaryKey
    [string] $clusterBootstrapAccount
    [string] $storageAccountUrl
    [string] $clusterOperatorAccount
    [string] $ouPath
    [string] $domainFqdn
}
function New-AzureNativeTypeSqlvirtualmachineWsfcDomainProfile
{
    param (
        [parameter(mandatory=$False,HelpMessage='Optional path for fileshare witness.)')]
        [string]
        $fileShareWitnessPath,
        [parameter(mandatory=$False,HelpMessage='Account name under which SQL service will run on all participating SQL virtual machines in the cluster.)')]
        [string]
        $sqlServiceAccount,
        [parameter(mandatory=$False,HelpMessage='Primary key of the witness storage account.)')]
        [string]
        $storageAccountPrimaryKey,
        [parameter(mandatory=$False,HelpMessage='Account name used for creating cluster (at minimum needs permissions to ''Create Computer Objects'' in domain).)')]
        [string]
        $clusterBootstrapAccount,
        [parameter(mandatory=$False,HelpMessage='Fully qualified ARM resource id of the witness storage account.)')]
        [string]
        $storageAccountUrl,
        [parameter(mandatory=$False,HelpMessage='Account name used for operating cluster i.e. will be part of administrators group on all the participating virtual machines in the cluster.)')]
        [string]
        $clusterOperatorAccount,
        [parameter(mandatory=$False,HelpMessage='Organizational Unit path in which the nodes and cluster will be present.)')]
        [string]
        $ouPath,
        [parameter(mandatory=$False,HelpMessage='Fully qualified name of the domain.)')]
        [string]
        $domainFqdn
    )

    process
    {
        return $([WsfcDomainProfile]$PSBoundParameters)
    }
}
function New-AzureNativeSqlvirtualmachineSqlVirtualMachineGroup
{
    [Alias('azure_native_sqlvirtualmachine_sqlvirtualmachinegroup')]
    param (
        [parameter(mandatory=$False,HelpMessage='Cluster Active Directory domain profile.)')]
        [WsfcDomainProfile]
        $wsfcDomainProfile,
        [parameter(mandatory=$False,HelpMessage='Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.)')]
        [string]
        $resourceGroupName,
        [parameter(mandatory=$False,HelpMessage='Resource location.)')]
        [string]
        $location,
        [parameter(mandatory=$False,HelpMessage='Name of the SQL virtual machine group.)')]
        [string]
        $sqlVirtualMachineGroupName,
        [parameter(mandatory=$False,HelpMessage='SQL image offer. Examples may include SQL2016-WS2016, SQL2017-WS2016.)')]
        [string]
        $sqlImageOffer,
        [parameter(mandatory=$False,HelpMessage='Resource tags.)')]
        [hashtable]
        $tags,
        [parameter(mandatory=$False,HelpMessage='SQL image sku.)')]
        [string]
        [ArgumentCompletions('Developer', 'Enterprise')]
        $sqlImageSku,
        [parameter(mandatory,HelpMessage='The reference to call when you want to make a dependency to another resource')]
        [string]
        $pulumiid,
        [parameter(HelpMessage='Specifies a list of named output properties that should be treated as secrets, which means they will be encrypted. It augments the list of values that Pulumi detects, based on secret inputs to the resource.')]
        [string[]]
        $PulumiSecretOutputs,
        [parameter(HelpMessage='The aliases parameter provides a list of aliases for a resource or component resource. If youre changing the name, type, or parent path of a resource or component resource, you can add the old name to the list of aliases for a resource to ensure that existing resources will be migrated to the new name instead of being deleted and replaced with the new named resource.')]
        [string[]]
        $PulumiAliases,
        [parameter(HelpMessage='The customTimeouts parameter provides a set of custom timeouts for create, update, and delete operations on a resource. These timeouts are specified using a duration string such as 5m (5 minutes), 40s (40 seconds), or 1d (1 day). Supported duration units are ns, us (or µs), ms, s, m, and h (nanoseconds, microseconds, milliseconds, seconds, minutes, and hours, respectively).')]
        [pulumicustomtimeouts]
        $PulumiCustomTimeouts,
        [parameter(HelpMessage='Setting the PulumiDeleteBeforeReplace parameter to true means that Pulumi will delete the existing resource before creating its replacement. Be aware that this behavior has a cascading impact on dependencies so more resources may be replaced, which can lead to downtime. However, this option may be necessary for some resources that manage scarce resources behind the scenes, and/or resources that cannot exist side-by-side.')]
        [bool]
        $PulumiDeleteBeforeReplace,
        [parameter(HelpMessage='Creates a list of explicit dependencies between resources.The DependsOn parameter ensures that resource creation, update, and deletion operations are done in the correct order.')]
        [object[]]
        $PulumiDependsOn,
        [parameter(HelpMessage='Specifies a list of properties that Pulumi will ignore when it updates existing resources. Any properties specified in this list that are also specified in the resources arguments will only be used when creating the resource.')]
        [string[]]
        $PulumiIgnoreChanges,
        [parameter(HelpMessage='Imports an existing cloud resource so that Pulumi can manage it. To import a resource, first specify the PulumiImport parameter with the resources ID')]
        [string]
        $PulumiImport = [NullString]::Value,
        [parameter(HelpMessage='Specifies a parent for a resource. It is used to associate children with the parents that encapsulate or are responsible for them.')]
        [object]
        $PulumiParent = [NullString]::Value,
        [parameter(HelpMessage='Marks a resource as protected. A protected resource cannot be deleted directly, and it will be an error to do a Pulumi deployment which tries to delete a protected resource for any reason.')]
        [bool]
        $PulumiProtect,
        [parameter(HelpMessage='Sets a provider for the resource. The default is to inherit this value from the parent resource, and to use the ambient provider specified by Pulumi configuration for resources without a parent.')]
        [object]
        $PulumiProvider = [NullString]::Value,
        [parameter(HelpMessage='Sets a list of providers for the resource and its children. This list is combined with resource parents providers lists. If no value is provided, the providers list is identical to the parent. When determining which provider to use for a resource, the providers list is used if provider is not supplied.')]
        [object[]]
        $PulumiProviders,
        [parameter(HelpMessage='Used to indicate that changes to certain properties on a resource should force a replacement of the resource instead of an in-place update. Typically users rely on the resource provider to make this decision based on whether the input property is one that the provider knows how to update in place, or if not, requires a replacement to modify. However, there are cases where users want to replace a resource on a change to an input property even if the resource provider itself doesnt believe it has to replace the resource.')]
        [string[]]
        $PulumiReplaceOnChanges,
        [parameter(HelpMessage='Marks a resource to be retained. If this option is set then Pulumi will not call through to the resource providers Delete method when deleting or replacing the resource during pulumi up or pulumi destroy. As a result, the resource will not be deleted from the backing cloud provider, but will be removed from the Pulumi state.')]
        [bool]
        $PulumiRetainOnDelete,
        [parameter(HelpMessage='Specifies a provider version to use when operating on a resource. This version overrides the version information inferred from the current package. This option should be used rarely.')]
        [string]
        $PulumiProviderVersion = [NullString]::Value
    )

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

        $resource.options.additionalSecretOutputs = $PulumiSecretOutputs
        $resource.options.aliases = $PulumiAliases
        $resource.options.customTimeouts = $PulumiCustomTimeouts
        $resource.options.deleteBeforeReplace = $PulumiDeleteBeforeReplace
        $resource.options.ignoreChanges = $PulumiIgnoreChanges
        $resource.options.import = if([string]::IsNullOrEmpty($PulumiImport)) { [NullString]::Value } else { $PulumiImport }
        $resource.options.protect = $PulumiProtect
        $resource.options.replaceOnChanges = $PulumiReplaceOnChanges
        $resource.options.retainOnDelete = $PulumiRetainOnDelete
        $resource.options.version = if([string]::IsNullOrEmpty($PulumiProviderVersion)) { [NullString]::Value } else { $PulumiProviderVersion }

        foreach($Dependency in $DependsOn)
        {
            if($Dependency -is [pulumiresource])
            {
                $resource.options.dependson += $Dependency.Reference()
            } else
            {
                $resource.options.dependson += $Dependency
            }
        }
        if($PulumiParent -is [pulumiresource])
        {
            $resource.options.parent = $PulumiParent.Reference()
        } else
        {
            $resource.options.parent = $PulumiParent
        }
        foreach($provider in $PulumiProviders)
        {
            if($provider -is [pulumiprovider])
            {
                $resource.options.providers += $provider.Reference()
            } else
            {
                $resource.options.providers += $provider
            }
        }
        if($PulumiProvider -is [pulumiprovider])
        {
            $resource.options.provider = $PulumiProvider.Reference()
        } else
        {
            $resource.options.provider = $PulumiProvider
        }
        $resource.properties["resourceGroupName"] = $resourceGroupName

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

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

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

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

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeSqlvirtualmachineAvailabilityGroupListener
{
    [Alias('azure_native_sqlvirtualmachine_availabilitygrouplistener')]
    param (
        [parameter(mandatory=$False,HelpMessage='Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.)')]
        [string]
        $resourceGroupName,
        [parameter(mandatory=$False,HelpMessage='Name of the availability group.)')]
        [string]
        $availabilityGroupName,
        [parameter(mandatory=$False,HelpMessage='Create a default availability group if it does not exist.)')]
        [bool]
        $createDefaultAvailabilityGroupIfNotExist,
        [parameter(mandatory=$False,HelpMessage='Name of the availability group listener.)')]
        [string]
        $availabilityGroupListenerName,
        [parameter(mandatory=$False,HelpMessage='Name of the SQL virtual machine group.)')]
        [string]
        $sqlVirtualMachineGroupName,
        [parameter(mandatory=$False,HelpMessage='List of load balancer configurations for an availability group listener.)')]
        $loadBalancerConfigurations,
        [parameter(mandatory=$False,HelpMessage='Listener port.)')]
        [int]
        $port,
        [parameter(mandatory,HelpMessage='The reference to call when you want to make a dependency to another resource')]
        [string]
        $pulumiid,
        [parameter(HelpMessage='Specifies a list of named output properties that should be treated as secrets, which means they will be encrypted. It augments the list of values that Pulumi detects, based on secret inputs to the resource.')]
        [string[]]
        $PulumiSecretOutputs,
        [parameter(HelpMessage='The aliases parameter provides a list of aliases for a resource or component resource. If youre changing the name, type, or parent path of a resource or component resource, you can add the old name to the list of aliases for a resource to ensure that existing resources will be migrated to the new name instead of being deleted and replaced with the new named resource.')]
        [string[]]
        $PulumiAliases,
        [parameter(HelpMessage='The customTimeouts parameter provides a set of custom timeouts for create, update, and delete operations on a resource. These timeouts are specified using a duration string such as 5m (5 minutes), 40s (40 seconds), or 1d (1 day). Supported duration units are ns, us (or µs), ms, s, m, and h (nanoseconds, microseconds, milliseconds, seconds, minutes, and hours, respectively).')]
        [pulumicustomtimeouts]
        $PulumiCustomTimeouts,
        [parameter(HelpMessage='Setting the PulumiDeleteBeforeReplace parameter to true means that Pulumi will delete the existing resource before creating its replacement. Be aware that this behavior has a cascading impact on dependencies so more resources may be replaced, which can lead to downtime. However, this option may be necessary for some resources that manage scarce resources behind the scenes, and/or resources that cannot exist side-by-side.')]
        [bool]
        $PulumiDeleteBeforeReplace,
        [parameter(HelpMessage='Creates a list of explicit dependencies between resources.The DependsOn parameter ensures that resource creation, update, and deletion operations are done in the correct order.')]
        [object[]]
        $PulumiDependsOn,
        [parameter(HelpMessage='Specifies a list of properties that Pulumi will ignore when it updates existing resources. Any properties specified in this list that are also specified in the resources arguments will only be used when creating the resource.')]
        [string[]]
        $PulumiIgnoreChanges,
        [parameter(HelpMessage='Imports an existing cloud resource so that Pulumi can manage it. To import a resource, first specify the PulumiImport parameter with the resources ID')]
        [string]
        $PulumiImport = [NullString]::Value,
        [parameter(HelpMessage='Specifies a parent for a resource. It is used to associate children with the parents that encapsulate or are responsible for them.')]
        [object]
        $PulumiParent = [NullString]::Value,
        [parameter(HelpMessage='Marks a resource as protected. A protected resource cannot be deleted directly, and it will be an error to do a Pulumi deployment which tries to delete a protected resource for any reason.')]
        [bool]
        $PulumiProtect,
        [parameter(HelpMessage='Sets a provider for the resource. The default is to inherit this value from the parent resource, and to use the ambient provider specified by Pulumi configuration for resources without a parent.')]
        [object]
        $PulumiProvider = [NullString]::Value,
        [parameter(HelpMessage='Sets a list of providers for the resource and its children. This list is combined with resource parents providers lists. If no value is provided, the providers list is identical to the parent. When determining which provider to use for a resource, the providers list is used if provider is not supplied.')]
        [object[]]
        $PulumiProviders,
        [parameter(HelpMessage='Used to indicate that changes to certain properties on a resource should force a replacement of the resource instead of an in-place update. Typically users rely on the resource provider to make this decision based on whether the input property is one that the provider knows how to update in place, or if not, requires a replacement to modify. However, there are cases where users want to replace a resource on a change to an input property even if the resource provider itself doesnt believe it has to replace the resource.')]
        [string[]]
        $PulumiReplaceOnChanges,
        [parameter(HelpMessage='Marks a resource to be retained. If this option is set then Pulumi will not call through to the resource providers Delete method when deleting or replacing the resource during pulumi up or pulumi destroy. As a result, the resource will not be deleted from the backing cloud provider, but will be removed from the Pulumi state.')]
        [bool]
        $PulumiRetainOnDelete,
        [parameter(HelpMessage='Specifies a provider version to use when operating on a resource. This version overrides the version information inferred from the current package. This option should be used rarely.')]
        [string]
        $PulumiProviderVersion = [NullString]::Value
    )

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

        $resource.options.additionalSecretOutputs = $PulumiSecretOutputs
        $resource.options.aliases = $PulumiAliases
        $resource.options.customTimeouts = $PulumiCustomTimeouts
        $resource.options.deleteBeforeReplace = $PulumiDeleteBeforeReplace
        $resource.options.ignoreChanges = $PulumiIgnoreChanges
        $resource.options.import = if([string]::IsNullOrEmpty($PulumiImport)) { [NullString]::Value } else { $PulumiImport }
        $resource.options.protect = $PulumiProtect
        $resource.options.replaceOnChanges = $PulumiReplaceOnChanges
        $resource.options.retainOnDelete = $PulumiRetainOnDelete
        $resource.options.version = if([string]::IsNullOrEmpty($PulumiProviderVersion)) { [NullString]::Value } else { $PulumiProviderVersion }

        foreach($Dependency in $DependsOn)
        {
            if($Dependency -is [pulumiresource])
            {
                $resource.options.dependson += $Dependency.Reference()
            } else
            {
                $resource.options.dependson += $Dependency
            }
        }
        if($PulumiParent -is [pulumiresource])
        {
            $resource.options.parent = $PulumiParent.Reference()
        } else
        {
            $resource.options.parent = $PulumiParent
        }
        foreach($provider in $PulumiProviders)
        {
            if($provider -is [pulumiprovider])
            {
                $resource.options.providers += $provider.Reference()
            } else
            {
                $resource.options.providers += $provider
            }
        }
        if($PulumiProvider -is [pulumiprovider])
        {
            $resource.options.provider = $PulumiProvider.Reference()
        } else
        {
            $resource.options.provider = $PulumiProvider
        }
        $resource.properties["resourceGroupName"] = $resourceGroupName
        $resource.properties["sqlVirtualMachineGroupName"] = $sqlVirtualMachineGroupName

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

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

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

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

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

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