pspulumiyaml.azurenative.sqlvirtualmachine.psm1

using module pspulumiyaml
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
    }
}
function Invoke-AzureNativeFunctionSqlvirtualmachineGetAvailabilityGroupListener
{
    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,
        [parameter(mandatory=$False,HelpMessage='Name of the availability group listener.)')]
        [string]
        $availabilityGroupListenerName
    )

    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
    }
}
class WsfcDomainProfile
{
    [string] $clusterOperatorAccount
    [string] $domainFqdn
    [string] $clusterBootstrapAccount
    [string] $sqlServiceAccount
    [string] $storageAccountPrimaryKey
    [string] $ouPath
    [string] $storageAccountUrl
    [string] $fileShareWitnessPath
}
function New-AzureNativeTypeSqlvirtualmachineWsfcDomainProfile
{
    param (
        [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='Fully qualified name of the domain.)')]
        [string]
        $domainFqdn,
        [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='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='Organizational Unit path in which the nodes and cluster will be present.)')]
        [string]
        $ouPath,
        [parameter(mandatory=$False,HelpMessage='Fully qualified ARM resource id of the witness storage account.)')]
        [string]
        $storageAccountUrl,
        [parameter(mandatory=$False,HelpMessage='Optional path for fileshare witness.)')]
        [string]
        $fileShareWitnessPath
    )

    process
    {
        return $([WsfcDomainProfile]$PSBoundParameters)
    }
}
function New-AzureNativeSqlvirtualmachineSqlVirtualMachineGroup
{
    [Alias('azure_native_sqlvirtualmachine_sqlvirtualmachinegroup')]
    param (
        [parameter(mandatory=$False,HelpMessage='Resource tags.)')]
        [hashtable]
        $tags,
        [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='Cluster Active Directory domain profile.)')]
        [WsfcDomainProfile]
        $wsfcDomainProfile,
        [parameter(mandatory=$False,HelpMessage='SQL image sku.)')]
        [string]
        [ValidateSet('Developer', 'Enterprise')]
        $sqlImageSku,
        [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 location.)')]
        [string]
        $location,
        [parameter(mandatory,HelpMessage='The reference to call when you want to make a dependency to another resource')]
        [string]
        $pulumiid
    )

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

        $resource.properties["resourceGroupName"] = $resourceGroupName

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

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

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

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

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

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

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

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

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

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

    process
    {
        return $([ServerConfigurationsManagementSettings]$PSBoundParameters)
    }
}
class SQLStorageSettings
{
    [int[]] $luns
    [string] $defaultFilePath
}
function New-AzureNativeTypeSqlvirtualmachineSQLStorageSettings
{
    param (
        [parameter(mandatory=$False,HelpMessage='Logical Unit Numbers for the disks.)')]
        [int[]]
        $luns,
        [parameter(mandatory=$False,HelpMessage='SQL Server default file path)')]
        [string]
        $defaultFilePath
    )

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

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

    process
    {
        return $([KeyVaultCredentialSettings]$PSBoundParameters)
    }
}
class AutoBackupSettings
{
    [string] $storageAccessKey
    [string] $password
    [int] $fullBackupWindowHours
    [bool] $backupSystemDbs
    [int] $retentionPeriod
    [int] $fullBackupStartTime
    [string] $storageAccountUrl
    [int] $logBackupFrequency
    [bool] $enable
    [ValidateSet('Manual', 'Automated')]
    [string] $backupScheduleType
    [ValidateSet('Manual', 'Automated')]
    [bool] $enableEncryption
    [ValidateSet('Daily', 'Weekly')]
    [string] $fullBackupFrequency
}
function New-AzureNativeTypeSqlvirtualmachineAutoBackupSettings
{
    param (
        [parameter(mandatory=$False,HelpMessage='Storage account key where backup will be taken to.)')]
        [string]
        $storageAccessKey,
        [parameter(mandatory=$False,HelpMessage='Password for encryption on backup.)')]
        [string]
        $password,
        [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='Include or exclude system databases from auto backup.)')]
        [bool]
        $backupSystemDbs,
        [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='Storage account url where backup will be taken to.)')]
        [string]
        $storageAccountUrl,
        [parameter(mandatory=$False,HelpMessage='Frequency of log backups. 5-60 minutes.)')]
        [int]
        $logBackupFrequency,
        [parameter(mandatory=$False,HelpMessage='Enable or disable autobackup on SQL virtual machine.)')]
        [bool]
        $enable,
        [parameter(mandatory=$False,HelpMessage='Backup schedule type.)')]
        [string]
        [ValidateSet('Manual', 'Automated')]
        $backupScheduleType,
        [parameter(mandatory=$False,HelpMessage='Enable or disable encryption for backup on SQL virtual machine.)')]
        [bool]
        $enableEncryption,
        [parameter(mandatory=$False,HelpMessage='Frequency of full backups. In both cases, full backups begin during the next scheduled time window.)')]
        [string]
        [ValidateSet('Daily', 'Weekly')]
        $fullBackupFrequency
    )

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

    process
    {
        return $([AutoPatchingSettings]$PSBoundParameters)
    }
}
class ResourceIdentity
{
    [ValidateSet('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]
        [ValidateSet('SystemAssigned')]
        $type
    )

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

    process
    {
        return $([WsfcDomainCredentials]$PSBoundParameters)
    }
}
function New-AzureNativeSqlvirtualmachineSqlVirtualMachine
{
    [Alias('azure_native_sqlvirtualmachine_sqlvirtualmachine')]
    param (
        [parameter(mandatory=$False,HelpMessage='Name of the SQL virtual machine.)')]
        [string]
        $sqlVirtualMachineName,
        [parameter(mandatory=$False,HelpMessage='SQL Server configuration management settings.)')]
        [ServerConfigurationsManagementSettings]
        $serverConfigurationsManagementSettings,
        [parameter(mandatory=$False,HelpMessage='SQL Server edition type.)')]
        [string]
        [ValidateSet('Developer', 'Express', 'Standard', 'Enterprise', 'Web')]
        $sqlImageSku,
        [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='Storage Configuration Settings.)')]
        [StorageConfigurationSettings]
        $storageConfigurationSettings,
        [parameter(mandatory=$False,HelpMessage='Key vault credential settings.)')]
        [KeyVaultCredentialSettings]
        $keyVaultCredentialSettings,
        [parameter(mandatory=$False,HelpMessage='Resource location.)')]
        [string]
        $location,
        [parameter(mandatory=$False,HelpMessage='ARM Resource id of underlying virtual machine created from SQL marketplace image.)')]
        [string]
        $virtualMachineResourceId,
        [parameter(mandatory=$False,HelpMessage='SQL image offer. Examples include SQL2016-WS2016, SQL2017-WS2016.)')]
        [string]
        $sqlImageOffer,
        [parameter(mandatory=$False,HelpMessage='Resource tags.)')]
        [hashtable]
        $tags,
        [parameter(mandatory=$False,HelpMessage='Auto backup settings for SQL Server.)')]
        [AutoBackupSettings]
        $autoBackupSettings,
        [parameter(mandatory=$False,HelpMessage='SQL Server license type.)')]
        [string]
        [ValidateSet('PAYG', 'AHUB', 'DR')]
        $sqlServerLicenseType,
        [parameter(mandatory=$False,HelpMessage='Auto patching settings for applying critical security updates to SQL virtual machine.)')]
        [AutoPatchingSettings]
        $autoPatchingSettings,
        [parameter(mandatory=$False,HelpMessage='SQL Server Management type.)')]
        [string]
        [ValidateSet('Full', 'LightWeight', 'NoAgent')]
        $sqlManagement,
        [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='Azure Active Directory identity of the server.)')]
        [ResourceIdentity]
        $identity,
        [parameter(mandatory=$False,HelpMessage='Domain credentials for setting up Windows Server Failover Cluster for SQL availability group.)')]
        [WsfcDomainCredentials]
        $wsfcDomainCredentials,
        [parameter(mandatory,HelpMessage='The reference to call when you want to make a dependency to another resource')]
        [string]
        $pulumiid
    )

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

        $resource.properties["resourceGroupName"] = $resourceGroupName

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeSqlvirtualmachineAvailabilityGroupListener
{
    [Alias('azure_native_sqlvirtualmachine_availabilitygrouplistener')]
    param (
        [parameter(mandatory=$False,HelpMessage='List of load balancer configurations for an availability group listener.)')]
        $loadBalancerConfigurations,
        [parameter(mandatory=$False,HelpMessage='Name of the SQL virtual machine group.)')]
        [string]
        $sqlVirtualMachineGroupName,
        [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='Create a default availability group if it does not exist.)')]
        [bool]
        $createDefaultAvailabilityGroupIfNotExist,
        [parameter(mandatory=$False,HelpMessage='Listener port.)')]
        [int]
        $port,
        [parameter(mandatory=$False,HelpMessage='Name of the availability group listener.)')]
        [string]
        $availabilityGroupListenerName,
        [parameter(mandatory=$False,HelpMessage='Name of the availability group.)')]
        [string]
        $availabilityGroupName,
        [parameter(mandatory,HelpMessage='The reference to call when you want to make a dependency to another resource')]
        [string]
        $pulumiid
    )

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

        $resource.properties["resourceGroupName"] = $resourceGroupName
        $resource.properties["sqlVirtualMachineGroupName"] = $sqlVirtualMachineGroupName

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

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

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

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

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

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