Share via


az site

Note

This reference is part of the site extension for the Azure CLI (version 2.75.0 or higher). The extension will automatically install the first time you run an az site command. Learn more about extensions.

Manage Site.

Commands

Name Description Type Status
az site create

Create a site resource scoped to a resource group, subscription, or service group.

Extension GA
az site delete

Deletes an existing site resource scoped to a resource group, subscription, or service group.

Extension GA
az site list

Lists all site resources scoped to a resource group, subscription, or service group.

Extension GA
az site show

Displays details of a specific site resource scoped to a resource group, subscription, or service group.

Extension GA
az site update

Updates an existing site resource scoped to a resource group, subscription, or service group.

Extension GA

az site create

Create a site resource scoped to a resource group, subscription, or service group.

Scope Options: --resource-group: Scope the site to a specific resource group. Note: When using this option, you must also provide --subscription. --subscription: Scope the site to a subscription. --service-group: Scope the site to a service group.

az site create --name --site-name
               [--city]
               [--country]
               [--description]
               [--display-name]
               [--labels]
               [--postal-code]
               [--resource-group]
               [--service-group --sg]
               [--state-or-province]
               [--street-address1]
               [--street-address2]

Examples

Create a Site at service group scope

az site create --site-name TestSiteName --service-group TestSGName --display-name 'Test Site Display' --description "Test Site" --labels key1="value1" key2="value2" --street-address1="16 TOWNSEND ST" --street-address2="UNIT 1" --city="newyork" --state-or-province="CA" --country="US" --postal-code="94107"

Create a Site at resource group scope

az site create --site-name TestSiteName --resource-group TestRGName --subscription 000000000-0000-0000-0000-000000000000 --display-name 'Test Site Display' --description "Test Site" --street-address1="16 TOWNSEND ST" --street-address2="UNIT 1" --city="newyork" --state-or-province="CA" --country="US" --postal-code="94107"

Create a Site at subscription scope

az site create --site-name TestSiteName --subscription 000000000-0000-0000-0000-000000000000 --display-name 'Test Site Display' --description "Test Site" --labels key1="value1" --street-address1="16 TOWNSEND ST" --street-address2="UNIT 1" --city="newyork" --state-or-province="CA" --country="US" --postal-code="94107"

Required Parameters

--name --site-name -n

Name of the site resource.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--city

City of the address.

Property Value
Parameter group: SiteAddress Arguments
--country

Country of the address.

Property Value
Parameter group: SiteAddress Arguments
--description

Description of site resource.

Property Value
Parameter group: Properties Arguments
--display-name

Display name of site resource.

Property Value
Parameter group: Properties Arguments
--labels

Key-value pairs for labeling the site resource. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Properties Arguments
--postal-code

Postal or ZIP code of the address.

Property Value
Parameter group: SiteAddress Arguments
--resource-group -g

Name of the resource group.

--service-group --sg

Name of the service group.

--state-or-province

State or province of the address.

Property Value
Parameter group: SiteAddress Arguments
--street-address1

First line of the street address.

Property Value
Parameter group: SiteAddress Arguments
--street-address2

Second line of the street address.

Property Value
Parameter group: SiteAddress Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az site delete

Deletes an existing site resource scoped to a resource group, subscription, or service group.

Scope Options: --resource-group: Target a site within a specific resource group. Note: Requires --subscription. --subscription: Target a site scoped to a subscription. --service-group: Target a site scoped to a service group.

az site delete --name --site-name
               [--resource-group]
               [--service-group --sg]
               [--yes]

Examples

Delete a Site at service group scope

az site delete --site-name TestSiteName --service-group TestSGName

Delete a Site at resource group scope

az site delete --site-name TestSiteName --resource-group TestRGName --subscription 00000000-0000-0000-0000-000000000000

Delete a Site at subscription scope

az site delete --site-name TestSiteName --subscription 00000000-0000-0000-0000-000000000000

Required Parameters

--name --site-name -n

Name of the site resource.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--resource-group -g

Name of the resource group.

--service-group --sg

Name of the service group.

--yes -y

Do not prompt for confirmation.

Property Value
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az site list

Lists all site resources scoped to a resource group, subscription, or service group.

Scope Options: --resource-group: List sites within a specific resource group. Note: Requires --subscription. --subscription: List sites scoped to a subscription. --service-group: List sites scoped to a service group.

az site list [--max-items]
             [--next-token]
             [--resource-group]
             [--service-group --sg]

Examples

List Sites at service group scope

az site list --service-group TestSGName

List Sites at resource group scope

az site list --resource-group TestRGName --subscription 00000000000-0000-0000-0000-000000000000

List Sites at subscription scope

az site list --subscription 00000000000-0000-0000-0000-000000000000

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--max-items

Total number of items to return in the command's output. If the total number of items available is more than the value specified, a token is provided in the command's output. To resume pagination, provide the token value in --next-token argument of a subsequent command.

Property Value
Parameter group: Pagination Arguments
--next-token

Token to specify where to start paginating. This is the token value from a previously truncated response.

Property Value
Parameter group: Pagination Arguments
--resource-group -g

Name of the resource group.

--service-group --sg

Name of the service group.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az site show

Displays details of a specific site resource scoped to a resource group, subscription, or service group.

Scope Options: --resource-group: Show site details within a specific resource group. Note: Requires --subscription. --subscription: Show site details scoped to a subscription. --service-group: Show site details scoped to a service group.

az site show --name --site-name
             [--resource-group]
             [--service-group --sg]

Examples

Show a Site at service group scope

az site show --site-name TestSiteName --service-group TestSGName

Show a Site at resource group scope

az site show --site-name TestSiteName --resource-group TestRGName --subscription 00000000-0000-0000-0000-000000000000

Show a Site at subscription scope

az site show --site-name TestSiteName --subscription 00000000-0000-0000-0000-000000000000

Required Parameters

--name --site-name -n

Name of the site resource.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--resource-group -g

Name of the resource group.

--service-group --sg

Name of the service group.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az site update

Updates an existing site resource scoped to a resource group, subscription, or service group.

Scope Options: --resource-group: Update a site within a specific resource group. Note: Requires --subscription. --subscription: Update a site scoped to a subscription. --service-group: Update a site scoped to a service group.

az site update --name --site-name
               [--city]
               [--country]
               [--description]
               [--display-name]
               [--labels]
               [--postal-code]
               [--resource-group]
               [--service-group --sg]
               [--state-or-province]
               [--street-address1]
               [--street-address2]

Examples

Update a Site at service group scope

az site update --site-name TestSiteName --service-group TestSGName --description "Test Site" --labels key1="value1" key2="value2" --street-address1="17 TOWNSEND ST" --street-address2="UNIT 2" --city="newyork" --state-or-province="CA" --country="US" --postal-code="94107"

Update a Site at resource group scope

az site update --site-name TestSiteName --resource-group TestMSRG --subscription 00000000-0000-0000-0000-000000000000 --description "Test Site" --labels key1="value1" key2="value2" --street-address1="17 TOWNSEND ST" --street-address2="UNIT 2" --city="newyork" --state-or-province="CA" --country="US" --postal-code="94107"

Update a Site at subscription scope

az site update --site-name TestSiteName  --subscription 00000000-0000-0000-0000-000000000000 --description "Test Site" --labels key1="value1" key2="value2" --street-address1="17 TOWNSEND ST" --street-address2="UNIT 2" --city="newyork" --state-or-province="CA" --country="US" --postal-code="94107"

Required Parameters

--name --site-name -n

Name of the site resource.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--city

City of the address.

Property Value
Parameter group: SiteAddress Arguments
--country

Country of the address.

Property Value
Parameter group: SiteAddress Arguments
--description

Description of Site resource.

Property Value
Parameter group: Properties Arguments
--display-name

DisplayName of Site resource.

Property Value
Parameter group: Properties Arguments
--labels

Key-value pairs for labeling the site resource; to delete a label, set its value to null, or to delete all labels, set --labels to null. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Properties Arguments
--postal-code

Postal or ZIP code of the address.

Property Value
Parameter group: SiteAddress Arguments
--resource-group -g

Name of the resource group.

--service-group --sg

Name of the service group.

--state-or-province

State or province of the address.

Property Value
Parameter group: SiteAddress Arguments
--street-address1

First line of the street address.

Property Value
Parameter group: SiteAddress Arguments
--street-address2

Second line of the street address.

Property Value
Parameter group: SiteAddress Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False