Skip to content

Commit acc55b6

Browse files
authored
Merge pull request Azure#11199 from Grayer123/bugfix/invokeAction
Bug Fix: fix help issues in Resources.
2 parents 319723a + 05ae31c commit acc55b6

File tree

5 files changed

+256
-1
lines changed

5 files changed

+256
-1
lines changed

src/Resources/Resources/help/Get-AzResourceProvider.md

Lines changed: 176 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,182 @@ The **Get-AzResourceProvider** cmdlet gets an Azure resource provider.
3030

3131
## EXAMPLES
3232

33+
### Example 1: Get all resource providers registered with the current subscription
34+
35+
```powershell
36+
PS C:\>Get-AzResourceProvider
37+
38+
ProviderNamespace : Microsoft.AppConfiguration
39+
RegistrationState : Registered
40+
ResourceTypes : {configurationStores, configurationStores/eventGridFilters, checkNameAvailability, locations…}
41+
Locations : {West Central US, Central US, West US, East US…}
42+
43+
ProviderNamespace : Microsoft.KeyVault
44+
RegistrationState : Registered
45+
ResourceTypes : {vaults, vaults/secrets, vaults/accessPolicies, operations…}
46+
Locations : {North Central US, East US, North Europe, West Europe…}
47+
48+
ProviderNamespace : Microsoft.Network
49+
RegistrationState : Registered
50+
ResourceTypes : {virtualNetworks, publicIPAddresses, networkInterfaces, privateEndpoints…}
51+
Locations : {West US, East US, North Europe, West Europe…}
52+
53+
ProviderNamespace : Microsoft.Compute
54+
RegistrationState : Registered
55+
ResourceTypes : {availabilitySets, virtualMachines, virtualMachines/extensions, virtualMachineScaleSets…}
56+
Locations : {East US, East US 2, West US, Central US…}
57+
58+
ProviderNamespace : Microsoft.Security
59+
RegistrationState : Registered
60+
ResourceTypes : {operations, securityStatuses, tasks, regulatoryComplianceStandards…}
61+
Locations : {Central US, East US, West Europe, West Central US…}
62+
63+
ProviderNamespace : Microsoft.ResourceHealth
64+
RegistrationState : Registered
65+
ResourceTypes : {availabilityStatuses, childAvailabilityStatuses, childResources, events…}
66+
Locations : {Australia Southeast}
67+
68+
ProviderNamespace : Microsoft.PolicyInsights
69+
RegistrationState : Registered
70+
ResourceTypes : {policyEvents, policyStates, operations, asyncOperationResults…}
71+
Locations : {}
72+
73+
ProviderNamespace : Microsoft.Storage
74+
RegistrationState : Registered
75+
ResourceTypes : {storageAccounts, operations, locations/asyncoperations, storageAccounts/listAccountSas…}
76+
Locations : {East US, East US 2, West US, West Europe…}
77+
78+
ProviderNamespace : Microsoft.Web
79+
RegistrationState : Registered
80+
ResourceTypes : {publishingUsers, ishostnameavailable, validate, isusernameavailable…}
81+
Locations : {Central US, North Europe, West Europe, Southeast Asia…}
82+
83+
ProviderNamespace : Sendgrid.Email
84+
RegistrationState : Registered
85+
ResourceTypes : {accounts, operations}
86+
Locations : {Australia East, Australia Southeast, Brazil South, Canada Central…}
87+
88+
ProviderNamespace : Microsoft.Authorization
89+
RegistrationState : Registered
90+
ResourceTypes : {roleAssignments, roleDefinitions, classicAdministrators, permissions…}
91+
Locations : {}
92+
...
93+
```
94+
95+
This command gets all the resource providers from the subscription.
96+
97+
### Example 2: Get all resource provider details from the given ProviderNamespace
98+
99+
```powershell
100+
PS C:\>Get-AzResourceProvider -ProviderNamespace Microsoft.Compute
101+
ProviderNamespace : Microsoft.Compute
102+
RegistrationState : Registered
103+
ResourceTypes : {availabilitySets}
104+
Locations : {East US, East US 2, West US, Central US…}
105+
106+
ProviderNamespace : Microsoft.Compute
107+
RegistrationState : Registered
108+
ResourceTypes : {virtualMachines}
109+
Locations : {East US, East US 2, West US, Central US…}
110+
111+
ProviderNamespace : Microsoft.Compute
112+
RegistrationState : Registered
113+
ResourceTypes : {virtualMachines/extensions}
114+
Locations : {East US, East US 2, West US, Central US…}
115+
116+
ProviderNamespace : Microsoft.Compute
117+
RegistrationState : Registered
118+
ResourceTypes : {virtualMachineScaleSets}
119+
Locations : {East US, East US 2, West US, Central US…}
120+
121+
ProviderNamespace : Microsoft.Compute
122+
RegistrationState : Registered
123+
ResourceTypes : {virtualMachineScaleSets/extensions}
124+
Locations : {East US, East US 2, West US, Central US…}
125+
126+
ProviderNamespace : Microsoft.Compute
127+
RegistrationState : Registered
128+
ResourceTypes : {virtualMachineScaleSets/virtualMachines}
129+
Locations : {East US, East US 2, West US, Central US…}
130+
131+
ProviderNamespace : Microsoft.Compute
132+
RegistrationState : Registered
133+
ResourceTypes : {virtualMachineScaleSets/networkInterfaces}
134+
Locations : {East US, East US 2, West US, Central US…}
135+
...
136+
```
137+
138+
This command Gets all the resource providers under "Microsoft.Compute".
139+
140+
### Example 3: Get all resource provider details from the given ProviderNamespace array
141+
142+
```powershell
143+
PS C:\>Get-AzResourceProvider -ProviderNamespace Microsoft.Compute,Microsoft.Network
144+
ProviderNamespace : Microsoft.Compute
145+
RegistrationState : Registered
146+
ResourceTypes : {availabilitySets}
147+
Locations : {East US, East US 2, West US, Central US…}
148+
149+
ProviderNamespace : Microsoft.Compute
150+
RegistrationState : Registered
151+
ResourceTypes : {virtualMachines}
152+
Locations : {East US, East US 2, West US, Central US…}
153+
154+
ProviderNamespace : Microsoft.Compute
155+
RegistrationState : Registered
156+
ResourceTypes : {virtualMachines/extensions}
157+
Locations : {East US, East US 2, West US, Central US…}
158+
159+
ProviderNamespace : Microsoft.Compute
160+
RegistrationState : Registered
161+
ResourceTypes : {virtualMachineScaleSets}
162+
Locations : {East US, East US 2, West US, Central US…}
163+
164+
ProviderNamespace : Microsoft.Compute
165+
RegistrationState : Registered
166+
ResourceTypes : {virtualMachineScaleSets/extensions}
167+
Locations : {East US, East US 2, West US, Central US…}
168+
...
169+
170+
ProviderNamespace : Microsoft.Network
171+
RegistrationState : Registered
172+
ResourceTypes : {virtualNetworks}
173+
Locations : {West US, East US, North Europe, West Europe…}
174+
175+
ProviderNamespace : Microsoft.Network
176+
RegistrationState : Registered
177+
ResourceTypes : {publicIPAddresses}
178+
Locations : {West US, East US, North Europe, West Europe…}
179+
180+
ProviderNamespace : Microsoft.Network
181+
RegistrationState : Registered
182+
ResourceTypes : {networkInterfaces}
183+
Locations : {West US, East US, North Europe, West Europe…}
184+
185+
ProviderNamespace : Microsoft.Network
186+
RegistrationState : Registered
187+
ResourceTypes : {privateEndpoints}
188+
Locations : {West US, East US, North Europe, West Europe…}
189+
190+
ProviderNamespace : Microsoft.Network
191+
RegistrationState : Registered
192+
ResourceTypes : {privateEndpointRedirectMaps}
193+
Locations : {West US, East US, North Europe, West Europe…}
194+
195+
ProviderNamespace : Microsoft.Network
196+
RegistrationState : Registered
197+
ResourceTypes : {loadBalancers}
198+
Locations : {West US, East US, North Europe, West Europe…}
199+
200+
ProviderNamespace : Microsoft.Network
201+
RegistrationState : Registered
202+
ResourceTypes : {networkSecurityGroups}
203+
Locations : {West US, East US, North Europe, West Europe…}
204+
...
205+
```
206+
207+
This command Gets all the resource providers under "Microsoft.Compute" and "Microsoft.Network".
208+
33209
## PARAMETERS
34210

35211
### -ApiVersion

src/Resources/Resources/help/Invoke-AzResourceAction.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,45 @@ To get a list of supported actions, use the Azure Resource Explorer tool.
4242

4343
## EXAMPLES
4444

45+
### Example 1: Invoke starting a VM with ResourceId
46+
47+
```powershell
48+
PS C:\>Invoke-AzResourceAction -ResourceId /subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.Compute/virtualMachines/testVM -Action start
49+
50+
Confirm
51+
Are you sure you want to invoke the 'start' action on the following resource: /subscriptions/{subId}/resourceGroups/testGroup/providers/Microsoft.Compute/virtualMachines/testVM
52+
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): y
53+
```
54+
55+
This command starts the Virtual Machine with {ResourceId}.
56+
57+
### Example 2: Invoke poweroffing a VM with ResourceName
58+
59+
```powershell
60+
PS C:\>Invoke-AzResourceAction -ResourceGroupName testGroup -ResourceName testVM -ResourceType Microsoft.Compute/virtualMachines/ -Action Poweroff -Force
61+
```
62+
63+
This command stops the Virtual Machine with {ResourceId}.
64+
The command specifies the *Force* parameter, therefore, it does not prompt you for confirmation.
65+
66+
### Example 3: Invoke registering a resource provider with ResourceId
67+
68+
```powershell
69+
PS C:\>Invoke-AzResourceAction -ResourceId /subscriptions/{subId}/providers/Microsoft.Network -action register -Force
70+
71+
id : /subscriptions/{subId}/providers/Microsoft.Network
72+
namespace : Microsoft.Network
73+
authorizations : {…}
74+
resourceTypes : {@{resourceType=virtualNetworks; locations=System.Object[]; apiVersions=System.Object[]},
75+
@{resourceType=publicIPAddresses; locations=System.Object[]; apiVersions=System.Object[]},
76+
@{resourceType=networkInterfaces; locations=System.Object[]; apiVersions=System.Object[]},
77+
@{resourceType=privateEndpoints; locations=System.Object[]; apiVersions=System.Object[]}…}
78+
registrationState : Registered
79+
```
80+
81+
This command registers a resource provider "Microsoft.Network".
82+
The command specifies the *Force* parameter, therefore, it does not prompt you for confirmation.
83+
4584
## PARAMETERS
4685

4786
### -Action

src/Resources/Resources/help/Remove-AzResourceGroupDeployment.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,33 @@ Remove-AzResourceGroupDeployment -Id <String> [-ApiVersion <String>] [-Pre]
2626
```
2727

2828
## DESCRIPTION
29+
2930
The **Remove-AzResourceGroupDeployment** cmdlet removes an Azure resource group deployment and any associated operations.
3031

3132
## EXAMPLES
3233

34+
### Example 1: Removes a resource group deployment with ResourceId
35+
36+
```powershell
37+
PS C:\>Remove-AzResourceGroupDeployment -ResourceId /subscriptions/{subId}/resourceGroups/testGroup/providers/Microsoft.Resources/deployments/testDeployment1
38+
39+
True
40+
```
41+
42+
This command removes a resource group deployment with the fully qualified resource Id of the deployment.
43+
Successful removal returns true.
44+
45+
### Example 2: Removes a resource group deployment with ResourceGroupName and ResourceName
46+
47+
```powershell
48+
PS C:\>Remove-AzResourceGroupDeployment -ResourceGroupName testGroup -Name testDeployment1
49+
50+
True
51+
```
52+
53+
This command removes a resource group deployment with the provided ResourceGroupName and ResourceName.
54+
Successful removal returns true.
55+
3356
## PARAMETERS
3457

3558
### -ApiVersion

src/Resources/Resources/help/Test-AzResourceGroupDeployment.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,23 @@ The **Test-AzResourceGroupDeployment** cmdlet determines whether an Azure resour
112112
## EXAMPLES
113113

114114
### Example 1: Test deployment with a custom template object and parameter file
115-
```
115+
116+
```powershell
116117
PS C:\> $TemplateFileText = [System.IO.File]::ReadAllText("D:\Azure\Templates\EngineeringSite.json")
117118
PS C:\> $TemplateObject = ConvertFrom-Json $TemplateFileText -AsHashtable
118119
PS C:\> Test-AzResourceGroupDeployment -ResourceGroupName "ContosoEngineering" -TemplateObject $TemplateObject -TemplateParameterFile "D:\Azure\Templates\EngSiteParams.json"
119120
```
120121

121122
This command tests a deployment in the given resource group using the an in-memory hashtable created from the given template file and a parameter file.
122123

124+
### Example 2: Test deployment via template file and parameter object
125+
126+
```powershell
127+
PS C:\> New-AzResourceGroupDeployment -Name testDeployment1 -ResourceGroupName testRG01 -TemplateFile "D:\Azure\Templates\sampleDeploymentTemplate.json" -TemplateParameterFile "D:\Azure\Templates\sampleDeploymentTemplateParams.json"
128+
```
129+
130+
This command tests a deployment in the given resource group and resource using the provided template file and a parameter file.
131+
123132
## PARAMETERS
124133

125134
### -ApiVersion

src/Resources/Resources/help/Unregister-AzResourceProvider.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ The **Unregister-AzResourceProvider** cmdlet unregisters an Azure resource provi
2323

2424
## EXAMPLES
2525

26+
### Example 1: Unregister resource provider with ProviderNamespace
27+
28+
```powershell
29+
PS C:\>Unregister-AzResourceProvider -ProviderNamespace "Microsoft.support"
30+
```
31+
32+
This command unregisters the resource provider "Microsoft.support".
33+
2634
## PARAMETERS
2735

2836
### -ApiVersion

0 commit comments

Comments
 (0)