pspulumiyaml.azurenative.sql.psm1

using module pspulumiyaml
function Invoke-AzureNativeFunctionSqlGetWorkloadGroup
{
    param (
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the database.)')]
        [string]
        $databaseName,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName,
        [parameter(mandatory=$False,HelpMessage='The name of the workload group.)')]
        [string]
        $workloadGroupName
    )

    process
    {
        $arguments = @{}
        $arguments["databaseName"] = $databaseName
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["serverName"] = $serverName
        $arguments["workloadGroupName"] = $workloadGroupName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getWorkloadGroup -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetDatabase
{
    param (
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the database.)')]
        [string]
        $databaseName,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName
    )

    process
    {
        $arguments = @{}
        $arguments["databaseName"] = $databaseName
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["serverName"] = $serverName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getDatabase -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetManagedDatabaseVulnerabilityAssessment
{
    param (
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the managed instance.)')]
        [string]
        $managedInstanceName,
        [parameter(mandatory=$False,HelpMessage='The name of the database for which the vulnerability assessment is defined.)')]
        [string]
        $databaseName,
        [parameter(mandatory=$False,HelpMessage='The name of the vulnerability assessment.)')]
        [string]
        $vulnerabilityAssessmentName
    )

    process
    {
        $arguments = @{}
        $arguments["databaseName"] = $databaseName
        $arguments["managedInstanceName"] = $managedInstanceName
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["vulnerabilityAssessmentName"] = $vulnerabilityAssessmentName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getManagedDatabaseVulnerabilityAssessment -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetServerCommunicationLink
{
    param (
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the server communication link.)')]
        [string]
        $communicationLinkName,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName
    )

    process
    {
        $arguments = @{}
        $arguments["communicationLinkName"] = $communicationLinkName
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["serverName"] = $serverName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getServerCommunicationLink -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetJobTargetGroup
{
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the target group.)')]
        [string]
        $targetGroupName,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName,
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the job agent.)')]
        [string]
        $jobAgentName
    )

    process
    {
        $arguments = @{}
        $arguments["jobAgentName"] = $jobAgentName
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["serverName"] = $serverName
        $arguments["targetGroupName"] = $targetGroupName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getJobTargetGroup -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetServerTrustGroup
{
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the server trust group.)')]
        [string]
        $serverTrustGroupName,
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the region where the resource is located.)')]
        [string]
        $locationName
    )

    process
    {
        $arguments = @{}
        $arguments["locationName"] = $locationName
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["serverTrustGroupName"] = $serverTrustGroupName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getServerTrustGroup -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetOutboundFirewallRule
{
    param (
        [parameter(mandatory=$False,HelpMessage=')')]
        [string]
        $outboundRuleFqdn,
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the server.)')]
        [string]
        $serverName
    )

    process
    {
        $arguments = @{}
        $arguments["outboundRuleFqdn"] = $outboundRuleFqdn
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["serverName"] = $serverName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getOutboundFirewallRule -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetFirewallRule
{
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the firewall rule.)')]
        [string]
        $firewallRuleName,
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the server.)')]
        [string]
        $serverName
    )

    process
    {
        $arguments = @{}
        $arguments["firewallRuleName"] = $firewallRuleName
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["serverName"] = $serverName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getFirewallRule -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetIPv6FirewallRule
{
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the firewall rule.)')]
        [string]
        $firewallRuleName,
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the server.)')]
        [string]
        $serverName
    )

    process
    {
        $arguments = @{}
        $arguments["firewallRuleName"] = $firewallRuleName
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["serverName"] = $serverName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getIPv6FirewallRule -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetManagedInstancePrivateEndpointConnection
{
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the managed instance.)')]
        [string]
        $managedInstanceName,
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the private endpoint connection.)')]
        [string]
        $privateEndpointConnectionName
    )

    process
    {
        $arguments = @{}
        $arguments["managedInstanceName"] = $managedInstanceName
        $arguments["privateEndpointConnectionName"] = $privateEndpointConnectionName
        $arguments["resourceGroupName"] = $resourceGroupName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getManagedInstancePrivateEndpointConnection -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetServerAzureADOnlyAuthentication
{
    param (
        [parameter(mandatory=$False,HelpMessage='The 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='The name of server azure active directory only authentication.)')]
        [string]
        $authenticationName,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName
    )

    process
    {
        $arguments = @{}
        $arguments["authenticationName"] = $authenticationName
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["serverName"] = $serverName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getServerAzureADOnlyAuthentication -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetSyncAgent
{
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the sync agent.)')]
        [string]
        $syncAgentName,
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the server on which the sync agent is hosted.)')]
        [string]
        $serverName
    )

    process
    {
        $arguments = @{}
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["serverName"] = $serverName
        $arguments["syncAgentName"] = $syncAgentName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getSyncAgent -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetManagedInstanceKey
{
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the managed instance.)')]
        [string]
        $managedInstanceName,
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the managed instance key to be retrieved.)')]
        [string]
        $keyName
    )

    process
    {
        $arguments = @{}
        $arguments["keyName"] = $keyName
        $arguments["managedInstanceName"] = $managedInstanceName
        $arguments["resourceGroupName"] = $resourceGroupName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getManagedInstanceKey -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetManagedDatabaseVulnerabilityAssessmentRuleBaseline
{
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the database for which the vulnerability assessment rule baseline is defined.)')]
        [string]
        $databaseName,
        [parameter(mandatory=$False,HelpMessage='The name of the managed instance.)')]
        [string]
        $managedInstanceName,
        [parameter(mandatory=$False,HelpMessage='The 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='The vulnerability assessment rule ID.)')]
        [string]
        $ruleId,
        [parameter(mandatory=$False,HelpMessage='The name of the vulnerability assessment.)')]
        [string]
        $vulnerabilityAssessmentName,
        [parameter(mandatory=$False,HelpMessage='The name of the vulnerability assessment rule baseline (default implies a baseline on a database level rule and master for server level rule).)')]
        [string]
        $baselineName
    )

    process
    {
        $arguments = @{}
        $arguments["baselineName"] = $baselineName
        $arguments["databaseName"] = $databaseName
        $arguments["managedInstanceName"] = $managedInstanceName
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["ruleId"] = $ruleId
        $arguments["vulnerabilityAssessmentName"] = $vulnerabilityAssessmentName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getManagedDatabaseVulnerabilityAssessmentRuleBaseline -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetEncryptionProtector
{
    param (
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the encryption protector to be retrieved.)')]
        [string]
        $encryptionProtectorName,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName
    )

    process
    {
        $arguments = @{}
        $arguments["encryptionProtectorName"] = $encryptionProtectorName
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["serverName"] = $serverName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getEncryptionProtector -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetManagedInstanceAdministrator
{
    param (
        [parameter(mandatory=$False,HelpMessage=')')]
        [string]
        $administratorName,
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the managed instance.)')]
        [string]
        $managedInstanceName
    )

    process
    {
        $arguments = @{}
        $arguments["administratorName"] = $administratorName
        $arguments["managedInstanceName"] = $managedInstanceName
        $arguments["resourceGroupName"] = $resourceGroupName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getManagedInstanceAdministrator -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetManagedDatabaseSensitivityLabel
{
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the table.)')]
        [string]
        $tableName,
        [parameter(mandatory=$False,HelpMessage='The name of the database.)')]
        [string]
        $databaseName,
        [parameter(mandatory=$False,HelpMessage='The name of the column.)')]
        [string]
        $columnName,
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the managed instance.)')]
        [string]
        $managedInstanceName,
        [parameter(mandatory=$False,HelpMessage='The name of the schema.)')]
        [string]
        $schemaName,
        [parameter(mandatory=$False,HelpMessage='The source of the sensitivity label.)')]
        [string]
        $sensitivityLabelSource
    )

    process
    {
        $arguments = @{}
        $arguments["columnName"] = $columnName
        $arguments["databaseName"] = $databaseName
        $arguments["managedInstanceName"] = $managedInstanceName
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["schemaName"] = $schemaName
        $arguments["sensitivityLabelSource"] = $sensitivityLabelSource
        $arguments["tableName"] = $tableName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getManagedDatabaseSensitivityLabel -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetSyncMember
{
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the sync member.)')]
        [string]
        $syncMemberName,
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the database on which the sync group is hosted.)')]
        [string]
        $databaseName,
        [parameter(mandatory=$False,HelpMessage='The name of the sync group on which the sync member is hosted.)')]
        [string]
        $syncGroupName,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName
    )

    process
    {
        $arguments = @{}
        $arguments["databaseName"] = $databaseName
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["serverName"] = $serverName
        $arguments["syncGroupName"] = $syncGroupName
        $arguments["syncMemberName"] = $syncMemberName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getSyncMember -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetSensitivityLabel
{
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName,
        [parameter(mandatory=$False,HelpMessage='The name of the database.)')]
        [string]
        $databaseName,
        [parameter(mandatory=$False,HelpMessage='The name of the column.)')]
        [string]
        $columnName,
        [parameter(mandatory=$False,HelpMessage='The 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='The source of the sensitivity label.)')]
        [string]
        $sensitivityLabelSource,
        [parameter(mandatory=$False,HelpMessage='The name of the schema.)')]
        [string]
        $schemaName,
        [parameter(mandatory=$False,HelpMessage='The name of the table.)')]
        [string]
        $tableName
    )

    process
    {
        $arguments = @{}
        $arguments["columnName"] = $columnName
        $arguments["databaseName"] = $databaseName
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["schemaName"] = $schemaName
        $arguments["sensitivityLabelSource"] = $sensitivityLabelSource
        $arguments["serverName"] = $serverName
        $arguments["tableName"] = $tableName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getSensitivityLabel -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetServerSecurityAlertPolicy
{
    param (
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the security alert policy.)')]
        [string]
        $securityAlertPolicyName,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName
    )

    process
    {
        $arguments = @{}
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["securityAlertPolicyName"] = $securityAlertPolicyName
        $arguments["serverName"] = $serverName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getServerSecurityAlertPolicy -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetLongTermRetentionPolicy
{
    param (
        [parameter(mandatory=$False,HelpMessage='The policy name. Should always be Default.)')]
        [string]
        $policyName,
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the database.)')]
        [string]
        $databaseName,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName
    )

    process
    {
        $arguments = @{}
        $arguments["databaseName"] = $databaseName
        $arguments["policyName"] = $policyName
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["serverName"] = $serverName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getLongTermRetentionPolicy -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetSyncGroup
{
    param (
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the database on which the sync group is hosted.)')]
        [string]
        $databaseName,
        [parameter(mandatory=$False,HelpMessage='The name of the sync group.)')]
        [string]
        $syncGroupName,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName
    )

    process
    {
        $arguments = @{}
        $arguments["databaseName"] = $databaseName
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["serverName"] = $serverName
        $arguments["syncGroupName"] = $syncGroupName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getSyncGroup -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetVirtualNetworkRule
{
    param (
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the server.)')]
        [string]
        $serverName,
        [parameter(mandatory=$False,HelpMessage='The name of the virtual network rule.)')]
        [string]
        $virtualNetworkRuleName
    )

    process
    {
        $arguments = @{}
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["serverName"] = $serverName
        $arguments["virtualNetworkRuleName"] = $virtualNetworkRuleName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getVirtualNetworkRule -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetDisasterRecoveryConfiguration
{
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName,
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the disaster recovery configuration.)')]
        [string]
        $disasterRecoveryConfigurationName
    )

    process
    {
        $arguments = @{}
        $arguments["disasterRecoveryConfigurationName"] = $disasterRecoveryConfigurationName
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["serverName"] = $serverName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getDisasterRecoveryConfiguration -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetExtendedServerBlobAuditingPolicy
{
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the blob auditing policy.)')]
        [string]
        $blobAuditingPolicyName,
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the server.)')]
        [string]
        $serverName
    )

    process
    {
        $arguments = @{}
        $arguments["blobAuditingPolicyName"] = $blobAuditingPolicyName
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["serverName"] = $serverName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getExtendedServerBlobAuditingPolicy -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetPrivateEndpointConnection
{
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the private endpoint connection.)')]
        [string]
        $privateEndpointConnectionName,
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the server.)')]
        [string]
        $serverName
    )

    process
    {
        $arguments = @{}
        $arguments["privateEndpointConnectionName"] = $privateEndpointConnectionName
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["serverName"] = $serverName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getPrivateEndpointConnection -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetWorkloadClassifier
{
    param (
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the database.)')]
        [string]
        $databaseName,
        [parameter(mandatory=$False,HelpMessage='The name of the workload classifier.)')]
        [string]
        $workloadClassifierName,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName,
        [parameter(mandatory=$False,HelpMessage='The name of the workload group from which to receive the classifier from.)')]
        [string]
        $workloadGroupName
    )

    process
    {
        $arguments = @{}
        $arguments["databaseName"] = $databaseName
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["serverName"] = $serverName
        $arguments["workloadClassifierName"] = $workloadClassifierName
        $arguments["workloadGroupName"] = $workloadGroupName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getWorkloadClassifier -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetTransparentDataEncryption
{
    param (
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the database for which the transparent data encryption applies.)')]
        [string]
        $databaseName,
        [parameter(mandatory=$False,HelpMessage='The name of the transparent data encryption configuration.)')]
        [string]
        $transparentDataEncryptionName,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName
    )

    process
    {
        $arguments = @{}
        $arguments["databaseName"] = $databaseName
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["serverName"] = $serverName
        $arguments["transparentDataEncryptionName"] = $transparentDataEncryptionName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getTransparentDataEncryption -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetFailoverGroup
{
    param (
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the failover group.)')]
        [string]
        $failoverGroupName,
        [parameter(mandatory=$False,HelpMessage='The name of the server containing the failover group.)')]
        [string]
        $serverName
    )

    process
    {
        $arguments = @{}
        $arguments["failoverGroupName"] = $failoverGroupName
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["serverName"] = $serverName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getFailoverGroup -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetServerKey
{
    param (
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the server key to be retrieved.)')]
        [string]
        $keyName,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName
    )

    process
    {
        $arguments = @{}
        $arguments["keyName"] = $keyName
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["serverName"] = $serverName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getServerKey -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetServerVulnerabilityAssessment
{
    param (
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the vulnerability assessment.)')]
        [string]
        $vulnerabilityAssessmentName,
        [parameter(mandatory=$False,HelpMessage='The name of the server for which the vulnerability assessment is defined.)')]
        [string]
        $serverName
    )

    process
    {
        $arguments = @{}
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["serverName"] = $serverName
        $arguments["vulnerabilityAssessmentName"] = $vulnerabilityAssessmentName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getServerVulnerabilityAssessment -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetServerDnsAlias
{
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the server that the alias is pointing to.)')]
        [string]
        $serverName,
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the server dns alias.)')]
        [string]
        $dnsAliasName
    )

    process
    {
        $arguments = @{}
        $arguments["dnsAliasName"] = $dnsAliasName
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["serverName"] = $serverName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getServerDnsAlias -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetDatabaseSecurityAlertPolicy
{
    param (
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the database for which the security alert policy is defined.)')]
        [string]
        $databaseName,
        [parameter(mandatory=$False,HelpMessage='The name of the security alert policy.)')]
        [string]
        $securityAlertPolicyName,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName
    )

    process
    {
        $arguments = @{}
        $arguments["databaseName"] = $databaseName
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["securityAlertPolicyName"] = $securityAlertPolicyName
        $arguments["serverName"] = $serverName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getDatabaseSecurityAlertPolicy -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetDataMaskingPolicy
{
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the database for which the data masking rule applies.)')]
        [string]
        $dataMaskingPolicyName,
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the database.)')]
        [string]
        $databaseName,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName
    )

    process
    {
        $arguments = @{}
        $arguments["dataMaskingPolicyName"] = $dataMaskingPolicyName
        $arguments["databaseName"] = $databaseName
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["serverName"] = $serverName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getDataMaskingPolicy -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetManagedDatabase
{
    param (
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the managed instance.)')]
        [string]
        $managedInstanceName,
        [parameter(mandatory=$False,HelpMessage='The name of the database.)')]
        [string]
        $databaseName
    )

    process
    {
        $arguments = @{}
        $arguments["databaseName"] = $databaseName
        $arguments["managedInstanceName"] = $managedInstanceName
        $arguments["resourceGroupName"] = $resourceGroupName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getManagedDatabase -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetJobCredential
{
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the credential.)')]
        [string]
        $credentialName,
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the server.)')]
        [string]
        $serverName,
        [parameter(mandatory=$False,HelpMessage='The name of the job agent.)')]
        [string]
        $jobAgentName
    )

    process
    {
        $arguments = @{}
        $arguments["credentialName"] = $credentialName
        $arguments["jobAgentName"] = $jobAgentName
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["serverName"] = $serverName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getJobCredential -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetManagedInstanceAzureADOnlyAuthentication
{
    param (
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the managed instance.)')]
        [string]
        $managedInstanceName,
        [parameter(mandatory=$False,HelpMessage='The name of server azure active directory only authentication.)')]
        [string]
        $authenticationName
    )

    process
    {
        $arguments = @{}
        $arguments["authenticationName"] = $authenticationName
        $arguments["managedInstanceName"] = $managedInstanceName
        $arguments["resourceGroupName"] = $resourceGroupName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getManagedInstanceAzureADOnlyAuthentication -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetJob
{
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the job to get.)')]
        [string]
        $jobName,
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the server.)')]
        [string]
        $serverName,
        [parameter(mandatory=$False,HelpMessage='The name of the job agent.)')]
        [string]
        $jobAgentName
    )

    process
    {
        $arguments = @{}
        $arguments["jobAgentName"] = $jobAgentName
        $arguments["jobName"] = $jobName
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["serverName"] = $serverName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getJob -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetManagedInstanceVulnerabilityAssessment
{
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the managed instance for which the vulnerability assessment is defined.)')]
        [string]
        $managedInstanceName,
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the vulnerability assessment.)')]
        [string]
        $vulnerabilityAssessmentName
    )

    process
    {
        $arguments = @{}
        $arguments["managedInstanceName"] = $managedInstanceName
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["vulnerabilityAssessmentName"] = $vulnerabilityAssessmentName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getManagedInstanceVulnerabilityAssessment -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetBackupShortTermRetentionPolicy
{
    param (
        [parameter(mandatory=$False,HelpMessage='The policy name. Should always be "default".)')]
        [string]
        $policyName,
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the database.)')]
        [string]
        $databaseName,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName
    )

    process
    {
        $arguments = @{}
        $arguments["databaseName"] = $databaseName
        $arguments["policyName"] = $policyName
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["serverName"] = $serverName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getBackupShortTermRetentionPolicy -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetExtendedDatabaseBlobAuditingPolicy
{
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the blob auditing policy.)')]
        [string]
        $blobAuditingPolicyName,
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the database.)')]
        [string]
        $databaseName,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName
    )

    process
    {
        $arguments = @{}
        $arguments["blobAuditingPolicyName"] = $blobAuditingPolicyName
        $arguments["databaseName"] = $databaseName
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["serverName"] = $serverName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getExtendedDatabaseBlobAuditingPolicy -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetManagedInstance
{
    param (
        [parameter(mandatory=$False,HelpMessage='The child resources to include in the response.)')]
        [string]
        $expand,
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the managed instance.)')]
        [string]
        $managedInstanceName
    )

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

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

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getManagedInstance -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetServerAzureADAdministrator
{
    param (
        [parameter(mandatory=$False,HelpMessage='The name of server active directory administrator.)')]
        [string]
        $administratorName,
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the server.)')]
        [string]
        $serverName
    )

    process
    {
        $arguments = @{}
        $arguments["administratorName"] = $administratorName
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["serverName"] = $serverName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getServerAzureADAdministrator -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetServerAdvisor
{
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the Server Advisor.)')]
        [string]
        $advisorName,
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the server.)')]
        [string]
        $serverName
    )

    process
    {
        $arguments = @{}
        $arguments["advisorName"] = $advisorName
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["serverName"] = $serverName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getServerAdvisor -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetJobAgent
{
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName,
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the job agent to be retrieved.)')]
        [string]
        $jobAgentName
    )

    process
    {
        $arguments = @{}
        $arguments["jobAgentName"] = $jobAgentName
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["serverName"] = $serverName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getJobAgent -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetManagedServerDnsAlias
{
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the managed instance.)')]
        [string]
        $managedInstanceName,
        [parameter(mandatory=$False,HelpMessage='The 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=')')]
        [string]
        $dnsAliasName
    )

    process
    {
        $arguments = @{}
        $arguments["dnsAliasName"] = $dnsAliasName
        $arguments["managedInstanceName"] = $managedInstanceName
        $arguments["resourceGroupName"] = $resourceGroupName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getManagedServerDnsAlias -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetDatabaseAdvisor
{
    param (
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the Database Advisor.)')]
        [string]
        $advisorName,
        [parameter(mandatory=$False,HelpMessage='The name of the database.)')]
        [string]
        $databaseName,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName
    )

    process
    {
        $arguments = @{}
        $arguments["advisorName"] = $advisorName
        $arguments["databaseName"] = $databaseName
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["serverName"] = $serverName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getDatabaseAdvisor -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetJobStep
{
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the job.)')]
        [string]
        $jobName,
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the job step.)')]
        [string]
        $stepName,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName,
        [parameter(mandatory=$False,HelpMessage='The name of the job agent.)')]
        [string]
        $jobAgentName
    )

    process
    {
        $arguments = @{}
        $arguments["jobAgentName"] = $jobAgentName
        $arguments["jobName"] = $jobName
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["serverName"] = $serverName
        $arguments["stepName"] = $stepName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getJobStep -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetServerBlobAuditingPolicy
{
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the blob auditing policy.)')]
        [string]
        $blobAuditingPolicyName,
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the server.)')]
        [string]
        $serverName
    )

    process
    {
        $arguments = @{}
        $arguments["blobAuditingPolicyName"] = $blobAuditingPolicyName
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["serverName"] = $serverName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getServerBlobAuditingPolicy -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetDistributedAvailabilityGroup
{
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the managed instance.)')]
        [string]
        $managedInstanceName,
        [parameter(mandatory=$False,HelpMessage='The 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='The distributed availability group name.)')]
        [string]
        $distributedAvailabilityGroupName
    )

    process
    {
        $arguments = @{}
        $arguments["distributedAvailabilityGroupName"] = $distributedAvailabilityGroupName
        $arguments["managedInstanceName"] = $managedInstanceName
        $arguments["resourceGroupName"] = $resourceGroupName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getDistributedAvailabilityGroup -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetDatabaseVulnerabilityAssessment
{
    param (
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the database for which the vulnerability assessment is defined.)')]
        [string]
        $databaseName,
        [parameter(mandatory=$False,HelpMessage='The name of the vulnerability assessment.)')]
        [string]
        $vulnerabilityAssessmentName,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName
    )

    process
    {
        $arguments = @{}
        $arguments["databaseName"] = $databaseName
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["serverName"] = $serverName
        $arguments["vulnerabilityAssessmentName"] = $vulnerabilityAssessmentName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getDatabaseVulnerabilityAssessment -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetDatabaseBlobAuditingPolicy
{
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the blob auditing policy.)')]
        [string]
        $blobAuditingPolicyName,
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the database.)')]
        [string]
        $databaseName,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName
    )

    process
    {
        $arguments = @{}
        $arguments["blobAuditingPolicyName"] = $blobAuditingPolicyName
        $arguments["databaseName"] = $databaseName
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["serverName"] = $serverName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getDatabaseBlobAuditingPolicy -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetServerTrustCertificate
{
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the managed instance.)')]
        [string]
        $managedInstanceName,
        [parameter(mandatory=$False,HelpMessage='The 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 of the certificate to get.)')]
        [string]
        $certificateName
    )

    process
    {
        $arguments = @{}
        $arguments["certificateName"] = $certificateName
        $arguments["managedInstanceName"] = $managedInstanceName
        $arguments["resourceGroupName"] = $resourceGroupName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getServerTrustCertificate -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetInstancePool
{
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the instance pool to be retrieved.)')]
        [string]
        $instancePoolName,
        [parameter(mandatory=$False,HelpMessage='The 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
    )

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

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getInstancePool -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetGeoBackupPolicy
{
    param (
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the database.)')]
        [string]
        $databaseName,
        [parameter(mandatory=$False,HelpMessage='The name of the geo backup policy.)')]
        [string]
        $geoBackupPolicyName,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName
    )

    process
    {
        $arguments = @{}
        $arguments["databaseName"] = $databaseName
        $arguments["geoBackupPolicyName"] = $geoBackupPolicyName
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["serverName"] = $serverName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getGeoBackupPolicy -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetElasticPool
{
    param (
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the server.)')]
        [string]
        $serverName,
        [parameter(mandatory=$False,HelpMessage='The name of the elastic pool.)')]
        [string]
        $elasticPoolName
    )

    process
    {
        $arguments = @{}
        $arguments["elasticPoolName"] = $elasticPoolName
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["serverName"] = $serverName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getElasticPool -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetInstanceFailoverGroup
{
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the region where the resource is located.)')]
        [string]
        $locationName,
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the failover group.)')]
        [string]
        $failoverGroupName
    )

    process
    {
        $arguments = @{}
        $arguments["failoverGroupName"] = $failoverGroupName
        $arguments["locationName"] = $locationName
        $arguments["resourceGroupName"] = $resourceGroupName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getInstanceFailoverGroup -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetServer
{
    param (
        [parameter(mandatory=$False,HelpMessage='The child resources to include in the response.)')]
        [string]
        $expand,
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the server.)')]
        [string]
        $serverName
    )

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

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

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getServer -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionSqlGetDatabaseVulnerabilityAssessmentRuleBaseline
{
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName,
        [parameter(mandatory=$False,HelpMessage='The name of the database for which the vulnerability assessment rule baseline is defined.)')]
        [string]
        $databaseName,
        [parameter(mandatory=$False,HelpMessage='The 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='The vulnerability assessment rule ID.)')]
        [string]
        $ruleId,
        [parameter(mandatory=$False,HelpMessage='The name of the vulnerability assessment.)')]
        [string]
        $vulnerabilityAssessmentName,
        [parameter(mandatory=$False,HelpMessage='The name of the vulnerability assessment rule baseline (default implies a baseline on a database level rule and master for server level rule).)')]
        [string]
        $baselineName
    )

    process
    {
        $arguments = @{}
        $arguments["baselineName"] = $baselineName
        $arguments["databaseName"] = $databaseName
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["ruleId"] = $ruleId
        $arguments["serverName"] = $serverName
        $arguments["vulnerabilityAssessmentName"] = $vulnerabilityAssessmentName

        $functionObject = Invoke-PulumiFunction -Name azure-native:sql:getDatabaseVulnerabilityAssessmentRuleBaseline -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function New-AzureNativeSqlServerAdvisor
{
    [Alias('azure_native_sql_serveradvisor')]
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the Server Advisor.)')]
        [string]
        $advisorName,
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the server.)')]
        [string]
        $serverName,
        [parameter(mandatory=$False,HelpMessage='Gets the auto-execute status (whether to let the system execute the recommendations) of this advisor. Possible values are ''Enabled'' and ''Disabled'')')]
        $autoExecuteStatus,
        [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:sql:ServerAdvisor")

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeSqlDatabaseVulnerabilityAssessmentRuleBaseline
{
    [Alias('azure_native_sql_databasevulnerabilityassessmentrulebaseline')]
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName,
        [parameter(mandatory=$False,HelpMessage='The name of the database for which the vulnerability assessment rule baseline is defined.)')]
        [string]
        $databaseName,
        [parameter(mandatory=$False,HelpMessage='The 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='The vulnerability assessment rule ID.)')]
        [string]
        $ruleId,
        [parameter(mandatory=$False,HelpMessage='The rule baseline result)')]
        $baselineResults,
        [parameter(mandatory=$False,HelpMessage='The name of the vulnerability assessment.)')]
        [string]
        $vulnerabilityAssessmentName,
        [parameter(mandatory=$False,HelpMessage='The name of the vulnerability assessment rule baseline (default implies a baseline on a database level rule and master for server level rule).)')]
        [string]
        $baselineName,
        [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:sql:DatabaseVulnerabilityAssessmentRuleBaseline")

        $resource.properties["baselineResults"] = $baselineResults
        $resource.properties["databaseName"] = $databaseName
        $resource.properties["resourceGroupName"] = $resourceGroupName
        $resource.properties["ruleId"] = $ruleId
        $resource.properties["serverName"] = $serverName
        $resource.properties["vulnerabilityAssessmentName"] = $vulnerabilityAssessmentName

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeSqlIPv6FirewallRule
{
    [Alias('azure_native_sql_ipv6firewallrule')]
    param (
        [parameter(mandatory=$False,HelpMessage='Resource name.)')]
        [string]
        $name,
        [parameter(mandatory=$False,HelpMessage='The 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='The start IP address of the firewall rule. Must be IPv6 format.)')]
        [string]
        $startIPv6Address,
        [parameter(mandatory=$False,HelpMessage='The name of the firewall rule.)')]
        [string]
        $firewallRuleName,
        [parameter(mandatory=$False,HelpMessage='The end IP address of the firewall rule. Must be IPv6 format. Must be greater than or equal to startIpAddress.)')]
        [string]
        $endIPv6Address,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName,
        [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:sql:IPv6FirewallRule")

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

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

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

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeSqlFirewallRule
{
    [Alias('azure_native_sql_firewallrule')]
    param (
        [parameter(mandatory=$False,HelpMessage='Resource name.)')]
        [string]
        $name,
        [parameter(mandatory=$False,HelpMessage='The start IP address of the firewall rule. Must be IPv4 format. Use value ''0.0.0.0'' for all Azure-internal IP addresses.)')]
        [string]
        $startIpAddress,
        [parameter(mandatory=$False,HelpMessage='The 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='The end IP address of the firewall rule. Must be IPv4 format. Must be greater than or equal to startIpAddress. Use value ''0.0.0.0'' for all Azure-internal IP addresses.)')]
        [string]
        $endIpAddress,
        [parameter(mandatory=$False,HelpMessage='The name of the firewall rule.)')]
        [string]
        $firewallRuleName,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName,
        [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:sql:FirewallRule")

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

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

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

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeSqlManagedInstanceAzureADOnlyAuthentication
{
    [Alias('azure_native_sql_managedinstanceazureadonlyauthentication')]
    param (
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the managed instance.)')]
        [string]
        $managedInstanceName,
        [parameter(mandatory=$False,HelpMessage='The name of server azure active directory only authentication.)')]
        [string]
        $authenticationName,
        [parameter(mandatory=$False,HelpMessage='Azure Active Directory only Authentication enabled.)')]
        [bool]
        $azureADOnlyAuthentication,
        [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:sql:ManagedInstanceAzureADOnlyAuthentication")

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeSqlDatabaseAdvisor
{
    [Alias('azure_native_sql_databaseadvisor')]
    param (
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the Database Advisor.)')]
        [string]
        $advisorName,
        [parameter(mandatory=$False,HelpMessage='The name of the database.)')]
        [string]
        $databaseName,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName,
        [parameter(mandatory=$False,HelpMessage='Gets the auto-execute status (whether to let the system execute the recommendations) of this advisor. Possible values are ''Enabled'' and ''Disabled'')')]
        $autoExecuteStatus,
        [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:sql:DatabaseAdvisor")

        $resource.properties["autoExecuteStatus"] = $autoExecuteStatus
        $resource.properties["databaseName"] = $databaseName
        $resource.properties["resourceGroupName"] = $resourceGroupName
        $resource.properties["serverName"] = $serverName

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeSqlOutboundFirewallRule
{
    [Alias('azure_native_sql_outboundfirewallrule')]
    param (
        [parameter(mandatory=$False,HelpMessage=')')]
        [string]
        $outboundRuleFqdn,
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the server.)')]
        [string]
        $serverName,
        [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:sql:OutboundFirewallRule")

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeSqlDistributedAvailabilityGroup
{
    [Alias('azure_native_sql_distributedavailabilitygroup')]
    param (
        [parameter(mandatory=$False,HelpMessage='The distributed availability group name.)')]
        [string]
        $distributedAvailabilityGroupName,
        [parameter(mandatory=$False,HelpMessage='The secondary availability group name)')]
        [string]
        $secondaryAvailabilityGroupName,
        [parameter(mandatory=$False,HelpMessage='The replication mode of a distributed availability group. Parameter will be ignored during link creation.)')]
        [string]
        [ValidateSet('Async', 'Sync')]
        $replicationMode,
        [parameter(mandatory=$False,HelpMessage='The primary availability group name)')]
        [string]
        $primaryAvailabilityGroupName,
        [parameter(mandatory=$False,HelpMessage='The source endpoint)')]
        [string]
        $sourceEndpoint,
        [parameter(mandatory=$False,HelpMessage='The name of the target database)')]
        [string]
        $targetDatabase,
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the managed instance.)')]
        [string]
        $managedInstanceName,
        [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:sql:DistributedAvailabilityGroup")

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

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

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

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

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

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeSqlDisasterRecoveryConfiguration
{
    [Alias('azure_native_sql_disasterrecoveryconfiguration')]
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName,
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the disaster recovery configuration to be created/updated.)')]
        [string]
        $disasterRecoveryConfigurationName,
        [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:sql:DisasterRecoveryConfiguration")

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeSqlManagedDatabase
{
    [Alias('azure_native_sql_manageddatabase')]
    param (
        [parameter(mandatory=$False,HelpMessage='Managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. RestoreLongTermRetentionBackup: Create a database by restoring from a long term retention backup (longTermRetentionBackupResourceId required).)')]
        [string]
        [ValidateSet('Default', 'RestoreExternalBackup', 'PointInTimeRestore', 'Recovery', 'RestoreLongTermRetentionBackup')]
        $createMode,
        [parameter(mandatory=$False,HelpMessage='Collation of the managed database.)')]
        [string]
        $collation,
        [parameter(mandatory=$False,HelpMessage='Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the uri of the storage container where backups for this restore are stored.)')]
        [string]
        $storageContainerUri,
        [parameter(mandatory=$False,HelpMessage='The name of the Long Term Retention backup to be used for restore of this managed database.)')]
        [string]
        $longTermRetentionBackupResourceId,
        [parameter(mandatory=$False,HelpMessage='The 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='Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the storage container sas token.)')]
        [string]
        $storageContainerSasToken,
        [parameter(mandatory=$False,HelpMessage='Conditional. If createMode is PointInTimeRestore, this value is required. Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database.)')]
        [string]
        $restorePointInTime,
        [parameter(mandatory=$False,HelpMessage='Resource location.)')]
        [string]
        $location,
        [parameter(mandatory=$False,HelpMessage='Collation of the metadata catalog.)')]
        [string]
        [ValidateSet('DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS')]
        $catalogCollation,
        [parameter(mandatory=$False,HelpMessage='Resource tags.)')]
        [hashtable]
        $tags,
        [parameter(mandatory=$False,HelpMessage='Whether to auto complete restore of this managed database.)')]
        [bool]
        $autoCompleteRestore,
        [parameter(mandatory=$False,HelpMessage='The resource identifier of the recoverable database associated with create operation of this database.)')]
        [string]
        $recoverableDatabaseId,
        [parameter(mandatory=$False,HelpMessage='The resource identifier of the source database associated with create operation of this database.)')]
        [string]
        $sourceDatabaseId,
        [parameter(mandatory=$False,HelpMessage='The name of the database.)')]
        [string]
        $databaseName,
        [parameter(mandatory=$False,HelpMessage='The name of the managed instance.)')]
        [string]
        $managedInstanceName,
        [parameter(mandatory=$False,HelpMessage='Last backup file name for restore of this managed database.)')]
        [string]
        $lastBackupName,
        [parameter(mandatory=$False,HelpMessage='The restorable dropped database resource id to restore when creating this database.)')]
        [string]
        $restorableDroppedDatabaseId,
        [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:sql:ManagedDatabase")

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeSqlJobCredential
{
    [Alias('azure_native_sql_jobcredential')]
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the job agent.)')]
        [string]
        $jobAgentName,
        [parameter(mandatory=$False,HelpMessage='The credential user name.)')]
        [string]
        $username,
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the credential.)')]
        [string]
        $credentialName,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName,
        [parameter(mandatory=$False,HelpMessage='The credential password.)')]
        [string]
        $password,
        [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:sql:JobCredential")

        $resource.properties["jobAgentName"] = $jobAgentName
        $resource.properties["password"] = $password
        $resource.properties["resourceGroupName"] = $resourceGroupName
        $resource.properties["serverName"] = $serverName
        $resource.properties["username"] = $username

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeSqlServerBlobAuditingPolicy
{
    [Alias('azure_native_sql_serverblobauditingpolicy')]
    param (
        [parameter(mandatory=$False,HelpMessage='Specifies whether audit events are sent to Azure Monitor.
In order to send the events to Azure Monitor, specify ''State'' as ''Enabled'' and ''IsAzureMonitorTargetEnabled'' as true.

When using REST API to configure auditing, Diagnostic Settings with ''SQLSecurityAuditEvents'' diagnostic logs category on the database should be also created.
Note that for server level audit you should use the ''master'' database as {databaseName}.

Diagnostic Settings URI format:
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview

For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207)
or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043)
)'
)]
        [bool]
        $isAzureMonitorTargetEnabled,
        [parameter(mandatory=$False,HelpMessage='Specifies the identifier key of the auditing storage account.
If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage.
Prerequisites for using managed identity authentication:
1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD).
2. Grant SQL Server identity access to the storage account by adding ''Storage Blob Data Contributor'' RBAC role to the server identity.
For more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355))'
)]
        [string]
        $storageAccountAccessKey,
        [parameter(mandatory=$False,HelpMessage='Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required.)')]
        [string]
        $storageEndpoint,
        [parameter(mandatory=$False,HelpMessage='Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required.)')]
        $state,
        [parameter(mandatory=$False,HelpMessage='Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed.
The default minimum value is 1000 (1 second). The maximum is 2,147,483,647.)'
)]
        [int]
        $queueDelayMs,
        [parameter(mandatory=$False,HelpMessage='The name of the blob auditing policy.)')]
        [string]
        $blobAuditingPolicyName,
        [parameter(mandatory=$False,HelpMessage='Specifies the state of devops audit. If state is Enabled, devops logs will be sent to Azure Monitor.
In order to send the events to Azure Monitor, specify ''State'' as ''Enabled'', ''IsAzureMonitorTargetEnabled'' as true and ''IsDevopsAuditEnabled'' as true

When using REST API to configure auditing, Diagnostic Settings with ''DevOpsOperationsAudit'' diagnostic logs category on the master database should also be created.

Diagnostic Settings URI format:
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview

For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207)
or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043)
)'
)]
        [bool]
        $isDevopsAuditEnabled,
        [parameter(mandatory=$False,HelpMessage='The 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='Specifies the Actions-Groups and Actions to audit.

The recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures executed against the database, as well as successful and failed logins:

BATCH_COMPLETED_GROUP,
SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP,
FAILED_DATABASE_AUTHENTICATION_GROUP.

This above combination is also the set that is configured by default when enabling auditing from the Azure portal.

The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary groups could lead to very large quantities of audit records):

APPLICATION_ROLE_CHANGE_PASSWORD_GROUP
BACKUP_RESTORE_GROUP
DATABASE_LOGOUT_GROUP
DATABASE_OBJECT_CHANGE_GROUP
DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP
DATABASE_OBJECT_PERMISSION_CHANGE_GROUP
DATABASE_OPERATION_GROUP
DATABASE_PERMISSION_CHANGE_GROUP
DATABASE_PRINCIPAL_CHANGE_GROUP
DATABASE_PRINCIPAL_IMPERSONATION_GROUP
DATABASE_ROLE_MEMBER_CHANGE_GROUP
FAILED_DATABASE_AUTHENTICATION_GROUP
SCHEMA_OBJECT_ACCESS_GROUP
SCHEMA_OBJECT_CHANGE_GROUP
SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP
SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP
SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP
USER_CHANGE_PASSWORD_GROUP
BATCH_STARTED_GROUP
BATCH_COMPLETED_GROUP

These are groups that cover all sql statements and stored procedures executed against the database, and should not be used in combination with other groups as this will result in duplicate audit logs.

For more information, see [Database-Level Audit Action Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups).

For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are:
SELECT
UPDATE
INSERT
DELETE
EXECUTE
RECEIVE
REFERENCES

The general form for defining an action to be audited is:
{action} ON {object} BY {principal}

Note that <object> in the above format can refer to an object like a table, view, or stored procedure, or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively.

For example:
SELECT on dbo.myTable by public
SELECT on DATABASE::myDatabase by public
SELECT on SCHEMA::mySchema by public

For more information, see [Database-Level Audit Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions))'
)]
        [string[]]
        $auditActionsAndGroups,
        [parameter(mandatory=$False,HelpMessage='Specifies the blob storage subscription Id.)')]
        [string]
        $storageAccountSubscriptionId,
        [parameter(mandatory=$False,HelpMessage='Specifies whether storageAccountAccessKey value is the storage''s secondary key.)')]
        [bool]
        $isStorageSecondaryKeyInUse,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName,
        [parameter(mandatory=$False,HelpMessage='Specifies the number of days to keep in the audit logs in the storage account.)')]
        [int]
        $retentionDays,
        [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:sql:ServerBlobAuditingPolicy")

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

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

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

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

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

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

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

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

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

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
class VulnerabilityAssessmentRecurringScansProperties
{
    [bool] $isEnabled
    [bool] $emailSubscriptionAdmins
    [string[]] $emails
}
function New-AzureNativeTypeSqlVulnerabilityAssessmentRecurringScansProperties
{
    param (
        [parameter(mandatory=$False,HelpMessage='Recurring scans state.)')]
        [bool]
        $isEnabled,
        [parameter(mandatory=$False,HelpMessage='Specifies that the schedule scan notification will be is sent to the subscription administrators.)')]
        [bool]
        $emailSubscriptionAdmins,
        [parameter(mandatory=$False,HelpMessage='Specifies an array of e-mail addresses to which the scan notification is sent.)')]
        [string[]]
        $emails
    )

    process
    {
        return $([VulnerabilityAssessmentRecurringScansProperties]$PSBoundParameters)
    }
}
function New-AzureNativeSqlDatabaseVulnerabilityAssessment
{
    [Alias('azure_native_sql_databasevulnerabilityassessment')]
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the database for which the vulnerability assessment is defined.)')]
        [string]
        $databaseName,
        [parameter(mandatory=$False,HelpMessage='Specifies the identifier key of the storage account for vulnerability assessment scan results. If ''StorageContainerSasKey'' isn''t specified, storageAccountAccessKey is required.)')]
        [string]
        $storageAccountAccessKey,
        [parameter(mandatory=$False,HelpMessage='The name of the vulnerability assessment.)')]
        [string]
        $vulnerabilityAssessmentName,
        [parameter(mandatory=$False,HelpMessage='A shared access signature (SAS Key) that has write access to the blob container specified in ''storageContainerPath'' parameter. If ''storageAccountAccessKey'' isn''t specified, StorageContainerSasKey is required.)')]
        [string]
        $storageContainerSasKey,
        [parameter(mandatory=$False,HelpMessage='A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). It is required if server level vulnerability assessment policy doesn''t set)')]
        [string]
        $storageContainerPath,
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the server.)')]
        [string]
        $serverName,
        [parameter(mandatory=$False,HelpMessage='The recurring scans settings)')]
        [VulnerabilityAssessmentRecurringScansProperties]
        $recurringScans,
        [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:sql:DatabaseVulnerabilityAssessment")

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

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

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

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

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeSqlExtendedDatabaseBlobAuditingPolicy
{
    [Alias('azure_native_sql_extendeddatabaseblobauditingpolicy')]
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the database.)')]
        [string]
        $databaseName,
        [parameter(mandatory=$False,HelpMessage='Specifies the identifier key of the auditing storage account.
If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage.
Prerequisites for using managed identity authentication:
1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD).
2. Grant SQL Server identity access to the storage account by adding ''Storage Blob Data Contributor'' RBAC role to the server identity.
For more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355))'
)]
        [string]
        $storageAccountAccessKey,
        [parameter(mandatory=$False,HelpMessage='Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required.)')]
        $state,
        [parameter(mandatory=$False,HelpMessage='Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed.
The default minimum value is 1000 (1 second). The maximum is 2,147,483,647.)'
)]
        [int]
        $queueDelayMs,
        [parameter(mandatory=$False,HelpMessage='The name of the blob auditing policy.)')]
        [string]
        $blobAuditingPolicyName,
        [parameter(mandatory=$False,HelpMessage='Specifies whether audit events are sent to Azure Monitor.
In order to send the events to Azure Monitor, specify ''State'' as ''Enabled'' and ''IsAzureMonitorTargetEnabled'' as true.

When using REST API to configure auditing, Diagnostic Settings with ''SQLSecurityAuditEvents'' diagnostic logs category on the database should be also created.
Note that for server level audit you should use the ''master'' database as {databaseName}.

Diagnostic Settings URI format:
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview

For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207)
or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043)
)'
)]
        [bool]
        $isAzureMonitorTargetEnabled,
        [parameter(mandatory=$False,HelpMessage='Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required.)')]
        [string]
        $storageEndpoint,
        [parameter(mandatory=$False,HelpMessage='The 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='Specifies the Actions-Groups and Actions to audit.

The recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures executed against the database, as well as successful and failed logins:

BATCH_COMPLETED_GROUP,
SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP,
FAILED_DATABASE_AUTHENTICATION_GROUP.

This above combination is also the set that is configured by default when enabling auditing from the Azure portal.

The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary groups could lead to very large quantities of audit records):

APPLICATION_ROLE_CHANGE_PASSWORD_GROUP
BACKUP_RESTORE_GROUP
DATABASE_LOGOUT_GROUP
DATABASE_OBJECT_CHANGE_GROUP
DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP
DATABASE_OBJECT_PERMISSION_CHANGE_GROUP
DATABASE_OPERATION_GROUP
DATABASE_PERMISSION_CHANGE_GROUP
DATABASE_PRINCIPAL_CHANGE_GROUP
DATABASE_PRINCIPAL_IMPERSONATION_GROUP
DATABASE_ROLE_MEMBER_CHANGE_GROUP
FAILED_DATABASE_AUTHENTICATION_GROUP
SCHEMA_OBJECT_ACCESS_GROUP
SCHEMA_OBJECT_CHANGE_GROUP
SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP
SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP
SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP
USER_CHANGE_PASSWORD_GROUP
BATCH_STARTED_GROUP
BATCH_COMPLETED_GROUP

These are groups that cover all sql statements and stored procedures executed against the database, and should not be used in combination with other groups as this will result in duplicate audit logs.

For more information, see [Database-Level Audit Action Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups).

For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are:
SELECT
UPDATE
INSERT
DELETE
EXECUTE
RECEIVE
REFERENCES

The general form for defining an action to be audited is:
{action} ON {object} BY {principal}

Note that <object> in the above format can refer to an object like a table, view, or stored procedure, or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively.

For example:
SELECT on dbo.myTable by public
SELECT on DATABASE::myDatabase by public
SELECT on SCHEMA::mySchema by public

For more information, see [Database-Level Audit Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions))'
)]
        [string[]]
        $auditActionsAndGroups,
        [parameter(mandatory=$False,HelpMessage='Specifies the blob storage subscription Id.)')]
        [string]
        $storageAccountSubscriptionId,
        [parameter(mandatory=$False,HelpMessage='Specifies condition of where clause when creating an audit.)')]
        [string]
        $predicateExpression,
        [parameter(mandatory=$False,HelpMessage='Specifies whether storageAccountAccessKey value is the storage''s secondary key.)')]
        [bool]
        $isStorageSecondaryKeyInUse,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName,
        [parameter(mandatory=$False,HelpMessage='Specifies the number of days to keep in the audit logs in the storage account.)')]
        [int]
        $retentionDays,
        [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:sql:ExtendedDatabaseBlobAuditingPolicy")

        $resource.properties["databaseName"] = $databaseName
        $resource.properties["resourceGroupName"] = $resourceGroupName
        $resource.properties["serverName"] = $serverName
        $resource.properties["state"] = $state

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

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

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

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

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

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

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

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

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
class Sku
{
    [int] $capacity
    [string] $size
    [string] $family
    [string] $tier
    [string] $name
}
function New-AzureNativeTypeSqlSku
{
    param (
        [parameter(mandatory=$False,HelpMessage='Capacity of the particular SKU.)')]
        [int]
        $capacity,
        [parameter(mandatory=$False,HelpMessage='Size of the particular SKU)')]
        [string]
        $size,
        [parameter(mandatory=$False,HelpMessage='If the service has different generations of hardware, for the same SKU, then that can be captured here.)')]
        [string]
        $family,
        [parameter(mandatory=$False,HelpMessage='The tier or edition of the particular SKU, e.g. Basic, Premium.)')]
        [string]
        $tier,
        [parameter(mandatory=$False,HelpMessage='The name of the SKU, typically, a letter + Number code, e.g. P3.)')]
        [string]
        $name
    )

    process
    {
        return $([Sku]$PSBoundParameters)
    }
}
function New-AzureNativeSqlInstancePool
{
    [Alias('azure_native_sql_instancepool')]
    param (
        [parameter(mandatory=$False,HelpMessage='The name and tier of the SKU.)')]
        [Sku]
        $sku,
        [parameter(mandatory=$False,HelpMessage='Resource tags.)')]
        [hashtable]
        $tags,
        [parameter(mandatory=$False,HelpMessage='The license type. Possible values are ''LicenseIncluded'' (price for SQL license is included) and ''BasePrice'' (without SQL license price).)')]
        [string]
        [ValidateSet('LicenseIncluded', 'BasePrice')]
        $licenseType,
        [parameter(mandatory=$False,HelpMessage='Resource location.)')]
        [string]
        $location,
        [parameter(mandatory=$False,HelpMessage='Resource ID of the subnet to place this instance pool in.)')]
        [string]
        $subnetId,
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the instance pool to be created or updated.)')]
        [string]
        $instancePoolName,
        [parameter(mandatory=$False,HelpMessage='Count of vCores belonging to this instance pool.)')]
        [int]
        $vCores,
        [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:sql:InstancePool")

        $resource.properties["licenseType"] = $licenseType
        $resource.properties["resourceGroupName"] = $resourceGroupName
        $resource.properties["subnetId"] = $subnetId
        $resource.properties["vCores"] = $vCores

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

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

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeSqlDatabaseBlobAuditingPolicy
{
    [Alias('azure_native_sql_databaseblobauditingpolicy')]
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the database.)')]
        [string]
        $databaseName,
        [parameter(mandatory=$False,HelpMessage='Specifies the identifier key of the auditing storage account.
If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage.
Prerequisites for using managed identity authentication:
1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD).
2. Grant SQL Server identity access to the storage account by adding ''Storage Blob Data Contributor'' RBAC role to the server identity.
For more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355))'
)]
        [string]
        $storageAccountAccessKey,
        [parameter(mandatory=$False,HelpMessage='Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required.)')]
        $state,
        [parameter(mandatory=$False,HelpMessage='Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed.
The default minimum value is 1000 (1 second). The maximum is 2,147,483,647.)'
)]
        [int]
        $queueDelayMs,
        [parameter(mandatory=$False,HelpMessage='The name of the blob auditing policy.)')]
        [string]
        $blobAuditingPolicyName,
        [parameter(mandatory=$False,HelpMessage='Specifies whether audit events are sent to Azure Monitor.
In order to send the events to Azure Monitor, specify ''State'' as ''Enabled'' and ''IsAzureMonitorTargetEnabled'' as true.

When using REST API to configure auditing, Diagnostic Settings with ''SQLSecurityAuditEvents'' diagnostic logs category on the database should be also created.
Note that for server level audit you should use the ''master'' database as {databaseName}.

Diagnostic Settings URI format:
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview

For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207)
or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043)
)'
)]
        [bool]
        $isAzureMonitorTargetEnabled,
        [parameter(mandatory=$False,HelpMessage='Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required.)')]
        [string]
        $storageEndpoint,
        [parameter(mandatory=$False,HelpMessage='The 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='Specifies the Actions-Groups and Actions to audit.

The recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures executed against the database, as well as successful and failed logins:

BATCH_COMPLETED_GROUP,
SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP,
FAILED_DATABASE_AUTHENTICATION_GROUP.

This above combination is also the set that is configured by default when enabling auditing from the Azure portal.

The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary groups could lead to very large quantities of audit records):

APPLICATION_ROLE_CHANGE_PASSWORD_GROUP
BACKUP_RESTORE_GROUP
DATABASE_LOGOUT_GROUP
DATABASE_OBJECT_CHANGE_GROUP
DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP
DATABASE_OBJECT_PERMISSION_CHANGE_GROUP
DATABASE_OPERATION_GROUP
DATABASE_PERMISSION_CHANGE_GROUP
DATABASE_PRINCIPAL_CHANGE_GROUP
DATABASE_PRINCIPAL_IMPERSONATION_GROUP
DATABASE_ROLE_MEMBER_CHANGE_GROUP
FAILED_DATABASE_AUTHENTICATION_GROUP
SCHEMA_OBJECT_ACCESS_GROUP
SCHEMA_OBJECT_CHANGE_GROUP
SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP
SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP
SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP
USER_CHANGE_PASSWORD_GROUP
BATCH_STARTED_GROUP
BATCH_COMPLETED_GROUP

These are groups that cover all sql statements and stored procedures executed against the database, and should not be used in combination with other groups as this will result in duplicate audit logs.

For more information, see [Database-Level Audit Action Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups).

For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are:
SELECT
UPDATE
INSERT
DELETE
EXECUTE
RECEIVE
REFERENCES

The general form for defining an action to be audited is:
{action} ON {object} BY {principal}

Note that <object> in the above format can refer to an object like a table, view, or stored procedure, or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively.

For example:
SELECT on dbo.myTable by public
SELECT on DATABASE::myDatabase by public
SELECT on SCHEMA::mySchema by public

For more information, see [Database-Level Audit Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions))'
)]
        [string[]]
        $auditActionsAndGroups,
        [parameter(mandatory=$False,HelpMessage='Specifies the blob storage subscription Id.)')]
        [string]
        $storageAccountSubscriptionId,
        [parameter(mandatory=$False,HelpMessage='Specifies whether storageAccountAccessKey value is the storage''s secondary key.)')]
        [bool]
        $isStorageSecondaryKeyInUse,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName,
        [parameter(mandatory=$False,HelpMessage='Specifies the number of days to keep in the audit logs in the storage account.)')]
        [int]
        $retentionDays,
        [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:sql:DatabaseBlobAuditingPolicy")

        $resource.properties["databaseName"] = $databaseName
        $resource.properties["resourceGroupName"] = $resourceGroupName
        $resource.properties["serverName"] = $serverName
        $resource.properties["state"] = $state

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

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

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

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

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

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

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

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeSqlServerCommunicationLink
{
    [Alias('azure_native_sql_servercommunicationlink')]
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName,
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the server communication link.)')]
        [string]
        $communicationLinkName,
        [parameter(mandatory=$False,HelpMessage='The name of the partner server.)')]
        [string]
        $partnerServer,
        [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:sql:ServerCommunicationLink")

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
class ManagedInstancePrivateEndpointProperty
{
    [string] $id
}
function New-AzureNativeTypeSqlManagedInstancePrivateEndpointProperty
{
    param (
        [parameter(mandatory=$False,HelpMessage='Resource id of the private endpoint.)')]
        [string]
        $id
    )

    process
    {
        return $([ManagedInstancePrivateEndpointProperty]$PSBoundParameters)
    }
}
class ManagedInstancePrivateLinkServiceConnectionStateProperty
{
    [string] $status
    [string] $description
}
function New-AzureNativeTypeSqlManagedInstancePrivateLinkServiceConnectionStateProperty
{
    param (
        [parameter(mandatory=$False,HelpMessage='The private link service connection status.)')]
        [string]
        $status,
        [parameter(mandatory=$False,HelpMessage='The private link service connection description.)')]
        [string]
        $description
    )

    process
    {
        return $([ManagedInstancePrivateLinkServiceConnectionStateProperty]$PSBoundParameters)
    }
}
function New-AzureNativeSqlManagedInstancePrivateEndpointConnection
{
    [Alias('azure_native_sql_managedinstanceprivateendpointconnection')]
    param (
        [parameter(mandatory=$False,HelpMessage='Private endpoint which the connection belongs to.)')]
        [ManagedInstancePrivateEndpointProperty]
        $privateEndpoint,
        [parameter(mandatory=$False,HelpMessage='The name of the managed instance.)')]
        [string]
        $managedInstanceName,
        [parameter(mandatory=$False,HelpMessage='The 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='Connection State of the Private Endpoint Connection.)')]
        [ManagedInstancePrivateLinkServiceConnectionStateProperty]
        $privateLinkServiceConnectionState,
        [parameter(mandatory=$False,HelpMessage=')')]
        [string]
        $privateEndpointConnectionName,
        [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:sql:ManagedInstancePrivateEndpointConnection")

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

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

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeSqlServerTrustGroup
{
    [Alias('azure_native_sql_servertrustgroup')]
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the server trust group.)')]
        [string]
        $serverTrustGroupName,
        [parameter(mandatory=$False,HelpMessage='The 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='Group members information for the server trust group.)')]
        $groupMembers,
        [parameter(mandatory=$False,HelpMessage='The name of the region where the resource is located.)')]
        [string]
        $locationName,
        [parameter(mandatory=$False,HelpMessage='Trust scope of the server trust group.)')]
        [string[]]
        $trustScopes,
        [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:sql:ServerTrustGroup")

        $resource.properties["groupMembers"] = $groupMembers
        $resource.properties["locationName"] = $locationName
        $resource.properties["resourceGroupName"] = $resourceGroupName
        $resource.properties["trustScopes"] = $trustScopes

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

        $global:pulumiresources += $resource
        return $resource
    }
}
class PrivateEndpointProperty
{
    [string] $id
}
function New-AzureNativeTypeSqlPrivateEndpointProperty
{
    param (
        [parameter(mandatory=$False,HelpMessage='Resource id of the private endpoint.)')]
        [string]
        $id
    )

    process
    {
        return $([PrivateEndpointProperty]$PSBoundParameters)
    }
}
class PrivateLinkServiceConnectionStateProperty
{
    [ValidateSet('Approved', 'Pending', 'Rejected', 'Disconnected')]
    [string] $status
    [ValidateSet('Approved', 'Pending', 'Rejected', 'Disconnected')]
    [string] $description
}
function New-AzureNativeTypeSqlPrivateLinkServiceConnectionStateProperty
{
    param (
        [parameter(mandatory=$False,HelpMessage='The private link service connection status.)')]
        [string]
        [ValidateSet('Approved', 'Pending', 'Rejected', 'Disconnected')]
        $status,
        [parameter(mandatory=$False,HelpMessage='The private link service connection description.)')]
        [string]
        $description
    )

    process
    {
        return $([PrivateLinkServiceConnectionStateProperty]$PSBoundParameters)
    }
}
function New-AzureNativeSqlPrivateEndpointConnection
{
    [Alias('azure_native_sql_privateendpointconnection')]
    param (
        [parameter(mandatory=$False,HelpMessage='Private endpoint which the connection belongs to.)')]
        [PrivateEndpointProperty]
        $privateEndpoint,
        [parameter(mandatory=$False,HelpMessage=')')]
        [string]
        $privateEndpointConnectionName,
        [parameter(mandatory=$False,HelpMessage='The 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='Connection state of the private endpoint connection.)')]
        [PrivateLinkServiceConnectionStateProperty]
        $privateLinkServiceConnectionState,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName,
        [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:sql:PrivateEndpointConnection")

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

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

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeSqlDataMaskingPolicy
{
    [Alias('azure_native_sql_datamaskingpolicy')]
    param (
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the database.)')]
        [string]
        $databaseName,
        [parameter(mandatory=$False,HelpMessage='The name of the database for which the data masking rule applies.)')]
        [string]
        $dataMaskingPolicyName,
        [parameter(mandatory=$False,HelpMessage='The state of the data masking policy.)')]
        $dataMaskingState,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName,
        [parameter(mandatory=$False,HelpMessage='The list of the exempt principals. Specifies the semicolon-separated list of database users for which the data masking policy does not apply. The specified users receive data results without masking for all of the database queries.)')]
        [string]
        $exemptPrincipals,
        [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:sql:DataMaskingPolicy")

        $resource.properties["dataMaskingState"] = $dataMaskingState
        $resource.properties["databaseName"] = $databaseName
        $resource.properties["resourceGroupName"] = $resourceGroupName
        $resource.properties["serverName"] = $serverName

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeSqlSyncMember
{
    [Alias('azure_native_sql_syncmember')]
    param (
        [parameter(mandatory=$False,HelpMessage='Sync direction of the sync member.)')]
        [string]
        [ValidateSet('Bidirectional', 'OneWayMemberToHub', 'OneWayHubToMember')]
        $syncDirection,
        [parameter(mandatory=$False,HelpMessage='Database name of the member database in the sync member.)')]
        [string]
        $databaseName,
        [parameter(mandatory=$False,HelpMessage='Database type of the sync member.)')]
        [string]
        [ValidateSet('AzureSqlDatabase', 'SqlServerDatabase')]
        $databaseType,
        [parameter(mandatory=$False,HelpMessage='SQL Server database id of the sync member.)')]
        [string]
        $sqlServerDatabaseId,
        [parameter(mandatory=$False,HelpMessage='ARM resource id of the sync member logical database, for sync members in Azure.)')]
        [string]
        $syncMemberAzureDatabaseResourceId,
        [parameter(mandatory=$False,HelpMessage='User name of the member database in the sync member.)')]
        [string]
        $userName,
        [parameter(mandatory=$False,HelpMessage='The name of the sync group on which the sync member is hosted.)')]
        [string]
        $syncGroupName,
        [parameter(mandatory=$False,HelpMessage='Password of the member database in the sync member.)')]
        [string]
        $password,
        [parameter(mandatory=$False,HelpMessage='The name of the sync member.)')]
        [string]
        $syncMemberName,
        [parameter(mandatory=$False,HelpMessage='ARM resource id of the sync agent in the sync member.)')]
        [string]
        $syncAgentId,
        [parameter(mandatory=$False,HelpMessage='The 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='Server name of the member database in the sync member)')]
        [string]
        $serverName,
        [parameter(mandatory=$False,HelpMessage='Whether to use private link connection.)')]
        [bool]
        $usePrivateLinkConnection,
        [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:sql:SyncMember")

        $resource.properties["databaseName"] = $databaseName
        $resource.properties["resourceGroupName"] = $resourceGroupName
        $resource.properties["serverName"] = $serverName
        $resource.properties["syncGroupName"] = $syncGroupName

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

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

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

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

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

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

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

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeSqlManagedDatabaseVulnerabilityAssessment
{
    [Alias('azure_native_sql_manageddatabasevulnerabilityassessment')]
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the database for which the vulnerability assessment is defined.)')]
        [string]
        $databaseName,
        [parameter(mandatory=$False,HelpMessage='Specifies the identifier key of the storage account for vulnerability assessment scan results. If ''StorageContainerSasKey'' isn''t specified, storageAccountAccessKey is required.)')]
        [string]
        $storageAccountAccessKey,
        [parameter(mandatory=$False,HelpMessage='The name of the vulnerability assessment.)')]
        [string]
        $vulnerabilityAssessmentName,
        [parameter(mandatory=$False,HelpMessage='A shared access signature (SAS Key) that has write access to the blob container specified in ''storageContainerPath'' parameter. If ''storageAccountAccessKey'' isn''t specified, StorageContainerSasKey is required.)')]
        [string]
        $storageContainerSasKey,
        [parameter(mandatory=$False,HelpMessage='A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). It is required if server level vulnerability assessment policy doesn''t set)')]
        [string]
        $storageContainerPath,
        [parameter(mandatory=$False,HelpMessage='The 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='The recurring scans settings)')]
        [VulnerabilityAssessmentRecurringScansProperties]
        $recurringScans,
        [parameter(mandatory=$False,HelpMessage='The name of the managed instance.)')]
        [string]
        $managedInstanceName,
        [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:sql:ManagedDatabaseVulnerabilityAssessment")

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

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

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

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

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
class ElasticPoolPerDatabaseSettings
{
    [int] $maxCapacity
    [int] $minCapacity
}
function New-AzureNativeTypeSqlElasticPoolPerDatabaseSettings
{
    param (
        [parameter(mandatory=$False,HelpMessage='The maximum capacity any one database can consume.)')]
        [int]
        $maxCapacity,
        [parameter(mandatory=$False,HelpMessage='The minimum capacity all databases are guaranteed.)')]
        [int]
        $minCapacity
    )

    process
    {
        return $([ElasticPoolPerDatabaseSettings]$PSBoundParameters)
    }
}
function New-AzureNativeSqlElasticPool
{
    [Alias('azure_native_sql_elasticpool')]
    param (
        [parameter(mandatory=$False,HelpMessage='Maintenance configuration id assigned to the elastic pool. This configuration defines the period when the maintenance updates will will occur.)')]
        [string]
        $maintenanceConfigurationId,
        [parameter(mandatory=$False,HelpMessage='The elastic pool SKU.

The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or the following command:

```azurecli
az sql elastic-pool list-editions -l <location> -o table
````
)'
)]
        [Sku]
        $sku,
        [parameter(mandatory=$False,HelpMessage='The name of the elastic pool.)')]
        [string]
        $elasticPoolName,
        [parameter(mandatory=$False,HelpMessage='The 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='The per database settings for the elastic pool.)')]
        [ElasticPoolPerDatabaseSettings]
        $perDatabaseSettings,
        [parameter(mandatory=$False,HelpMessage='The license type to apply for this elastic pool.)')]
        [string]
        [ValidateSet('LicenseIncluded', 'BasePrice')]
        $licenseType,
        [parameter(mandatory=$False,HelpMessage='Whether or not this elastic pool is zone redundant, which means the replicas of this elastic pool will be spread across multiple availability zones.)')]
        [bool]
        $zoneRedundant,
        [parameter(mandatory=$False,HelpMessage='Resource tags.)')]
        [hashtable]
        $tags,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName,
        [parameter(mandatory=$False,HelpMessage='The storage limit for the database elastic pool in bytes.)')]
        [int]
        $maxSizeBytes,
        [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:sql:ElasticPool")

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

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

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

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

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

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

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

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

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeSqlGeoBackupPolicy
{
    [Alias('azure_native_sql_geobackuppolicy')]
    param (
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the database.)')]
        [string]
        $databaseName,
        [parameter(mandatory=$False,HelpMessage='The name of the geo backup policy.)')]
        [string]
        $geoBackupPolicyName,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName,
        [parameter(mandatory=$False,HelpMessage='The state of the geo backup policy.)')]
        $state,
        [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:sql:GeoBackupPolicy")

        $resource.properties["databaseName"] = $databaseName
        $resource.properties["resourceGroupName"] = $resourceGroupName
        $resource.properties["serverName"] = $serverName
        $resource.properties["state"] = $state

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

        $global:pulumiresources += $resource
        return $resource
    }
}
class FailoverGroupReadWriteEndpoint
{
    [int] $failoverWithDataLossGracePeriodMinutes
    [ValidateSet('Manual', 'Automatic')]
    [string] $failoverPolicy
}
function New-AzureNativeTypeSqlFailoverGroupReadWriteEndpoint
{
    param (
        [parameter(mandatory=$False,HelpMessage='Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.)')]
        [int]
        $failoverWithDataLossGracePeriodMinutes,
        [parameter(mandatory=$False,HelpMessage='Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.)')]
        [string]
        [ValidateSet('Manual', 'Automatic')]
        $failoverPolicy
    )

    process
    {
        return $([FailoverGroupReadWriteEndpoint]$PSBoundParameters)
    }
}
class FailoverGroupReadOnlyEndpoint
{
    [ValidateSet('Disabled', 'Enabled')]
    [string] $failoverPolicy
}
function New-AzureNativeTypeSqlFailoverGroupReadOnlyEndpoint
{
    param (
        [parameter(mandatory=$False,HelpMessage='Failover policy of the read-only endpoint for the failover group.)')]
        [string]
        [ValidateSet('Disabled', 'Enabled')]
        $failoverPolicy
    )

    process
    {
        return $([FailoverGroupReadOnlyEndpoint]$PSBoundParameters)
    }
}
function New-AzureNativeSqlFailoverGroup
{
    [Alias('azure_native_sql_failovergroup')]
    param (
        [parameter(mandatory=$False,HelpMessage='Resource tags.)')]
        [hashtable]
        $tags,
        [parameter(mandatory=$False,HelpMessage='Read-write endpoint of the failover group instance.)')]
        [FailoverGroupReadWriteEndpoint]
        $readWriteEndpoint,
        [parameter(mandatory=$False,HelpMessage='List of partner server information for the failover group.)')]
        $partnerServers,
        [parameter(mandatory=$False,HelpMessage='The name of the server containing the failover group.)')]
        [string]
        $serverName,
        [parameter(mandatory=$False,HelpMessage='The 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='Read-only endpoint of the failover group instance.)')]
        [FailoverGroupReadOnlyEndpoint]
        $readOnlyEndpoint,
        [parameter(mandatory=$False,HelpMessage='List of databases in the failover group.)')]
        [string[]]
        $databases,
        [parameter(mandatory=$False,HelpMessage='The name of the failover group.)')]
        [string]
        $failoverGroupName,
        [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:sql:FailoverGroup")

        $resource.properties["partnerServers"] = $partnerServers
        $resource.properties["readWriteEndpoint"] = $readWriteEndpoint
        $resource.properties["resourceGroupName"] = $resourceGroupName
        $resource.properties["serverName"] = $serverName

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

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

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeSqlServerKey
{
    [Alias('azure_native_sql_serverkey')]
    param (
        [parameter(mandatory=$False,HelpMessage='The URI of the server key. If the ServerKeyType is AzureKeyVault, then the URI is required.)')]
        [string]
        $uri,
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the server key to be operated on (updated or created). The key name is required to be in the format of ''vault_key_version''. For example, if the keyId is https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be formatted as: YourVaultName_YourKeyName_YourKeyVersion)')]
        [string]
        $keyName,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName,
        [parameter(mandatory=$False,HelpMessage='The server key type like ''ServiceManaged'', ''AzureKeyVault''.)')]
        [string]
        [ValidateSet('ServiceManaged', 'AzureKeyVault')]
        $serverKeyType,
        [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:sql:ServerKey")

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

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeSqlLongTermRetentionPolicy
{
    [Alias('azure_native_sql_longtermretentionpolicy')]
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the database.)')]
        [string]
        $databaseName,
        [parameter(mandatory=$False,HelpMessage='The monthly retention policy for an LTR backup in an ISO 8601 format.)')]
        [string]
        $monthlyRetention,
        [parameter(mandatory=$False,HelpMessage='The week of year to take the yearly backup in an ISO 8601 format.)')]
        [int]
        $weekOfYear,
        [parameter(mandatory=$False,HelpMessage='The weekly retention policy for an LTR backup in an ISO 8601 format.)')]
        [string]
        $weeklyRetention,
        [parameter(mandatory=$False,HelpMessage='The policy name. Should always be Default.)')]
        [string]
        $policyName,
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the server.)')]
        [string]
        $serverName,
        [parameter(mandatory=$False,HelpMessage='The yearly retention policy for an LTR backup in an ISO 8601 format.)')]
        [string]
        $yearlyRetention,
        [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:sql:LongTermRetentionPolicy")

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

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

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

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

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeSqlServerAzureADOnlyAuthentication
{
    [Alias('azure_native_sql_serverazureadonlyauthentication')]
    param (
        [parameter(mandatory=$False,HelpMessage='The 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='The name of server azure active directory only authentication.)')]
        [string]
        $authenticationName,
        [parameter(mandatory=$False,HelpMessage='Azure Active Directory only Authentication enabled.)')]
        [bool]
        $azureADOnlyAuthentication,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName,
        [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:sql:ServerAzureADOnlyAuthentication")

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeSqlServerDnsAlias
{
    [Alias('azure_native_sql_serverdnsalias')]
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the server that the alias is pointing to.)')]
        [string]
        $serverName,
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the server dns alias.)')]
        [string]
        $dnsAliasName,
        [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:sql:ServerDnsAlias")

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeSqlServerSecurityAlertPolicy
{
    [Alias('azure_native_sql_serversecurityalertpolicy')]
    param (
        [parameter(mandatory=$False,HelpMessage='Specifies an array of e-mail addresses to which the alert is sent.)')]
        [string[]]
        $emailAddresses,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName,
        [parameter(mandatory=$False,HelpMessage='The 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='Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.)')]
        [string]
        $storageEndpoint,
        [parameter(mandatory=$False,HelpMessage='Specifies that the alert is sent to the account administrators.)')]
        [bool]
        $emailAccountAdmins,
        [parameter(mandatory=$False,HelpMessage='Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database.)')]
        $state,
        [parameter(mandatory=$False,HelpMessage='Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action, Brute_Force)')]
        [string[]]
        $disabledAlerts,
        [parameter(mandatory=$False,HelpMessage='Specifies the identifier key of the Threat Detection audit storage account.)')]
        [string]
        $storageAccountAccessKey,
        [parameter(mandatory=$False,HelpMessage='The name of the threat detection policy.)')]
        [string]
        $securityAlertPolicyName,
        [parameter(mandatory=$False,HelpMessage='Specifies the number of days to keep in the Threat Detection audit logs.)')]
        [int]
        $retentionDays,
        [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:sql:ServerSecurityAlertPolicy")

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

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

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

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

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

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

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeSqlManagedInstanceVulnerabilityAssessment
{
    [Alias('azure_native_sql_managedinstancevulnerabilityassessment')]
    param (
        [parameter(mandatory=$False,HelpMessage='A shared access signature (SAS Key) that has write access to the blob container specified in ''storageContainerPath'' parameter. If ''storageAccountAccessKey'' isn''t specified, StorageContainerSasKey is required. Applies only if the storage account is not behind a Vnet or a firewall)')]
        [string]
        $storageContainerSasKey,
        [parameter(mandatory=$False,HelpMessage='The name of the managed instance for which the vulnerability assessment is defined.)')]
        [string]
        $managedInstanceName,
        [parameter(mandatory=$False,HelpMessage='The 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='Specifies the identifier key of the storage account for vulnerability assessment scan results. If ''StorageContainerSasKey'' isn''t specified, storageAccountAccessKey is required. Applies only if the storage account is not behind a Vnet or a firewall)')]
        [string]
        $storageAccountAccessKey,
        [parameter(mandatory=$False,HelpMessage='The name of the vulnerability assessment.)')]
        [string]
        $vulnerabilityAssessmentName,
        [parameter(mandatory=$False,HelpMessage='The recurring scans settings)')]
        [VulnerabilityAssessmentRecurringScansProperties]
        $recurringScans,
        [parameter(mandatory=$False,HelpMessage='A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).)')]
        [string]
        $storageContainerPath,
        [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:sql:ManagedInstanceVulnerabilityAssessment")

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

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

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

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeSqlTransparentDataEncryption
{
    [Alias('azure_native_sql_transparentdataencryption')]
    param (
        [parameter(mandatory=$False,HelpMessage='The status of the database transparent data encryption.)')]
        [string]
        [ValidateSet('Enabled', 'Disabled')]
        $status,
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the database for which setting the transparent data encryption applies.)')]
        [string]
        $databaseName,
        [parameter(mandatory=$False,HelpMessage='The name of the transparent data encryption configuration.)')]
        [string]
        $transparentDataEncryptionName,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName,
        [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:sql:TransparentDataEncryption")

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

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeSqlManagedDatabaseVulnerabilityAssessmentRuleBaseline
{
    [Alias('azure_native_sql_manageddatabasevulnerabilityassessmentrulebaseline')]
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the database for which the vulnerability assessment rule baseline is defined.)')]
        [string]
        $databaseName,
        [parameter(mandatory=$False,HelpMessage='The name of the managed instance.)')]
        [string]
        $managedInstanceName,
        [parameter(mandatory=$False,HelpMessage='The 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='The vulnerability assessment rule ID.)')]
        [string]
        $ruleId,
        [parameter(mandatory=$False,HelpMessage='The rule baseline result)')]
        $baselineResults,
        [parameter(mandatory=$False,HelpMessage='The name of the vulnerability assessment.)')]
        [string]
        $vulnerabilityAssessmentName,
        [parameter(mandatory=$False,HelpMessage='The name of the vulnerability assessment rule baseline (default implies a baseline on a database level rule and master for server level rule).)')]
        [string]
        $baselineName,
        [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:sql:ManagedDatabaseVulnerabilityAssessmentRuleBaseline")

        $resource.properties["baselineResults"] = $baselineResults
        $resource.properties["databaseName"] = $databaseName
        $resource.properties["managedInstanceName"] = $managedInstanceName
        $resource.properties["resourceGroupName"] = $resourceGroupName
        $resource.properties["ruleId"] = $ruleId
        $resource.properties["vulnerabilityAssessmentName"] = $vulnerabilityAssessmentName

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeSqlEncryptionProtector
{
    [Alias('azure_native_sql_encryptionprotector')]
    param (
        [parameter(mandatory=$False,HelpMessage='The encryption protector type like ''ServiceManaged'', ''AzureKeyVault''.)')]
        [string]
        [ValidateSet('ServiceManaged', 'AzureKeyVault')]
        $serverKeyType,
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the encryption protector to be updated.)')]
        [string]
        $encryptionProtectorName,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName,
        [parameter(mandatory=$False,HelpMessage='The name of the server key.)')]
        [string]
        $serverKeyName,
        [parameter(mandatory=$False,HelpMessage='Key auto rotation opt-in flag. Either true or false.)')]
        [bool]
        $autoRotationEnabled,
        [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:sql:EncryptionProtector")

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

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

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeSqlJobTargetGroup
{
    [Alias('azure_native_sql_jobtargetgroup')]
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the target group.)')]
        [string]
        $targetGroupName,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName,
        [parameter(mandatory=$False,HelpMessage='The 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='Members of the target group.)')]
        $members,
        [parameter(mandatory=$False,HelpMessage='The name of the job agent.)')]
        [string]
        $jobAgentName,
        [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:sql:JobTargetGroup")

        $resource.properties["jobAgentName"] = $jobAgentName
        $resource.properties["members"] = $members
        $resource.properties["resourceGroupName"] = $resourceGroupName
        $resource.properties["serverName"] = $serverName

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeSqlManagedInstanceKey
{
    [Alias('azure_native_sql_managedinstancekey')]
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the managed instance.)')]
        [string]
        $managedInstanceName,
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the managed instance key to be operated on (updated or created).)')]
        [string]
        $keyName,
        [parameter(mandatory=$False,HelpMessage='The URI of the key. If the ServerKeyType is AzureKeyVault, then the URI is required.)')]
        [string]
        $uri,
        [parameter(mandatory=$False,HelpMessage='The key type like ''ServiceManaged'', ''AzureKeyVault''.)')]
        [string]
        [ValidateSet('ServiceManaged', 'AzureKeyVault')]
        $serverKeyType,
        [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:sql:ManagedInstanceKey")

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

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeSqlManagedServerDnsAlias
{
    [Alias('azure_native_sql_managedserverdnsalias')]
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the managed instance.)')]
        [string]
        $managedInstanceName,
        [parameter(mandatory=$False,HelpMessage='The 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=')')]
        [string]
        $dnsAliasName,
        [parameter(mandatory=$False,HelpMessage='Whether or not DNS record should be created for this alias.)')]
        [bool]
        $createDnsRecord,
        [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:sql:ManagedServerDnsAlias")

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

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeSqlServerAzureADAdministrator
{
    [Alias('azure_native_sql_serverazureadadministrator')]
    param (
        [parameter(mandatory=$False,HelpMessage='Login name of the server administrator.)')]
        [string]
        $login,
        [parameter(mandatory=$False,HelpMessage='The 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='SID (object ID) of the server administrator.)')]
        [string]
        $sid,
        [parameter(mandatory=$False,HelpMessage='The name of server active directory administrator.)')]
        [string]
        $administratorName,
        [parameter(mandatory=$False,HelpMessage='Type of the sever administrator.)')]
        [string]
        [ValidateSet('ActiveDirectory')]
        $administratorType,
        [parameter(mandatory=$False,HelpMessage='Tenant ID of the administrator.)')]
        [string]
        $tenantId,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName,
        [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:sql:ServerAzureADAdministrator")

        $resource.properties["administratorType"] = $administratorType
        $resource.properties["login"] = $login
        $resource.properties["resourceGroupName"] = $resourceGroupName
        $resource.properties["serverName"] = $serverName
        $resource.properties["sid"] = $sid

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
class ResourceIdentity
{
    [ValidateSet('None', 'SystemAssigned', 'UserAssigned', 'SystemAssigned,UserAssigned')]
    [string] $type
    [ValidateSet('None', 'SystemAssigned', 'UserAssigned', 'SystemAssigned,UserAssigned')]
    [object] $userAssignedIdentities
}
function New-AzureNativeTypeSqlResourceIdentity
{
    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('None', 'SystemAssigned', 'UserAssigned', 'SystemAssigned,UserAssigned')]
        $type,
        [parameter(mandatory=$False,HelpMessage='The resource ids of the user assigned identities to use)')]
        [object]
        $userAssignedIdentities
    )

    process
    {
        return $([ResourceIdentity]$PSBoundParameters)
    }
}
class ServerExternalAdministrator
{
    [string] $login
    [string] $sid
    [bool] $azureADOnlyAuthentication
    [ValidateSet('ActiveDirectory')]
    [string] $administratorType
    [ValidateSet('User', 'Group', 'Application')]
    [string] $principalType
    [ValidateSet('User', 'Group', 'Application')]
    [string] $tenantId
}
function New-AzureNativeTypeSqlServerExternalAdministrator
{
    param (
        [parameter(mandatory=$False,HelpMessage='Login name of the server administrator.)')]
        [string]
        $login,
        [parameter(mandatory=$False,HelpMessage='SID (object ID) of the server administrator.)')]
        [string]
        $sid,
        [parameter(mandatory=$False,HelpMessage='Azure Active Directory only Authentication enabled.)')]
        [bool]
        $azureADOnlyAuthentication,
        [parameter(mandatory=$False,HelpMessage='Type of the sever administrator.)')]
        [string]
        [ValidateSet('ActiveDirectory')]
        $administratorType,
        [parameter(mandatory=$False,HelpMessage='Principal Type of the sever administrator.)')]
        [string]
        [ValidateSet('User', 'Group', 'Application')]
        $principalType,
        [parameter(mandatory=$False,HelpMessage='Tenant ID of the administrator.)')]
        [string]
        $tenantId
    )

    process
    {
        return $([ServerExternalAdministrator]$PSBoundParameters)
    }
}
function New-AzureNativeSqlServer
{
    [Alias('azure_native_sql_server')]
    param (
        [parameter(mandatory=$False,HelpMessage='Whether or not public endpoint access is allowed for this server. Value is optional but if passed in, must be ''Enabled'' or ''Disabled'')')]
        [string]
        [ValidateSet('Enabled', 'Disabled')]
        $publicNetworkAccess,
        [parameter(mandatory=$False,HelpMessage='Resource tags.)')]
        [hashtable]
        $tags,
        [parameter(mandatory=$False,HelpMessage='Administrator username for the server. Once created it cannot be changed.)')]
        [string]
        $administratorLogin,
        [parameter(mandatory=$False,HelpMessage='The 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='The Azure Active Directory identity of the server.)')]
        [ResourceIdentity]
        $identity,
        [parameter(mandatory=$False,HelpMessage='The administrator login password (required for server creation).)')]
        [string]
        $administratorLoginPassword,
        [parameter(mandatory=$False,HelpMessage='The version of the server.)')]
        [string]
        $version,
        [parameter(mandatory=$False,HelpMessage='Resource location.)')]
        [string]
        $location,
        [parameter(mandatory=$False,HelpMessage='The resource id of a user assigned identity to be used by default.)')]
        [string]
        $primaryUserAssignedIdentityId,
        [parameter(mandatory=$False,HelpMessage='A CMK URI of the key to use for encryption.)')]
        [string]
        $keyId,
        [parameter(mandatory=$False,HelpMessage='Minimal TLS version. Allowed values: ''1.0'', ''1.1'', ''1.2'')')]
        [string]
        $minimalTlsVersion,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName,
        [parameter(mandatory=$False,HelpMessage='The Azure Active Directory identity of the server.)')]
        [ServerExternalAdministrator]
        $administrators,
        [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:sql:Server")

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

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

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

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

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

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

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

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

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

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

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

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeSqlExtendedServerBlobAuditingPolicy
{
    [Alias('azure_native_sql_extendedserverblobauditingpolicy')]
    param (
        [parameter(mandatory=$False,HelpMessage='Specifies whether audit events are sent to Azure Monitor.
In order to send the events to Azure Monitor, specify ''State'' as ''Enabled'' and ''IsAzureMonitorTargetEnabled'' as true.

When using REST API to configure auditing, Diagnostic Settings with ''SQLSecurityAuditEvents'' diagnostic logs category on the database should be also created.
Note that for server level audit you should use the ''master'' database as {databaseName}.

Diagnostic Settings URI format:
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview

For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207)
or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043)
)'
)]
        [bool]
        $isAzureMonitorTargetEnabled,
        [parameter(mandatory=$False,HelpMessage='Specifies the identifier key of the auditing storage account.
If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage.
Prerequisites for using managed identity authentication:
1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD).
2. Grant SQL Server identity access to the storage account by adding ''Storage Blob Data Contributor'' RBAC role to the server identity.
For more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355))'
)]
        [string]
        $storageAccountAccessKey,
        [parameter(mandatory=$False,HelpMessage='Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required.)')]
        [string]
        $storageEndpoint,
        [parameter(mandatory=$False,HelpMessage='Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required.)')]
        $state,
        [parameter(mandatory=$False,HelpMessage='Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed.
The default minimum value is 1000 (1 second). The maximum is 2,147,483,647.)'
)]
        [int]
        $queueDelayMs,
        [parameter(mandatory=$False,HelpMessage='The name of the blob auditing policy.)')]
        [string]
        $blobAuditingPolicyName,
        [parameter(mandatory=$False,HelpMessage='Specifies the state of devops audit. If state is Enabled, devops logs will be sent to Azure Monitor.
In order to send the events to Azure Monitor, specify ''State'' as ''Enabled'', ''IsAzureMonitorTargetEnabled'' as true and ''IsDevopsAuditEnabled'' as true

When using REST API to configure auditing, Diagnostic Settings with ''DevOpsOperationsAudit'' diagnostic logs category on the master database should also be created.

Diagnostic Settings URI format:
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview

For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207)
or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043)
)'
)]
        [bool]
        $isDevopsAuditEnabled,
        [parameter(mandatory=$False,HelpMessage='The 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='Specifies the Actions-Groups and Actions to audit.

The recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures executed against the database, as well as successful and failed logins:

BATCH_COMPLETED_GROUP,
SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP,
FAILED_DATABASE_AUTHENTICATION_GROUP.

This above combination is also the set that is configured by default when enabling auditing from the Azure portal.

The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary groups could lead to very large quantities of audit records):

APPLICATION_ROLE_CHANGE_PASSWORD_GROUP
BACKUP_RESTORE_GROUP
DATABASE_LOGOUT_GROUP
DATABASE_OBJECT_CHANGE_GROUP
DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP
DATABASE_OBJECT_PERMISSION_CHANGE_GROUP
DATABASE_OPERATION_GROUP
DATABASE_PERMISSION_CHANGE_GROUP
DATABASE_PRINCIPAL_CHANGE_GROUP
DATABASE_PRINCIPAL_IMPERSONATION_GROUP
DATABASE_ROLE_MEMBER_CHANGE_GROUP
FAILED_DATABASE_AUTHENTICATION_GROUP
SCHEMA_OBJECT_ACCESS_GROUP
SCHEMA_OBJECT_CHANGE_GROUP
SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP
SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP
SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP
USER_CHANGE_PASSWORD_GROUP
BATCH_STARTED_GROUP
BATCH_COMPLETED_GROUP

These are groups that cover all sql statements and stored procedures executed against the database, and should not be used in combination with other groups as this will result in duplicate audit logs.

For more information, see [Database-Level Audit Action Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups).

For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are:
SELECT
UPDATE
INSERT
DELETE
EXECUTE
RECEIVE
REFERENCES

The general form for defining an action to be audited is:
{action} ON {object} BY {principal}

Note that <object> in the above format can refer to an object like a table, view, or stored procedure, or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively.

For example:
SELECT on dbo.myTable by public
SELECT on DATABASE::myDatabase by public
SELECT on SCHEMA::mySchema by public

For more information, see [Database-Level Audit Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions))'
)]
        [string[]]
        $auditActionsAndGroups,
        [parameter(mandatory=$False,HelpMessage='Specifies the blob storage subscription Id.)')]
        [string]
        $storageAccountSubscriptionId,
        [parameter(mandatory=$False,HelpMessage='Specifies condition of where clause when creating an audit.)')]
        [string]
        $predicateExpression,
        [parameter(mandatory=$False,HelpMessage='Specifies whether storageAccountAccessKey value is the storage''s secondary key.)')]
        [bool]
        $isStorageSecondaryKeyInUse,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName,
        [parameter(mandatory=$False,HelpMessage='Specifies the number of days to keep in the audit logs in the storage account.)')]
        [int]
        $retentionDays,
        [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:sql:ExtendedServerBlobAuditingPolicy")

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

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

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

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

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

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

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

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

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

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

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeSqlWorkloadGroup
{
    [Alias('azure_native_sql_workloadgroup')]
    param (
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the server.)')]
        [string]
        $serverName,
        [parameter(mandatory=$False,HelpMessage='The workload group query execution timeout.)')]
        [int]
        $queryExecutionTimeout,
        [parameter(mandatory=$False,HelpMessage='The workload group importance level.)')]
        [string]
        $importance,
        [parameter(mandatory=$False,HelpMessage='The workload group cap percentage resource.)')]
        [int]
        $maxResourcePercent,
        [parameter(mandatory=$False,HelpMessage='The workload group minimum percentage resource.)')]
        [int]
        $minResourcePercent,
        [parameter(mandatory=$False,HelpMessage='The name of the workload group.)')]
        [string]
        $workloadGroupName,
        [parameter(mandatory=$False,HelpMessage='The workload group request maximum grant percentage.)')]
        [int]
        $maxResourcePercentPerRequest,
        [parameter(mandatory=$False,HelpMessage='The name of the database.)')]
        [string]
        $databaseName,
        [parameter(mandatory=$False,HelpMessage='The workload group request minimum grant percentage.)')]
        [int]
        $minResourcePercentPerRequest,
        [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:sql:WorkloadGroup")

        $resource.properties["databaseName"] = $databaseName
        $resource.properties["maxResourcePercent"] = $maxResourcePercent
        $resource.properties["minResourcePercent"] = $minResourcePercent
        $resource.properties["minResourcePercentPerRequest"] = $minResourcePercentPerRequest
        $resource.properties["resourceGroupName"] = $resourceGroupName
        $resource.properties["serverName"] = $serverName

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

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

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeSqlWorkloadClassifier
{
    [Alias('azure_native_sql_workloadclassifier')]
    param (
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the server.)')]
        [string]
        $serverName,
        [parameter(mandatory=$False,HelpMessage='The workload classifier member name.)')]
        [string]
        $memberName,
        [parameter(mandatory=$False,HelpMessage='The name of the database.)')]
        [string]
        $databaseName,
        [parameter(mandatory=$False,HelpMessage='The name of the workload group from which to receive the classifier from.)')]
        [string]
        $workloadGroupName,
        [parameter(mandatory=$False,HelpMessage='The workload classifier importance.)')]
        [string]
        $importance,
        [parameter(mandatory=$False,HelpMessage='The workload classifier start time for classification.)')]
        [string]
        $startTime,
        [parameter(mandatory=$False,HelpMessage='The name of the workload classifier to create/update.)')]
        [string]
        $workloadClassifierName,
        [parameter(mandatory=$False,HelpMessage='The workload classifier context.)')]
        [string]
        $context,
        [parameter(mandatory=$False,HelpMessage='The workload classifier label.)')]
        [string]
        $label,
        [parameter(mandatory=$False,HelpMessage='The workload classifier end time for classification.)')]
        [string]
        $endTime,
        [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:sql:WorkloadClassifier")

        $resource.properties["databaseName"] = $databaseName
        $resource.properties["memberName"] = $memberName
        $resource.properties["resourceGroupName"] = $resourceGroupName
        $resource.properties["serverName"] = $serverName
        $resource.properties["workloadGroupName"] = $workloadGroupName

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

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

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

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

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
class InstanceFailoverGroupReadWriteEndpoint
{
    [int] $failoverWithDataLossGracePeriodMinutes
    [ValidateSet('Manual', 'Automatic')]
    [string] $failoverPolicy
}
function New-AzureNativeTypeSqlInstanceFailoverGroupReadWriteEndpoint
{
    param (
        [parameter(mandatory=$False,HelpMessage='Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.)')]
        [int]
        $failoverWithDataLossGracePeriodMinutes,
        [parameter(mandatory=$False,HelpMessage='Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.)')]
        [string]
        [ValidateSet('Manual', 'Automatic')]
        $failoverPolicy
    )

    process
    {
        return $([InstanceFailoverGroupReadWriteEndpoint]$PSBoundParameters)
    }
}
class InstanceFailoverGroupReadOnlyEndpoint
{
    [ValidateSet('Disabled', 'Enabled')]
    [string] $failoverPolicy
}
function New-AzureNativeTypeSqlInstanceFailoverGroupReadOnlyEndpoint
{
    param (
        [parameter(mandatory=$False,HelpMessage='Failover policy of the read-only endpoint for the failover group.)')]
        [string]
        [ValidateSet('Disabled', 'Enabled')]
        $failoverPolicy
    )

    process
    {
        return $([InstanceFailoverGroupReadOnlyEndpoint]$PSBoundParameters)
    }
}
function New-AzureNativeSqlInstanceFailoverGroup
{
    [Alias('azure_native_sql_instancefailovergroup')]
    param (
        [parameter(mandatory=$False,HelpMessage='List of managed instance pairs in the failover group.)')]
        $managedInstancePairs,
        [parameter(mandatory=$False,HelpMessage='The name of the failover group.)')]
        [string]
        $failoverGroupName,
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the region where the resource is located.)')]
        [string]
        $locationName,
        [parameter(mandatory=$False,HelpMessage='Read-write endpoint of the failover group instance.)')]
        [InstanceFailoverGroupReadWriteEndpoint]
        $readWriteEndpoint,
        [parameter(mandatory=$False,HelpMessage='Partner region information for the failover group.)')]
        $partnerRegions,
        [parameter(mandatory=$False,HelpMessage='Read-only endpoint of the failover group instance.)')]
        [InstanceFailoverGroupReadOnlyEndpoint]
        $readOnlyEndpoint,
        [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:sql:InstanceFailoverGroup")

        $resource.properties["locationName"] = $locationName
        $resource.properties["managedInstancePairs"] = $managedInstancePairs
        $resource.properties["partnerRegions"] = $partnerRegions
        $resource.properties["readWriteEndpoint"] = $readWriteEndpoint
        $resource.properties["resourceGroupName"] = $resourceGroupName

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeSqlServerTrustCertificate
{
    [Alias('azure_native_sql_servertrustcertificate')]
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the managed instance.)')]
        [string]
        $managedInstanceName,
        [parameter(mandatory=$False,HelpMessage='The 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='The certificate public blob)')]
        [string]
        $publicBlob,
        [parameter(mandatory=$False,HelpMessage='Name of of the certificate to upload.)')]
        [string]
        $certificateName,
        [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:sql:ServerTrustCertificate")

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

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeSqlDatabase
{
    [Alias('azure_native_sql_database')]
    param (
        [parameter(mandatory=$False,HelpMessage='Specifies the mode of database creation.

Default: regular database creation.

Copy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource ID of the source database.

Secondary: creates a database as a secondary replica of an existing database. sourceDatabaseId must be specified as the resource ID of the existing primary database.

PointInTimeRestore: Creates a database by restoring a point in time backup of an existing database. sourceDatabaseId must be specified as the resource ID of the existing database, and restorePointInTime must be specified.

Recovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be specified as the recoverable database resource ID to restore.

Restore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must be specified. If sourceDatabaseId is the database''s original resource ID, then sourceDatabaseDeletionDate must be specified. Otherwise sourceDatabaseId must be the restorable dropped database resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime may also be specified to restore from an earlier point in time.

RestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention vault. recoveryServicesRecoveryPointResourceId must be specified as the recovery point resource ID.

Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition.)'
)]
        [string]
        [ValidateSet('Default', 'Copy', 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', 'RestoreLongTermRetentionBackup', 'OnlineSecondary')]
        $createMode,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName,
        [parameter(mandatory=$False,HelpMessage='The collation of the database.)')]
        [string]
        $collation,
        [parameter(mandatory=$False,HelpMessage='The resource identifier of the recoverable database associated with create operation of this database.)')]
        [string]
        $recoverableDatabaseId,
        [parameter(mandatory=$False,HelpMessage='Specifies the time that the database was deleted.)')]
        [string]
        $sourceDatabaseDeletionDate,
        [parameter(mandatory=$False,HelpMessage='The max size of the database expressed in bytes.)')]
        [int]
        $maxSizeBytes,
        [parameter(mandatory=$False,HelpMessage='The license type to apply for this database. `LicenseIncluded` if you need a license, or `BasePrice` if you have a license and are eligible for the Azure Hybrid Benefit.)')]
        [string]
        [ValidateSet('LicenseIncluded', 'BasePrice')]
        $licenseType,
        [parameter(mandatory=$False,HelpMessage='The storage account type to be used to store backups for this database.)')]
        [string]
        [ValidateSet('Geo', 'Local', 'Zone')]
        $requestedBackupStorageRedundancy,
        [parameter(mandatory=$False,HelpMessage='The resource identifier of the recovery point associated with create operation of this database.)')]
        [string]
        $recoveryServicesRecoveryPointId,
        [parameter(mandatory=$False,HelpMessage='The resource identifier of the source database associated with create operation of this database.)')]
        [string]
        $sourceDatabaseId,
        [parameter(mandatory=$False,HelpMessage='The resource identifier of the restorable dropped database associated with create operation of this database.)')]
        [string]
        $restorableDroppedDatabaseId,
        [parameter(mandatory=$False,HelpMessage='Resource location.)')]
        [string]
        $location,
        [parameter(mandatory=$False,HelpMessage='Collation of the metadata catalog.)')]
        [string]
        [ValidateSet('DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS')]
        $catalogCollation,
        [parameter(mandatory=$False,HelpMessage='The database SKU.

The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or one of the following commands:

```azurecli
az sql db list-editions -l <location> -o table
````

```powershell
Get-AzSqlServerServiceObjective -Location <location>
````
)'
)]
        [Sku]
        $sku,
        [parameter(mandatory=$False,HelpMessage='Minimal capacity that database will always have allocated, if not paused)')]
        [int]
        $minCapacity,
        [parameter(mandatory=$False,HelpMessage='The 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 tags.)')]
        [hashtable]
        $tags,
        [parameter(mandatory=$False,HelpMessage='The number of secondary replicas associated with the database that are used to provide high availability.)')]
        [int]
        $highAvailabilityReplicaCount,
        [parameter(mandatory=$False,HelpMessage='The name of the database.)')]
        [string]
        $databaseName,
        [parameter(mandatory=$False,HelpMessage='The secondary type of the database if it is a secondary. Valid values are Geo and Named.)')]
        [string]
        [ValidateSet('Geo', 'Named')]
        $secondaryType,
        [parameter(mandatory=$False,HelpMessage='The resource identifier of the long term retention backup associated with create operation of this database.)')]
        [string]
        $longTermRetentionBackupResourceId,
        [parameter(mandatory=$False,HelpMessage='Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.)')]
        [bool]
        $zoneRedundant,
        [parameter(mandatory=$False,HelpMessage='The name of the sample schema to apply when creating this database.)')]
        [string]
        [ValidateSet('AdventureWorksLT', 'WideWorldImportersStd', 'WideWorldImportersFull')]
        $sampleName,
        [parameter(mandatory=$False,HelpMessage='The resource identifier of the elastic pool containing this database.)')]
        [string]
        $elasticPoolId,
        [parameter(mandatory=$False,HelpMessage='Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database.)')]
        [string]
        $restorePointInTime,
        [parameter(mandatory=$False,HelpMessage='The state of read-only routing. If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica in the same region.)')]
        [string]
        [ValidateSet('Enabled', 'Disabled')]
        $readScale,
        [parameter(mandatory=$False,HelpMessage='Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled)')]
        [int]
        $autoPauseDelay,
        [parameter(mandatory=$False,HelpMessage='Maintenance configuration id assigned to the database. This configuration defines the period when the maintenance updates will occur.)')]
        [string]
        $maintenanceConfigurationId,
        [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:sql:Database")

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeSqlBackupShortTermRetentionPolicy
{
    [Alias('azure_native_sql_backupshorttermretentionpolicy')]
    param (
        [parameter(mandatory=$False,HelpMessage='The policy name. Should always be "default".)')]
        [string]
        $policyName,
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the database.)')]
        [string]
        $databaseName,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName,
        [parameter(mandatory=$False,HelpMessage='The backup retention period in days. This is how many days Point-in-Time Restore will be supported.)')]
        [int]
        $retentionDays,
        [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:sql:BackupShortTermRetentionPolicy")

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

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeSqlSensitivityLabel
{
    [Alias('azure_native_sql_sensitivitylabel')]
    param (
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the server.)')]
        [string]
        $serverName,
        [parameter(mandatory=$False,HelpMessage='The information type ID.)')]
        [string]
        $informationTypeId,
        [parameter(mandatory=$False,HelpMessage='The name of the schema.)')]
        [string]
        $schemaName,
        [parameter(mandatory=$False,HelpMessage='The name of the table.)')]
        [string]
        $tableName,
        [parameter(mandatory=$False,HelpMessage='The label name.)')]
        [string]
        $labelName,
        [parameter(mandatory=$False,HelpMessage='The label ID.)')]
        [string]
        $labelId,
        [parameter(mandatory=$False,HelpMessage='The information type.)')]
        [string]
        $informationType,
        [parameter(mandatory=$False,HelpMessage=')')]
        $rank,
        [parameter(mandatory=$False,HelpMessage='The source of the sensitivity label.)')]
        [string]
        $sensitivityLabelSource,
        [parameter(mandatory=$False,HelpMessage='The name of the database.)')]
        [string]
        $databaseName,
        [parameter(mandatory=$False,HelpMessage='The name of the column.)')]
        [string]
        $columnName,
        [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:sql:SensitivityLabel")

        $resource.properties["columnName"] = $columnName
        $resource.properties["databaseName"] = $databaseName
        $resource.properties["resourceGroupName"] = $resourceGroupName
        $resource.properties["schemaName"] = $schemaName
        $resource.properties["serverName"] = $serverName
        $resource.properties["tableName"] = $tableName

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

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

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

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

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeSqlJobAgent
{
    [Alias('azure_native_sql_jobagent')]
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the job agent to be created or updated.)')]
        [string]
        $jobAgentName,
        [parameter(mandatory=$False,HelpMessage='The name and tier of the SKU.)')]
        [Sku]
        $sku,
        [parameter(mandatory=$False,HelpMessage='The 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 tags.)')]
        [hashtable]
        $tags,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName,
        [parameter(mandatory=$False,HelpMessage='Resource ID of the database to store job metadata in.)')]
        [string]
        $databaseId,
        [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:sql:JobAgent")

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

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

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

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
class JobSchedule
{
    [string] $endTime
    [ValidateSet('Once', 'Recurring')]
    [object] $type
    [ValidateSet('Once', 'Recurring')]
    [string] $interval
    [ValidateSet('Once', 'Recurring')]
    [bool] $enabled
    [ValidateSet('Once', 'Recurring')]
    [string] $startTime
}
function New-AzureNativeTypeSqlJobSchedule
{
    param (
        [parameter(mandatory=$False,HelpMessage='Schedule end time.)')]
        [string]
        $endTime,
        [parameter(mandatory=$False,HelpMessage='Schedule interval type)')]
        $type,
        [parameter(mandatory=$False,HelpMessage='Value of the schedule''s recurring interval, if the ScheduleType is recurring. ISO8601 duration format.)')]
        [string]
        $interval,
        [parameter(mandatory=$False,HelpMessage='Whether or not the schedule is enabled.)')]
        [bool]
        $enabled,
        [parameter(mandatory=$False,HelpMessage='Schedule start time.)')]
        [string]
        $startTime
    )

    process
    {
        return $([JobSchedule]$PSBoundParameters)
    }
}
function New-AzureNativeSqlJob
{
    [Alias('azure_native_sql_job')]
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the job agent.)')]
        [string]
        $jobAgentName,
        [parameter(mandatory=$False,HelpMessage='The name of the job to get.)')]
        [string]
        $jobName,
        [parameter(mandatory=$False,HelpMessage='User-defined description of the job.)')]
        [string]
        $description,
        [parameter(mandatory=$False,HelpMessage='Schedule properties of the job.)')]
        [JobSchedule]
        $schedule,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName,
        [parameter(mandatory=$False,HelpMessage='The 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,HelpMessage='The reference to call when you want to make a dependency to another resource')]
        [string]
        $pulumiid
    )

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

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

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

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
class SyncGroupSchemaTableColumn
{
    [string] $dataSize
    [string] $quotedName
    [string] $dataType
}
function New-AzureNativeTypeSqlSyncGroupSchemaTableColumn
{
    param (
        [parameter(mandatory=$False,HelpMessage='Data size of the column.)')]
        [string]
        $dataSize,
        [parameter(mandatory=$False,HelpMessage='Quoted name of sync group table column.)')]
        [string]
        $quotedName,
        [parameter(mandatory=$False,HelpMessage='Data type of the column.)')]
        [string]
        $dataType
    )

    process
    {
        return $([SyncGroupSchemaTableColumn]$PSBoundParameters)
    }
}
class SyncGroupSchemaTable
{
    [SyncGroupSchemaTableColumn[]] $columns
    [string] $quotedName
}
function New-AzureNativeTypeSqlSyncGroupSchemaTable
{
    param (
        [parameter(mandatory=$False,HelpMessage='List of columns in sync group schema.)')]
        $columns,
        [parameter(mandatory=$False,HelpMessage='Quoted name of sync group schema table.)')]
        [string]
        $quotedName
    )

    process
    {
        return $([SyncGroupSchemaTable]$PSBoundParameters)
    }
}
class SyncGroupSchema
{
    [string] $masterSyncMemberName
    [SyncGroupSchemaTable[]] $tables
}
function New-AzureNativeTypeSqlSyncGroupSchema
{
    param (
        [parameter(mandatory=$False,HelpMessage='Name of master sync member where the schema is from.)')]
        [string]
        $masterSyncMemberName,
        [parameter(mandatory=$False,HelpMessage='List of tables in sync group schema.)')]
        $tables
    )

    process
    {
        return $([SyncGroupSchema]$PSBoundParameters)
    }
}
function New-AzureNativeSqlSyncGroup
{
    [Alias('azure_native_sql_syncgroup')]
    param (
        [parameter(mandatory=$False,HelpMessage='The name and capacity of the SKU.)')]
        [Sku]
        $sku,
        [parameter(mandatory=$False,HelpMessage='The name of the database on which the sync group is hosted.)')]
        [string]
        $databaseName,
        [parameter(mandatory=$False,HelpMessage='User name for the sync group hub database credential.)')]
        [string]
        $hubDatabaseUserName,
        [parameter(mandatory=$False,HelpMessage='If use private link connection is enabled.)')]
        [bool]
        $usePrivateLinkConnection,
        [parameter(mandatory=$False,HelpMessage='The name of the sync group.)')]
        [string]
        $syncGroupName,
        [parameter(mandatory=$False,HelpMessage='ARM resource id of the sync database in the sync group.)')]
        [string]
        $syncDatabaseId,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName,
        [parameter(mandatory=$False,HelpMessage='If conflict logging is enabled.)')]
        [bool]
        $enableConflictLogging,
        [parameter(mandatory=$False,HelpMessage='Conflict logging retention period.)')]
        [int]
        $conflictLoggingRetentionInDays,
        [parameter(mandatory=$False,HelpMessage='The 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='Sync schema of the sync group.)')]
        [SyncGroupSchema]
        $schema,
        [parameter(mandatory=$False,HelpMessage='Sync interval of the sync group.)')]
        [int]
        $interval,
        [parameter(mandatory=$False,HelpMessage='Password for the sync group hub database credential.)')]
        [string]
        $hubDatabasePassword,
        [parameter(mandatory=$False,HelpMessage='Conflict resolution policy of the sync group.)')]
        [string]
        [ValidateSet('HubWin', 'MemberWin')]
        $conflictResolutionPolicy,
        [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:sql:SyncGroup")

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

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

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

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

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

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

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

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

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

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

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeSqlManagedDatabaseSensitivityLabel
{
    [Alias('azure_native_sql_manageddatabasesensitivitylabel')]
    param (
        [parameter(mandatory=$False,HelpMessage='The 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='The name of the managed instance.)')]
        [string]
        $managedInstanceName,
        [parameter(mandatory=$False,HelpMessage='The information type ID.)')]
        [string]
        $informationTypeId,
        [parameter(mandatory=$False,HelpMessage='The name of the schema.)')]
        [string]
        $schemaName,
        [parameter(mandatory=$False,HelpMessage='The name of the table.)')]
        [string]
        $tableName,
        [parameter(mandatory=$False,HelpMessage='The label name.)')]
        [string]
        $labelName,
        [parameter(mandatory=$False,HelpMessage='The label ID.)')]
        [string]
        $labelId,
        [parameter(mandatory=$False,HelpMessage='The information type.)')]
        [string]
        $informationType,
        [parameter(mandatory=$False,HelpMessage=')')]
        $rank,
        [parameter(mandatory=$False,HelpMessage='The source of the sensitivity label.)')]
        [string]
        $sensitivityLabelSource,
        [parameter(mandatory=$False,HelpMessage='The name of the database.)')]
        [string]
        $databaseName,
        [parameter(mandatory=$False,HelpMessage='The name of the column.)')]
        [string]
        $columnName,
        [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:sql:ManagedDatabaseSensitivityLabel")

        $resource.properties["columnName"] = $columnName
        $resource.properties["databaseName"] = $databaseName
        $resource.properties["managedInstanceName"] = $managedInstanceName
        $resource.properties["resourceGroupName"] = $resourceGroupName
        $resource.properties["schemaName"] = $schemaName
        $resource.properties["tableName"] = $tableName

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

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

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

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

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeSqlVirtualNetworkRule
{
    [Alias('azure_native_sql_virtualnetworkrule')]
    param (
        [parameter(mandatory=$False,HelpMessage='The 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 firewall rule before the virtual network has vnet service endpoint enabled.)')]
        [bool]
        $ignoreMissingVnetServiceEndpoint,
        [parameter(mandatory=$False,HelpMessage='The ARM resource id of the virtual network subnet.)')]
        [string]
        $virtualNetworkSubnetId,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName,
        [parameter(mandatory=$False,HelpMessage='The name of the virtual network rule.)')]
        [string]
        $virtualNetworkRuleName,
        [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:sql:VirtualNetworkRule")

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

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeSqlManagedInstanceAdministrator
{
    [Alias('azure_native_sql_managedinstanceadministrator')]
    param (
        [parameter(mandatory=$False,HelpMessage='Login name of the managed instance administrator.)')]
        [string]
        $login,
        [parameter(mandatory=$False,HelpMessage='The name of the managed instance.)')]
        [string]
        $managedInstanceName,
        [parameter(mandatory=$False,HelpMessage='The 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='SID (object ID) of the managed instance administrator.)')]
        [string]
        $sid,
        [parameter(mandatory=$False,HelpMessage=')')]
        [string]
        $administratorName,
        [parameter(mandatory=$False,HelpMessage='Type of the managed instance administrator.)')]
        [string]
        [ValidateSet('ActiveDirectory')]
        $administratorType,
        [parameter(mandatory=$False,HelpMessage='Tenant ID of the managed instance administrator.)')]
        [string]
        $tenantId,
        [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:sql:ManagedInstanceAdministrator")

        $resource.properties["administratorType"] = $administratorType
        $resource.properties["login"] = $login
        $resource.properties["managedInstanceName"] = $managedInstanceName
        $resource.properties["resourceGroupName"] = $resourceGroupName
        $resource.properties["sid"] = $sid

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeSqlServerVulnerabilityAssessment
{
    [Alias('azure_native_sql_servervulnerabilityassessment')]
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the server for which the vulnerability assessment is defined.)')]
        [string]
        $serverName,
        [parameter(mandatory=$False,HelpMessage='A shared access signature (SAS Key) that has write access to the blob container specified in ''storageContainerPath'' parameter. If ''storageAccountAccessKey'' isn''t specified, StorageContainerSasKey is required. Applies only if the storage account is not behind a Vnet or a firewall)')]
        [string]
        $storageContainerSasKey,
        [parameter(mandatory=$False,HelpMessage='The 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='Specifies the identifier key of the storage account for vulnerability assessment scan results. If ''StorageContainerSasKey'' isn''t specified, storageAccountAccessKey is required. Applies only if the storage account is not behind a Vnet or a firewall)')]
        [string]
        $storageAccountAccessKey,
        [parameter(mandatory=$False,HelpMessage='The name of the vulnerability assessment.)')]
        [string]
        $vulnerabilityAssessmentName,
        [parameter(mandatory=$False,HelpMessage='The recurring scans settings)')]
        [VulnerabilityAssessmentRecurringScansProperties]
        $recurringScans,
        [parameter(mandatory=$False,HelpMessage='A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).)')]
        [string]
        $storageContainerPath,
        [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:sql:ServerVulnerabilityAssessment")

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

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

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

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
class JobStepAction
{
    [ValidateSet('Inline')]
    [string] $source
    [ValidateSet('TSql')]
    [string] $type
    [ValidateSet('TSql')]
    [string] $value
}
function New-AzureNativeTypeSqlJobStepAction
{
    param (
        [parameter(mandatory=$False,HelpMessage='The source of the action to execute.)')]
        [string]
        [ValidateSet('Inline')]
        $source,
        [parameter(mandatory=$False,HelpMessage='Type of action being executed by the job step.)')]
        [string]
        [ValidateSet('TSql')]
        $type,
        [parameter(mandatory=$False,HelpMessage='The action value, for example the text of the T-SQL script to execute.)')]
        [string]
        $value
    )

    process
    {
        return $([JobStepAction]$PSBoundParameters)
    }
}
class JobStepOutput
{
    [string] $tableName
    [string] $databaseName
    [string] $schemaName
    [string] $credential
    [string] $subscriptionId
    [string] $resourceGroupName
    [string] $serverName
    [ValidateSet('SqlDatabase')]
    [string] $type
}
function New-AzureNativeTypeSqlJobStepOutput
{
    param (
        [parameter(mandatory=$False,HelpMessage='The output destination table.)')]
        [string]
        $tableName,
        [parameter(mandatory=$False,HelpMessage='The output destination database.)')]
        [string]
        $databaseName,
        [parameter(mandatory=$False,HelpMessage='The output destination schema.)')]
        [string]
        $schemaName,
        [parameter(mandatory=$False,HelpMessage='The resource ID of the credential to use to connect to the output destination.)')]
        [string]
        $credential,
        [parameter(mandatory=$False,HelpMessage='The output destination subscription id.)')]
        [string]
        $subscriptionId,
        [parameter(mandatory=$False,HelpMessage='The output destination resource group.)')]
        [string]
        $resourceGroupName,
        [parameter(mandatory=$False,HelpMessage='The output destination server name.)')]
        [string]
        $serverName,
        [parameter(mandatory=$False,HelpMessage='The output destination type.)')]
        [string]
        [ValidateSet('SqlDatabase')]
        $type
    )

    process
    {
        return $([JobStepOutput]$PSBoundParameters)
    }
}
class JobStepExecutionOptions
{
    [int] $timeoutSeconds
    [int] $maximumRetryIntervalSeconds
    [int] $retryIntervalBackoffMultiplier
    [int] $retryAttempts
    [int] $initialRetryIntervalSeconds
}
function New-AzureNativeTypeSqlJobStepExecutionOptions
{
    param (
        [parameter(mandatory=$False,HelpMessage='Execution timeout for the job step.)')]
        [int]
        $timeoutSeconds,
        [parameter(mandatory=$False,HelpMessage='The maximum amount of time to wait between retries for job step execution.)')]
        [int]
        $maximumRetryIntervalSeconds,
        [parameter(mandatory=$False,HelpMessage='The backoff multiplier for the time between retries.)')]
        [int]
        $retryIntervalBackoffMultiplier,
        [parameter(mandatory=$False,HelpMessage='Maximum number of times the job step will be reattempted if the first attempt fails.)')]
        [int]
        $retryAttempts,
        [parameter(mandatory=$False,HelpMessage='Initial delay between retries for job step execution.)')]
        [int]
        $initialRetryIntervalSeconds
    )

    process
    {
        return $([JobStepExecutionOptions]$PSBoundParameters)
    }
}
function New-AzureNativeSqlJobStep
{
    [Alias('azure_native_sql_jobstep')]
    param (
        [parameter(mandatory=$False,HelpMessage='The resource ID of the job credential that will be used to connect to the targets.)')]
        [string]
        $credential,
        [parameter(mandatory=$False,HelpMessage='The action payload of the job step.)')]
        [JobStepAction]
        $action,
        [parameter(mandatory=$False,HelpMessage='The name of the job.)')]
        [string]
        $jobName,
        [parameter(mandatory=$False,HelpMessage='Output destination properties of the job step.)')]
        [JobStepOutput]
        $output,
        [parameter(mandatory=$False,HelpMessage='The name of the job agent.)')]
        [string]
        $jobAgentName,
        [parameter(mandatory=$False,HelpMessage='The job step''s index within the job. If not specified when creating the job step, it will be created as the last step. If not specified when updating the job step, the step id is not modified.)')]
        [int]
        $stepId,
        [parameter(mandatory=$False,HelpMessage='The resource ID of the target group that the job step will be executed on.)')]
        [string]
        $targetGroup,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName,
        [parameter(mandatory=$False,HelpMessage='The 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='Execution options for the job step.)')]
        [JobStepExecutionOptions]
        $executionOptions,
        [parameter(mandatory=$False,HelpMessage='The name of the job step.)')]
        [string]
        $stepName,
        [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:sql:JobStep")

        $resource.properties["action"] = $action
        $resource.properties["credential"] = $credential
        $resource.properties["jobAgentName"] = $jobAgentName
        $resource.properties["jobName"] = $jobName
        $resource.properties["resourceGroupName"] = $resourceGroupName
        $resource.properties["serverName"] = $serverName
        $resource.properties["targetGroup"] = $targetGroup

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

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

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeSqlDatabaseSecurityAlertPolicy
{
    [Alias('azure_native_sql_databasesecurityalertpolicy')]
    param (
        [parameter(mandatory=$False,HelpMessage='Specifies an array of e-mail addresses to which the alert is sent.)')]
        [string[]]
        $emailAddresses,
        [parameter(mandatory=$False,HelpMessage='The name of the server.)')]
        [string]
        $serverName,
        [parameter(mandatory=$False,HelpMessage='The name of the security alert policy.)')]
        [string]
        $securityAlertPolicyName,
        [parameter(mandatory=$False,HelpMessage='The 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='Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.)')]
        [string]
        $storageEndpoint,
        [parameter(mandatory=$False,HelpMessage='Specifies that the alert is sent to the account administrators.)')]
        [bool]
        $emailAccountAdmins,
        [parameter(mandatory=$False,HelpMessage='Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database.)')]
        $state,
        [parameter(mandatory=$False,HelpMessage='Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action, Brute_Force)')]
        [string[]]
        $disabledAlerts,
        [parameter(mandatory=$False,HelpMessage='Specifies the identifier key of the Threat Detection audit storage account.)')]
        [string]
        $storageAccountAccessKey,
        [parameter(mandatory=$False,HelpMessage='The name of the database for which the security alert policy is defined.)')]
        [string]
        $databaseName,
        [parameter(mandatory=$False,HelpMessage='Specifies the number of days to keep in the Threat Detection audit logs.)')]
        [int]
        $retentionDays,
        [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:sql:DatabaseSecurityAlertPolicy")

        $resource.properties["databaseName"] = $databaseName
        $resource.properties["resourceGroupName"] = $resourceGroupName
        $resource.properties["serverName"] = $serverName
        $resource.properties["state"] = $state

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

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

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

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

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

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeSqlSyncAgent
{
    [Alias('azure_native_sql_syncagent')]
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the sync agent.)')]
        [string]
        $syncAgentName,
        [parameter(mandatory=$False,HelpMessage='The 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 the sync database in the sync agent.)')]
        [string]
        $syncDatabaseId,
        [parameter(mandatory=$False,HelpMessage='The name of the server on which the sync agent is hosted.)')]
        [string]
        $serverName,
        [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:sql:SyncAgent")

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

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
class ManagedInstanceExternalAdministrator
{
    [string] $login
    [string] $sid
    [bool] $azureADOnlyAuthentication
    [ValidateSet('ActiveDirectory')]
    [string] $administratorType
    [ValidateSet('User', 'Group', 'Application')]
    [string] $principalType
    [ValidateSet('User', 'Group', 'Application')]
    [string] $tenantId
}
function New-AzureNativeTypeSqlManagedInstanceExternalAdministrator
{
    param (
        [parameter(mandatory=$False,HelpMessage='Login name of the server administrator.)')]
        [string]
        $login,
        [parameter(mandatory=$False,HelpMessage='SID (object ID) of the server administrator.)')]
        [string]
        $sid,
        [parameter(mandatory=$False,HelpMessage='Azure Active Directory only Authentication enabled.)')]
        [bool]
        $azureADOnlyAuthentication,
        [parameter(mandatory=$False,HelpMessage='Type of the sever administrator.)')]
        [string]
        [ValidateSet('ActiveDirectory')]
        $administratorType,
        [parameter(mandatory=$False,HelpMessage='Principal Type of the sever administrator.)')]
        [string]
        [ValidateSet('User', 'Group', 'Application')]
        $principalType,
        [parameter(mandatory=$False,HelpMessage='Tenant ID of the administrator.)')]
        [string]
        $tenantId
    )

    process
    {
        return $([ManagedInstanceExternalAdministrator]$PSBoundParameters)
    }
}
function New-AzureNativeSqlManagedInstance
{
    [Alias('azure_native_sql_managedinstance')]
    param (
        [parameter(mandatory=$False,HelpMessage='Collation of the managed instance.)')]
        [string]
        $collation,
        [parameter(mandatory=$False,HelpMessage='Subnet resource ID for the managed instance.)')]
        [string]
        $subnetId,
        [parameter(mandatory=$False,HelpMessage='Specifies the mode of database creation.

Default: Regular instance creation.

Restore: Creates an instance by restoring a set of backups to specific point in time. RestorePointInTime and SourceManagedInstanceId must be specified.)'
)]
        [string]
        [ValidateSet('Default', 'PointInTimeRestore')]
        $managedInstanceCreateMode,
        [parameter(mandatory=$False,HelpMessage='Whether or not the public data endpoint is enabled.)')]
        [bool]
        $publicDataEndpointEnabled,
        [parameter(mandatory=$False,HelpMessage='The resource id of another managed instance whose DNS zone this managed instance will share after creation.)')]
        [string]
        $dnsZonePartner,
        [parameter(mandatory=$False,HelpMessage='The Azure Active Directory administrator of the server.)')]
        [ManagedInstanceExternalAdministrator]
        $administrators,
        [parameter(mandatory=$False,HelpMessage='The resource identifier of the source managed instance associated with create operation of this instance.)')]
        [string]
        $sourceManagedInstanceId,
        [parameter(mandatory=$False,HelpMessage='The Id of the instance pool this managed server belongs to.)')]
        [string]
        $instancePoolId,
        [parameter(mandatory=$False,HelpMessage='Minimal TLS version. Allowed values: ''None'', ''1.0'', ''1.1'', ''1.2'')')]
        [string]
        $minimalTlsVersion,
        [parameter(mandatory=$False,HelpMessage='The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80.)')]
        [int]
        $vCores,
        [parameter(mandatory=$False,HelpMessage='The 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='Id of the timezone. Allowed values are timezones supported by Windows.
Windows keeps details on supported timezones, including the id, in registry under
KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones.
You can get those registry values via SQL Server by querying SELECT name AS timezone_id FROM sys.time_zone_info.
List of Ids can also be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell.
An example of valid timezone id is "Pacific Standard Time" or "W. Europe Standard Time".)'
)]
        [string]
        $timezoneId,
        [parameter(mandatory=$False,HelpMessage='Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database.)')]
        [string]
        $restorePointInTime,
        [parameter(mandatory=$False,HelpMessage='Resource location.)')]
        [string]
        $location,
        [parameter(mandatory=$False,HelpMessage='Connection type used for connecting to the instance.)')]
        [string]
        [ValidateSet('Proxy', 'Redirect', 'Default')]
        $proxyOverride,
        [parameter(mandatory=$False,HelpMessage='A CMK URI of the key to use for encryption.)')]
        [string]
        $keyId,
        [parameter(mandatory=$False,HelpMessage='Resource tags.)')]
        [hashtable]
        $tags,
        [parameter(mandatory=$False,HelpMessage='Storage size in GB. Minimum value: 32. Maximum value: 8192. Increments of 32 GB allowed only.)')]
        [int]
        $storageSizeInGB,
        [parameter(mandatory=$False,HelpMessage='The license type. Possible values are ''LicenseIncluded'' (regular price inclusive of a new SQL license) and ''BasePrice'' (discounted AHB price for bringing your own SQL licenses).)')]
        [string]
        [ValidateSet('LicenseIncluded', 'BasePrice')]
        $licenseType,
        [parameter(mandatory=$False,HelpMessage='The storage account type used to store backups for this instance. The options are LRS (LocallyRedundantStorage), ZRS (ZoneRedundantStorage) and GRS (GeoRedundantStorage))')]
        [string]
        [ValidateSet('GRS', 'LRS', 'ZRS')]
        $storageAccountType,
        [parameter(mandatory=$False,HelpMessage='Managed instance SKU. Allowed values for sku.name: GP_Gen4, GP_Gen5, BC_Gen4, BC_Gen5)')]
        [Sku]
        $sku,
        [parameter(mandatory=$False,HelpMessage='Whether or not the multi-az is enabled.)')]
        [bool]
        $zoneRedundant,
        [parameter(mandatory=$False,HelpMessage='Administrator username for the managed instance. Can only be specified when the managed instance is being created (and is required for creation).)')]
        [string]
        $administratorLogin,
        [parameter(mandatory=$False,HelpMessage='The resource id of a user assigned identity to be used by default.)')]
        [string]
        $primaryUserAssignedIdentityId,
        [parameter(mandatory=$False,HelpMessage='The name of the managed instance.)')]
        [string]
        $managedInstanceName,
        [parameter(mandatory=$False,HelpMessage='The Azure Active Directory identity of the managed instance.)')]
        [ResourceIdentity]
        $identity,
        [parameter(mandatory=$False,HelpMessage='The administrator login password (required for managed instance creation).)')]
        [string]
        $administratorLoginPassword,
        [parameter(mandatory=$False,HelpMessage='Specifies maintenance configuration id to apply to this managed instance.)')]
        [string]
        $maintenanceConfigurationId,
        [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:sql:ManagedInstance")

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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