en-US/PSArm.dll-Help.xml
<?xml version="1.0" encoding="utf-8"?>
<helpItems schema="maml" xmlns="http://msh"> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>ConvertFrom-ArmTemplate</command:name> <command:verb>ConvertFrom</command:verb> <command:noun>ArmTemplate</command:noun> <maml:description> <maml:para>Convert from an ARM JSON template to object form.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Converts an Azure ARM JSON template into a PSArm ARM template object type. Such an object can then be manipulated using PowerShell or written out either back to JSON or as a PSArm script using `ConvertTo-PSArmTemplate`.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>ConvertFrom-ArmTemplate</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="none"> <maml:name>Input</maml:name> <maml:description> <maml:para>A string containing the JSON for an ARM template.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>ConvertFrom-ArmTemplate</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to a JSON file containing an ARM template.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>ConvertFrom-ArmTemplate</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>Uri</maml:name> <maml:description> <maml:para>The URI of an ARM JSON file to be converted.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Uri[]</command:parameterValue> <dev:type> <maml:name>Uri[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="none"> <maml:name>Input</maml:name> <maml:description> <maml:para>A string containing the JSON for an ARM template.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>Path</maml:name> <maml:description> <maml:para>The path to a JSON file containing an ARM template.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>Uri</maml:name> <maml:description> <maml:para>The URI of an ARM JSON file to be converted.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Uri[]</command:parameterValue> <dev:type> <maml:name>Uri[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>System.String[]</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>PSArm.Templates.ArmTemplate</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para></maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- Example 1 --------------------------</maml:title> <dev:code>PS C:\> $template = ConvertFrom-ArmTemplate -Uri 'https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-vm-simple-linux/azuredeploy.json'</dev:code> <dev:remarks> <maml:para>Downloads the template at the given URL, parses it and deserializes it into an in-memory PSArm template object.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 2 --------------------------</maml:title> <dev:code>PS C:\> ConvertFrom-ArmTemplate -Uri 'https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-vm-simple-linux/azuredeploy.json' | ConvertTo-PSArm -OutFile ./linux-vm.psarm.ps1</dev:code> <dev:remarks> <maml:para>Downloads the template at the given URL, converts it from ARM JSON to a PSArm template object and then converts that to a PSArm script.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 2 --------------------------</maml:title> <dev:code>PS C:\> (ConvertFrom-ArmTemplate -Uri 'https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-vm-simple-linux/azuredeploy.json').ToJsonString()</dev:code> <dev:remarks> <maml:para>Downloads the template at the given URL, converts it from ARM JSON to a PSArm template object and then serializes it back to a JSON string.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks /> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>ConvertTo-PSArm</command:name> <command:verb>ConvertTo</command:verb> <command:noun>PSArm</command:noun> <maml:description> <maml:para>Convert a PSArm template object to a PSArm script that can generate it.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Converts a PSArm template object into a PSArm PowerShell script that, when executed, will generate that template. This is most useful for converting from ARM JSON templates after `ConvertFrom-ArmTemplate`.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>ConvertTo-PSArm</maml:name> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Force</maml:name> <maml:description> <maml:para>If a file exists in the `OutFile` location, overwrite it.</maml:para> </maml:description> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases="none"> <maml:name>InputTemplate</maml:name> <maml:description> <maml:para>The PSArm template object to convert to PSArm script.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">ArmTemplate[]</command:parameterValue> <dev:type> <maml:name>ArmTemplate[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>OutFile</maml:name> <maml:description> <maml:para>The file system location to write the converted template to. If a file already exists there, this will fail unless `-Force` is used.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>PassThru</maml:name> <maml:description> <maml:para>If set, the PSArm script will also be written out as a string.</maml:para> </maml:description> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Force</maml:name> <maml:description> <maml:para>If a file exists in the `OutFile` location, overwrite it.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases="none"> <maml:name>InputTemplate</maml:name> <maml:description> <maml:para>The PSArm template object to convert to PSArm script.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">ArmTemplate[]</command:parameterValue> <dev:type> <maml:name>ArmTemplate[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>OutFile</maml:name> <maml:description> <maml:para>The file system location to write the converted template to. If a file already exists there, this will fail unless `-Force` is used.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>PassThru</maml:name> <maml:description> <maml:para>If set, the PSArm script will also be written out as a string.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>PSArm.Templates.ArmTemplate[]</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para></maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- Example 1 --------------------------</maml:title> <dev:code>PS C:\> ConvertFrom-ArmTemplate -Path ./examples/windows-vm/template.json | ConvertTo-PSArm -OutFile ./windows-vm.psarm.ps1</dev:code> <dev:remarks> <maml:para>Converts a JSON ARM template file to a PSArm script.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks /> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>New-PSArmDependsOn</command:name> <command:verb>New</command:verb> <command:noun>PSArmDependsOn</command:noun> <maml:description> <maml:para>Declares an ARM template dependency</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Declares a dependency from the resource this is used in to the resources it refers to.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>New-PSArmDependsOn</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>Value</maml:name> <maml:description> <maml:para>References to the resources depended on.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">IArmString[]</command:parameterValue> <dev:type> <maml:name>IArmString[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>Value</maml:name> <maml:description> <maml:para>References to the resources depended on.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">IArmString[]</command:parameterValue> <dev:type> <maml:name>IArmString[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>None</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>PSArm.Templates.Primitives.ArmEntry</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para></maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- Example 1 --------------------------</maml:title> <dev:code>DependsOn @( resourceId 'Microsoft.Storage/storageAccounts' $storageAccountName resourceId 'Microsoft.Network/networkInterfaces' $nicName )</dev:code> <dev:remarks> <maml:para>Adds an entry in the current resource that it depends on the two other resources referred to.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks /> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>New-PSArmEntry</command:name> <command:verb>New</command:verb> <command:noun>PSArmEntry</command:noun> <maml:description> <maml:para>Declare a low-level ARM key/value pair.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>`New-PSArmEntry`, better used as the `RawEntry` keyword, allows you to specify an arbitrary key/value pair when building ARM JSON. This keyword is used internally for many PSArm definitions, but you can use it too to add custom entries to ARM templates.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>New-PSArmEntry</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>Key</maml:name> <maml:description> <maml:para>The JSON key of this ARM entry</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">IArmString</command:parameterValue> <dev:type> <maml:name>IArmString</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>Body</maml:name> <maml:description> <maml:para>An object body for this entry.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">ScriptBlock</command:parameterValue> <dev:type> <maml:name>ScriptBlock</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Array</maml:name> <maml:description> <maml:para>Defines this entry as an array entry. This and any other entries with the same key will be collected into a JSON array.</maml:para> </maml:description> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>ArrayBody</maml:name> <maml:description> <maml:para>Defines this entry as having an array body. The value of this entry will be rendered as an array in JSON. If the value is already an array, it will be a second order array.</maml:para> </maml:description> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>DiscriminatorKey</maml:name> <maml:description> <maml:para>Specifies the name of the discriminator of the ARM element being described</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>DiscriminatorValue</maml:name> <maml:description> <maml:para>Specifies the value of the discriminator of the ARM element being described</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>New-PSArmEntry</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>Key</maml:name> <maml:description> <maml:para>The JSON key of this ARM entry</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">IArmString</command:parameterValue> <dev:type> <maml:name>IArmString</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>Value</maml:name> <maml:description> <maml:para>The value to set in the ARM JSON</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">ArmElement</command:parameterValue> <dev:type> <maml:name>ArmElement</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Array</maml:name> <maml:description> <maml:para>Defines this entry as an array entry. This and any other entries with the same key will be collected into a JSON array.</maml:para> </maml:description> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Array</maml:name> <maml:description> <maml:para>Defines this entry as an array entry. This and any other entries with the same key will be collected into a JSON array.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>ArrayBody</maml:name> <maml:description> <maml:para>Defines this entry as having an array body. The value of this entry will be rendered as an array in JSON. If the value is already an array, it will be a second order array.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>Body</maml:name> <maml:description> <maml:para>An object body for this entry.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">ScriptBlock</command:parameterValue> <dev:type> <maml:name>ScriptBlock</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>DiscriminatorKey</maml:name> <maml:description> <maml:para>Specifies the name of the discriminator of the ARM element being described</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>DiscriminatorValue</maml:name> <maml:description> <maml:para>Specifies the value of the discriminator of the ARM element being described</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>Key</maml:name> <maml:description> <maml:para>The JSON key of this ARM entry</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">IArmString</command:parameterValue> <dev:type> <maml:name>IArmString</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>Value</maml:name> <maml:description> <maml:para>The value to set in the ARM JSON</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">ArmElement</command:parameterValue> <dev:type> <maml:name>ArmElement</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>None</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>PSArm.Templates.Primitives.ArmEntry</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para></maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- Example 1 --------------------------</maml:title> <dev:code>RawEntry 'key' 'value'</dev:code> <dev:remarks> <maml:para>Creates an entry that in a parent body will be rendered into JSON like:</maml:para> <maml:para>{ "key": "value" }</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 2 --------------------------</maml:title> <dev:code>RawEntry 'object' { RawEntry 'one' 'value1' RawEntry 'two' 'value2' RawEntry 'three' 'value3' }</dev:code> <dev:remarks> <maml:para>Creates an entry that in a parent body will be rendered into JSON like:</maml:para> <maml:para>{ "object": { "one": "value1", "two": "value2", "three": "value3" } }</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks /> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>New-PSArmFunctionCall</command:name> <command:verb>New</command:verb> <command:noun>PSArmFunctionCall</command:noun> <maml:description> <maml:para>Low-level way to declare a function call in ARM</maml:para> </maml:description> </command:details> <maml:description> <maml:para>`New-PSArmFunctionCall`, better used as the `RawCall` keyword, specifies an ARM function call with the given name and arguments.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>New-PSArmFunctionCall</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the function being called.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">IArmString</command:parameterValue> <dev:type> <maml:name>IArmString</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Arguments</maml:name> <maml:description> <maml:para>The arguments to the function call.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">ArmExpression[]</command:parameterValue> <dev:type> <maml:name>ArmExpression[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Arguments</maml:name> <maml:description> <maml:para>The arguments to the function call.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">ArmExpression[]</command:parameterValue> <dev:type> <maml:name>ArmExpression[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the function being called.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">IArmString</command:parameterValue> <dev:type> <maml:name>IArmString</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>PSArm.Templates.Primitives.ArmExpression[]</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>PSArm.Templates.Operations.ArmFunctionCallExpression</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para></maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- Example 1 --------------------------</maml:title> <dev:code>RawCall concat prefix suffic</dev:code> <dev:remarks> <maml:para>Specifies the parameter call `[concat('prefix', 'suffix')]`.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks /> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>New-PSArmOutput</command:name> <command:verb>New</command:verb> <command:noun>PSArmOutput</command:noun> <maml:description> <maml:para>Declare outputs of the template</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Declares any outputs of the ARM template. Best used as the `Output` keyword</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>New-PSArmOutput</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the output</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">IArmString</command:parameterValue> <dev:type> <maml:name>IArmString</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Type</maml:name> <maml:description> <maml:para>The ARM type of the output</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">IArmString</command:parameterValue> <dev:type> <maml:name>IArmString</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Value</maml:name> <maml:description> <maml:para>The reference expression for the output</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">IArmString</command:parameterValue> <dev:type> <maml:name>IArmString</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the output</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">IArmString</command:parameterValue> <dev:type> <maml:name>IArmString</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Type</maml:name> <maml:description> <maml:para>The ARM type of the output</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">IArmString</command:parameterValue> <dev:type> <maml:name>IArmString</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Value</maml:name> <maml:description> <maml:para>The reference expression for the output</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">IArmString</command:parameterValue> <dev:type> <maml:name>IArmString</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>None</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>PSArm.Templates.Primitives.ArmEntry</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para></maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- Example 1 --------------------------</maml:title> <dev:code>Output 'hostname' -Type 'string' -Value (reference $publicIPAddressName).dnsSettings.fqdn</dev:code> <dev:remarks> <maml:para>Declares the `hostname` output, which outputs the fully qualified domain name of the public IP address, which is a string.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks /> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>New-PSArmResource</command:name> <command:verb>New</command:verb> <command:noun>PSArmResource</command:noun> <maml:description> <maml:para>Declare an ARM resource in PSArm.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>The `Resource` keyword declares ARM resources in PSArm, to combine into templates for deployment. It is intended to be used in the body of the `Arm` keyword.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>New-PSArmResource</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the resource.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">IArmString</command:parameterValue> <dev:type> <maml:name>IArmString</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>Body</maml:name> <maml:description> <maml:para>The definition of the ARM resource, given as a scriptblock in PSArm.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">ScriptBlock</command:parameterValue> <dev:type> <maml:name>ScriptBlock</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>ApiVersion</maml:name> <maml:description> <maml:para>The API version of the declared ARM resource.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">IArmString</command:parameterValue> <dev:type> <maml:name>IArmString</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Type</maml:name> <maml:description> <maml:para>The type of the resource being defined.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">IArmString</command:parameterValue> <dev:type> <maml:name>IArmString</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Provider</maml:name> <maml:description> <maml:para>{{ Fill Provider Description }}</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">IArmString</command:parameterValue> <dev:type> <maml:name>IArmString</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>ApiVersion</maml:name> <maml:description> <maml:para>The API version of the declared ARM resource.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">IArmString</command:parameterValue> <dev:type> <maml:name>IArmString</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>Body</maml:name> <maml:description> <maml:para>The definition of the ARM resource, given as a scriptblock in PSArm.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">ScriptBlock</command:parameterValue> <dev:type> <maml:name>ScriptBlock</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the resource.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">IArmString</command:parameterValue> <dev:type> <maml:name>IArmString</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Type</maml:name> <maml:description> <maml:para>The type of the resource being defined.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">IArmString</command:parameterValue> <dev:type> <maml:name>IArmString</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Provider</maml:name> <maml:description> <maml:para>{{ Fill Provider Description }}</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">IArmString</command:parameterValue> <dev:type> <maml:name>IArmString</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>None</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>PSArm.Templates.Primitives.ArmEntry</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para></maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- Example 1 --------------------------</maml:title> <dev:code>Resource $storageAccountName -Provider 'Microsoft.Storage' -Type 'storageAccounts' -apiVersion '2019-06-01' -kind 'StorageV2' -Location 'WestUS2' { ArmSku 'Standard_LRS' Properties { accessTier 'Hot' minimumTLSVersion 'TLS1_2' supportsHTTPSTrafficOnly 1 allowBlobPublicAccess 1 allowSharedKeyAccess 1 } }</dev:code> <dev:remarks> <maml:para>Declares a storage account resource in the PSArm DSL.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks /> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>New-PSArmSku</command:name> <command:verb>New</command:verb> <command:noun>PSArmSku</command:noun> <maml:description> <maml:para>Declare the SKU of the given resource</maml:para> </maml:description> </command:details> <maml:description> <maml:para>The `ArmSku` keyword specifies what SKU the given resource is. Not all `ArmSku` parameters will apply to every resource</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>New-PSArmSku</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>Name</maml:name> <maml:description> <maml:para>The SKU name required</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">IArmString</command:parameterValue> <dev:type> <maml:name>IArmString</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Capacity</maml:name> <maml:description> <maml:para>The SKU capacity required</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">IArmString</command:parameterValue> <dev:type> <maml:name>IArmString</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Family</maml:name> <maml:description> <maml:para>The SKU family required</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">IArmString</command:parameterValue> <dev:type> <maml:name>IArmString</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Size</maml:name> <maml:description> <maml:para>The SKU size required</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">IArmString</command:parameterValue> <dev:type> <maml:name>IArmString</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Tier</maml:name> <maml:description> <maml:para>The SKU tier required</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">IArmString</command:parameterValue> <dev:type> <maml:name>IArmString</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Capacity</maml:name> <maml:description> <maml:para>The SKU capacity required</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">IArmString</command:parameterValue> <dev:type> <maml:name>IArmString</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Family</maml:name> <maml:description> <maml:para>The SKU family required</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">IArmString</command:parameterValue> <dev:type> <maml:name>IArmString</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>Name</maml:name> <maml:description> <maml:para>The SKU name required</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">IArmString</command:parameterValue> <dev:type> <maml:name>IArmString</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Size</maml:name> <maml:description> <maml:para>The SKU size required</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">IArmString</command:parameterValue> <dev:type> <maml:name>IArmString</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Tier</maml:name> <maml:description> <maml:para>The SKU tier required</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">IArmString</command:parameterValue> <dev:type> <maml:name>IArmString</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>None</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>PSArm.Templates.PRimitives.ArmEntry</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para></maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- Example 1 --------------------------</maml:title> <dev:code>ArmSku 'Basic' -Tier 'Regional'</dev:code> <dev:remarks> <maml:para>Declares the resource to have a SKU with name `Basic` and tier `Regional`</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks /> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>New-PSArmTemplate</command:name> <command:verb>New</command:verb> <command:noun>PSArmTemplate</command:noun> <maml:description> <maml:para>Define an Azure ARM template in script.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Defines an Azure ARM template in the body scriptblock. This cmdlet is intended to be used in the form of the `Arm` keyword for more fluent reading.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>New-PSArmTemplate</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>Body</maml:name> <maml:description> <maml:para>The ARM template declaration in the PSArm DSL.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">ScriptBlock</command:parameterValue> <dev:type> <maml:name>ScriptBlock</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the ARM template. If not provided, the name of the declaring file will be used. If multiple PSArm templates are declared in the same file, numbers will be added.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>Body</maml:name> <maml:description> <maml:para>The ARM template declaration in the PSArm DSL.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">ScriptBlock</command:parameterValue> <dev:type> <maml:name>ScriptBlock</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the ARM template. If not provided, the name of the declaring file will be used. If multiple PSArm templates are declared in the same file, numbers will be added.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>None</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>PSArm.Templates.ArmTemplate</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para></maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- Example 1 --------------------------</maml:title> <dev:code>Arm { Resource $storageAccountName -Provider 'Microsoft.Storage' -Type 'storageAccounts' -apiVersion '2019-06-01' -kind 'StorageV2' -Location 'WestUS2' { ArmSku 'Standard_LRS' Properties { accessTier 'Hot' minimumTLSVersion 'TLS1_2' supportsHTTPSTrafficOnly 1 allowBlobPublicAccess 1 allowSharedKeyAccess 1 } } }</dev:code> <dev:remarks> <maml:para>Declares a very simple ARM template that will deploy a new storage account.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks /> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Publish-PSArmTemplate</command:name> <command:verb>Publish</command:verb> <command:noun>PSArmTemplate</command:noun> <maml:description> <maml:para>Execute PSArm templates and write them as an ARM JSON template file.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>`Publish-PSArmTemplate` is the primary cmdlet in the PSArm module, used to execute PSArm template files. It works similarly to `Invoke-Pester` or `Invoke-Build`, where files with a given prefix are found and executed.</maml:para> <maml:para>`Publish-PSArmTemplate` will execute PSArm scripts given to it, aggregate them into a nested ARM template, add a hash value to that template, and then write the template out to a JSON file.</maml:para> <maml:para>Template file deployment must be done with a separate command, such as `New-AzResourceGroupDeployment`.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Publish-PSArmTemplate</maml:name> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>AzureToken</maml:name> <maml:description> <maml:para>An Azure token used to hash the generated template. By default, `Publish-PSArmTemplate` will try to use `Get-AzAccessToken` and `az accounts get-access-token`, but supplying a value for this parameter will override that. If `Publish-PSArmTemplate` is unable to hash the template (because it can't get a token or because the token is invalid) and `-NoHashTemplate` isn't specified, the command will fail.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Force</maml:name> <maml:description> <maml:para>Overwrite the output template file if it already exists.</maml:para> </maml:description> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>NoHashTemplate</maml:name> <maml:description> <maml:para>Skip the template hashing step. This means the template will not be hashed by sending it to the Azure template hashing API, so no token is needed and no hash is added to the template. This can be used to make template publication faster when experimenting with changes.</maml:para> </maml:description> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>NoWriteFile</maml:name> <maml:description> <maml:para>Do not write a template file.</maml:para> </maml:description> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>OutFile</maml:name> <maml:description> <maml:para>The path to write the template file to. If not specified, the template is written to `./template.json`.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Parameters</maml:name> <maml:description> <maml:para>A hashtable of parameters to supply to executed PSArm scripts and the templates they contain. If a PSArm script has a `param` block, parameters from this value will be used for it. Additionally, if the body of an `Arm` keyword has a `param` block, parameters from this value will be used for that as well. This parameter also supports `PSObject` values, meaning it can accept the output of cmdlets like `ConvertFrom-Json`.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Hashtable</command:parameterValue> <dev:type> <maml:name>Hashtable</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>PassThru</maml:name> <maml:description> <maml:para>Emit the final aggregated template object (not the JSON string) as output in addition to writing the template file.</maml:para> </maml:description> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="true" pipelineInput="True (ByValue)" position="named" aliases="Path"> <maml:name>TemplatePath</maml:name> <maml:description> <maml:para>The path to the PSArm template scripts to execute, or directories (or a combination of both). If directory paths are given, those will be recursively searched for files ending with the `.psarm.ps1` extension. All found PSArm template scripts will be executed in the order they're found and aggregated into a single nested ARM template for publication.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>AzureToken</maml:name> <maml:description> <maml:para>An Azure token used to hash the generated template. By default, `Publish-PSArmTemplate` will try to use `Get-AzAccessToken` and `az accounts get-access-token`, but supplying a value for this parameter will override that. If `Publish-PSArmTemplate` is unable to hash the template (because it can't get a token or because the token is invalid) and `-NoHashTemplate` isn't specified, the command will fail.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Force</maml:name> <maml:description> <maml:para>Overwrite the output template file if it already exists.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>NoHashTemplate</maml:name> <maml:description> <maml:para>Skip the template hashing step. This means the template will not be hashed by sending it to the Azure template hashing API, so no token is needed and no hash is added to the template. This can be used to make template publication faster when experimenting with changes.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>NoWriteFile</maml:name> <maml:description> <maml:para>Do not write a template file.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>OutFile</maml:name> <maml:description> <maml:para>The path to write the template file to. If not specified, the template is written to `./template.json`.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Parameters</maml:name> <maml:description> <maml:para>A hashtable of parameters to supply to executed PSArm scripts and the templates they contain. If a PSArm script has a `param` block, parameters from this value will be used for it. Additionally, if the body of an `Arm` keyword has a `param` block, parameters from this value will be used for that as well. This parameter also supports `PSObject` values, meaning it can accept the output of cmdlets like `ConvertFrom-Json`.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Hashtable</command:parameterValue> <dev:type> <maml:name>Hashtable</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>PassThru</maml:name> <maml:description> <maml:para>Emit the final aggregated template object (not the JSON string) as output in addition to writing the template file.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="true" pipelineInput="True (ByValue)" position="named" aliases="Path"> <maml:name>TemplatePath</maml:name> <maml:description> <maml:para>The path to the PSArm template scripts to execute, or directories (or a combination of both). If directory paths are given, those will be recursively searched for files ending with the `.psarm.ps1` extension. All found PSArm template scripts will be executed in the order they're found and aggregated into a single nested ARM template for publication.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>System.String[]</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>PSArm.Templates.ArmNestedTemplate</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para></maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- Example 1 --------------------------</maml:title> <dev:code>PS C:\> Publish-PSArmTemplate -TemplatePath ./examples/linux-vm -Parameters @{ AdminUsername = 'admin' AdminPasswordOrKey = 'verystrongpassword' AuthenticationType = 'password' }</dev:code> <dev:remarks> <maml:para>Execute the PSArm templates (files with the `.psarm.ps1` extension) in the `./examples/linux-vm` directory with the supplied parameters and write the ARM JSON template file out to the default location of `./template.json`. If the file already exists, this will fail.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 1 --------------------------</maml:title> <dev:code>PS C:\> $parameters = Get-Content -Raw -Path ./examples/windows-vm/parameters.json | ConvertFrom-Json PS C:\> Publish-PSArmTemplate -TemplatePath ./examples/windows-vm/windows-vm.psarm.ps1 -Parameters $parameters -OutFile windows-vm.json -Force</dev:code> <dev:remarks> <maml:para>Execute the PSArm template at `./examples/windows-vm/windows-vm.psarm.ps1` with the supplied parameters (`-Parameters` supports PSObjects) and write the ARM JSON template file out to `./windows-vm.json`. If the file already exists, this will overwrite it.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks /> </command:command> </helpItems> |