Skip to content

Commit 9175c28

Browse files
authored
[WebAapp] add web job feature. (#16749)
* [WebApp]init. * [WebApp]updated README.md. * [Websites] rebuild for continuousjob feature. * [WebApp]updated README.md. * [WebSites] update readme.me. * [WebApp]update readme.md * [WebApp] add examples and test cases. * [WebApp] rebuild resource. * [WebApp] record test cases. * [WebApp]modified README.md. * [website]keep origin id.
1 parent e9fd3d9 commit 9175c28

File tree

102 files changed

+8965
-25
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+8965
-25
lines changed

src/Websites/Websites.Autorest/Az.Websites.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
DotNetFrameworkVersion = '4.7.2'
1212
RequiredAssemblies = './bin/Az.Websites.private.dll'
1313
FormatsToProcess = './Az.Websites.format.ps1xml'
14-
FunctionsToExport = 'Get-AzStaticWebApp', 'Get-AzStaticWebAppBuild', 'Get-AzStaticWebAppBuildAppSetting', 'Get-AzStaticWebAppBuildFunction', 'Get-AzStaticWebAppBuildFunctionAppSetting', 'Get-AzStaticWebAppConfiguredRole', 'Get-AzStaticWebAppCustomDomain', 'Get-AzStaticWebAppFunction', 'Get-AzStaticWebAppFunctionAppSetting', 'Get-AzStaticWebAppSecret', 'Get-AzStaticWebAppSetting', 'Get-AzStaticWebAppUser', 'Get-AzStaticWebAppUserProvidedFunctionApp', 'New-AzStaticWebApp', 'New-AzStaticWebAppBuildAppSetting', 'New-AzStaticWebAppBuildFunctionAppSetting', 'New-AzStaticWebAppCustomDomain', 'New-AzStaticWebAppFunctionAppSetting', 'New-AzStaticWebAppSetting', 'New-AzStaticWebAppUserRoleInvitationLink', 'Register-AzStaticWebAppUserProvidedFunctionApp', 'Remove-AzStaticWebApp', 'Remove-AzStaticWebAppAttachedRepository', 'Remove-AzStaticWebAppBuild', 'Remove-AzStaticWebAppCustomDomain', 'Remove-AzStaticWebAppUser', 'Reset-AzStaticWebAppApiKey', 'Test-AzStaticWebAppCustomDomain', 'Unregister-AzStaticWebAppBuildUserProvidedFunctionApp', 'Unregister-AzStaticWebAppUserProvidedFunctionApp', 'Update-AzStaticWebApp', 'Update-AzStaticWebAppUser', '*'
14+
FunctionsToExport = 'Get-AzStaticWebApp', 'Get-AzStaticWebAppBuild', 'Get-AzStaticWebAppBuildAppSetting', 'Get-AzStaticWebAppBuildFunction', 'Get-AzStaticWebAppBuildFunctionAppSetting', 'Get-AzStaticWebAppConfiguredRole', 'Get-AzStaticWebAppCustomDomain', 'Get-AzStaticWebAppFunction', 'Get-AzStaticWebAppFunctionAppSetting', 'Get-AzStaticWebAppSecret', 'Get-AzStaticWebAppSetting', 'Get-AzStaticWebAppUser', 'Get-AzStaticWebAppUserProvidedFunctionApp', 'Get-AzWebAppContinuousWebJob', 'Get-AzWebAppSlotContinuousWebJob', 'Get-AzWebAppSlotTriggeredWebJob', 'Get-AzWebAppSlotTriggeredWebJobHistory', 'Get-AzWebAppSlotWebJob', 'Get-AzWebAppTriggeredWebJob', 'Get-AzWebAppTriggeredWebJobHistory', 'Get-AzWebAppWebJob', 'New-AzStaticWebApp', 'New-AzStaticWebAppBuildAppSetting', 'New-AzStaticWebAppBuildFunctionAppSetting', 'New-AzStaticWebAppCustomDomain', 'New-AzStaticWebAppFunctionAppSetting', 'New-AzStaticWebAppSetting', 'New-AzStaticWebAppUserRoleInvitationLink', 'Register-AzStaticWebAppUserProvidedFunctionApp', 'Remove-AzStaticWebApp', 'Remove-AzStaticWebAppAttachedRepository', 'Remove-AzStaticWebAppBuild', 'Remove-AzStaticWebAppCustomDomain', 'Remove-AzStaticWebAppUser', 'Remove-AzWebAppContinuousWebJob', 'Remove-AzWebAppSlotContinuousWebJob', 'Remove-AzWebAppSlotTriggeredWebJob', 'Remove-AzWebAppTriggeredWebJob', 'Reset-AzStaticWebAppApiKey', 'Start-AzWebAppContinuousWebJob', 'Start-AzWebAppSlotContinuousWebJob', 'Start-AzWebAppSlotTriggeredWebJob', 'Start-AzWebAppTriggeredWebJob', 'Stop-AzWebAppContinuousWebJob', 'Stop-AzWebAppSlotContinuousWebJob', 'Test-AzStaticWebAppCustomDomain', 'Unregister-AzStaticWebAppBuildUserProvidedFunctionApp', 'Unregister-AzStaticWebAppUserProvidedFunctionApp', 'Update-AzStaticWebApp', 'Update-AzStaticWebAppUser', '*'
1515
AliasesToExport = '*'
1616
PrivateData = @{
1717
PSData = @{

src/Websites/Websites.Autorest/README.md

Lines changed: 1293 additions & 2 deletions
Large diffs are not rendered by default.

src/Websites/Websites.Autorest/custom/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ For `Az.Websites` to use custom cmdlets, it does this two different ways. We **h
1212

1313
For C# cmdlets, they are compiled with the rest of the generated low-level cmdlets into the `./bin/Az.Websites.private.dll`. The names of the cmdlets (methods) and files must follow the `[cmdletName]_[variantName]` syntax used for generated cmdlets. The `variantName` is used as the `ParameterSetName`, so use something appropriate that doesn't clash with already created variant or parameter set names. You cannot use the `ParameterSetName` property in the `Parameter` attribute on C# cmdlets. Each cmdlet must be separated into variants using the same pattern as seen in the `generated/cmdlets` folder.
1414

15-
For script cmdlets, these are loaded via the `Az.Websites.custom.psm1`. Then, during the build process, this module is loaded and processed in the same manner as the C# cmdlets. The fundemental difference is the script cmdlets use the `ParameterSetName` attribute and C# cmdlets do not. To create a script cmdlet variant of a generated cmdlet, simply decorate all parameters in the script with the new `ParameterSetName` in the `Parameter` attribute. This will appropriately treat each parameter set as a separate variant when processed to be exported during the build.
15+
For script cmdlets, these are loaded via the `Az.Websites.custom.psm1`. Then, during the build process, this module is loaded and processed in the same manner as the C# cmdlets. The fundamental difference is the script cmdlets use the `ParameterSetName` attribute and C# cmdlets do not. To create a script cmdlet variant of a generated cmdlet, simply decorate all parameters in the script with the new `ParameterSetName` in the `Parameter` attribute. This will appropriately treat each parameter set as a separate variant when processed to be exported during the build.
1616

1717
## Purpose
1818
This allows the modules to have cmdlets that were not defined in the REST specification. It also allows combining logic using generated cmdlets. This is a level of customization beyond what can be done using the [readme configuration options](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md) that are currently available. These custom cmdlets are then referenced by the cmdlets created at build-time in the `..\exports` folder.
@@ -32,10 +32,10 @@ These provide functionality to our HTTP pipeline and other useful features. In s
3232
### Attributes
3333
For processing the cmdlets, we've created some additional attributes:
3434
- `Microsoft.Azure.PowerShell.Cmdlets.Websites.DescriptionAttribute`
35-
- Used in C# cmdlets to provide a high-level description of the cmdlet. This is propegated to reference documentation via [help comments](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_comment_based_help) in the exported scripts.
35+
- Used in C# cmdlets to provide a high-level description of the cmdlet. This is propagated to reference documentation via [help comments](https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) in the exported scripts.
3636
- `Microsoft.Azure.PowerShell.Cmdlets.Websites.DoNotExportAttribute`
3737
- Used in C# and script cmdlets to suppress creating an exported cmdlet at build-time. These cmdlets will *not be exposed* by `Az.Websites`.
3838
- `Microsoft.Azure.PowerShell.Cmdlets.Websites.InternalExportAttribute`
39-
- Used in C# cmdlets to route exported cmdlets to the `..\internal`, which are *not exposed* by `Az.Websites`. For more information, see [readme.md](..\internal/readme.md) in the `..\internal` folder.
39+
- Used in C# cmdlets to route exported cmdlets to the `..\internal`, which are *not exposed* by `Az.Websites`. For more information, see [README.md](..\internal/README.md) in the `..\internal` folder.
4040
- `Microsoft.Azure.PowerShell.Cmdlets.Websites.ProfileAttribute`
4141
- Used in C# and script cmdlets to define which Azure profiles the cmdlet supports. This is only supported for Azure (`--azure`) modules.

src/Websites/Websites.Autorest/docs/Az.Websites.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,30 @@ Description for Gets the list of users of a static site.
5050
### [Get-AzStaticWebAppUserProvidedFunctionApp](Get-AzStaticWebAppUserProvidedFunctionApp.md)
5151
Description for Gets the details of the user provided function app registered with a static site build
5252

53+
### [Get-AzWebAppContinuousWebJob](Get-AzWebAppContinuousWebJob.md)
54+
Get or list continuous web for an app.
55+
56+
### [Get-AzWebAppSlotContinuousWebJob](Get-AzWebAppSlotContinuousWebJob.md)
57+
Get or list continuous web for a deployment slot.
58+
59+
### [Get-AzWebAppSlotTriggeredWebJob](Get-AzWebAppSlotTriggeredWebJob.md)
60+
Get or list triggered web for a deployment slot.
61+
62+
### [Get-AzWebAppSlotTriggeredWebJobHistory](Get-AzWebAppSlotTriggeredWebJobHistory.md)
63+
Get or list triggered web job's history for a deployment slot.
64+
65+
### [Get-AzWebAppSlotWebJob](Get-AzWebAppSlotWebJob.md)
66+
List webjobs for a deployment slot.
67+
68+
### [Get-AzWebAppTriggeredWebJob](Get-AzWebAppTriggeredWebJob.md)
69+
Get or list triggered web for an app.
70+
71+
### [Get-AzWebAppTriggeredWebJobHistory](Get-AzWebAppTriggeredWebJobHistory.md)
72+
Get or list triggered web job's history for an app.
73+
74+
### [Get-AzWebAppWebJob](Get-AzWebAppWebJob.md)
75+
List webjobs for an app.
76+
5377
### [New-AzStaticWebApp](New-AzStaticWebApp.md)
5478
Description for Creates a new static site in an existing resource group, or updates an existing static site.
5579

@@ -89,9 +113,39 @@ Description for Deletes a custom domain.
89113
### [Remove-AzStaticWebAppUser](Remove-AzStaticWebAppUser.md)
90114
Description for Deletes the user entry from the static site.
91115

116+
### [Remove-AzWebAppContinuousWebJob](Remove-AzWebAppContinuousWebJob.md)
117+
Delete a continuous web job for an app.
118+
119+
### [Remove-AzWebAppSlotContinuousWebJob](Remove-AzWebAppSlotContinuousWebJob.md)
120+
Delete a continuous web job for a deployment slot.
121+
122+
### [Remove-AzWebAppSlotTriggeredWebJob](Remove-AzWebAppSlotTriggeredWebJob.md)
123+
Delete a triggered web job for a deployment slot.
124+
125+
### [Remove-AzWebAppTriggeredWebJob](Remove-AzWebAppTriggeredWebJob.md)
126+
Delete a triggered web job for an app.
127+
92128
### [Reset-AzStaticWebAppApiKey](Reset-AzStaticWebAppApiKey.md)
93129
Description for Resets the api key for an existing static site.
94130

131+
### [Start-AzWebAppContinuousWebJob](Start-AzWebAppContinuousWebJob.md)
132+
Start a continuous web job for an app.
133+
134+
### [Start-AzWebAppSlotContinuousWebJob](Start-AzWebAppSlotContinuousWebJob.md)
135+
Start a continuous web job for a deployment slot.
136+
137+
### [Start-AzWebAppSlotTriggeredWebJob](Start-AzWebAppSlotTriggeredWebJob.md)
138+
Run a triggered web job for a deployment slot.
139+
140+
### [Start-AzWebAppTriggeredWebJob](Start-AzWebAppTriggeredWebJob.md)
141+
Run a triggered web job for an app.
142+
143+
### [Stop-AzWebAppContinuousWebJob](Stop-AzWebAppContinuousWebJob.md)
144+
Stop a continuous web job for an app.
145+
146+
### [Stop-AzWebAppSlotContinuousWebJob](Stop-AzWebAppSlotContinuousWebJob.md)
147+
Stop a continuous web job for a deployment slot.
148+
95149
### [Test-AzStaticWebAppCustomDomain](Test-AzStaticWebAppCustomDomain.md)
96150
Description for Validates a particular custom domain can be added to a static site.
97151

src/Websites/Websites.Autorest/docs/Get-AzStaticWebApp.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,12 +195,15 @@ INPUTOBJECT <IWebsitesIdentity>: Identity Parameter
195195
- `[EnvironmentName <String>]`: The stage site identifier.
196196
- `[FunctionAppName <String>]`: Name of the function app registered with the static site build.
197197
- `[Id <String>]`: Resource identity path
198+
- `[JobHistoryId <String>]`: History ID.
198199
- `[Location <String>]`: Location where you plan to create the static site.
199200
- `[Name <String>]`: Name of the static site.
200201
- `[PrivateEndpointConnectionName <String>]`: Name of the private endpoint connection.
201202
- `[ResourceGroupName <String>]`: Name of the resource group to which the resource belongs.
203+
- `[Slot <String>]`: Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot.
202204
- `[SubscriptionId <String>]`: Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).
203205
- `[Userid <String>]`: The user id of the user.
206+
- `[WebJobName <String>]`: Name of Web Job.
204207

205208
## RELATED LINKS
206209

src/Websites/Websites.Autorest/docs/Get-AzStaticWebAppBuild.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,12 +192,15 @@ INPUTOBJECT <IWebsitesIdentity>: Identity Parameter
192192
- `[EnvironmentName <String>]`: The stage site identifier.
193193
- `[FunctionAppName <String>]`: Name of the function app registered with the static site build.
194194
- `[Id <String>]`: Resource identity path
195+
- `[JobHistoryId <String>]`: History ID.
195196
- `[Location <String>]`: Location where you plan to create the static site.
196197
- `[Name <String>]`: Name of the static site.
197198
- `[PrivateEndpointConnectionName <String>]`: Name of the private endpoint connection.
198199
- `[ResourceGroupName <String>]`: Name of the resource group to which the resource belongs.
200+
- `[Slot <String>]`: Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot.
199201
- `[SubscriptionId <String>]`: Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).
200202
- `[Userid <String>]`: The user id of the user.
203+
- `[WebJobName <String>]`: Name of Web Job.
201204

202205
## RELATED LINKS
203206

src/Websites/Websites.Autorest/docs/Get-AzStaticWebAppConfiguredRole.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,14 @@ Description for Lists the roles configured for the static site.
2323
## EXAMPLES
2424

2525
### Example 1: Lists the roles configured for the static site
26-
2726
```powershell
28-
Get-AzStaticWebAppConfiguredRole -ResourceGroupName azure-rg-test -Name staticweb-portal04
29-
```
30-
```output
27+
PS C:\> Get-AzStaticWebAppConfiguredRole -ResourceGroupName azure-rg-test -Name staticweb-portal04
28+
3129
Kind Name Type Property
3230
---- ---- ---- --------
3331
configuredRoles Microsoft.Web/staticSites/configuredRoles {anonymous, authenticated}
3432
```
33+
3534
This command lists the roles configured for the static site.
3635

3736
## PARAMETERS

src/Websites/Websites.Autorest/docs/Get-AzStaticWebAppCustomDomain.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,12 +192,15 @@ INPUTOBJECT <IWebsitesIdentity>: Identity Parameter
192192
- `[EnvironmentName <String>]`: The stage site identifier.
193193
- `[FunctionAppName <String>]`: Name of the function app registered with the static site build.
194194
- `[Id <String>]`: Resource identity path
195+
- `[JobHistoryId <String>]`: History ID.
195196
- `[Location <String>]`: Location where you plan to create the static site.
196197
- `[Name <String>]`: Name of the static site.
197198
- `[PrivateEndpointConnectionName <String>]`: Name of the private endpoint connection.
198199
- `[ResourceGroupName <String>]`: Name of the resource group to which the resource belongs.
200+
- `[Slot <String>]`: Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot.
199201
- `[SubscriptionId <String>]`: Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).
200202
- `[Userid <String>]`: The user id of the user.
203+
- `[WebJobName <String>]`: Name of Web Job.
201204

202205
## RELATED LINKS
203206

src/Websites/Websites.Autorest/docs/Get-AzStaticWebAppUserProvidedFunctionApp.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,12 +243,15 @@ INPUTOBJECT <IWebsitesIdentity>: Identity Parameter
243243
- `[EnvironmentName <String>]`: The stage site identifier.
244244
- `[FunctionAppName <String>]`: Name of the function app registered with the static site build.
245245
- `[Id <String>]`: Resource identity path
246+
- `[JobHistoryId <String>]`: History ID.
246247
- `[Location <String>]`: Location where you plan to create the static site.
247248
- `[Name <String>]`: Name of the static site.
248249
- `[PrivateEndpointConnectionName <String>]`: Name of the private endpoint connection.
249250
- `[ResourceGroupName <String>]`: Name of the resource group to which the resource belongs.
251+
- `[Slot <String>]`: Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot.
250252
- `[SubscriptionId <String>]`: Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).
251253
- `[Userid <String>]`: The user id of the user.
254+
- `[WebJobName <String>]`: Name of Web Job.
252255

253256
## RELATED LINKS
254257

0 commit comments

Comments
 (0)