From ede6a3855eae4e747185977e299dd79d1621137b Mon Sep 17 00:00:00 2001 From: "RuiJun Hu (MSFT)" Date: Mon, 14 Jul 2025 11:38:02 +0800 Subject: [PATCH 1/2] add example --- .../aaz/latest/gallery/service_artifact/_create.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallery-service-artifact/azext_gallery_service_artifact/aaz/latest/gallery/service_artifact/_create.py b/src/gallery-service-artifact/azext_gallery_service_artifact/aaz/latest/gallery/service_artifact/_create.py index 454765df9ea..f69b5316a2d 100644 --- a/src/gallery-service-artifact/azext_gallery_service_artifact/aaz/latest/gallery/service_artifact/_create.py +++ b/src/gallery-service-artifact/azext_gallery_service_artifact/aaz/latest/gallery/service_artifact/_create.py @@ -16,6 +16,9 @@ ) class Create(AAZCommand): """Create a Service Artifact under a gallery. + + :example: Create a Service Artifact under a gallery. + az gallery service-artifact create --gallery-name gallery -g rg --service-artifact-name TestArco --location eastus2euap --target-locations "[{'name': 'eastus2euap'}, {'name': 'centraluseuap'}, {'name': 'westcentralus'}, {'name': 'westus'}]" --vm-artifacts-profiles "[{'artifactProfiles': [{'description': 'Using a SIG Image for mocking', 'imageReference': {'id': '/subscriptions/db75-92e7-4da3-8e63-0ed4bd4c3d5e/resourceGroups/robhoopa_validate_arco_changes/providers/Microsoft.Compute/galleries/ArcoBugBashGallery1/images/WindowsGen2ImageGeneralized1', 'initialVersion': '0.0.1'}}], 'description': 'VM Artifact profile with default upgrade window', 'name': 'vmArtifactsProfile', 'upgradeSdpPolicy': {'schedulingPolicy': {'disableRegularUpgrades': False, 'maxConcurrentResourceCountPerRegion': 5, 'upgradeWindow': 'Default'}, 'type': 'PlatformOrchestratedForNewAndExistingResources'}}]" --description "Test Arco" """ _aaz_info = { From fadafccbb4f18c109ce447f72a20fbefb39e44de Mon Sep 17 00:00:00 2001 From: "RuiJun Hu (MSFT)" Date: Mon, 14 Jul 2025 14:12:28 +0800 Subject: [PATCH 2/2] hide values --- .../aaz/latest/gallery/service_artifact/_create.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallery-service-artifact/azext_gallery_service_artifact/aaz/latest/gallery/service_artifact/_create.py b/src/gallery-service-artifact/azext_gallery_service_artifact/aaz/latest/gallery/service_artifact/_create.py index f69b5316a2d..518e0788c98 100644 --- a/src/gallery-service-artifact/azext_gallery_service_artifact/aaz/latest/gallery/service_artifact/_create.py +++ b/src/gallery-service-artifact/azext_gallery_service_artifact/aaz/latest/gallery/service_artifact/_create.py @@ -18,7 +18,7 @@ class Create(AAZCommand): """Create a Service Artifact under a gallery. :example: Create a Service Artifact under a gallery. - az gallery service-artifact create --gallery-name gallery -g rg --service-artifact-name TestArco --location eastus2euap --target-locations "[{'name': 'eastus2euap'}, {'name': 'centraluseuap'}, {'name': 'westcentralus'}, {'name': 'westus'}]" --vm-artifacts-profiles "[{'artifactProfiles': [{'description': 'Using a SIG Image for mocking', 'imageReference': {'id': '/subscriptions/db75-92e7-4da3-8e63-0ed4bd4c3d5e/resourceGroups/robhoopa_validate_arco_changes/providers/Microsoft.Compute/galleries/ArcoBugBashGallery1/images/WindowsGen2ImageGeneralized1', 'initialVersion': '0.0.1'}}], 'description': 'VM Artifact profile with default upgrade window', 'name': 'vmArtifactsProfile', 'upgradeSdpPolicy': {'schedulingPolicy': {'disableRegularUpgrades': False, 'maxConcurrentResourceCountPerRegion': 5, 'upgradeWindow': 'Default'}, 'type': 'PlatformOrchestratedForNewAndExistingResources'}}]" --description "Test Arco" + az gallery service-artifact create --gallery-name gallery -g rg --service-artifact-name TestArco --location eastus2euap --target-locations "[{'name': 'eastus2euap'}, {'name': 'centraluseuap'}, {'name': 'westcentralus'}, {'name': 'westus'}]" --vm-artifacts-profiles "[{'artifactProfiles': [{'description': 'Using a SIG Image for mocking', 'imageReference': {'id': '/subscriptions/0000-0000-0000-0000-000000000000/resourceGroups/myrg/providers/Microsoft.Compute/galleries/Gallery1/images/WindowsGen2ImageGeneralized1', 'initialVersion': '0.0.1'}}], 'description': 'VM Artifact profile with default upgrade window', 'name': 'vmArtifactsProfile', 'upgradeSdpPolicy': {'schedulingPolicy': {'disableRegularUpgrades': False, 'maxConcurrentResourceCountPerRegion': 5, 'upgradeWindow': 'Default'}, 'type': 'PlatformOrchestratedForNewAndExistingResources'}}]" --description "Test Arco" """ _aaz_info = {