Skip to content
Open
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
71 changes: 71 additions & 0 deletions linter_exclusions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,20 @@ appservice plan update:
number_of_workers:
rule_exclusions:
- no_parameter_defaults_for_update_commands
appservice plan list-skus:
rule_exclusions:
- missing_command_test_coverage
parameters:
name:
rule_exclusions:
- missing_parameter_test_coverage
appservice plan list-slots:
rule_exclusions:
- missing_command_test_coverage
parameters:
name:
rule_exclusions:
- missing_parameter_test_coverage
aro create:
parameters:
cluster_resource_group:
Expand Down Expand Up @@ -3887,6 +3901,52 @@ webapp config container show:
show_multicontainer_config:
rule_exclusions:
- option_length_too_long
webapp config public-cert delete:
rule_exclusions:
- missing_command_test_coverage
parameters:
public_certificate_name:
rule_exclusions:
- missing_parameter_test_coverage
slot:
rule_exclusions:
- missing_parameter_test_coverage
webapp config public-cert list:
rule_exclusions:
- missing_command_test_coverage
parameters:
name:
rule_exclusions:
- missing_parameter_test_coverage
slot:
rule_exclusions:
- missing_parameter_test_coverage
webapp config public-cert show:
rule_exclusions:
- missing_command_test_coverage
parameters:
public_certificate_name:
rule_exclusions:
- missing_parameter_test_coverage
slot:
rule_exclusions:
- missing_parameter_test_coverage
webapp config public-cert upload:
rule_exclusions:
- missing_command_test_coverage
parameters:
public_certificate_name:
rule_exclusions:
- missing_parameter_test_coverage
certificate_file:
rule_exclusions:
- missing_parameter_test_coverage
public_certificate_location:
rule_exclusions:
- missing_parameter_test_coverage
slot:
rule_exclusions:
- missing_parameter_test_coverage
webapp config set:
parameters:
generic_configurations:
Expand Down Expand Up @@ -3945,6 +4005,16 @@ webapp delete:
keep_dns_registration:
rule_exclusions:
- option_length_too_long
webapp deployment slot copy:
rule_exclusions:
- missing_command_test_coverage
parameters:
slot:
rule_exclusions:
- missing_parameter_test_coverage
target_slot:
rule_exclusions:
- missing_parameter_test_coverage
webapp deployment source config:
parameters:
private_repo_password:
Expand All @@ -3961,6 +4031,7 @@ webapp log config:
docker_container_logging:
rule_exclusions:
- option_length_too_long
- missing_parameter_test_coverage
failed_request_tracing:
rule_exclusions:
- option_length_too_long
Expand Down
176 changes: 168 additions & 8 deletions src/azure-cli/azure/cli/command_modules/appservice/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,26 @@
crafted: true
"""

helps['appservice plan list-skus'] = """
type: command
short-summary: List the available SKUs for an app service plan.
long-summary: Shows which SKU tiers and sizes are available for an existing app service plan, including worker sizes and capacities.
examples:
- name: List available SKUs for an app service plan.
text: >
az appservice plan list-skus -g MyResourceGroup -n MyPlan
"""

helps['appservice plan list-slots'] = """
type: command
short-summary: List all deployment slots across all apps in an app service plan.
long-summary: Enumerates every web app under the plan, then lists the deployment slots for each app.
examples:
- name: List all deployment slots for all apps in a plan.
text: >
az appservice plan list-slots -g MyResourceGroup -n MyPlan
"""

helps['appservice plan managed-instance'] = """
type: group
short-summary: Manage configurations for managed instance App Service plans.
Expand Down Expand Up @@ -1489,7 +1509,14 @@
helps['webapp config appsettings set'] = """
type: command
short-summary: Set a web app's settings.
long-summary: Note that setting values are now redacted in the result. Please use the `az webapp config appsettings list` command to view the settings.
long-summary: |
Note that setting values are now redacted in the result. Please use the `az webapp config appsettings list` command to view the settings.

To enable Application Insights monitoring, set the APPLICATIONINSIGHTS_CONNECTION_STRING app setting to the
connection string of your Application Insights resource. You can find the connection string in the Azure Portal
under your Application Insights resource's Overview page. Using the connection string is the recommended approach
over the legacy APPINSIGHTS_INSTRUMENTATIONKEY setting. For more information, see
https://learn.microsoft.com/azure/azure-monitor/app/azure-web-apps
parameters:
- name: --settings
short-summary: Space-separated appsettings in KEY=VALUE format. Use @{file} to load from a file. See https://go.microsoft.com/fwlink/?linkid=2219923 for more information on file format and editing app settings in bulk.
Expand All @@ -1502,6 +1529,12 @@
- name: Set using both key-value pair and a json file with more settings.
text: >
az webapp config appsettings set -g MyResourceGroup -n MyUniqueApp --settings mySetting=value @moreSettings.json
- name: Enable Application Insights monitoring using a connection string (recommended).
text: >
az webapp config appsettings set -g MyResourceGroup -n MyUniqueApp --settings APPLICATIONINSIGHTS_CONNECTION_STRING="InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://region.in.applicationinsights.azure.com/"
- name: Enable Application Insights monitoring using an instrumentation key (legacy).
text: >
az webapp config appsettings set -g MyResourceGroup -n MyUniqueApp --settings APPINSIGHTS_INSTRUMENTATIONKEY=00000000-0000-0000-0000-000000000000
"""

helps['webapp config backup'] = """
Expand All @@ -1512,10 +1545,22 @@
helps['webapp config backup create'] = """
type: command
short-summary: Create a backup of a web app.
long-summary: |
Create a backup of a web app to an Azure Blob Storage container.
The --container-url must be a SAS URL with write permissions to the target container.

VNet / Private Endpoint note: If the storage account is behind a VNet or private endpoint,
the web app must have VNet integration enabled and the storage account's firewall must allow
access from the web app's outbound VNet. Ensure the SAS token is valid and the app's
outbound traffic can reach the storage account. For more information, see
https://learn.microsoft.com/azure/app-service/web-sites-backup#troubleshooting
examples:
- name: Create a backup of a web app. (autogenerated)
- name: Create a backup of a web app.
text: az webapp config backup create --container-url {container-url} --resource-group MyResourceGroup --webapp-name MyWebapp
crafted: true
- name: Create a backup with a custom name and database.
text: >
az webapp config backup create --container-url {container-url} --resource-group MyResourceGroup --webapp-name MyWebapp --backup-name mybackup --db-name mydb --db-type SqlAzure --db-connection-string "Server=..."
"""

helps['webapp config backup list'] = """
Expand All @@ -1530,6 +1575,21 @@
helps['webapp config backup restore'] = """
type: command
short-summary: Restore a web app from a backup.
long-summary: |
Restore a web app from a previously created backup stored in Azure Blob Storage.

VNet / Private Endpoint note: If the storage account is behind a VNet or private endpoint,
the web app must have VNet integration enabled and the storage account's firewall must allow
access from the web app's outbound VNet. Ensure the SAS token is valid and the app's
outbound traffic can reach the storage account. For more information, see
https://learn.microsoft.com/azure/app-service/web-sites-backup#troubleshooting
examples:
- name: Restore a web app from a backup.
text: >
az webapp config backup restore --container-url {container-url} --resource-group MyResourceGroup --webapp-name MyWebapp --backup-name mybackup
- name: Restore a web app overwriting the existing app.
text: >
az webapp config backup restore --container-url {container-url} --resource-group MyResourceGroup --webapp-name MyWebapp --backup-name mybackup --overwrite
"""

helps['webapp config backup delete'] = """
Expand Down Expand Up @@ -1570,9 +1630,10 @@
type: command
short-summary: Get a web app's connection strings.
examples:
- name: Get a web app's connection strings. (autogenerated)
- name: Get a web app's connection strings.
text: az webapp config connection-string list --name MyWebapp --resource-group MyResourceGroup
crafted: true
- name: Get a web app's connection strings using a resource ID.
text: az webapp config connection-string list --ids /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Web/sites/{WebApp}
"""

helps['webapp config connection-string set'] = """
Expand Down Expand Up @@ -1778,6 +1839,53 @@
text: az webapp config ssl create --resource-group MyResourceGroup --name MyWebapp --hostname cname.mycustomdomain.com
"""

helps['webapp config public-cert'] = """
type: group
short-summary: Manage public certificates for a web app.
"""

helps['webapp config public-cert upload'] = """
type: command
short-summary: Upload a public certificate (.cer or .crt) to a web app.
long-summary: >
Public certificates are used to allow the web app to make outbound calls to services that
require certificate-based authentication. Unlike SSL certificates, public certificates do not
bind to a hostname.
examples:
- name: Upload a public certificate to a web app.
text: >
az webapp config public-cert upload -g MyResourceGroup -n MyWebapp
--public-certificate-name MyCert --certificate-file /path/to/cert.cer
- name: Upload a public certificate to a deployment slot.
text: >
az webapp config public-cert upload -g MyResourceGroup -n MyWebapp --slot staging
--public-certificate-name MyCert --certificate-file /path/to/cert.cer
"""

helps['webapp config public-cert list'] = """
type: command
short-summary: List public certificates for a web app.
examples:
- name: List public certificates for a web app.
text: az webapp config public-cert list -g MyResourceGroup -n MyWebapp
"""

helps['webapp config public-cert show'] = """
type: command
short-summary: Show the details of a public certificate for a web app.
examples:
- name: Show a public certificate.
text: az webapp config public-cert show -g MyResourceGroup -n MyWebapp --public-certificate-name MyCert
"""

helps['webapp config public-cert delete'] = """
type: command
short-summary: Delete a public certificate from a web app.
examples:
- name: Delete a public certificate from a web app.
text: az webapp config public-cert delete -g MyResourceGroup -n MyWebapp --public-certificate-name MyCert
"""

helps['webapp config storage-account'] = """
type: group
short-summary: Manage a web app's Azure storage account configurations.
Expand Down Expand Up @@ -2052,6 +2160,24 @@
--target-slot production
"""

helps['webapp deployment slot copy'] = """
type: command
short-summary: Copy the content and configuration of a deployment slot to another slot.
long-summary: >
Copy site content from the source slot to the target slot. This is a one-way operation
that overwrites the target slot's content. Unlike swap, this does not exchange the slots.
The source slot is specified with --slot, and the destination is --target-slot (defaults to production).
examples:
- name: Copy a staging slot's content to production.
text: >
az webapp deployment slot copy -g MyResourceGroup -n MyUniqueApp --slot staging \\
--target-slot production
- name: Copy production content to a staging slot.
text: >
az webapp deployment slot copy -g MyResourceGroup -n MyUniqueApp --slot production \\
--target-slot staging
"""

helps['webapp deployment source'] = """
type: group
short-summary: Manage web app deployment via source control.
Expand Down Expand Up @@ -2265,6 +2391,13 @@
helps['webapp list-instances'] = """
type: command
short-summary: List all scaled out instances of a web app or web app slot.
examples:
- name: List instances for a web app.
text: >
az webapp list-instances -g MyResourceGroup -n MyWebApp
- name: List instances for a specific deployment slot.
text: >
az webapp list-instances -g MyResourceGroup -n MyWebApp --slot staging
"""

helps['webapp list-runtimes'] = """
Expand All @@ -2285,13 +2418,34 @@
helps['webapp log config'] = """
type: command
short-summary: Configure logging for a web app.
examples:
- name: Configure logging for a web app. (autogenerated)
long-summary: |
Configure application-level and web server logging. For Linux and custom container web apps,
--docker-container-logging controls whether STDOUT and STDERR from the container are collected.
Use 'filesystem' to enable (logs viewable via `az webapp log tail` or downloadable via
`az webapp log download`) or 'off' to disable. Web server logs can be stored on the filesystem
or in Azure Blob Storage. When using Azure Blob Storage, provide a SAS URL via --web-server-log-sas-url.
parameters:
- name: --web-server-logging
short-summary: "Configure Web server logging. Use 'filesystem' for local storage, 'azureblobstorage' for Azure Blob Storage, or 'off' to disable."
- name: --web-server-log-sas-url
short-summary: SAS URL to an Azure Blob Storage container for web server log storage. Required when --web-server-logging is set to azureblobstorage.
- name: --web-server-log-retention
short-summary: Number of days to retain web server logs when using Azure Blob Storage (default 3).
examples:
- name: Disable web server logging.
text: az webapp log config --name MyWebapp --resource-group MyResourceGroup --web-server-logging off
crafted: true
- name: Configure logging for a web app. (autogenerated)
- name: Disable Docker container logging.
text: az webapp log config --docker-container-logging off --name MyWebapp --resource-group MyResourceGroup
crafted: true
- name: Enable docker container logging (write to filesystem) for a Linux/container web app.
text: az webapp log config --docker-container-logging filesystem --name MyWebapp --resource-group MyResourceGroup
- name: Enable web server logging to Azure Blob Storage.
text: >
az webapp log config --name MyWebapp --resource-group MyResourceGroup --web-server-logging azureblobstorage --web-server-log-sas-url "https://mystorageaccount.blob.core.windows.net/weblogs?sv=...&sig=..."
- name: Configure application logging to write to the filesystem at verbose level.
text: >
az webapp log config --name MyWebapp --resource-group MyResourceGroup --application-logging filesystem --level verbose
"""

helps['webapp log download'] = """
Expand Down Expand Up @@ -2431,10 +2585,16 @@
helps['webapp traffic-routing set'] = """
type: command
short-summary: Configure routing traffic to deployment slots.
long-summary: |
Configure the percentage of production traffic routed to deployment slots.
Note: this command updates the site configuration, which may cause a brief app restart on the platform.
This is a known Azure App Service platform behavior when modifying ramp-up rules via the configuration API.
examples:
- name: Configure routing traffic to deployment slots. (autogenerated)
- name: Route 50% of production traffic to the staging slot.
text: az webapp traffic-routing set --distribution staging=50 --name MyWebApp --resource-group MyResourceGroup
crafted: true
- name: Split traffic across multiple slots.
text: az webapp traffic-routing set --distribution staging=30 canary=20 --name MyWebApp --resource-group MyResourceGroup
"""

helps['webapp traffic-routing show'] = """
Expand Down
Loading
Loading