pspulumiyaml.azurenative.guestconfiguration.psm1

using module pspulumiyaml
function Invoke-AzureNativeFunctionGuestconfigurationGetGuestConfigurationHCRPAssignment
{
    param (
        [parameter(mandatory=$False,HelpMessage='The guest configuration assignment name.)')]
        [string]
        $guestConfigurationAssignmentName,
        [parameter(mandatory=$False,HelpMessage='The name of the ARC machine.)')]
        [string]
        $machineName,
        [parameter(mandatory=$False,HelpMessage='The resource group name.)')]
        [string]
        $resourceGroupName
    )

    process
    {
        $arguments = @{}
        $arguments["guestConfigurationAssignmentName"] = $guestConfigurationAssignmentName
        $arguments["machineName"] = $machineName
        $arguments["resourceGroupName"] = $resourceGroupName

        $functionObject = Invoke-PulumiFunction -Name azure-native:guestconfiguration:getGuestConfigurationHCRPAssignment -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionGuestconfigurationGetGuestConfigurationAssignment
{
    param (
        [parameter(mandatory=$False,HelpMessage='The guest configuration assignment name.)')]
        [string]
        $guestConfigurationAssignmentName,
        [parameter(mandatory=$False,HelpMessage='The name of the virtual machine.)')]
        [string]
        $vmName,
        [parameter(mandatory=$False,HelpMessage='The resource group name.)')]
        [string]
        $resourceGroupName
    )

    process
    {
        $arguments = @{}
        $arguments["guestConfigurationAssignmentName"] = $guestConfigurationAssignmentName
        $arguments["resourceGroupName"] = $resourceGroupName
        $arguments["vmName"] = $vmName

        $functionObject = Invoke-PulumiFunction -Name azure-native:guestconfiguration:getGuestConfigurationAssignment -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
class ConfigurationParameter
{
    [string] $name
    [string] $value
}
function New-AzureNativeTypeGuestconfigurationConfigurationParameter
{
    param (
        [parameter(mandatory=$False,HelpMessage='Name of the configuration parameter.)')]
        [string]
        $name,
        [parameter(mandatory=$False,HelpMessage='Value of the configuration parameter.)')]
        [string]
        $value
    )

    process
    {
        return $([ConfigurationParameter]$PSBoundParameters)
    }
}
class ConfigurationSetting
{
    [bool] $allowModuleOverwrite
    [ArgumentCompletions('ApplyOnly', 'ApplyAndMonitor', 'ApplyAndAutoCorrect')]
    [string] $configurationMode
    [bool] $rebootIfNeeded
    [int] $configurationModeFrequencyMins
    [ArgumentCompletions('ContinueConfiguration', 'StopConfiguration')]
    [string] $actionAfterReboot
    [int] $refreshFrequencyMins
}
function New-AzureNativeTypeGuestconfigurationConfigurationSetting
{
    param (
        [parameter(mandatory=$False,HelpMessage='If true - new configurations downloaded from the pull service are allowed to overwrite the old ones on the target node. Otherwise, false)')]
        [bool]
        $allowModuleOverwrite,
        [parameter(mandatory=$False,HelpMessage='Specifies how the LCM(Local Configuration Manager) actually applies the configuration to the target nodes. Possible values are ApplyOnly, ApplyAndMonitor, and ApplyAndAutoCorrect.)')]
        [string]
        [ValidateSet('ApplyOnly', 'ApplyAndMonitor', 'ApplyAndAutoCorrect')]
        $configurationMode,
        [parameter(mandatory=$False,HelpMessage='Set this to true to automatically reboot the node after a configuration that requires reboot is applied. Otherwise, you will have to manually reboot the node for any configuration that requires it. The default value is false. To use this setting when a reboot condition is enacted by something other than DSC (such as Windows Installer), combine this setting with the xPendingReboot module.)')]
        [bool]
        $rebootIfNeeded,
        [parameter(mandatory=$False,HelpMessage='How often, in minutes, the current configuration is checked and applied. This property is ignored if the ConfigurationMode property is set to ApplyOnly. The default value is 15.)')]
        [int]
        $configurationModeFrequencyMins,
        [parameter(mandatory=$False,HelpMessage='Specifies what happens after a reboot during the application of a configuration. The possible values are ContinueConfiguration and StopConfiguration)')]
        [string]
        [ValidateSet('ContinueConfiguration', 'StopConfiguration')]
        $actionAfterReboot,
        [parameter(mandatory=$False,HelpMessage='The time interval, in minutes, at which the LCM checks a pull service to get updated configurations. This value is ignored if the LCM is not configured in pull mode. The default value is 30.)')]
        [int]
        $refreshFrequencyMins
    )

    process
    {
        return $([ConfigurationSetting]$PSBoundParameters)
    }
}
class GuestConfigurationNavigation
{
    [string] $name
    [ConfigurationParameter[]] $configurationProtectedParameter
    [string] $contentHash
    [string] $contentUri
    [ArgumentCompletions('DSC')]
    [string] $kind
    [ConfigurationParameter[]] $configurationParameter
    [ArgumentCompletions('Audit', 'DeployAndAutoCorrect', 'ApplyAndAutoCorrect', 'ApplyAndMonitor')]
    [string] $assignmentType
    [string] $version
    [ConfigurationSetting] $configurationSetting
}
function New-AzureNativeTypeGuestconfigurationGuestConfigurationNavigation
{
    param (
        [parameter(mandatory=$False,HelpMessage='Name of the guest configuration.)')]
        [string]
        $name,
        [parameter(mandatory=$False,HelpMessage='The protected configuration parameters for the guest configuration.)')]
        $configurationProtectedParameter,
        [parameter(mandatory=$False,HelpMessage='Combined hash of the guest configuration package and configuration parameters.)')]
        [string]
        $contentHash,
        [parameter(mandatory=$False,HelpMessage='Uri of the storage where guest configuration package is uploaded.)')]
        [string]
        $contentUri,
        [parameter(mandatory=$False,HelpMessage='Kind of the guest configuration. For example:DSC)')]
        [string]
        [ValidateSet('DSC')]
        $kind,
        [parameter(mandatory=$False,HelpMessage='The configuration parameters for the guest configuration.)')]
        $configurationParameter,
        [parameter(mandatory=$False,HelpMessage='Specifies the assignment type and execution of the configuration. Possible values are Audit, DeployAndAutoCorrect, ApplyAndAutoCorrect and ApplyAndMonitor.)')]
        [string]
        [ValidateSet('Audit', 'DeployAndAutoCorrect', 'ApplyAndAutoCorrect', 'ApplyAndMonitor')]
        $assignmentType,
        [parameter(mandatory=$False,HelpMessage='Version of the guest configuration.)')]
        [string]
        $version,
        [parameter(mandatory=$False,HelpMessage='The configuration setting for the guest configuration.)')]
        [ConfigurationSetting]
        $configurationSetting
    )

    process
    {
        return $([GuestConfigurationNavigation]$PSBoundParameters)
    }
}
class GuestConfigurationAssignmentProperties
{
    [string] $context
    [GuestConfigurationNavigation] $guestConfiguration
}
function New-AzureNativeTypeGuestconfigurationGuestConfigurationAssignmentProperties
{
    param (
        [parameter(mandatory=$False,HelpMessage='The source which initiated the guest configuration assignment. Ex: Azure Policy)')]
        [string]
        $context,
        [parameter(mandatory=$False,HelpMessage='The guest configuration to assign.)')]
        [GuestConfigurationNavigation]
        $guestConfiguration
    )

    process
    {
        return $([GuestConfigurationAssignmentProperties]$PSBoundParameters)
    }
}
function New-AzureNativeGuestconfigurationGuestConfigurationAssignment
{
    [Alias('azure_native_guestconfiguration_guestconfigurationassignment')]
    param (
        [parameter(mandatory=$False,HelpMessage='Name of the guest configuration assignment.)')]
        [string]
        $guestConfigurationAssignmentName,
        [parameter(mandatory=$False,HelpMessage='Properties of the Guest configuration assignment.)')]
        [GuestConfigurationAssignmentProperties]
        $properties,
        [parameter(mandatory=$False,HelpMessage='The resource group name.)')]
        [string]
        $resourceGroupName,
        [parameter(mandatory=$False,HelpMessage='Name of the guest configuration assignment.)')]
        [string]
        $name,
        [parameter(mandatory=$False,HelpMessage='The name of the virtual machine.)')]
        [string]
        $vmName,
        [parameter(mandatory=$False,HelpMessage='Region where the VM is located.)')]
        [string]
        $location,
        [parameter(mandatory,HelpMessage='The reference to call when you want to make a dependency to another resource')]
        [string]
        $pulumiid,
        [parameter(mandatory,HelpMessage='Pass in the resources you make to make this resource dependant on')]
        [object]
        $DependsOn
    )

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

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

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

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

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

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

        $global:pulumiresources += $resource
        return $resource
    }
}
function New-AzureNativeGuestconfigurationGuestConfigurationHCRPAssignment
{
    [Alias('azure_native_guestconfiguration_guestconfigurationhcrpassignment')]
    param (
        [parameter(mandatory=$False,HelpMessage='Name of the guest configuration assignment.)')]
        [string]
        $guestConfigurationAssignmentName,
        [parameter(mandatory=$False,HelpMessage='Properties of the Guest configuration assignment.)')]
        [GuestConfigurationAssignmentProperties]
        $properties,
        [parameter(mandatory=$False,HelpMessage='The resource group name.)')]
        [string]
        $resourceGroupName,
        [parameter(mandatory=$False,HelpMessage='The name of the ARC machine.)')]
        [string]
        $machineName,
        [parameter(mandatory=$False,HelpMessage='Name of the guest configuration assignment.)')]
        [string]
        $name,
        [parameter(mandatory=$False,HelpMessage='Region where the VM is located.)')]
        [string]
        $location,
        [parameter(mandatory,HelpMessage='The reference to call when you want to make a dependency to another resource')]
        [string]
        $pulumiid,
        [parameter(mandatory,HelpMessage='Pass in the resources you make to make this resource dependant on')]
        [object]
        $DependsOn
    )

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

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

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

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

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

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

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