Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 113 additions & 0 deletions Export-LogicAppDefinition.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
---
external help file: PowerAzPlus-help.xml
Module Name: PowerAzPlus
online version:
schema: 2.0.0
---

# Export-LogicAppDefinition

## SYNOPSIS
Exports the definition of an Azure Logic App to a JSON file.

## SYNTAX

```
Export-LogicAppDefinition [-Name] <String> [[-FilePath] <String>] [[-FileName] <String>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
```

## DESCRIPTION
The `Export-LogicAppDefinition` function retrieves the definition of a specified Azure Logic App and saves it as a JSON file to the specified file path. If the `FileName` parameter is not provided, a default name is generated based on the Logic App name and the current date/time.

## EXAMPLES

### Example 1
```powershell
Export-LogicAppDefinition -Name "MyLogicApp" -FilePath "C:\Exports" -FileName "MyLogicApp.json"
```

This example exports the definition of the Logic App named "MyLogicApp" to the file `C:\Exports\MyLogicApp.json`.

### Example 2: Exporting all Logic Apps in a Subscription
```powershell
Get-AzLogicApp | Export-LogicAppDefinition -FilePath "C:\Exports"
```

This example exports the definitions of all Logic Apps in the current Azure subscription to the `C:\Exports` directory. File names are automatically generated.

## PARAMETERS

### -FileName
Specifies the name of the JSON file to be created. If not provided, a name will be generated in the format `<LogicAppName>_<Timestamp>.json`.

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -FilePath
Specifies the directory path where the exported JSON file will be saved. If not provided, the current working directory is used by default.

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Name
Specifies the name of the Logic App to export. This parameter accepts input from the pipeline and by property name.

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
```

### -ProgressAction
{{ Fill ProgressAction Description }}

```yaml
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

### System.String

## OUTPUTS

### System.Object
## NOTES

## RELATED LINKS
264 changes: 264 additions & 0 deletions PowerAzPlus/PowerAzPlus-help.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,264 @@
<?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>Export-LogicAppDefinition</command:name>
<command:verb>Export</command:verb>
<command:noun>LogicAppDefinition</command:noun>
<maml:description>
<maml:para>Exports the definition of an Azure Logic App to a JSON file.</maml:para>
</maml:description>
</command:details>
<maml:description>
<maml:para>The `Export-LogicAppDefinition` function retrieves the definition of a specified Azure Logic App and saves it as a JSON file to the specified file path. If the `FileName` parameter is not provided, a default name is generated based on the Logic App name and the current date/time.</maml:para>
</maml:description>
<command:syntax>
<command:syntaxItem>
<maml:name>Export-LogicAppDefinition</maml:name>
<command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="none">
<maml:name>Name</maml:name>
<maml:description>
<maml:para>Specifies the name of the Logic App to export. This parameter accepts input from the pipeline and by property name.</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="1" aliases="none">
<maml:name>FilePath</maml:name>
<maml:description>
<maml:para>Specifies the directory path where the exported JSON file will be saved. If not provided, the current working directory is used by default.</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="2" aliases="none">
<maml:name>FileName</maml:name>
<maml:description>
<maml:para>Specifies the name of the JSON file to be created. If not provided, a name will be generated in the format `&lt;LogicAppName&gt;_&lt;Timestamp&gt;.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:syntaxItem>
</command:syntax>
<command:parameters>
<command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="none">
<maml:name>Name</maml:name>
<maml:description>
<maml:para>Specifies the name of the Logic App to export. This parameter accepts input from the pipeline and by property name.</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="1" aliases="none">
<maml:name>FilePath</maml:name>
<maml:description>
<maml:para>Specifies the directory path where the exported JSON file will be saved. If not provided, the current working directory is used by default.</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="2" aliases="none">
<maml:name>FileName</maml:name>
<maml:description>
<maml:para>Specifies the name of the JSON file to be created. If not provided, a name will be generated in the format `&lt;LogicAppName&gt;_&lt;Timestamp&gt;.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: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>System.Object</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>Export-LogicAppDefinition -Name "MyLogicApp" -FilePath "C:\Exports" -FileName "MyLogicApp.json"</dev:code>
<dev:remarks>
<maml:para>This example exports the definition of the Logic App named "MyLogicApp" to the file `C:\Exports\MyLogicApp.json`.</maml:para>
</dev:remarks>
</command:example>
<command:example>
<maml:title>---- Example 2: Exporting all Logic Apps in a Subscription ----</maml:title>
<dev:code>Get-AzLogicApp | Export-LogicAppDefinition -FilePath "C:\Exports"</dev:code>
<dev:remarks>
<maml:para>This example exports the definitions of all Logic Apps in the current Azure subscription to the `C:\Exports` directory. File names are automatically generated.</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>Import-LogicAppDefinition</command:name>
<command:verb>Import</command:verb>
<command:noun>LogicAppDefinition</command:noun>
<maml:description>
<maml:para>Imnports the definition of an Azure Logic App from a JSON file.</maml:para>
</maml:description>
</command:details>
<maml:description>
<maml:para>The `Export-LogicAppDefinition` function imports the definition from a JSON and overwrites an existing Logic Apps' workflow definition. The Logic App Name and Resource Group must be specific.</maml:para>
</maml:description>
<command:syntax>
<command:syntaxItem>
<maml:name>Import-LogicAppDefinition</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>Specifies the name of the Logic App to import the workflow definition to.</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="1" aliases="none">
<maml:name>ResourceGroupName</maml:name>
<maml:description>
<maml:para>Specifies the resource group name where the Logic App resides.</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="True (ByPropertyName)" position="2" aliases="FullName">
<maml:name>FileName</maml:name>
<maml:description>
<maml:para>Specifies the file name of the JSON file to import.</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>Name</maml:name>
<maml:description>
<maml:para>Specifies the name of the Logic App to import the workflow definition to.</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="1" aliases="none">
<maml:name>ResourceGroupName</maml:name>
<maml:description>
<maml:para>Specifies the resource group name where the Logic App resides.</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="True (ByPropertyName)" position="2" aliases="FullName">
<maml:name>FileName</maml:name>
<maml:description>
<maml:para>Specifies the file name of the JSON file to import.</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>System.Object</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>Import-LogicAppDefinition -Name mylogicapp -Resource logicapps-rg -File C:\backup\mylogicapp-export.json</dev:code>
<dev:remarks>
<maml:para>This example imports the definition found in C:\backup\mylogicapp-export.json to the Logic App named "mylogicapp".</maml:para>
</dev:remarks>
</command:example>
</command:examples>
<command:relatedLinks />
</command:command>
</helpItems>
4 changes: 2 additions & 2 deletions PowerAzPlus/PowerAzPlus.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RootModule = 'PowerAzPlus.psm1'

# Version number of this module.
ModuleVersion = '1.0.1'
ModuleVersion = '1.1.0'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down Expand Up @@ -107,7 +107,7 @@ PrivateData = @{
# IconUri = ''

# ReleaseNotes of this module
ReleaseNotes = 'Initial 1.0.0 release with Help.'
ReleaseNotes = 'Added Import-LogicAppDefinition, switch to XML-based help file.'

# Prerelease string of this module
# Prerelease = ''
Expand Down
Loading
Loading