pspulumiyaml.azurenative.guestconfiguration.psm1

using module @{ ModuleName = "PSPulumiYaml"; ModuleVersion = "0.0.3"; GUID = "909344e0-a08f-45f6-8177-80e36bb2ba58" }
function Invoke-AzureNativeFunctionGuestconfigurationGetGuestConfigurationAssignment
{
    param (
        [parameter(mandatory=$False,HelpMessage='The resource group name.)')]
        [string]
        $resourceGroupName,
        [parameter(mandatory=$False,HelpMessage='The guest configuration assignment name.)')]
        [string]
        $guestConfigurationAssignmentName,
        [parameter(mandatory=$False,HelpMessage='The name of the virtual machine.)')]
        [string]
        $vmName
    )

    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
    }
}
function Invoke-AzureNativeFunctionGuestconfigurationGetGuestConfigurationHCRPAssignment
{
    param (
        [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='The guest configuration assignment name.)')]
        [string]
        $guestConfigurationAssignmentName
    )

    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
    }
}
class ConfigurationSetting
{
    [bool] $allowModuleOverwrite
    [ArgumentCompletions('ApplyOnly', 'ApplyAndMonitor', 'ApplyAndAutoCorrect')]
    [string] $configurationMode
    [ArgumentCompletions('ContinueConfiguration', 'StopConfiguration')]
    [string] $actionAfterReboot
    [bool] $rebootIfNeeded
    [int] $refreshFrequencyMins
    [int] $configurationModeFrequencyMins
}
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]
        [ArgumentCompletions('ApplyOnly', 'ApplyAndMonitor', 'ApplyAndAutoCorrect')]
        $configurationMode,
        [parameter(mandatory=$False,HelpMessage='Specifies what happens after a reboot during the application of a configuration. The possible values are ContinueConfiguration and StopConfiguration)')]
        [string]
        [ArgumentCompletions('ContinueConfiguration', 'StopConfiguration')]
        $actionAfterReboot,
        [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='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,
        [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
    )

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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