-
Notifications
You must be signed in to change notification settings - Fork 4k
invoke-azrest #12291
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
invoke-azrest #12291
Conversation
Azure Pipelines successfully started running 3 pipeline(s). |
@@ -0,0 +1,37 @@ | |||
using System; |
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.
license declaration.
@@ -0,0 +1,32 @@ | |||
using System; |
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.
license declaration.
|
||
namespace Microsoft.Azure.Commands.Profile.Rest | ||
{ | ||
[Cmdlet("Invoke", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "Rest", DefaultParameterSetName = ByPath, SupportsShouldProcess = true), OutputType(typeof(PSHttpResponse))] |
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.
Replace "Invoke" using PowerShell constant
[ValidateNotNullOrEmpty] | ||
public string Path { get; set; } | ||
|
||
[Parameter(Mandatory = true, HelpMessage = "Api Version")] |
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.
Is it mandatory? Can we allow user append API on query path?
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.
I prefer leave this as an independent parameter
{ | ||
if (this.IsParameterBound(c => this.ResourceType) && !this.IsParameterBound(c => this.Name)) | ||
{ | ||
throw new PSArgumentException("number of resource types and resource names must be the same"); |
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.
I remember you have no plan to expose type and name pairs. If you still want to use it, it seems you need to add an additional parameter set to indicate resource type and name both need to be shown up. Then linke 152-160 are not required.
src/Accounts/Accounts/Rest/Utils.cs
Outdated
|
||
namespace Microsoft.Azure.Commands.Profile.Rest | ||
{ | ||
public class Utils |
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.
Please merge it into InvokeAzRestCommand because it is used by it for the time being.
@@ -72,8 +72,11 @@ Gets tenants that are authorized for the current user. | |||
### [Import-AzContext](Import-AzContext.md) | |||
Loads Azure authentication information from a file. | |||
|
|||
### [Invoke-AzRest](Invoke-AzRest.md) | |||
{{ Fill in the Synopsis }} |
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.
Please update it.
# Invoke-AzRest | ||
|
||
## SYNOPSIS | ||
Construct and perform HTTP request |
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.
we need to emphasize the request to Azure resource management URL only
} | ||
``` | ||
|
||
Get LA Workspace by path |
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.
LA is short for?
src/Accounts/Accounts/ChangeLog.md
Outdated
@@ -18,6 +18,7 @@ | |||
- Additional information about change #1 | |||
--> | |||
## Upcoming Release | |||
* Added new cmdlet `Invoke-AzRest` |
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.
Change it to Invoke-AzRestMethod?
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
* support generic get * update * update test case * remove api version when construct uri * update uri construct * update localfeed * to use full response * convert output to PSHttpResponse * remove request id from pshttpresponse * rename to invoke-azrest * update parameter name * create help markdown for invoke-azrest * update common API reference * clean localfeed * add test case for invoke-azrest * update changelog.md * resolve comments * fix bug in get api version * update changelog * fix help * handle upper case in path * fix bug
Description
Checklist
CONTRIBUTING.md
ChangeLog.md
file(s) has been updated:ChangeLog.md
file can be found atsrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
## Upcoming Release
header -- no new version header should be added