-
Notifications
You must be signed in to change notification settings - Fork 54
Update the help content for 'Push-OutputBinding' #179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| --- | ||
| external help file: Microsoft.Azure.Functions.PowerShellWorker-help.xml | ||
| Module Name: Microsoft.Azure.Functions.PowerShellWorker | ||
| online version: | ||
| schema: 2.0.0 | ||
| --- | ||
|
|
||
| # Get-OutputBinding | ||
|
|
||
| ## SYNOPSIS | ||
| Gets the hashtable of the output bindings set so far. | ||
|
|
||
| ## SYNTAX | ||
|
|
||
| ``` | ||
| Get-OutputBinding [[-Name] <String[]>] [-Purge] [<CommonParameters>] | ||
| ``` | ||
|
|
||
| ## DESCRIPTION | ||
| Gets the hashtable of the output bindings set so far. | ||
|
|
||
| ## EXAMPLES | ||
|
|
||
| ### EXAMPLE 1 | ||
| ``` | ||
| Get-OutputBinding | ||
| ``` | ||
|
|
||
| Gets the hashtable of all the output bindings set so far. | ||
|
|
||
| ### EXAMPLE 2 | ||
| ``` | ||
| Get-OutputBinding -Name res | ||
| ``` | ||
|
|
||
| Gets the hashtable of specific output binding. | ||
|
|
||
| ### EXAMPLE 3 | ||
| ``` | ||
| Get-OutputBinding -Name r* | ||
| ``` | ||
|
|
||
| Gets the hashtable of output bindings that match the wildcard. | ||
|
|
||
| ## PARAMETERS | ||
|
|
||
| ### -Name | ||
| The name of the output binding you want to get. | ||
| Supports wildcards. | ||
|
|
||
| ```yaml | ||
| Type: String[] | ||
| Parameter Sets: (All) | ||
| Aliases: | ||
|
|
||
| Required: False | ||
| Position: 1 | ||
| Default value: * | ||
| Accept pipeline input: True (ByPropertyName, ByValue) | ||
| Accept wildcard characters: False | ||
| ``` | ||
|
|
||
| ### -Purge | ||
| Clear all stored output binding values. | ||
|
|
||
| ```yaml | ||
| Type: SwitchParameter | ||
| Parameter Sets: (All) | ||
| Aliases: | ||
|
|
||
| Required: False | ||
| Position: Named | ||
| Default value: False | ||
| 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 | ||
|
|
||
| ## OUTPUTS | ||
|
|
||
| ### The hashtable of binding names to their respective value. | ||
| ## NOTES | ||
|
|
||
| ## RELATED LINKS | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,149 @@ | ||
| --- | ||
| external help file: Microsoft.Azure.Functions.PowerShellWorker-help.xml | ||
| Module Name: Microsoft.Azure.Functions.PowerShellWorker | ||
| online version: | ||
| schema: 2.0.0 | ||
| --- | ||
|
|
||
| # Push-OutputBinding | ||
|
|
||
| ## SYNOPSIS | ||
| Sets the value for the specified output binding. | ||
|
|
||
| ## SYNTAX | ||
|
|
||
| ``` | ||
| Push-OutputBinding [-Name] <String> [-Value] <Object> [-Clobber] [<CommonParameters>] | ||
| ``` | ||
|
|
||
| ## DESCRIPTION | ||
| When running in the Functions runtime, this cmdlet is aware of the output bindings | ||
| defined for the function that is invoking this cmdlet. | ||
| Hence, it's able to decide | ||
| whether an output binding accepts singleton value only or a collection of values. | ||
|
|
||
| For example, the HTTP output binding only accepts one response object, while the | ||
| queue output binding can accept one or multiple queue messages. | ||
|
|
||
| With this knowledge, the 'Push-OutputBinding' cmdlet acts differently based on the | ||
| value specified for '-Name': | ||
|
|
||
| - If the specified name cannot be resolved to a valid output binding, then an error | ||
| will be thrown; | ||
|
|
||
| - If the output binding corresponding to that name accepts a collection of values, | ||
| then it's allowed to call 'Push-OutputBinding' with the same name repeatedly in | ||
| the function script to push multiple values; | ||
|
|
||
| - If the output binding corresponding to that name only accepts a singleton value, | ||
| then the second time calling 'Push-OutputBinding' with that name will result in | ||
| an error, with detailed message about why it failed. | ||
|
|
||
| ## EXAMPLES | ||
|
|
||
| ### EXAMPLE 1 | ||
| ``` | ||
| Push-OutputBinding -Name response -Value "output #1" | ||
| ``` | ||
|
|
||
| The output binding of "response" will have the value of "output #1" | ||
|
|
||
| ### EXAMPLE 2 | ||
| ``` | ||
| Push-OutputBinding -Name response -Value "output #2" | ||
| ``` | ||
|
|
||
| The output binding is 'http', which accepts a singleton value only. | ||
| So an error will be thrown from this second run. | ||
|
|
||
| ### EXAMPLE 3 | ||
| ``` | ||
| Push-OutputBinding -Name response -Value "output #3" -Clobber | ||
| ``` | ||
|
|
||
| The output binding is 'http', which accepts a singleton value only. | ||
| But you can use '-Clobber' to override the old value. | ||
| The output binding of "response" will now have the value of "output #3" | ||
|
|
||
| ### EXAMPLE 4 | ||
| ``` | ||
| Push-OutputBinding -Name outQueue -Value "output #1" | ||
| ``` | ||
|
|
||
| The output binding of "outQueue" will have the value of "output #1" | ||
|
|
||
| ### EXAMPLE 5 | ||
| ``` | ||
| Push-OutputBinding -Name outQueue -Value "output #2" | ||
| ``` | ||
|
|
||
| The output binding is 'queue', which accepts multiple output values. | ||
| The output binding of "outQueue" will now have a list with 2 items: "output #1", "output #2" | ||
|
|
||
| ### EXAMPLE 6 | ||
| ``` | ||
| Push-OutputBinding -Name outQueue -Value @("output #3", "output #4") | ||
| ``` | ||
|
|
||
| When the value is a collection, the collection will be unrolled and elements of the collection | ||
| will be added to the list. | ||
| The output binding of "outQueue" will now have a list with 4 items: | ||
| "output #1", "output #2", "output #3", "output #4". | ||
|
|
||
| ## PARAMETERS | ||
|
|
||
| ### -Name | ||
| The name of the output binding you want to set. | ||
|
|
||
| ```yaml | ||
| Type: String | ||
| Parameter Sets: (All) | ||
| Aliases: | ||
|
|
||
| Required: True | ||
| Position: 1 | ||
| Default value: None | ||
| Accept pipeline input: False | ||
| Accept wildcard characters: False | ||
| ``` | ||
|
|
||
| ### -Value | ||
| The value of the output binding you want to set. | ||
|
|
||
| ```yaml | ||
| Type: Object | ||
| Parameter Sets: (All) | ||
| Aliases: | ||
|
|
||
| Required: True | ||
| Position: 2 | ||
| Default value: None | ||
| Accept pipeline input: True (ByValue) | ||
| Accept wildcard characters: False | ||
| ``` | ||
|
|
||
| ### -Clobber | ||
| (Optional) If specified, will force the value to be set for a specified output binding. | ||
|
|
||
| ```yaml | ||
| Type: SwitchParameter | ||
| Parameter Sets: (All) | ||
| Aliases: | ||
|
|
||
| Required: False | ||
| Position: Named | ||
| Default value: False | ||
| 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 | ||
|
|
||
| ## OUTPUTS | ||
|
|
||
| ## NOTES | ||
|
|
||
| ## RELATED LINKS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| --- | ||
| external help file: Microsoft.Azure.Functions.PowerShellWorker-help.xml | ||
| Module Name: Microsoft.Azure.Functions.PowerShellWorker | ||
| online version: | ||
| schema: 2.0.0 | ||
| --- | ||
|
|
||
| # Trace-PipelineObject | ||
|
|
||
| ## SYNOPSIS | ||
| Writes the formatted output of the pipeline object to the information stream before passing the object down to the pipeline. | ||
|
|
||
| ## SYNTAX | ||
|
|
||
| ``` | ||
| Trace-PipelineObject [-InputObject] <Object> [<CommonParameters>] | ||
| ``` | ||
|
|
||
| ## DESCRIPTION | ||
| INTERNAL POWERSHELL WORKER USE ONLY. | ||
| Writes the formatted output of the pipeline object to the information stream before passing the object down to the pipeline. | ||
|
|
||
| ## EXAMPLES | ||
|
|
||
| ### Example 1 | ||
| ```powershell | ||
| PS C:\> {{ Add example code here }} | ||
| ``` | ||
|
|
||
| {{ Add example description here }} | ||
|
|
||
| ## PARAMETERS | ||
|
|
||
| ### -InputObject | ||
| The object from pipeline. | ||
|
|
||
| ```yaml | ||
| Type: Object | ||
| Parameter Sets: (All) | ||
| Aliases: | ||
|
|
||
| Required: True | ||
| Position: 1 | ||
| Default value: None | ||
| Accept pipeline input: True (ByValue) | ||
| 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 | ||
|
|
||
| ## OUTPUTS | ||
|
|
||
| ## NOTES | ||
|
|
||
| ## RELATED LINKS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is false but it does support wildcard characters?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bug in PlatyPS? I don't think it's able to figure out if a parameter accepts wildcard.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cannot change it manually, unless we revert the doc check code in build.