Share via


az sig share

Note

This command group has commands that are defined in both Azure CLI and at least one extension. Install each extension to benefit from its extended capabilities. Learn more about extensions.

Manage gallery sharing profile.

Commands

Name Description Type Status
az sig share add

Share gallery with subscriptions and tenants.

Core GA
az sig share enable-community

Allow to share gallery to the community.

Core GA
az sig share enable-community (image-gallery extension)

Allow to share gallery to the community.

Extension GA
az sig share remove

Stop sharing gallery with a subscription or tenant.

Core GA
az sig share reset

Disable gallery from being shared with subscription or tenant.

Core GA
az sig share wait

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

Core GA

az sig share add

Share gallery with subscriptions and tenants.

az sig share add [--gallery-name]
                 [--ids]
                 [--no-wait]
                 [--op-type]
                 [--resource-group]
                 [--subscription]
                 [--subscription-ids]
                 [--tenant-ids]

Examples

Share entire gallery with all members of a subscription and/or tenant.

az sig share add --resource-group MyResourceGroup --gallery-name MyGallery \
--subscription-ids subId1 subId2 --tenant-ids tenantId1 tenantId2

Optional Parameters

--gallery-name -r

The name of the Shared Image Gallery.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--no-wait

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

Default value: False
--op-type
Deprecated

Argument 'op_type' has been deprecated and will be removed in a future release.

Distinguish add operation and remove operation.

Default value: Add
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

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

--subscription-ids

A list of subscription ids to share the gallery.

--tenant-ids

A list of tenant ids to share the gallery.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az sig share enable-community

Allow to share gallery to the community.

az sig share enable-community [--gallery-name]
                              [--ids]
                              [--no-wait]
                              [--op-type]
                              [--resource-group]
                              [--subscription]
                              [--subscription-ids]
                              [--tenant-ids]

Examples

Allow to share gallery to the community

az sig share enable-community --resource-group MyResourceGroup --gallery-name MyGallery

Optional Parameters

--gallery-name -r

The name of the Shared Image Gallery.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--no-wait

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

Default value: False
--op-type
Deprecated

Argument 'op_type' has been deprecated and will be removed in a future release.

Distinguish add operation and remove operation.

Default value: EnableCommunity
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

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

--subscription-ids

A list of subscription ids to share the gallery.

--tenant-ids

A list of tenant ids to share the gallery.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az sig share enable-community (image-gallery extension)

Allow to share gallery to the community.

az sig share enable-community [--gallery-name]
                              [--ids]
                              [--no-wait]
                              [--op-type]
                              [--resource-group]
                              [--subscription]
                              [--subscription-ids]
                              [--tenant-ids]

Examples

Allow to share gallery to the community

az sig share enable-community --resource-group MyResourceGroup --gallery-name MyGallery

Optional Parameters

--gallery-name -r

The name of the Shared Image Gallery.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--no-wait

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

Default value: False
--op-type
Deprecated

Argument 'op_type' has been deprecated and will be removed in a future release.

Distinguish add operation and remove operation.

Default value: EnableCommunity
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

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

--subscription-ids

A list of subscription ids to share the gallery.

--tenant-ids

A list of tenant ids to share the gallery.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az sig share remove

Stop sharing gallery with a subscription or tenant.

az sig share remove [--gallery-name]
                    [--ids]
                    [--no-wait]
                    [--op-type]
                    [--resource-group]
                    [--subscription]
                    [--subscription-ids]
                    [--tenant-ids]

Examples

Stop sharing with a subscription or tenant ID

az sig share remove --resource-group MyResourceGroup --gallery-name MyGallery \
--subscription-ids subId1 subId2 --tenant-ids tenantId1 tenantId2

Optional Parameters

--gallery-name -r

The name of the Shared Image Gallery.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--no-wait

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

Default value: False
--op-type
Deprecated

Argument 'op_type' has been deprecated and will be removed in a future release.

Distinguish add operation and remove operation.

Default value: Remove
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

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

--subscription-ids

A list of subscription ids to share the gallery.

--tenant-ids

A list of tenant ids to share the gallery.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az sig share reset

Disable gallery from being shared with subscription or tenant.

az sig share reset [--gallery-name]
                   [--ids]
                   [--no-wait]
                   [--resource-group]
                   [--subscription]

Examples

Reset sharing profile of a gallery.

az sig share reset --resource-group MyResourceGroup --gallery-name MyGallery

Optional Parameters

--gallery-name -r

The name of the Shared Image Gallery.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--no-wait

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

Default value: False
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az sig share wait

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

az sig share wait --gallery-name
                  --resource-group
                  [--created]
                  [--custom]
                  [--deleted]
                  [--exists]
                  [--interval]
                  [--timeout]
                  [--updated]

Examples

Place the CLI in a waiting state until the gallery sharing object is updated.

az sig share wait --updated --resource-group MyResourceGroup --gallery-name Gallery

Required Parameters

--gallery-name -r

Gallery name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--created

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

Default value: False
--custom

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

--deleted

Wait until deleted.

Default value: False
--exists

Wait until the resource exists.

Default value: False
--interval

Polling interval in seconds.

Default value: 30
--timeout

Maximum wait in seconds.

Default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.