az service-group

Note

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

This command group is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Manage Azure Service Groups.

Commands

Name Description Type Status
az service-group create

Create or update a service group.

Extension Preview
az service-group delete

Delete a service group.

Extension Preview
az service-group list-ancestors

Get the details of a service group's ancestors.

Extension Preview
az service-group show

Get the details of a service group.

Extension Preview
az service-group update

Update a service group.

Extension Preview
az service-group wait

Place the CLI in a waiting state until a condition is met.

Extension Preview

az service-group create

Preview

Command group 'az service-group' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Create or update a service group.

az service-group create --name
                        [--acquire-policy-token]
                        [--change-reference]
                        [--display-name]
                        [--kind]
                        [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                        [--parent]
                        [--tags]

Examples

Create a service group under the tenant root

az service-group create --name MyServiceGroup --display-name "My Service Group" --parent resource-id="/providers/Microsoft.Management/serviceGroups/<tenantId>"

Create a child service group under an existing parent

az service-group create --name ChildGroup --display-name "Child" --parent resource-id="/providers/Microsoft.Management/serviceGroups/ParentGroup"

Required Parameters

--name -n

ServiceGroup Name.

Optional Parameters

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

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--display-name

The display name of the service group.

Property Value
Parameter group: Properties Arguments
--kind

The kind of the service group.

Property Value
Parameter group: Resource Arguments
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--parent

The details of the parent service group. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Properties Arguments
--tags

The service group tags. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Resource 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 service-group delete

Preview

Command group 'az service-group' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Delete a service group.

az service-group delete --name
                        [--acquire-policy-token]
                        [--change-reference]
                        [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                        [--yes]

Examples

Delete a service group

az service-group delete --name MyServiceGroup --yes

Required Parameters

--name -n

ServiceGroup Name.

Optional Parameters

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

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--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 service-group list-ancestors

Preview

Command group 'az service-group' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Get the details of a service group's ancestors.

az service-group list-ancestors --name
                                [--acquire-policy-token]
                                [--change-reference]

Examples

List ancestors of a service group

az service-group list-ancestors --name MyServiceGroup

Required Parameters

--name -n

ServiceGroup Name.

Optional Parameters

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

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy 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 service-group show

Preview

Command group 'az service-group' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Get the details of a service group.

az service-group show --name

Examples

Get a service group

az service-group show --name MyServiceGroup

Required Parameters

--name -n

ServiceGroup Name.

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 service-group update

Preview

Command group 'az service-group' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Update a service group.

az service-group update --name
                        [--acquire-policy-token]
                        [--change-reference]
                        [--display-name]
                        [--kind]
                        [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                        [--parent]
                        [--tags]

Examples

Update the display name of a service group

az service-group update --name MyServiceGroup --display-name "Updated Name"

Required Parameters

--name -n

ServiceGroup Name.

Optional Parameters

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

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--display-name

The display name of the service group.

Property Value
Parameter group: Properties Arguments
--kind

The kind of the service group.

Property Value
Parameter group: Resource Arguments
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--parent

The details of the parent service group. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Properties Arguments
--tags

The service group tags. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Resource 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 service-group wait

Preview

Command group 'az service-group' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Place the CLI in a waiting state until a condition is met.

az service-group wait --name
                      [--acquire-policy-token]
                      [--change-reference]
                      [--created]
                      [--custom]
                      [--deleted]
                      [--exists]
                      [--interval]
                      [--timeout]
                      [--updated]

Required Parameters

--name -n

ServiceGroup Name.

Optional Parameters

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

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--created

Wait until created with 'provisioningState' at 'Succeeded'.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--custom

Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].

Property Value
Parameter group: Wait Condition Arguments
--deleted

Wait until deleted.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--exists

Wait until the resource exists.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--interval

Polling interval in seconds.

Property Value
Parameter group: Wait Condition Arguments
Default value: 30
--timeout

Maximum wait in seconds.

Property Value
Parameter group: Wait Condition Arguments
Default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.

Property Value
Parameter group: Wait Condition Arguments
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