diff --git a/specification/compute/Gallery.Management/Gallery.tsp b/specification/compute/Gallery.Management/Gallery.tsp index 3df43872a673..251b8065e41c 100644 --- a/specification/compute/Gallery.Management/Gallery.tsp +++ b/specification/compute/Gallery.Management/Gallery.tsp @@ -18,7 +18,7 @@ model Gallery is Azure.ResourceManager.TrackedResource { Resource = Gallery, KeyName = "galleryName", SegmentName = "galleries", - NamePattern = "" + NamePattern = "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" >; /** diff --git a/specification/compute/Gallery.Management/GalleryScript.tsp b/specification/compute/Gallery.Management/GalleryScript.tsp new file mode 100644 index 000000000000..a270125391a4 --- /dev/null +++ b/specification/compute/Gallery.Management/GalleryScript.tsp @@ -0,0 +1,102 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "@typespec/versioning"; +import "./models.tsp"; +import "./Gallery.tsp"; +import "../Common.Management/operations.tsp"; + +using TypeSpec.Rest; +using Versioning; +using Azure.ResourceManager; +using TypeSpec.Http; + +namespace Microsoft.Compute; + +/** + * Gallery script name with pattern validation + */ +@pattern("^[a-zA-Z0-9]+([_]?[a-zA-Z0-9]+)*$") +@doc("The name of the gallery Script Definition in which the Script Version is to be created.") +scalar GalleryScriptName extends string; + +/** + * Specifies information about the gallery Script Definition that you want to create or update. + */ +@added(Versions.v2025_03_03) +@parentResource(Gallery) +model GalleryScript + is Azure.ResourceManager.TrackedResource { + @key("galleryScriptName") + @segment("scripts") + @path + name: GalleryScriptName; +} + +@armResourceOperations +interface GalleryScripts { + /** + * Retrieves information about a gallery script definition. + */ + @added(Versions.v2025_03_03) + get is ComputeResourceRead; + + /** + * Create or update a Gallery Script Definition. Gallery scripts allow the storage, sharing and reuse of common scripts + */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-put-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/no-response-body" "For backward compatibility" + @added(Versions.v2025_03_03) + createOrUpdate is ComputeResourceCreateOrReplaceAsync< + GalleryScript, + Response = ArmResourceUpdatedResponse | ArmResourceCreatedResponse< + GalleryScript, + ArmLroLocationHeader & Azure.Core.Foundations.RetryAfterHeader + > + >; + + /** + * Update a gallery Script Definition. + */ + @patch(#{ implicitOptionality: false }) + @added(Versions.v2025_03_03) + update is ComputeCustomPatchAsync< + GalleryScript, + PatchModel = GalleryScriptUpdate, + Response = ArmResponse | ArmAcceptedLroResponse + >; + + /** + * Delete a gallery Script Definition. + */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + @added(Versions.v2025_03_03) + delete is ComputeResourceDeleteAsync< + GalleryScript, + Response = ArmDeleteAcceptedLroResponse | ArmDeletedNoContentResponse + >; + + /** + * List gallery Script Definitions in a gallery. + */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-duplicate-property" "For backward compatibility" + @added(Versions.v2025_03_03) + listByGallery is ComputeResourceListByParent< + GalleryScript, + Response = ArmResponse + >; +} + +@@doc(GalleryScript.name, + "The name of the gallery Script Definition to be retrieved." +); +@@doc(GalleryScript.properties, + "Describes the properties of a gallery Script Definition." +); +@@doc(GalleryScripts.createOrUpdate::parameters.resource, + "Parameters supplied to the create or update gallery Script operation." +); +@@doc(GalleryScripts.update::parameters.properties, + "Parameters supplied to the update gallery Script operation." +); diff --git a/specification/compute/Gallery.Management/GalleryScriptVersion.tsp b/specification/compute/Gallery.Management/GalleryScriptVersion.tsp new file mode 100644 index 000000000000..6acbc12306b6 --- /dev/null +++ b/specification/compute/Gallery.Management/GalleryScriptVersion.tsp @@ -0,0 +1,118 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "@typespec/versioning"; +import "./models.tsp"; +import "./GalleryScript.tsp"; +import "../Common.Management/operations.tsp"; + +using TypeSpec.Rest; +using Versioning; +using Azure.ResourceManager; +using TypeSpec.Http; +using Azure.Core; // Needed for @useFinalStateVia decorator + +namespace Microsoft.Compute { + @pattern("^[0-9]+\\.[0-9]+\\.[0-9]+$") + @doc("The name of the gallery Script Version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: ..") + scalar GalleryScriptVersionName extends string; + + @added(Versions.v2025_03_03) + model GalleryScriptVersionList is Azure.Core.Page; + + @added(Versions.v2025_03_03) + @parentResource(GalleryScript) + model GalleryScriptVersion + is Azure.ResourceManager.TrackedResource { + @key("galleryScriptVersionName") + @segment("versions") + @path + name: GalleryScriptVersionName; + } + + /** + * Common LRO headers (Azure-AsyncOperation required Jan 2025). Keep Location + Retry-After for backward compatibility. + */ + alias GalleryScriptVersionLroHeaders = ArmAsyncOperationHeader & + ArmLroLocationHeader & + Azure.Core.Foundations.RetryAfterHeader; + + @armResourceOperations + interface GalleryScriptVersions { + @added(Versions.v2025_03_03) + get is ComputeResourceRead; + + /** + * Create or update a gallery Script Version. + */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-put-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/no-response-body" "For backward compatibility" + @useFinalStateVia("azure-async-operation") + @added(Versions.v2025_03_03) + createOrUpdate is ComputeResourceCreateOrReplaceAsync< + GalleryScriptVersion, + Azure.ResourceManager.Foundations.DefaultBaseParameters, + GalleryScriptVersionLroHeaders, + {}, + ArmResourceUpdatedResponse | ArmResourceCreatedResponse< + GalleryScriptVersion, + GalleryScriptVersionLroHeaders + > + >; + + /** + * Update a gallery Script Version. + */ + @useFinalStateVia("azure-async-operation") + @added(Versions.v2025_03_03) + @patch(#{ implicitOptionality: false }) + update is ComputeCustomPatchAsync< + GalleryScriptVersion, + GalleryScriptVersionUpdate, + Azure.ResourceManager.Foundations.DefaultBaseParameters, + GalleryScriptVersionLroHeaders, + {}, + ArmResponse | ArmAcceptedLroResponse< + "Resource update request accepted.", + GalleryScriptVersionLroHeaders + > + >; + + /** + * Delete a gallery Script Version. + */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + @useFinalStateVia("azure-async-operation") + @added(Versions.v2025_03_03) + delete is ComputeResourceDeleteAsync< + GalleryScriptVersion, + Azure.ResourceManager.Foundations.DefaultBaseParameters, + GalleryScriptVersionLroHeaders, + {}, + ArmDeleteAcceptedLroResponse | ArmDeletedNoContentResponse + >; + + /** + * List gallery Script Versions in a gallery Script Definition. + */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-duplicate-property" "For backward compatibility" + @added(Versions.v2025_03_03) + listByGalleryScript is ComputeResourceListByParent< + GalleryScriptVersion, + Response = ArmResponse + >; + } + + @@doc(GalleryScriptVersion.name, + "The name of the gallery Script Version to be retrieved." + ); + @@doc(GalleryScriptVersion.properties, + "Describes the properties of a gallery Script Version." + ); + @@doc(GalleryScriptVersions.createOrUpdate::parameters.resource, + "Parameters supplied to the create or update gallery Script Version operation." + ); + @@doc(GalleryScriptVersions.update::parameters.properties, + "Parameters supplied to the update gallery Script Version operation." + ); +} diff --git a/specification/compute/Gallery.Management/back-compatible.tsp b/specification/compute/Gallery.Management/back-compatible.tsp index 6af95ba4576d..304ca4054904 100644 --- a/specification/compute/Gallery.Management/back-compatible.tsp +++ b/specification/compute/Gallery.Management/back-compatible.tsp @@ -59,6 +59,19 @@ using Microsoft.Compute; @@clientName(GalleryApplications.update::parameters.properties, "galleryApplication" ); + +@@clientName(GalleryScripts.createOrUpdate::parameters.resource, + "galleryScript" +); +@@clientName(GalleryScripts.update::parameters.properties, "galleryScript"); + +@@clientName(GalleryScriptVersions.createOrUpdate::parameters.resource, + "galleryScriptVersion" +); +@@clientName(GalleryScriptVersions.update::parameters.properties, + "galleryScriptVersion" +); + #suppress "deprecated" "@flattenProperty decorator is not recommended to use." @@flattenProperty(GalleryApplication.properties); diff --git a/specification/compute/Gallery.Management/examples/2025-03-03/galleryScriptExamples/GalleryScriptVersion_Create.json b/specification/compute/Gallery.Management/examples/2025-03-03/galleryScriptExamples/GalleryScriptVersion_Create.json new file mode 100644 index 000000000000..f4f75f158788 --- /dev/null +++ b/specification/compute/Gallery.Management/examples/2025-03-03/galleryScriptExamples/GalleryScriptVersion_Create.json @@ -0,0 +1,269 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "api-version": "2025-03-03", + "galleryName": "myGalleryName", + "galleryScriptName": "myGalleryScriptName", + "galleryScriptVersionName": "1.0.0", + "galleryScriptVersion": { + "location": "West US", + "properties": { + "publishingProfile": { + "source": { + "scriptLink": "https://mystorageaccount.blob.core.windows.net/mycontainer/myScript.ps1?{sasKey}", + "parameters": [ + { + "name": "location", + "required": true, + "defaultValue": "westus", + "type": "String" + }, + { + "name": "myGalleryScriptParameter1", + "required": true, + "type": "String", + "defaultValue": "default value of parameter", + "description": "description of the parameter" + }, + { + "name": "myGalleryScriptParameter2", + "required": false, + "type": "String", + "defaultValue": "default value of parameter", + "description": "description of the parameter" + }, + { + "name": "numberOfUnits", + "required": true, + "type": "Int", + "defaultValue": "3", + "description": "description of the parameter", + "minValue": "1", + "maxValue": "5" + }, + { + "name": "weightOfUnit", + "required": true, + "type": "Double", + "defaultValue": "0.6", + "description": "description of the parameter", + "minValue": "0.1", + "maxValue": "2" + }, + { + "name": "typeOfProduct", + "required": false, + "type": "Enum", + "defaultValue": "Fruit", + "description": "description of the parameter", + "enumValues": [ + "Fruit", + "Vegetable", + "Greens", + "Nuts" + ] + } + ] + }, + "targetRegions": [ + { + "name": "West US", + "regionalReplicaCount": 2, + "storageAccountType": "Standard_LRS", + "excludeFromLatest": false + } + ], + "replicaCount": 2, + "endOfLifeDate": "2027-07-01T07:00:00Z", + "storageAccountType": "Standard_LRS" + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + } + } + } + }, + "responses": { + "200": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/000000-8de3-42e7-b00e-8970003527749a/providers/Microsoft.Compute/locations/westus/capsOperations/0012b61c-2d36-40bc-b7ed-1f0e48757277?api-version=2025-03-03", + "Location": "https://management.azure.com/subscriptions/000000-8de3-42e7-b00e-8970003527749a/providers/Microsoft.Compute/locations/westus/capsOperations/0012b61c-2d36-40bc-b7ed-1f0e48757277?monitor=true&api-version=2025-03-03" + }, + "body": { + "location": "West US", + "name": "1.0.0", + "type": "Microsoft.Compute/galleries/scripts/versions", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/scripts/myGalleryScript/versions/1.0.0", + "properties": { + "publishingProfile": { + "source": { + "scriptLink": "https://mystorageaccount.blob.core.windows.net/mycontainer/myScript.ps1", + "parameters": [ + { + "name": "location", + "required": true, + "defaultValue": "westus", + "type": "String" + }, + { + "name": "myGalleryScriptParameter1", + "required": true, + "type": "String", + "defaultValue": "default value of parameter", + "description": "description of the parameter" + }, + { + "name": "myGalleryScriptParameter2", + "required": false, + "type": "String", + "defaultValue": "default value of parameter", + "description": "description of the parameter" + }, + { + "name": "numberOfUnits", + "required": true, + "type": "Int", + "defaultValue": "3", + "description": "description of the parameter", + "minValue": "1", + "maxValue": "5" + }, + { + "name": "weightOfUnit", + "required": true, + "type": "Double", + "defaultValue": "0.6", + "description": "description of the parameter", + "minValue": "0.1", + "maxValue": "2" + }, + { + "name": "typeOfProduct", + "required": false, + "type": "Enum", + "defaultValue": "Fruit", + "description": "description of the parameter", + "enumValues": [ + "Fruit", + "Vegetable", + "Greens", + "Nuts" + ] + } + ] + }, + "targetRegions": [ + { + "name": "West US", + "regionalReplicaCount": 2, + "storageAccountType": "Standard_LRS", + "excludeFromLatest": false + } + ], + "replicaCount": 2, + "excludeFromLatest": false, + "publishedDate": "2025-06-21T17:13:57.5972568+00:00", + "endOfLifeDate": "2027-07-01T07:00:00+00:00", + "storageAccountType": "Standard_LRS" + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + }, + "provisioningState": "Updating" + } + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/000000-8de3-42e7-b00e-8970003527749a/providers/Microsoft.Compute/locations/westus/capsOperations/0012b61c-2d36-40bc-b7ed-1f0e48757277?api-version=2025-03-03", + "Location": "https://management.azure.com/subscriptions/000000-8de3-42e7-b00e-8970003527749a/providers/Microsoft.Compute/locations/westus/capsOperations/0012b61c-2d36-40bc-b7ed-1f0e48757277?monitor=true&api-version=2025-03-03" + }, + "body": { + "location": "West US", + "name": "1.0.0", + "type": "Microsoft.Compute/galleries/scripts/versions", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/scripts/myGalleryScript/versions/1.0.0", + "properties": { + "publishingProfile": { + "source": { + "scriptLink": "https://mystorageaccount.blob.core.windows.net/mycontainer/myScript.ps1", + "parameters": [ + { + "name": "location", + "required": true, + "defaultValue": "westus", + "type": "String" + }, + { + "name": "myGalleryScriptParameter1", + "required": true, + "type": "String", + "defaultValue": "default value of parameter", + "description": "description of the parameter" + }, + { + "name": "myGalleryScriptParameter2", + "required": false, + "type": "String", + "defaultValue": "default value of parameter", + "description": "description of the parameter" + }, + { + "name": "numberOfUnits", + "required": true, + "type": "Int", + "defaultValue": "3", + "description": "description of the parameter", + "minValue": "1", + "maxValue": "5" + }, + { + "name": "weightOfUnit", + "required": true, + "type": "Double", + "defaultValue": "0.6", + "description": "description of the parameter", + "minValue": "0.1", + "maxValue": "2" + }, + { + "name": "typeOfProduct", + "required": false, + "type": "Enum", + "defaultValue": "Fruit", + "description": "description of the parameter", + "enumValues": [ + "Fruit", + "Vegetable", + "Greens", + "Nuts" + ] + } + ] + }, + "targetRegions": [ + { + "name": "West US", + "regionalReplicaCount": 2, + "storageAccountType": "Standard_LRS", + "excludeFromLatest": false + } + ], + "replicaCount": 2, + "excludeFromLatest": false, + "publishedDate": "2025-06-21T17:13:57.5972568+00:00", + "endOfLifeDate": "2027-07-01T07:00:00+00:00", + "storageAccountType": "Standard_LRS" + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + }, + "provisioningState": "Creating" + } + } + } + }, + "operationId": "GalleryScriptVersions_CreateOrUpdate", + "title": "Create or update a simple gallery Script Version." +} diff --git a/specification/compute/Gallery.Management/examples/2025-03-03/galleryScriptExamples/GalleryScriptVersion_Delete.json b/specification/compute/Gallery.Management/examples/2025-03-03/galleryScriptExamples/GalleryScriptVersion_Delete.json new file mode 100644 index 000000000000..44e3494d72e6 --- /dev/null +++ b/specification/compute/Gallery.Management/examples/2025-03-03/galleryScriptExamples/GalleryScriptVersion_Delete.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroupName", + "api-version": "2025-03-03", + "galleryName": "myGalleryName", + "galleryScriptName": "myGalleryScriptName", + "galleryScriptVersionName": "1.0.0" + }, + "responses": { + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/000000-8de3-42e7-b00e-8970003527749a/providers/Microsoft.Compute/locations/eastus/capsOperations/0012b61c-2d36-40bc-b7ed-1f0e48757277?api-version=2025-03-03", + "Location": "https://management.azure.com/subscriptions/000000-8de3-42e7-b00e-8970003527749a/providers/Microsoft.Compute/locations/eastus/capsOperations/0012b61c-2d36-40bc-b7ed-1f0e48757277?monitor=true&api-version=2025-03-03" + } + }, + "204": {} + }, + "operationId": "GalleryScriptVersions_Delete", + "title": "Delete a gallery Script Version." +} diff --git a/specification/compute/Gallery.Management/examples/2025-03-03/galleryScriptExamples/GalleryScriptVersion_Get.json b/specification/compute/Gallery.Management/examples/2025-03-03/galleryScriptExamples/GalleryScriptVersion_Get.json new file mode 100644 index 000000000000..ca3b785de363 --- /dev/null +++ b/specification/compute/Gallery.Management/examples/2025-03-03/galleryScriptExamples/GalleryScriptVersion_Get.json @@ -0,0 +1,99 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroupName", + "api-version": "2025-03-03", + "galleryName": "myGalleryName", + "galleryScriptName": "myGalleryScriptName", + "galleryScriptVersionName": "1.0.0" + }, + "responses": { + "200": { + "body": { + "location": "West US", + "name": "1.0.0", + "type": "Microsoft.Compute/galleries/scripts/versions", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/galleries/myGalleryName/scripts/myGalleryScriptName/versions/1.0.0", + "properties": { + "publishingProfile": { + "source": { + "scriptLink": "https://mystorageaccount.blob.core.windows.net/mycontainer/myScript.ps1", + "parameters": [ + { + "name": "location", + "required": true, + "defaultValue": "westus", + "type": "String" + }, + { + "name": "myGalleryScriptParameter1", + "required": true, + "type": "String", + "defaultValue": "default value of parameter", + "description": "description of the parameter" + }, + { + "name": "myGalleryScriptParameter2", + "required": false, + "type": "String", + "defaultValue": "default value of parameter", + "description": "description of the parameter" + }, + { + "name": "numberOfUnits", + "required": true, + "type": "Int", + "defaultValue": "3", + "description": "description of the parameter", + "minValue": "1", + "maxValue": "5" + }, + { + "name": "weightOfUnit", + "required": true, + "type": "Double", + "defaultValue": "0.6", + "description": "description of the parameter", + "minValue": "0.1", + "maxValue": "2" + }, + { + "name": "typeOfProduct", + "required": false, + "type": "Enum", + "defaultValue": "Fruit", + "description": "description of the parameter", + "enumValues": [ + "Fruit", + "Vegetable", + "Greens", + "Nuts" + ] + } + ] + }, + "targetRegions": [ + { + "name": "West US", + "regionalReplicaCount": 2, + "storageAccountType": "Standard_LRS", + "excludeFromLatest": false + } + ], + "replicaCount": 2, + "excludeFromLatest": false, + "publishedDate": "2025-06-21T17:13:57.5972568+00:00", + "endOfLifeDate": "2027-07-01T07:00:00+00:00", + "storageAccountType": "Standard_LRS" + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + }, + "provisioningState": "Succeeded" + } + } + } + }, + "operationId": "GalleryScriptVersions_Get", + "title": "Get a gallery Script Version." +} diff --git a/specification/compute/Gallery.Management/examples/2025-03-03/galleryScriptExamples/GalleryScriptVersion_Get_WithReplicationStatus.json b/specification/compute/Gallery.Management/examples/2025-03-03/galleryScriptExamples/GalleryScriptVersion_Get_WithReplicationStatus.json new file mode 100644 index 000000000000..926b52560875 --- /dev/null +++ b/specification/compute/Gallery.Management/examples/2025-03-03/galleryScriptExamples/GalleryScriptVersion_Get_WithReplicationStatus.json @@ -0,0 +1,110 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroupName", + "api-version": "2025-03-03", + "galleryName": "myGalleryName", + "galleryScriptName": "myGalleryScriptName", + "galleryScriptVersionName": "1.0.0", + "$expand": "ReplicationStatus" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/galleries/myGalleryName/scripts/myGalleryScriptName/versions/1.0.0", + "properties": { + "publishingProfile": { + "source": { + "scriptLink": "https://mystorageaccount.blob.core.windows.net/mycontainer/myScript.ps1", + "parameters": [ + { + "name": "location", + "required": true, + "defaultValue": "westus", + "type": "String" + }, + { + "name": "myGalleryScriptParameter1", + "required": true, + "type": "String", + "defaultValue": "default value of parameter", + "description": "description of the parameter" + }, + { + "name": "myGalleryScriptParameter2", + "required": false, + "type": "String", + "defaultValue": "default value of parameter", + "description": "description of the parameter" + }, + { + "name": "numberOfUnits", + "required": true, + "type": "Int", + "defaultValue": "3", + "description": "description of the parameter", + "minValue": "1", + "maxValue": "5" + }, + { + "name": "weightOfUnit", + "required": true, + "type": "Double", + "defaultValue": "0.6", + "description": "description of the parameter", + "minValue": "0.1", + "maxValue": "2" + }, + { + "name": "typeOfProduct", + "required": false, + "type": "Enum", + "defaultValue": "Fruit", + "description": "description of the parameter", + "enumValues": [ + "Fruit", + "Vegetable", + "Greens", + "Nuts" + ] + } + ] + }, + "targetRegions": [ + { + "name": "West US", + "regionalReplicaCount": 2, + "storageAccountType": "Standard_LRS", + "excludeFromLatest": false + } + ], + "replicaCount": 2, + "excludeFromLatest": false, + "publishedDate": "2025-06-21T17:13:57.5972568+00:00", + "endOfLifeDate": "2027-07-01T07:00:00+00:00", + "storageAccountType": "Standard_LRS" + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + }, + "replicationStatus": { + "aggregatedState": "Completed", + "summary": [ + { + "region": "West US", + "state": "Completed", + "details": "", + "progress": 100 + } + ] + }, + "provisioningState": "Succeeded" + }, + "location": "West US", + "name": "1.0.0" + } + } + }, + "operationId": "GalleryScriptVersions_Get", + "title": "Get a gallery Script Version with replication status." +} diff --git a/specification/compute/Gallery.Management/examples/2025-03-03/galleryScriptExamples/GalleryScriptVersion_ListByGalleryScript.json b/specification/compute/Gallery.Management/examples/2025-03-03/galleryScriptExamples/GalleryScriptVersion_ListByGalleryScript.json new file mode 100644 index 000000000000..fc50d025f30e --- /dev/null +++ b/specification/compute/Gallery.Management/examples/2025-03-03/galleryScriptExamples/GalleryScriptVersion_ListByGalleryScript.json @@ -0,0 +1,149 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroupName", + "api-version": "2025-03-03", + "galleryName": "myGalleryName", + "galleryScriptName": "myGalleryScriptName" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "location": "West US", + "name": "1.0.0", + "type": "Microsoft.Compute/galleries/script/versions", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/galleries/myGalleryName/scripts/myGalleryScriptName/versions/1.0.0", + "properties": { + "publishingProfile": { + "source": { + "scriptLink": "https://mystorageaccount.blob.core.windows.net/mycontainer/myScript1.ps1", + "parameters": [ + { + "name": "location", + "required": true, + "defaultValue": "westus", + "type": "String" + }, + { + "name": "myGalleryScriptParameter1", + "required": true, + "type": "String", + "defaultValue": "default value of parameter", + "description": "description of the parameter" + }, + { + "name": "myGalleryScriptParameter2", + "required": false, + "type": "String", + "defaultValue": "default value of parameter", + "description": "description of the parameter" + }, + { + "name": "numberOfUnits", + "required": true, + "type": "Int", + "defaultValue": "3", + "description": "description of the parameter", + "minValue": "1", + "maxValue": "5" + }, + { + "name": "weightOfUnit", + "required": true, + "type": "Double", + "defaultValue": "0.6", + "description": "description of the parameter", + "minValue": "0.1", + "maxValue": "2" + }, + { + "name": "typeOfProduct", + "required": false, + "type": "Enum", + "defaultValue": "Fruit", + "description": "description of the parameter", + "enumValues": [ + "Fruit", + "Vegetable", + "Greens", + "Nuts" + ] + } + ] + }, + "targetRegions": [ + { + "name": "West US", + "regionalReplicaCount": 2, + "storageAccountType": "Standard_LRS", + "excludeFromLatest": false + } + ], + "replicaCount": 2, + "excludeFromLatest": false, + "publishedDate": "2025-06-21T17:13:57.5972568+00:00", + "endOfLifeDate": "2027-07-01T07:00:00+00:00", + "storageAccountType": "Standard_LRS" + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + }, + "provisioningState": "Succeeded" + } + }, + { + "location": "West US", + "name": "1.0.1", + "type": "Microsoft.Compute/galleries/script/versions", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/galleries/myGalleryName/scripts/myGalleryScriptName/versions/1.0.1", + "properties": { + "publishingProfile": { + "source": { + "scriptLink": "https://mystorageaccount.blob.core.windows.net/mycontainer/myScript2.ps1", + "parameters": [ + { + "name": "myGalleryScriptParameter1", + "required": true, + "type": "String", + "defaultValue": "default value of parameter", + "description": "description of the parameter" + }, + { + "name": "myGalleryScriptParameter2", + "required": false, + "type": "String", + "defaultValue": "default value of parameter", + "description": "description of the parameter" + } + ] + }, + "targetRegions": [ + { + "name": "West US", + "regionalReplicaCount": 2, + "storageAccountType": "Standard_LRS", + "excludeFromLatest": false + } + ], + "replicaCount": 2, + "excludeFromLatest": false, + "publishedDate": "2025-06-21T17:13:57.5972568+00:00", + "endOfLifeDate": "2027-07-01T07:00:00+00:00", + "storageAccountType": "Standard_LRS" + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + }, + "provisioningState": "Succeeded" + } + } + ], + "nextLink": "https://microsoft.com/nextLinkExample" + } + } + }, + "operationId": "GalleryScriptVersions_ListByGalleryScript", + "title": "List gallery Script Versions in a gallery Script Definition." +} diff --git a/specification/compute/Gallery.Management/examples/2025-03-03/galleryScriptExamples/GalleryScriptVersion_Update.json b/specification/compute/Gallery.Management/examples/2025-03-03/galleryScriptExamples/GalleryScriptVersion_Update.json new file mode 100644 index 000000000000..d15f8c26b33d --- /dev/null +++ b/specification/compute/Gallery.Management/examples/2025-03-03/galleryScriptExamples/GalleryScriptVersion_Update.json @@ -0,0 +1,181 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroupName", + "api-version": "2025-03-03", + "galleryName": "myGalleryName", + "galleryScriptName": "myGalleryScriptName", + "galleryScriptVersionName": "1.0.0", + "galleryScriptVersion": { + "properties": { + "publishingProfile": { + "source": { + "scriptLink": "https://mystorageaccount.blob.core.windows.net/mycontainer/myScript.ps1?{sasKey}", + "parameters": [ + { + "name": "location", + "required": true, + "defaultValue": "westus", + "type": "String" + }, + { + "name": "myGalleryScriptParameter1", + "required": true, + "type": "String", + "defaultValue": "default value of parameter", + "description": "description of the parameter" + }, + { + "name": "myGalleryScriptParameter2", + "required": false, + "type": "String", + "defaultValue": "default value of parameter", + "description": "description of the parameter" + }, + { + "name": "numberOfUnits", + "required": true, + "type": "Int", + "defaultValue": "3", + "description": "description of the parameter", + "minValue": "1", + "maxValue": "5" + }, + { + "name": "weightOfUnit", + "required": true, + "type": "Double", + "defaultValue": "0.6", + "description": "description of the parameter", + "minValue": "0.1", + "maxValue": "2" + }, + { + "name": "typeOfProduct", + "required": false, + "type": "Enum", + "defaultValue": "Fruit", + "description": "description of the parameter", + "enumValues": [ + "Fruit", + "Vegetable", + "Greens", + "Nuts" + ] + } + ] + }, + "targetRegions": [ + { + "name": "West US", + "regionalReplicaCount": 2, + "storageAccountType": "Standard_LRS", + "excludeFromLatest": false + } + ], + "replicaCount": 2, + "endOfLifeDate": "2027-07-01T07:00:00Z", + "storageAccountType": "Standard_LRS" + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + } + } + } + }, + "responses": { + "200": { + "body": { + "location": "West US", + "name": "1.0.0", + "type": "Microsoft.Compute/galleries/scripts/versions", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/galleries/myGalleryName/scripts/myGalleryScriptName/versions/1.0.0", + "properties": { + "publishingProfile": { + "source": { + "scriptLink": "https://mystorageaccount.blob.core.windows.net/mycontainer/myScript.ps1", + "parameters": [ + { + "name": "location", + "required": true, + "defaultValue": "westus", + "type": "String" + }, + { + "name": "myGalleryScriptParameter1", + "required": true, + "type": "String", + "defaultValue": "default value of parameter", + "description": "description of the parameter" + }, + { + "name": "myGalleryScriptParameter2", + "required": false, + "type": "String", + "defaultValue": "default value of parameter", + "description": "description of the parameter" + }, + { + "name": "numberOfUnits", + "required": true, + "type": "Int", + "defaultValue": "3", + "description": "description of the parameter", + "minValue": "1", + "maxValue": "5" + }, + { + "name": "weightOfUnit", + "required": true, + "type": "Double", + "defaultValue": "0.6", + "description": "description of the parameter", + "minValue": "0.1", + "maxValue": "2" + }, + { + "name": "typeOfProduct", + "required": false, + "type": "Enum", + "defaultValue": "Fruit", + "description": "description of the parameter", + "enumValues": [ + "Fruit", + "Vegetable", + "Greens", + "Nuts" + ] + } + ] + }, + "targetRegions": [ + { + "name": "West US", + "regionalReplicaCount": 2, + "storageAccountType": "Standard_LRS", + "excludeFromLatest": false + } + ], + "replicaCount": 2, + "excludeFromLatest": false, + "publishedDate": "2025-06-21T17:13:57.5972568+00:00", + "endOfLifeDate": "2027-07-01T07:00:00+00:00", + "storageAccountType": "Standard_LRS" + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + }, + "provisioningState": "Updating" + } + } + }, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/000000-8de3-42e7-b00e-8970003527749a/providers/Microsoft.Compute/locations/eastus/capsOperations/0012b61c-2d36-40bc-b7ed-1f0e48757277?api-version=2025-03-03", + "Location": "https://management.azure.com/subscriptions/000000-8de3-42e7-b00e-8970003527749a/providers/Microsoft.Compute/locations/eastus/capsOperations/0012b61c-2d36-40bc-b7ed-1f0e48757277?monitor=true&api-version=2025-03-03" + } + } + }, + "operationId": "GalleryScriptVersions_Update", + "title": "Update a simple gallery Script Version." +} diff --git a/specification/compute/Gallery.Management/examples/2025-03-03/galleryScriptExamples/GalleryScript_Create.json b/specification/compute/Gallery.Management/examples/2025-03-03/galleryScriptExamples/GalleryScript_Create.json new file mode 100644 index 000000000000..2dbbf0186de5 --- /dev/null +++ b/specification/compute/Gallery.Management/examples/2025-03-03/galleryScriptExamples/GalleryScript_Create.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "api-version": "2025-03-03", + "galleryName": "myGalleryName", + "galleryScriptName": "myGalleryScriptName", + "galleryScript": { + "location": "West US", + "properties": { + "description": "This is the gallery script description.", + "eula": "This is the gallery script EULA.", + "privacyStatementUri": "{myPrivacyStatementUri}", + "releaseNoteUri": "{myReleaseNoteUri}", + "supportedOSType": "Windows" + } + } + }, + "responses": { + "200": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/000000-8de3-42e7-b00e-8970003527749a/providers/Microsoft.Compute/locations/westus/capsOperations/0012b61c-2d36-40bc-b7ed-1f0e48757277?api-version=2025-03-03" + }, + "body": { + "properties": { + "description": "This is the gallery script description.", + "eula": "This is the gallery script EULA.", + "privacyStatementUri": "{myPrivacyStatementUri}", + "releaseNoteUri": "{myReleaseNoteUri}", + "supportedOSType": "Windows", + "provisioningState": "Updating" + }, + "location": "West US", + "name": "myGalleryScriptName", + "type": "Microsoft.Compute/galleries", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/scripts/myGalleryScriptName" + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/000000-8de3-42e7-b00e-8970003527749a/providers/Microsoft.Compute/locations/westus/capsOperations/0012b61c-2d36-40bc-b7ed-1f0e48757277?api-version=2025-03-03" + }, + "body": { + "properties": { + "description": "This is the gallery script description.", + "eula": "This is the gallery script EULA.", + "privacyStatementUri": "{myPrivacyStatementUri}", + "releaseNoteUri": "{myReleaseNoteUri}", + "supportedOSType": "Windows", + "provisioningState": "Creating" + }, + "location": "West US", + "name": "myGalleryApplicationName", + "type": "Microsoft.Compute/galleries", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/scripts/myGalleryScriptName" + } + } + }, + "operationId": "GalleryScripts_CreateOrUpdate", + "title": "Create or update a simple gallery Script." +} diff --git a/specification/compute/Gallery.Management/examples/2025-03-03/galleryScriptExamples/GalleryScript_Delete.json b/specification/compute/Gallery.Management/examples/2025-03-03/galleryScriptExamples/GalleryScript_Delete.json new file mode 100644 index 000000000000..f689a0888463 --- /dev/null +++ b/specification/compute/Gallery.Management/examples/2025-03-03/galleryScriptExamples/GalleryScript_Delete.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "api-version": "2025-03-03", + "galleryName": "myGalleryName", + "galleryScriptName": "myGalleryScriptName" + }, + "responses": { + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/000000-8de3-42e7-b00e-8970003527749a/providers/Microsoft.Compute/locations/eastus/capsOperations/0012b61c-0000-40bc-b7ed-000000000000?api-version=2025-03-03", + "Location": "https://management.azure.com/subscriptions/000000-8de3-42e7-b00e-8970003527749a/providers/Microsoft.Compute/locations/eastus/capsOperations/0012b61c-0000-40bc-b7ed-000000000000?monitor=true&api-version=2025-03-03" + } + }, + "204": {} + }, + "operationId": "GalleryScripts_Delete", + "title": "Delete a gallery Script." +} diff --git a/specification/compute/Gallery.Management/examples/2025-03-03/galleryScriptExamples/GalleryScript_Get.json b/specification/compute/Gallery.Management/examples/2025-03-03/galleryScriptExamples/GalleryScript_Get.json new file mode 100644 index 000000000000..c1b91778ca0c --- /dev/null +++ b/specification/compute/Gallery.Management/examples/2025-03-03/galleryScriptExamples/GalleryScript_Get.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "api-version": "2025-03-03", + "galleryName": "myGalleryName", + "galleryScriptName": "myGalleryScriptName" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/scripts/myGalleryScriptName", + "properties": { + "description": "This is the gallery script description.", + "eula": "This is the gallery script EULA.", + "privacyStatementUri": "{myPrivacyStatementUri}", + "releaseNoteUri": "{myReleaseNoteUri}", + "supportedOSType": "Windows", + "provisioningState": "Succeeded" + }, + "location": "West US", + "name": "myGalleryScriptName" + } + } + }, + "operationId": "GalleryScripts_Get", + "title": "Get a gallery Script." +} diff --git a/specification/compute/Gallery.Management/examples/2025-03-03/galleryScriptExamples/GalleryScript_ListByGallery.json b/specification/compute/Gallery.Management/examples/2025-03-03/galleryScriptExamples/GalleryScript_ListByGallery.json new file mode 100644 index 000000000000..bb74a56372cc --- /dev/null +++ b/specification/compute/Gallery.Management/examples/2025-03-03/galleryScriptExamples/GalleryScript_ListByGallery.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "api-version": "2025-03-03", + "galleryName": "myGalleryName" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/scripts/myGalleryScriptName", + "properties": { + "description": "This is the gallery script description.", + "eula": "This is the gallery script EULA.", + "privacyStatementUri": "{myPrivacyStatementUri}", + "releaseNoteUri": "{myReleaseNoteUri}", + "supportedOSType": "Windows", + "provisioningState": "Succeeded" + }, + "location": "West US", + "name": "myGalleryScriptName" + }, + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/scripts/myGalleryScriptName2", + "properties": { + "description": "This is the gallery script description.", + "eula": "This is the gallery script EULA.", + "privacyStatementUri": "{myPrivacyStatementUri}", + "releaseNoteUri": "{myReleaseNoteUri}", + "supportedOSType": "Windows", + "provisioningState": "Succeeded" + }, + "location": "West US", + "name": "myGalleryScriptName2" + } + ], + "nextLink": "https://microsoft.com/nextLinkExample" + } + } + }, + "operationId": "GalleryScripts_ListByGallery", + "title": "List gallery Scripts in a gallery." +} diff --git a/specification/compute/Gallery.Management/examples/2025-03-03/galleryScriptExamples/GalleryScript_Update.json b/specification/compute/Gallery.Management/examples/2025-03-03/galleryScriptExamples/GalleryScript_Update.json new file mode 100644 index 000000000000..05a123c9ca3e --- /dev/null +++ b/specification/compute/Gallery.Management/examples/2025-03-03/galleryScriptExamples/GalleryScript_Update.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "api-version": "2025-03-03", + "galleryName": "myGalleryName", + "galleryScriptName": "myGalleryScriptName", + "galleryScript": { + "properties": { + "description": "This is the gallery script description.", + "eula": "This is the gallery script EULA.", + "privacyStatementUri": "{myPrivacyStatementUri}", + "releaseNoteUri": "{myReleaseNoteUri}", + "supportedOSType": "Windows" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "description": "This is the gallery script description.", + "eula": "This is the gallery script EULA.", + "privacyStatementUri": "myPrivacyStatementUri", + "releaseNoteUri": "myReleaseNoteUri", + "supportedOSType": "Windows" + }, + "location": "West US", + "name": "myGalleryScriptName", + "type": "Microsoft.Compute/galleries", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/scripts/myGalleryScriptName" + } + }, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/000000-8de3-42e7-b00e-8970003527749a/providers/Microsoft.Compute/locations/eastus/capsOperations/0012b61c-2d36-40bc-b7ed-1f0e48757277?api-version=2025-03-03", + "Location": "https://management.azure.com/subscriptions/000000-8de3-42e7-b00e-8970003527749a/providers/Microsoft.Compute/locations/eastus/capsOperations/0012b61c-2d36-40bc-b7ed-1f0e48757277?monitor=true&api-version=2025-03-03" + } + } + }, + "operationId": "GalleryScripts_Update", + "title": "Update a simple gallery Script." +} diff --git a/specification/compute/Gallery.Management/main.tsp b/specification/compute/Gallery.Management/main.tsp index be7dd5e8f92b..61a356624d8c 100644 --- a/specification/compute/Gallery.Management/main.tsp +++ b/specification/compute/Gallery.Management/main.tsp @@ -19,6 +19,8 @@ import "./GalleryImage.tsp"; import "./GalleryImageVersion.tsp"; import "./GalleryApplication.tsp"; import "./GalleryApplicationVersion.tsp"; +import "./GalleryScript.tsp"; +import "./GalleryScriptVersion.tsp"; import "./GalleryInVMAccessControlProfile.tsp"; import "./GalleryInVMAccessControlProfileVersion.tsp"; import "./SharedGallery.tsp"; diff --git a/specification/compute/Gallery.Management/models.tsp b/specification/compute/Gallery.Management/models.tsp index e0824f6bc14a..4ecea77db072 100644 --- a/specification/compute/Gallery.Management/models.tsp +++ b/specification/compute/Gallery.Management/models.tsp @@ -45,6 +45,39 @@ union GallerySharingPermissionTypes { Community: "Community", } +/** + * Specifies the type of the Gallery Script parameter. Possible values are: String, Int, Double, Boolean, Enum + */ +@added(Versions.v2025_03_03) +union GalleryScriptParameterType { + string, + + /** + * String gallery script parameter type + */ + String: "String", + + /** + * Int gallery script parameter type + */ + Int: "Int", + + /** + * Double gallery script parameter type + */ + Double: "Double", + + /** + * Boolean gallery script parameter type + */ + Boolean: "Boolean", + + /** + * Enum gallery script parameter type + */ + Enum: "Enum", +} + /** * This property allows you to specify the type of sharing group. Possible values are: **Subscriptions,** **AADTenants.** */ @@ -1742,6 +1775,12 @@ model GalleryImageVersionList is Azure.Core.Page; */ model GalleryApplicationList is Azure.Core.Page; +/** + * The List Gallery Script operation response. + */ +@added(Versions.v2025_03_03) +model GalleryScriptList is Azure.Core.Page; + /** * The List Gallery Application version operation response. */ @@ -1788,6 +1827,195 @@ model GallerySoftDeletedResourceProperties { softDeletedTime?: string; } +/** + * Describes the properties of a gallery script definition. + */ +@added(Versions.v2025_03_03) +model GalleryScriptProperties { + /** + * The description of this gallery script definition resource. This property is updatable. + */ + description?: string; + + /** + * The Eula agreement (End User License Agreement) for the gallery Script Definition. + */ + eula?: string; + + /** + * The privacy statement uri. + */ + privacyStatementUri?: string; + + /** + * The release note uri. + */ + releaseNoteUri?: string; + + /** + * The end of life date of the gallery Script Definition. This property can be used for decommissioning purposes. This property is updatable. + */ + endOfLifeDate?: utcDateTime; + + /** + * This property allows you to specify the supported type of the OS that application is built for. Possible values are: **Windows,** **Linux.** + */ + supportedOSType: OperatingSystemTypes; + + /** + * The provisioning state, which only appears in the response. + */ + @visibility(Lifecycle.Read) + provisioningState?: GalleryProvisioningState; +} + +/** + * Specifies information about the gallery Script Definition that you want to update. + */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +@added(Versions.v2025_03_03) +model GalleryScriptUpdate extends UpdateResourceDefinition { + /** + * Describes the properties of a gallery script definition. + */ + #suppress "@azure-tools/typespec-azure-core/no-private-usage" "For backward compatibility" + @Azure.ResourceManager.Private.conditionalClientFlatten + properties?: GalleryScriptProperties; +} + +/** + * Describes the properties of a gallery script version. + */ +@added(Versions.v2025_03_03) +model GalleryScriptVersionProperties { + /** + * The publishing profile of a gallery image version. + */ + publishingProfile: GalleryScriptVersionPublishingProfile; + + /** + * The safety profile of the Gallery Script Version. + */ + safetyProfile?: GalleryScriptVersionSafetyProfile; + + /** + * The provisioning state, which only appears in the response. + */ + @visibility(Lifecycle.Read) + provisioningState?: GalleryProvisioningState; + + /** + * This is the replication status of the gallery image version. + */ + @visibility(Lifecycle.Read) + replicationStatus?: ReplicationStatus; +} + +/** + * The publishing profile of a gallery image version. + */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +@added(Versions.v2025_03_03) +model GalleryScriptVersionPublishingProfile + extends GalleryArtifactPublishingProfileBase { + /** + * The source script from which the Script Version is going to be created. + */ + source: ScriptSource; +} + +/** + * The safety profile of the Gallery Script Version. + */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/no-empty-model" "By design. Properties will be added in future." +@added(Versions.v2025_03_03) +model GalleryScriptVersionSafetyProfile + extends GalleryArtifactSafetyProfileBase {} + +/** + * The source script from which the Script Version is going to be created. + */ +@added(Versions.v2025_03_03) +model ScriptSource { + /** + * Required. The link of the source script, it must be a readable storage blob with SAS URI or publicly accessible URI or managed identity enabled. + */ + scriptLink: string; + + /** + * Optional. Any input parameters that needs to passed to the script and are accessed within the script for its execution. + */ + parameters?: GalleryScriptParameter[]; +} + +/** + * The definition of a parameter that can be passed to a script of a Gallery Script Version. + */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +@added(Versions.v2025_03_03) +model GalleryScriptParameter extends GenericGalleryParameter { + /** + * Specifies the type of the Gallery Script parameter. Possible values are: String, Int, Double, Boolean, Enum + */ + type?: GalleryScriptParameterType; + + /** + * The minimum value of parameter. + */ + minValue?: string; + + /** + * The minimum value of parameter. + */ + maxValue?: string; + + /** + * A list of permissible values. Only applicable values are from 'enum' values defined in 'GalleryScriptParameter'. + */ + enumValues?: string[]; +} + +/** + * The definition of a generic gallery parameter. + */ +@added(Versions.v2025_03_03) +model GenericGalleryParameter { + /** + * The name of the parameter. + */ + name: string; + + /** + * Indicates whether this parameter must be passed. + */ + required?: boolean; + + /** + * The default value of the parameter, only applies to string types. + */ + defaultValue?: string; + + /** + * A description to help users understand what this parameter means + */ + description?: string; +} + +/** + * Specifies information about the gallery Script Version that you want to update. + */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +@added(Versions.v2025_03_03) +model GalleryScriptVersionUpdate extends UpdateResourceDefinition { + /** + * Describes the properties of a gallery script version. + */ + #suppress "@azure-tools/typespec-azure-core/no-private-usage" "For backward compatibility" + @Azure.ResourceManager.Private.conditionalClientFlatten + properties?: GalleryScriptVersionProperties; +} + /** * Specifies information about the gallery sharing profile update. */ diff --git a/specification/compute/Gallery.Management/tspconfig.yaml b/specification/compute/Gallery.Management/tspconfig.yaml index 102eec2412a7..06f041488b83 100644 --- a/specification/compute/Gallery.Management/tspconfig.yaml +++ b/specification/compute/Gallery.Management/tspconfig.yaml @@ -7,6 +7,7 @@ options: azure-resource-provider-folder: "resource-manager" output-file: "{azure-resource-provider-folder}/{service-name}/GalleryRP/{version-status}/{version}/GalleryRP.json" examples-dir: "{project-root}/examples" + use-read-only-status-schema: true linter: extends: - "@azure-tools/typespec-azure-rulesets/resource-manager" diff --git a/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/GalleryRP.json b/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/GalleryRP.json index fdaa27b130af..9a006b8f1fd0 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/GalleryRP.json +++ b/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/GalleryRP.json @@ -813,7 +813,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "$select", @@ -909,7 +910,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "gallery", @@ -1012,7 +1014,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "gallery", @@ -1080,7 +1083,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" } ], "responses": { @@ -1144,7 +1148,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" } ], "responses": { @@ -1193,7 +1198,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "galleryApplicationName", @@ -1244,7 +1250,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "galleryApplicationName", @@ -1342,7 +1349,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "galleryApplicationName", @@ -1417,7 +1425,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "galleryApplicationName", @@ -1488,7 +1497,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "galleryApplicationName", @@ -1544,7 +1554,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "galleryApplicationName", @@ -1630,7 +1641,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "galleryApplicationName", @@ -1735,7 +1747,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "galleryApplicationName", @@ -1817,7 +1830,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "galleryApplicationName", @@ -1895,7 +1909,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" } ], "responses": { @@ -1944,7 +1959,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "galleryImageName", @@ -1995,7 +2011,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "galleryImageName", @@ -2093,7 +2110,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "galleryImageName", @@ -2171,7 +2189,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "galleryImageName", @@ -2242,7 +2261,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "galleryImageName", @@ -2298,7 +2318,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "galleryImageName", @@ -2396,7 +2417,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "galleryImageName", @@ -2528,7 +2550,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "galleryImageName", @@ -2616,7 +2639,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "galleryImageName", @@ -2694,7 +2718,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" } ], "responses": { @@ -2743,7 +2768,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "inVMAccessControlProfileName", @@ -2794,7 +2820,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "inVMAccessControlProfileName", @@ -2875,7 +2902,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "inVMAccessControlProfileName", @@ -2950,7 +2978,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "inVMAccessControlProfileName", @@ -3017,7 +3046,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "inVMAccessControlProfileName", @@ -3073,7 +3103,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "inVMAccessControlProfileName", @@ -3131,7 +3162,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "inVMAccessControlProfileName", @@ -3219,7 +3251,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "inVMAccessControlProfileName", @@ -3301,7 +3334,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "inVMAccessControlProfileName", @@ -3375,7 +3409,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "sharingUpdate", @@ -3457,7 +3492,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "artifactType", @@ -5436,7 +5472,8 @@ "value": "Migrating" } ] - } + }, + "readOnly": true }, "GalleryResourceProfilePropertiesBase": { "type": "object", @@ -6443,7 +6480,8 @@ "value": "Unknown" } ] - } + }, + "readOnly": true }, "SharingStatus": { "type": "object", @@ -6840,7 +6878,8 @@ "value": "Succeeded" } ] - } + }, + "readOnly": true }, "ValidationsProfile": { "type": "object", diff --git a/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2025-03-03/GalleryRP.json b/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2025-03-03/GalleryRP.json index b6334da24f47..1bc0e76af6c5 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2025-03-03/GalleryRP.json +++ b/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2025-03-03/GalleryRP.json @@ -54,6 +54,12 @@ { "name": "GalleryApplicationVersions" }, + { + "name": "GalleryScripts" + }, + { + "name": "GalleryScriptVersions" + }, { "name": "GalleryInVMAccessControlProfiles" }, @@ -813,7 +819,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "$select", @@ -909,7 +916,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "gallery", @@ -1012,7 +1020,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "gallery", @@ -1080,7 +1089,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" } ], "responses": { @@ -1144,7 +1154,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" } ], "responses": { @@ -1193,7 +1204,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "galleryApplicationName", @@ -1244,7 +1256,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "galleryApplicationName", @@ -1342,7 +1355,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "galleryApplicationName", @@ -1417,7 +1431,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "galleryApplicationName", @@ -1488,7 +1503,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "galleryApplicationName", @@ -1544,7 +1560,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "galleryApplicationName", @@ -1630,7 +1647,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "galleryApplicationName", @@ -1735,7 +1753,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "galleryApplicationName", @@ -1817,7 +1836,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "galleryApplicationName", @@ -1895,7 +1915,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" } ], "responses": { @@ -1944,7 +1965,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "galleryImageName", @@ -1995,7 +2017,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "galleryImageName", @@ -2093,7 +2116,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "galleryImageName", @@ -2171,7 +2195,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "galleryImageName", @@ -2242,7 +2267,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "galleryImageName", @@ -2298,7 +2324,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "galleryImageName", @@ -2396,7 +2423,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "galleryImageName", @@ -2528,7 +2556,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "galleryImageName", @@ -2616,7 +2645,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "galleryImageName", @@ -2694,7 +2724,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" } ], "responses": { @@ -2743,7 +2774,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "inVMAccessControlProfileName", @@ -2794,7 +2826,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "inVMAccessControlProfileName", @@ -2875,7 +2908,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "inVMAccessControlProfileName", @@ -2950,7 +2984,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "inVMAccessControlProfileName", @@ -3017,7 +3052,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "inVMAccessControlProfileName", @@ -3073,7 +3109,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "inVMAccessControlProfileName", @@ -3131,7 +3168,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "inVMAccessControlProfileName", @@ -3219,7 +3257,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "inVMAccessControlProfileName", @@ -3301,21 +3340,744 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" + }, + { + "name": "inVMAccessControlProfileName", + "in": "path", + "description": "The name of the gallery inVMAccessControlProfile to be retrieved.", + "required": true, + "type": "string" + }, + { + "name": "inVMAccessControlProfileVersionName", + "in": "path", + "description": "The name of the gallery inVMAccessControlProfile version to be retrieved.", + "required": true, "type": "string" + } + ], + "responses": { + "202": { + "description": "Resource deletion accepted.", + "headers": { + "Azure-AsyncOperation": { + "type": "string", + "description": "A link to the status monitor" + }, + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + } + } + }, + "204": { + "description": "Resource does not exist." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../common-types/v1/common.json#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "Delete a gallery inVMAccessControlProfile version.": { + "$ref": "./examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfileVersion_Delete.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/scripts": { + "get": { + "operationId": "GalleryScripts_ListByGallery", + "tags": [ + "GalleryScripts" + ], + "description": "List gallery Script Definitions in a gallery.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "galleryName", + "in": "path", + "description": "The name of the Shared Image Gallery.", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/GalleryScriptList" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../common-types/v1/common.json#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "List gallery Scripts in a gallery.": { + "$ref": "./examples/galleryScriptExamples/GalleryScript_ListByGallery.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/scripts/{galleryScriptName}": { + "get": { + "operationId": "GalleryScripts_Get", + "tags": [ + "GalleryScripts" + ], + "description": "Retrieves information about a gallery script definition.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "galleryName", + "in": "path", + "description": "The name of the Shared Image Gallery.", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" + }, + { + "name": "galleryScriptName", + "in": "path", + "description": "The name of the gallery Script Definition to be retrieved.", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9]+([_]?[a-zA-Z0-9]+)*$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/GalleryScript" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../common-types/v1/common.json#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "Get a gallery Script.": { + "$ref": "./examples/galleryScriptExamples/GalleryScript_Get.json" + } + } + }, + "put": { + "operationId": "GalleryScripts_CreateOrUpdate", + "tags": [ + "GalleryScripts" + ], + "description": "Create or update a Gallery Script Definition. Gallery scripts allow the storage, sharing and reuse of common scripts", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "galleryName", + "in": "path", + "description": "The name of the Shared Image Gallery.", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" + }, + { + "name": "galleryScriptName", + "in": "path", + "description": "The name of the gallery Script Definition to be retrieved.", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9]+([_]?[a-zA-Z0-9]+)*$" + }, + { + "name": "galleryScript", + "in": "body", + "description": "Parameters supplied to the create or update gallery Script operation.", + "required": true, + "schema": { + "$ref": "#/definitions/GalleryScript" + } + } + ], + "responses": { + "200": { + "description": "Resource 'GalleryScript' update operation succeeded", + "schema": { + "$ref": "#/definitions/GalleryScript" + } + }, + "201": { + "description": "Resource 'GalleryScript' create operation succeeded", + "schema": { + "$ref": "#/definitions/GalleryScript" + }, + "headers": { + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../common-types/v1/common.json#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "Create or update a simple gallery Script.": { + "$ref": "./examples/galleryScriptExamples/GalleryScript_Create.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + }, + "patch": { + "operationId": "GalleryScripts_Update", + "tags": [ + "GalleryScripts" + ], + "description": "Update a gallery Script Definition.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "galleryName", + "in": "path", + "description": "The name of the Shared Image Gallery.", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" + }, + { + "name": "galleryScriptName", + "in": "path", + "description": "The name of the gallery Script Definition to be retrieved.", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9]+([_]?[a-zA-Z0-9]+)*$" + }, + { + "name": "galleryScript", + "in": "body", + "description": "Parameters supplied to the update gallery Script operation.", + "required": true, + "schema": { + "$ref": "#/definitions/GalleryScriptUpdate" + } + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/GalleryScript" + } + }, + "202": { + "description": "Resource operation accepted.", + "headers": { + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../common-types/v1/common.json#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "Update a simple gallery Script.": { + "$ref": "./examples/galleryScriptExamples/GalleryScript_Update.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + }, + "delete": { + "operationId": "GalleryScripts_Delete", + "tags": [ + "GalleryScripts" + ], + "description": "Delete a gallery Script Definition.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "galleryName", + "in": "path", + "description": "The name of the Shared Image Gallery.", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" + }, + { + "name": "galleryScriptName", + "in": "path", + "description": "The name of the gallery Script Definition to be retrieved.", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9]+([_]?[a-zA-Z0-9]+)*$" + } + ], + "responses": { + "202": { + "description": "Resource deletion accepted.", + "headers": { + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + } + } + }, + "204": { + "description": "Resource does not exist." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../common-types/v1/common.json#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "Delete a gallery Script.": { + "$ref": "./examples/galleryScriptExamples/GalleryScript_Delete.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/scripts/{galleryScriptName}/versions": { + "get": { + "operationId": "GalleryScriptVersions_ListByGalleryScript", + "tags": [ + "GalleryScriptVersions" + ], + "description": "List gallery Script Versions in a gallery Script Definition.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "galleryName", + "in": "path", + "description": "The name of the Shared Image Gallery.", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" + }, + { + "name": "galleryScriptName", + "in": "path", + "description": "The name of the gallery Script Definition to be retrieved.", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9]+([_]?[a-zA-Z0-9]+)*$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/GalleryScriptVersionList" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../common-types/v1/common.json#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "List gallery Script Versions in a gallery Script Definition.": { + "$ref": "./examples/galleryScriptExamples/GalleryScriptVersion_ListByGalleryScript.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/scripts/{galleryScriptName}/versions/{galleryScriptVersionName}": { + "get": { + "operationId": "GalleryScriptVersions_Get", + "tags": [ + "GalleryScriptVersions" + ], + "description": "Custom ArmResourceRead operation template with CloudError as Error", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "galleryName", + "in": "path", + "description": "The name of the Shared Image Gallery.", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" + }, + { + "name": "galleryScriptName", + "in": "path", + "description": "The name of the gallery Script Definition to be retrieved.", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9]+([_]?[a-zA-Z0-9]+)*$" + }, + { + "name": "galleryScriptVersionName", + "in": "path", + "description": "The name of the gallery Script Version to be retrieved.", + "required": true, + "type": "string", + "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/GalleryScriptVersion" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../common-types/v1/common.json#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "Get a gallery Script Version with replication status.": { + "$ref": "./examples/galleryScriptExamples/GalleryScriptVersion_Get_WithReplicationStatus.json" + }, + "Get a gallery Script Version.": { + "$ref": "./examples/galleryScriptExamples/GalleryScriptVersion_Get.json" + } + } + }, + "put": { + "operationId": "GalleryScriptVersions_CreateOrUpdate", + "tags": [ + "GalleryScriptVersions" + ], + "description": "Create or update a gallery Script Version.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "galleryName", + "in": "path", + "description": "The name of the Shared Image Gallery.", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" + }, + { + "name": "galleryScriptName", + "in": "path", + "description": "The name of the gallery Script Definition to be retrieved.", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9]+([_]?[a-zA-Z0-9]+)*$" + }, + { + "name": "galleryScriptVersionName", + "in": "path", + "description": "The name of the gallery Script Version to be retrieved.", + "required": true, + "type": "string", + "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$" + }, + { + "name": "galleryScriptVersion", + "in": "body", + "description": "Parameters supplied to the create or update gallery Script Version operation.", + "required": true, + "schema": { + "$ref": "#/definitions/GalleryScriptVersion" + } + } + ], + "responses": { + "200": { + "description": "Resource 'GalleryScriptVersion' update operation succeeded", + "schema": { + "$ref": "#/definitions/GalleryScriptVersion" + } + }, + "201": { + "description": "Resource 'GalleryScriptVersion' create operation succeeded", + "schema": { + "$ref": "#/definitions/GalleryScriptVersion" + }, + "headers": { + "Azure-AsyncOperation": { + "type": "string", + "description": "A link to the status monitor" + }, + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../common-types/v1/common.json#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "Create or update a simple gallery Script Version.": { + "$ref": "./examples/galleryScriptExamples/GalleryScriptVersion_Create.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-long-running-operation": true + }, + "patch": { + "operationId": "GalleryScriptVersions_Update", + "tags": [ + "GalleryScriptVersions" + ], + "description": "Update a gallery Script Version.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "galleryName", + "in": "path", + "description": "The name of the Shared Image Gallery.", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" + }, + { + "name": "galleryScriptName", + "in": "path", + "description": "The name of the gallery Script Definition to be retrieved.", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9]+([_]?[a-zA-Z0-9]+)*$" + }, + { + "name": "galleryScriptVersionName", + "in": "path", + "description": "The name of the gallery Script Version to be retrieved.", + "required": true, + "type": "string", + "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$" + }, + { + "name": "galleryScriptVersion", + "in": "body", + "description": "Parameters supplied to the update gallery Script Version operation.", + "required": true, + "schema": { + "$ref": "#/definitions/GalleryScriptVersionUpdate" + } + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/GalleryScriptVersion" + } + }, + "202": { + "description": "Resource update request accepted.", + "headers": { + "Azure-AsyncOperation": { + "type": "string", + "description": "A link to the status monitor" + }, + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../common-types/v1/common.json#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "Update a simple gallery Script Version.": { + "$ref": "./examples/galleryScriptExamples/GalleryScriptVersion_Update.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-long-running-operation": true + }, + "delete": { + "operationId": "GalleryScriptVersions_Delete", + "tags": [ + "GalleryScriptVersions" + ], + "description": "Delete a gallery Script Version.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "galleryName", + "in": "path", + "description": "The name of the Shared Image Gallery.", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { - "name": "inVMAccessControlProfileName", + "name": "galleryScriptName", "in": "path", - "description": "The name of the gallery inVMAccessControlProfile to be retrieved.", + "description": "The name of the gallery Script Definition to be retrieved.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9]+([_]?[a-zA-Z0-9]+)*$" }, { - "name": "inVMAccessControlProfileVersionName", + "name": "galleryScriptVersionName", "in": "path", - "description": "The name of the gallery inVMAccessControlProfile version to be retrieved.", + "description": "The name of the gallery Script Version to be retrieved.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$" } ], "responses": { @@ -3329,6 +4091,11 @@ "Location": { "type": "string", "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." } } }, @@ -3343,12 +4110,12 @@ } }, "x-ms-examples": { - "Delete a gallery inVMAccessControlProfile version.": { - "$ref": "./examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfileVersion_Delete.json" + "Delete a gallery Script Version.": { + "$ref": "./examples/galleryScriptExamples/GalleryScriptVersion_Delete.json" } }, "x-ms-long-running-operation-options": { - "final-state-via": "location" + "final-state-via": "azure-async-operation" }, "x-ms-long-running-operation": true } @@ -3375,7 +4142,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "sharingUpdate", @@ -3457,7 +4225,8 @@ "in": "path", "description": "The name of the Shared Image Gallery.", "required": true, - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$" }, { "name": "artifactType", @@ -5436,7 +6205,8 @@ "value": "Migrating" } ] - } + }, + "readOnly": true }, "GalleryResourceProfilePropertiesBase": { "type": "object", @@ -5485,6 +6255,273 @@ } } }, + "GalleryScript": { + "type": "object", + "description": "Specifies information about the gallery Script Definition that you want to create or update.", + "properties": { + "properties": { + "$ref": "#/definitions/GalleryScriptProperties", + "description": "Describes the properties of a gallery Script Definition." + } + }, + "allOf": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/TrackedResource" + } + ] + }, + "GalleryScriptList": { + "type": "object", + "description": "The List Gallery Script operation response.", + "properties": { + "value": { + "type": "array", + "description": "The GalleryScript items on this page", + "items": { + "$ref": "#/definitions/GalleryScript" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "GalleryScriptParameter": { + "type": "object", + "description": "The definition of a parameter that can be passed to a script of a Gallery Script Version.", + "properties": { + "type": { + "$ref": "#/definitions/GalleryScriptParameterType", + "description": "Specifies the type of the Gallery Script parameter. Possible values are: String, Int, Double, Boolean, Enum" + }, + "minValue": { + "type": "string", + "description": "The minimum value of parameter." + }, + "maxValue": { + "type": "string", + "description": "The minimum value of parameter." + }, + "enumValues": { + "type": "array", + "description": "A list of permissible values. Only applicable values are from 'enum' values defined in 'GalleryScriptParameter'.", + "items": { + "type": "string" + } + } + }, + "allOf": [ + { + "$ref": "#/definitions/GenericGalleryParameter" + } + ] + }, + "GalleryScriptParameterType": { + "type": "string", + "description": "Specifies the type of the Gallery Script parameter. Possible values are: String, Int, Double, Boolean, Enum", + "enum": [ + "String", + "Int", + "Double", + "Boolean", + "Enum" + ], + "x-ms-enum": { + "name": "GalleryScriptParameterType", + "modelAsString": true, + "values": [ + { + "name": "String", + "value": "String", + "description": "String gallery script parameter type" + }, + { + "name": "Int", + "value": "Int", + "description": "Int gallery script parameter type" + }, + { + "name": "Double", + "value": "Double", + "description": "Double gallery script parameter type" + }, + { + "name": "Boolean", + "value": "Boolean", + "description": "Boolean gallery script parameter type" + }, + { + "name": "Enum", + "value": "Enum", + "description": "Enum gallery script parameter type" + } + ] + } + }, + "GalleryScriptProperties": { + "type": "object", + "description": "Describes the properties of a gallery script definition.", + "properties": { + "description": { + "type": "string", + "description": "The description of this gallery script definition resource. This property is updatable." + }, + "eula": { + "type": "string", + "description": "The Eula agreement (End User License Agreement) for the gallery Script Definition." + }, + "privacyStatementUri": { + "type": "string", + "description": "The privacy statement uri." + }, + "releaseNoteUri": { + "type": "string", + "description": "The release note uri." + }, + "endOfLifeDate": { + "type": "string", + "format": "date-time", + "description": "The end of life date of the gallery Script Definition. This property can be used for decommissioning purposes. This property is updatable." + }, + "supportedOSType": { + "$ref": "#/definitions/OperatingSystemTypes", + "description": "This property allows you to specify the supported type of the OS that application is built for. Possible values are: **Windows,** **Linux.**" + }, + "provisioningState": { + "$ref": "#/definitions/GalleryProvisioningState", + "description": "The provisioning state, which only appears in the response.", + "readOnly": true + } + }, + "required": [ + "supportedOSType" + ] + }, + "GalleryScriptUpdate": { + "type": "object", + "description": "Specifies information about the gallery Script Definition that you want to update.", + "properties": { + "properties": { + "$ref": "#/definitions/GalleryScriptProperties", + "description": "Describes the properties of a gallery script definition." + } + }, + "allOf": [ + { + "$ref": "#/definitions/UpdateResourceDefinition" + } + ] + }, + "GalleryScriptVersion": { + "type": "object", + "description": "Concrete tracked resource types can be created by aliasing this type using a specific property type.", + "properties": { + "properties": { + "$ref": "#/definitions/GalleryScriptVersionProperties", + "description": "Describes the properties of a gallery Script Version." + } + }, + "allOf": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/TrackedResource" + } + ] + }, + "GalleryScriptVersionList": { + "type": "object", + "description": "Paged collection of GalleryScriptVersion items", + "properties": { + "value": { + "type": "array", + "description": "The GalleryScriptVersion items on this page", + "items": { + "$ref": "#/definitions/GalleryScriptVersion" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "GalleryScriptVersionProperties": { + "type": "object", + "description": "Describes the properties of a gallery script version.", + "properties": { + "publishingProfile": { + "$ref": "#/definitions/GalleryScriptVersionPublishingProfile", + "description": "The publishing profile of a gallery image version." + }, + "safetyProfile": { + "$ref": "#/definitions/GalleryScriptVersionSafetyProfile", + "description": "The safety profile of the Gallery Script Version." + }, + "provisioningState": { + "$ref": "#/definitions/GalleryProvisioningState", + "description": "The provisioning state, which only appears in the response.", + "readOnly": true + }, + "replicationStatus": { + "$ref": "#/definitions/ReplicationStatus", + "description": "This is the replication status of the gallery image version.", + "readOnly": true + } + }, + "required": [ + "publishingProfile" + ] + }, + "GalleryScriptVersionPublishingProfile": { + "type": "object", + "description": "The publishing profile of a gallery image version.", + "properties": { + "source": { + "$ref": "#/definitions/ScriptSource", + "description": "The source script from which the Script Version is going to be created." + } + }, + "required": [ + "source" + ], + "allOf": [ + { + "$ref": "#/definitions/GalleryArtifactPublishingProfileBase" + } + ] + }, + "GalleryScriptVersionSafetyProfile": { + "type": "object", + "description": "The safety profile of the Gallery Script Version.", + "allOf": [ + { + "$ref": "#/definitions/GalleryArtifactSafetyProfileBase" + } + ] + }, + "GalleryScriptVersionUpdate": { + "type": "object", + "description": "Specifies information about the gallery Script Version that you want to update.", + "properties": { + "properties": { + "$ref": "#/definitions/GalleryScriptVersionProperties", + "description": "Describes the properties of a gallery script version." + } + }, + "allOf": [ + { + "$ref": "#/definitions/UpdateResourceDefinition" + } + ] + }, "GallerySharingPermissionTypes": { "type": "string", "description": "This property allows you to specify the permission of sharing gallery. Possible values are: **Private,** **Groups,** **Community.**", @@ -5614,6 +6651,31 @@ } ] }, + "GenericGalleryParameter": { + "type": "object", + "description": "The definition of a generic gallery parameter.", + "properties": { + "name": { + "type": "string", + "description": "The name of the parameter." + }, + "required": { + "type": "boolean", + "description": "Indicates whether this parameter must be passed." + }, + "defaultValue": { + "type": "string", + "description": "The default value of the parameter, only applies to string types." + }, + "description": { + "type": "string", + "description": "A description to help users understand what this parameter means" + } + }, + "required": [ + "name" + ] + }, "HostCaching": { "type": "string", "description": "The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'", @@ -6016,6 +7078,26 @@ } } }, + "ScriptSource": { + "type": "object", + "description": "The source script from which the Script Version is going to be created.", + "properties": { + "scriptLink": { + "type": "string", + "description": "Required. The link of the source script, it must be a readable storage blob with SAS URI or publicly accessible URI or managed identity enabled." + }, + "parameters": { + "type": "array", + "description": "Optional. Any input parameters that needs to passed to the script and are accessed within the script for its execution.", + "items": { + "$ref": "#/definitions/GalleryScriptParameter" + } + } + }, + "required": [ + "scriptLink" + ] + }, "SharedGallery": { "type": "object", "description": "Specifies information about the Shared Gallery that you want to create or update.", @@ -6443,7 +7525,8 @@ "value": "Unknown" } ] - } + }, + "readOnly": true }, "SharingStatus": { "type": "object", @@ -6840,7 +7923,8 @@ "value": "Succeeded" } ] - } + }, + "readOnly": true }, "ValidationsProfile": { "type": "object", diff --git a/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2025-03-03/examples/galleryScriptExamples/GalleryScriptVersion_Create.json b/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2025-03-03/examples/galleryScriptExamples/GalleryScriptVersion_Create.json new file mode 100644 index 000000000000..f4f75f158788 --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2025-03-03/examples/galleryScriptExamples/GalleryScriptVersion_Create.json @@ -0,0 +1,269 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "api-version": "2025-03-03", + "galleryName": "myGalleryName", + "galleryScriptName": "myGalleryScriptName", + "galleryScriptVersionName": "1.0.0", + "galleryScriptVersion": { + "location": "West US", + "properties": { + "publishingProfile": { + "source": { + "scriptLink": "https://mystorageaccount.blob.core.windows.net/mycontainer/myScript.ps1?{sasKey}", + "parameters": [ + { + "name": "location", + "required": true, + "defaultValue": "westus", + "type": "String" + }, + { + "name": "myGalleryScriptParameter1", + "required": true, + "type": "String", + "defaultValue": "default value of parameter", + "description": "description of the parameter" + }, + { + "name": "myGalleryScriptParameter2", + "required": false, + "type": "String", + "defaultValue": "default value of parameter", + "description": "description of the parameter" + }, + { + "name": "numberOfUnits", + "required": true, + "type": "Int", + "defaultValue": "3", + "description": "description of the parameter", + "minValue": "1", + "maxValue": "5" + }, + { + "name": "weightOfUnit", + "required": true, + "type": "Double", + "defaultValue": "0.6", + "description": "description of the parameter", + "minValue": "0.1", + "maxValue": "2" + }, + { + "name": "typeOfProduct", + "required": false, + "type": "Enum", + "defaultValue": "Fruit", + "description": "description of the parameter", + "enumValues": [ + "Fruit", + "Vegetable", + "Greens", + "Nuts" + ] + } + ] + }, + "targetRegions": [ + { + "name": "West US", + "regionalReplicaCount": 2, + "storageAccountType": "Standard_LRS", + "excludeFromLatest": false + } + ], + "replicaCount": 2, + "endOfLifeDate": "2027-07-01T07:00:00Z", + "storageAccountType": "Standard_LRS" + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + } + } + } + }, + "responses": { + "200": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/000000-8de3-42e7-b00e-8970003527749a/providers/Microsoft.Compute/locations/westus/capsOperations/0012b61c-2d36-40bc-b7ed-1f0e48757277?api-version=2025-03-03", + "Location": "https://management.azure.com/subscriptions/000000-8de3-42e7-b00e-8970003527749a/providers/Microsoft.Compute/locations/westus/capsOperations/0012b61c-2d36-40bc-b7ed-1f0e48757277?monitor=true&api-version=2025-03-03" + }, + "body": { + "location": "West US", + "name": "1.0.0", + "type": "Microsoft.Compute/galleries/scripts/versions", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/scripts/myGalleryScript/versions/1.0.0", + "properties": { + "publishingProfile": { + "source": { + "scriptLink": "https://mystorageaccount.blob.core.windows.net/mycontainer/myScript.ps1", + "parameters": [ + { + "name": "location", + "required": true, + "defaultValue": "westus", + "type": "String" + }, + { + "name": "myGalleryScriptParameter1", + "required": true, + "type": "String", + "defaultValue": "default value of parameter", + "description": "description of the parameter" + }, + { + "name": "myGalleryScriptParameter2", + "required": false, + "type": "String", + "defaultValue": "default value of parameter", + "description": "description of the parameter" + }, + { + "name": "numberOfUnits", + "required": true, + "type": "Int", + "defaultValue": "3", + "description": "description of the parameter", + "minValue": "1", + "maxValue": "5" + }, + { + "name": "weightOfUnit", + "required": true, + "type": "Double", + "defaultValue": "0.6", + "description": "description of the parameter", + "minValue": "0.1", + "maxValue": "2" + }, + { + "name": "typeOfProduct", + "required": false, + "type": "Enum", + "defaultValue": "Fruit", + "description": "description of the parameter", + "enumValues": [ + "Fruit", + "Vegetable", + "Greens", + "Nuts" + ] + } + ] + }, + "targetRegions": [ + { + "name": "West US", + "regionalReplicaCount": 2, + "storageAccountType": "Standard_LRS", + "excludeFromLatest": false + } + ], + "replicaCount": 2, + "excludeFromLatest": false, + "publishedDate": "2025-06-21T17:13:57.5972568+00:00", + "endOfLifeDate": "2027-07-01T07:00:00+00:00", + "storageAccountType": "Standard_LRS" + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + }, + "provisioningState": "Updating" + } + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/000000-8de3-42e7-b00e-8970003527749a/providers/Microsoft.Compute/locations/westus/capsOperations/0012b61c-2d36-40bc-b7ed-1f0e48757277?api-version=2025-03-03", + "Location": "https://management.azure.com/subscriptions/000000-8de3-42e7-b00e-8970003527749a/providers/Microsoft.Compute/locations/westus/capsOperations/0012b61c-2d36-40bc-b7ed-1f0e48757277?monitor=true&api-version=2025-03-03" + }, + "body": { + "location": "West US", + "name": "1.0.0", + "type": "Microsoft.Compute/galleries/scripts/versions", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/scripts/myGalleryScript/versions/1.0.0", + "properties": { + "publishingProfile": { + "source": { + "scriptLink": "https://mystorageaccount.blob.core.windows.net/mycontainer/myScript.ps1", + "parameters": [ + { + "name": "location", + "required": true, + "defaultValue": "westus", + "type": "String" + }, + { + "name": "myGalleryScriptParameter1", + "required": true, + "type": "String", + "defaultValue": "default value of parameter", + "description": "description of the parameter" + }, + { + "name": "myGalleryScriptParameter2", + "required": false, + "type": "String", + "defaultValue": "default value of parameter", + "description": "description of the parameter" + }, + { + "name": "numberOfUnits", + "required": true, + "type": "Int", + "defaultValue": "3", + "description": "description of the parameter", + "minValue": "1", + "maxValue": "5" + }, + { + "name": "weightOfUnit", + "required": true, + "type": "Double", + "defaultValue": "0.6", + "description": "description of the parameter", + "minValue": "0.1", + "maxValue": "2" + }, + { + "name": "typeOfProduct", + "required": false, + "type": "Enum", + "defaultValue": "Fruit", + "description": "description of the parameter", + "enumValues": [ + "Fruit", + "Vegetable", + "Greens", + "Nuts" + ] + } + ] + }, + "targetRegions": [ + { + "name": "West US", + "regionalReplicaCount": 2, + "storageAccountType": "Standard_LRS", + "excludeFromLatest": false + } + ], + "replicaCount": 2, + "excludeFromLatest": false, + "publishedDate": "2025-06-21T17:13:57.5972568+00:00", + "endOfLifeDate": "2027-07-01T07:00:00+00:00", + "storageAccountType": "Standard_LRS" + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + }, + "provisioningState": "Creating" + } + } + } + }, + "operationId": "GalleryScriptVersions_CreateOrUpdate", + "title": "Create or update a simple gallery Script Version." +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2025-03-03/examples/galleryScriptExamples/GalleryScriptVersion_Delete.json b/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2025-03-03/examples/galleryScriptExamples/GalleryScriptVersion_Delete.json new file mode 100644 index 000000000000..44e3494d72e6 --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2025-03-03/examples/galleryScriptExamples/GalleryScriptVersion_Delete.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroupName", + "api-version": "2025-03-03", + "galleryName": "myGalleryName", + "galleryScriptName": "myGalleryScriptName", + "galleryScriptVersionName": "1.0.0" + }, + "responses": { + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/000000-8de3-42e7-b00e-8970003527749a/providers/Microsoft.Compute/locations/eastus/capsOperations/0012b61c-2d36-40bc-b7ed-1f0e48757277?api-version=2025-03-03", + "Location": "https://management.azure.com/subscriptions/000000-8de3-42e7-b00e-8970003527749a/providers/Microsoft.Compute/locations/eastus/capsOperations/0012b61c-2d36-40bc-b7ed-1f0e48757277?monitor=true&api-version=2025-03-03" + } + }, + "204": {} + }, + "operationId": "GalleryScriptVersions_Delete", + "title": "Delete a gallery Script Version." +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2025-03-03/examples/galleryScriptExamples/GalleryScriptVersion_Get.json b/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2025-03-03/examples/galleryScriptExamples/GalleryScriptVersion_Get.json new file mode 100644 index 000000000000..ca3b785de363 --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2025-03-03/examples/galleryScriptExamples/GalleryScriptVersion_Get.json @@ -0,0 +1,99 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroupName", + "api-version": "2025-03-03", + "galleryName": "myGalleryName", + "galleryScriptName": "myGalleryScriptName", + "galleryScriptVersionName": "1.0.0" + }, + "responses": { + "200": { + "body": { + "location": "West US", + "name": "1.0.0", + "type": "Microsoft.Compute/galleries/scripts/versions", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/galleries/myGalleryName/scripts/myGalleryScriptName/versions/1.0.0", + "properties": { + "publishingProfile": { + "source": { + "scriptLink": "https://mystorageaccount.blob.core.windows.net/mycontainer/myScript.ps1", + "parameters": [ + { + "name": "location", + "required": true, + "defaultValue": "westus", + "type": "String" + }, + { + "name": "myGalleryScriptParameter1", + "required": true, + "type": "String", + "defaultValue": "default value of parameter", + "description": "description of the parameter" + }, + { + "name": "myGalleryScriptParameter2", + "required": false, + "type": "String", + "defaultValue": "default value of parameter", + "description": "description of the parameter" + }, + { + "name": "numberOfUnits", + "required": true, + "type": "Int", + "defaultValue": "3", + "description": "description of the parameter", + "minValue": "1", + "maxValue": "5" + }, + { + "name": "weightOfUnit", + "required": true, + "type": "Double", + "defaultValue": "0.6", + "description": "description of the parameter", + "minValue": "0.1", + "maxValue": "2" + }, + { + "name": "typeOfProduct", + "required": false, + "type": "Enum", + "defaultValue": "Fruit", + "description": "description of the parameter", + "enumValues": [ + "Fruit", + "Vegetable", + "Greens", + "Nuts" + ] + } + ] + }, + "targetRegions": [ + { + "name": "West US", + "regionalReplicaCount": 2, + "storageAccountType": "Standard_LRS", + "excludeFromLatest": false + } + ], + "replicaCount": 2, + "excludeFromLatest": false, + "publishedDate": "2025-06-21T17:13:57.5972568+00:00", + "endOfLifeDate": "2027-07-01T07:00:00+00:00", + "storageAccountType": "Standard_LRS" + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + }, + "provisioningState": "Succeeded" + } + } + } + }, + "operationId": "GalleryScriptVersions_Get", + "title": "Get a gallery Script Version." +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2025-03-03/examples/galleryScriptExamples/GalleryScriptVersion_Get_WithReplicationStatus.json b/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2025-03-03/examples/galleryScriptExamples/GalleryScriptVersion_Get_WithReplicationStatus.json new file mode 100644 index 000000000000..926b52560875 --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2025-03-03/examples/galleryScriptExamples/GalleryScriptVersion_Get_WithReplicationStatus.json @@ -0,0 +1,110 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroupName", + "api-version": "2025-03-03", + "galleryName": "myGalleryName", + "galleryScriptName": "myGalleryScriptName", + "galleryScriptVersionName": "1.0.0", + "$expand": "ReplicationStatus" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/galleries/myGalleryName/scripts/myGalleryScriptName/versions/1.0.0", + "properties": { + "publishingProfile": { + "source": { + "scriptLink": "https://mystorageaccount.blob.core.windows.net/mycontainer/myScript.ps1", + "parameters": [ + { + "name": "location", + "required": true, + "defaultValue": "westus", + "type": "String" + }, + { + "name": "myGalleryScriptParameter1", + "required": true, + "type": "String", + "defaultValue": "default value of parameter", + "description": "description of the parameter" + }, + { + "name": "myGalleryScriptParameter2", + "required": false, + "type": "String", + "defaultValue": "default value of parameter", + "description": "description of the parameter" + }, + { + "name": "numberOfUnits", + "required": true, + "type": "Int", + "defaultValue": "3", + "description": "description of the parameter", + "minValue": "1", + "maxValue": "5" + }, + { + "name": "weightOfUnit", + "required": true, + "type": "Double", + "defaultValue": "0.6", + "description": "description of the parameter", + "minValue": "0.1", + "maxValue": "2" + }, + { + "name": "typeOfProduct", + "required": false, + "type": "Enum", + "defaultValue": "Fruit", + "description": "description of the parameter", + "enumValues": [ + "Fruit", + "Vegetable", + "Greens", + "Nuts" + ] + } + ] + }, + "targetRegions": [ + { + "name": "West US", + "regionalReplicaCount": 2, + "storageAccountType": "Standard_LRS", + "excludeFromLatest": false + } + ], + "replicaCount": 2, + "excludeFromLatest": false, + "publishedDate": "2025-06-21T17:13:57.5972568+00:00", + "endOfLifeDate": "2027-07-01T07:00:00+00:00", + "storageAccountType": "Standard_LRS" + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + }, + "replicationStatus": { + "aggregatedState": "Completed", + "summary": [ + { + "region": "West US", + "state": "Completed", + "details": "", + "progress": 100 + } + ] + }, + "provisioningState": "Succeeded" + }, + "location": "West US", + "name": "1.0.0" + } + } + }, + "operationId": "GalleryScriptVersions_Get", + "title": "Get a gallery Script Version with replication status." +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2025-03-03/examples/galleryScriptExamples/GalleryScriptVersion_ListByGalleryScript.json b/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2025-03-03/examples/galleryScriptExamples/GalleryScriptVersion_ListByGalleryScript.json new file mode 100644 index 000000000000..fc50d025f30e --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2025-03-03/examples/galleryScriptExamples/GalleryScriptVersion_ListByGalleryScript.json @@ -0,0 +1,149 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroupName", + "api-version": "2025-03-03", + "galleryName": "myGalleryName", + "galleryScriptName": "myGalleryScriptName" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "location": "West US", + "name": "1.0.0", + "type": "Microsoft.Compute/galleries/script/versions", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/galleries/myGalleryName/scripts/myGalleryScriptName/versions/1.0.0", + "properties": { + "publishingProfile": { + "source": { + "scriptLink": "https://mystorageaccount.blob.core.windows.net/mycontainer/myScript1.ps1", + "parameters": [ + { + "name": "location", + "required": true, + "defaultValue": "westus", + "type": "String" + }, + { + "name": "myGalleryScriptParameter1", + "required": true, + "type": "String", + "defaultValue": "default value of parameter", + "description": "description of the parameter" + }, + { + "name": "myGalleryScriptParameter2", + "required": false, + "type": "String", + "defaultValue": "default value of parameter", + "description": "description of the parameter" + }, + { + "name": "numberOfUnits", + "required": true, + "type": "Int", + "defaultValue": "3", + "description": "description of the parameter", + "minValue": "1", + "maxValue": "5" + }, + { + "name": "weightOfUnit", + "required": true, + "type": "Double", + "defaultValue": "0.6", + "description": "description of the parameter", + "minValue": "0.1", + "maxValue": "2" + }, + { + "name": "typeOfProduct", + "required": false, + "type": "Enum", + "defaultValue": "Fruit", + "description": "description of the parameter", + "enumValues": [ + "Fruit", + "Vegetable", + "Greens", + "Nuts" + ] + } + ] + }, + "targetRegions": [ + { + "name": "West US", + "regionalReplicaCount": 2, + "storageAccountType": "Standard_LRS", + "excludeFromLatest": false + } + ], + "replicaCount": 2, + "excludeFromLatest": false, + "publishedDate": "2025-06-21T17:13:57.5972568+00:00", + "endOfLifeDate": "2027-07-01T07:00:00+00:00", + "storageAccountType": "Standard_LRS" + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + }, + "provisioningState": "Succeeded" + } + }, + { + "location": "West US", + "name": "1.0.1", + "type": "Microsoft.Compute/galleries/script/versions", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/galleries/myGalleryName/scripts/myGalleryScriptName/versions/1.0.1", + "properties": { + "publishingProfile": { + "source": { + "scriptLink": "https://mystorageaccount.blob.core.windows.net/mycontainer/myScript2.ps1", + "parameters": [ + { + "name": "myGalleryScriptParameter1", + "required": true, + "type": "String", + "defaultValue": "default value of parameter", + "description": "description of the parameter" + }, + { + "name": "myGalleryScriptParameter2", + "required": false, + "type": "String", + "defaultValue": "default value of parameter", + "description": "description of the parameter" + } + ] + }, + "targetRegions": [ + { + "name": "West US", + "regionalReplicaCount": 2, + "storageAccountType": "Standard_LRS", + "excludeFromLatest": false + } + ], + "replicaCount": 2, + "excludeFromLatest": false, + "publishedDate": "2025-06-21T17:13:57.5972568+00:00", + "endOfLifeDate": "2027-07-01T07:00:00+00:00", + "storageAccountType": "Standard_LRS" + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + }, + "provisioningState": "Succeeded" + } + } + ], + "nextLink": "https://microsoft.com/nextLinkExample" + } + } + }, + "operationId": "GalleryScriptVersions_ListByGalleryScript", + "title": "List gallery Script Versions in a gallery Script Definition." +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2025-03-03/examples/galleryScriptExamples/GalleryScriptVersion_Update.json b/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2025-03-03/examples/galleryScriptExamples/GalleryScriptVersion_Update.json new file mode 100644 index 000000000000..d15f8c26b33d --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2025-03-03/examples/galleryScriptExamples/GalleryScriptVersion_Update.json @@ -0,0 +1,181 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroupName", + "api-version": "2025-03-03", + "galleryName": "myGalleryName", + "galleryScriptName": "myGalleryScriptName", + "galleryScriptVersionName": "1.0.0", + "galleryScriptVersion": { + "properties": { + "publishingProfile": { + "source": { + "scriptLink": "https://mystorageaccount.blob.core.windows.net/mycontainer/myScript.ps1?{sasKey}", + "parameters": [ + { + "name": "location", + "required": true, + "defaultValue": "westus", + "type": "String" + }, + { + "name": "myGalleryScriptParameter1", + "required": true, + "type": "String", + "defaultValue": "default value of parameter", + "description": "description of the parameter" + }, + { + "name": "myGalleryScriptParameter2", + "required": false, + "type": "String", + "defaultValue": "default value of parameter", + "description": "description of the parameter" + }, + { + "name": "numberOfUnits", + "required": true, + "type": "Int", + "defaultValue": "3", + "description": "description of the parameter", + "minValue": "1", + "maxValue": "5" + }, + { + "name": "weightOfUnit", + "required": true, + "type": "Double", + "defaultValue": "0.6", + "description": "description of the parameter", + "minValue": "0.1", + "maxValue": "2" + }, + { + "name": "typeOfProduct", + "required": false, + "type": "Enum", + "defaultValue": "Fruit", + "description": "description of the parameter", + "enumValues": [ + "Fruit", + "Vegetable", + "Greens", + "Nuts" + ] + } + ] + }, + "targetRegions": [ + { + "name": "West US", + "regionalReplicaCount": 2, + "storageAccountType": "Standard_LRS", + "excludeFromLatest": false + } + ], + "replicaCount": 2, + "endOfLifeDate": "2027-07-01T07:00:00Z", + "storageAccountType": "Standard_LRS" + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + } + } + } + }, + "responses": { + "200": { + "body": { + "location": "West US", + "name": "1.0.0", + "type": "Microsoft.Compute/galleries/scripts/versions", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/galleries/myGalleryName/scripts/myGalleryScriptName/versions/1.0.0", + "properties": { + "publishingProfile": { + "source": { + "scriptLink": "https://mystorageaccount.blob.core.windows.net/mycontainer/myScript.ps1", + "parameters": [ + { + "name": "location", + "required": true, + "defaultValue": "westus", + "type": "String" + }, + { + "name": "myGalleryScriptParameter1", + "required": true, + "type": "String", + "defaultValue": "default value of parameter", + "description": "description of the parameter" + }, + { + "name": "myGalleryScriptParameter2", + "required": false, + "type": "String", + "defaultValue": "default value of parameter", + "description": "description of the parameter" + }, + { + "name": "numberOfUnits", + "required": true, + "type": "Int", + "defaultValue": "3", + "description": "description of the parameter", + "minValue": "1", + "maxValue": "5" + }, + { + "name": "weightOfUnit", + "required": true, + "type": "Double", + "defaultValue": "0.6", + "description": "description of the parameter", + "minValue": "0.1", + "maxValue": "2" + }, + { + "name": "typeOfProduct", + "required": false, + "type": "Enum", + "defaultValue": "Fruit", + "description": "description of the parameter", + "enumValues": [ + "Fruit", + "Vegetable", + "Greens", + "Nuts" + ] + } + ] + }, + "targetRegions": [ + { + "name": "West US", + "regionalReplicaCount": 2, + "storageAccountType": "Standard_LRS", + "excludeFromLatest": false + } + ], + "replicaCount": 2, + "excludeFromLatest": false, + "publishedDate": "2025-06-21T17:13:57.5972568+00:00", + "endOfLifeDate": "2027-07-01T07:00:00+00:00", + "storageAccountType": "Standard_LRS" + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + }, + "provisioningState": "Updating" + } + } + }, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/000000-8de3-42e7-b00e-8970003527749a/providers/Microsoft.Compute/locations/eastus/capsOperations/0012b61c-2d36-40bc-b7ed-1f0e48757277?api-version=2025-03-03", + "Location": "https://management.azure.com/subscriptions/000000-8de3-42e7-b00e-8970003527749a/providers/Microsoft.Compute/locations/eastus/capsOperations/0012b61c-2d36-40bc-b7ed-1f0e48757277?monitor=true&api-version=2025-03-03" + } + } + }, + "operationId": "GalleryScriptVersions_Update", + "title": "Update a simple gallery Script Version." +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2025-03-03/examples/galleryScriptExamples/GalleryScript_Create.json b/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2025-03-03/examples/galleryScriptExamples/GalleryScript_Create.json new file mode 100644 index 000000000000..2dbbf0186de5 --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2025-03-03/examples/galleryScriptExamples/GalleryScript_Create.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "api-version": "2025-03-03", + "galleryName": "myGalleryName", + "galleryScriptName": "myGalleryScriptName", + "galleryScript": { + "location": "West US", + "properties": { + "description": "This is the gallery script description.", + "eula": "This is the gallery script EULA.", + "privacyStatementUri": "{myPrivacyStatementUri}", + "releaseNoteUri": "{myReleaseNoteUri}", + "supportedOSType": "Windows" + } + } + }, + "responses": { + "200": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/000000-8de3-42e7-b00e-8970003527749a/providers/Microsoft.Compute/locations/westus/capsOperations/0012b61c-2d36-40bc-b7ed-1f0e48757277?api-version=2025-03-03" + }, + "body": { + "properties": { + "description": "This is the gallery script description.", + "eula": "This is the gallery script EULA.", + "privacyStatementUri": "{myPrivacyStatementUri}", + "releaseNoteUri": "{myReleaseNoteUri}", + "supportedOSType": "Windows", + "provisioningState": "Updating" + }, + "location": "West US", + "name": "myGalleryScriptName", + "type": "Microsoft.Compute/galleries", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/scripts/myGalleryScriptName" + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/000000-8de3-42e7-b00e-8970003527749a/providers/Microsoft.Compute/locations/westus/capsOperations/0012b61c-2d36-40bc-b7ed-1f0e48757277?api-version=2025-03-03" + }, + "body": { + "properties": { + "description": "This is the gallery script description.", + "eula": "This is the gallery script EULA.", + "privacyStatementUri": "{myPrivacyStatementUri}", + "releaseNoteUri": "{myReleaseNoteUri}", + "supportedOSType": "Windows", + "provisioningState": "Creating" + }, + "location": "West US", + "name": "myGalleryApplicationName", + "type": "Microsoft.Compute/galleries", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/scripts/myGalleryScriptName" + } + } + }, + "operationId": "GalleryScripts_CreateOrUpdate", + "title": "Create or update a simple gallery Script." +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2025-03-03/examples/galleryScriptExamples/GalleryScript_Delete.json b/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2025-03-03/examples/galleryScriptExamples/GalleryScript_Delete.json new file mode 100644 index 000000000000..f689a0888463 --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2025-03-03/examples/galleryScriptExamples/GalleryScript_Delete.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "api-version": "2025-03-03", + "galleryName": "myGalleryName", + "galleryScriptName": "myGalleryScriptName" + }, + "responses": { + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/000000-8de3-42e7-b00e-8970003527749a/providers/Microsoft.Compute/locations/eastus/capsOperations/0012b61c-0000-40bc-b7ed-000000000000?api-version=2025-03-03", + "Location": "https://management.azure.com/subscriptions/000000-8de3-42e7-b00e-8970003527749a/providers/Microsoft.Compute/locations/eastus/capsOperations/0012b61c-0000-40bc-b7ed-000000000000?monitor=true&api-version=2025-03-03" + } + }, + "204": {} + }, + "operationId": "GalleryScripts_Delete", + "title": "Delete a gallery Script." +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2025-03-03/examples/galleryScriptExamples/GalleryScript_Get.json b/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2025-03-03/examples/galleryScriptExamples/GalleryScript_Get.json new file mode 100644 index 000000000000..c1b91778ca0c --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2025-03-03/examples/galleryScriptExamples/GalleryScript_Get.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "api-version": "2025-03-03", + "galleryName": "myGalleryName", + "galleryScriptName": "myGalleryScriptName" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/scripts/myGalleryScriptName", + "properties": { + "description": "This is the gallery script description.", + "eula": "This is the gallery script EULA.", + "privacyStatementUri": "{myPrivacyStatementUri}", + "releaseNoteUri": "{myReleaseNoteUri}", + "supportedOSType": "Windows", + "provisioningState": "Succeeded" + }, + "location": "West US", + "name": "myGalleryScriptName" + } + } + }, + "operationId": "GalleryScripts_Get", + "title": "Get a gallery Script." +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2025-03-03/examples/galleryScriptExamples/GalleryScript_ListByGallery.json b/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2025-03-03/examples/galleryScriptExamples/GalleryScript_ListByGallery.json new file mode 100644 index 000000000000..bb74a56372cc --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2025-03-03/examples/galleryScriptExamples/GalleryScript_ListByGallery.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "api-version": "2025-03-03", + "galleryName": "myGalleryName" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/scripts/myGalleryScriptName", + "properties": { + "description": "This is the gallery script description.", + "eula": "This is the gallery script EULA.", + "privacyStatementUri": "{myPrivacyStatementUri}", + "releaseNoteUri": "{myReleaseNoteUri}", + "supportedOSType": "Windows", + "provisioningState": "Succeeded" + }, + "location": "West US", + "name": "myGalleryScriptName" + }, + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/scripts/myGalleryScriptName2", + "properties": { + "description": "This is the gallery script description.", + "eula": "This is the gallery script EULA.", + "privacyStatementUri": "{myPrivacyStatementUri}", + "releaseNoteUri": "{myReleaseNoteUri}", + "supportedOSType": "Windows", + "provisioningState": "Succeeded" + }, + "location": "West US", + "name": "myGalleryScriptName2" + } + ], + "nextLink": "https://microsoft.com/nextLinkExample" + } + } + }, + "operationId": "GalleryScripts_ListByGallery", + "title": "List gallery Scripts in a gallery." +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2025-03-03/examples/galleryScriptExamples/GalleryScript_Update.json b/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2025-03-03/examples/galleryScriptExamples/GalleryScript_Update.json new file mode 100644 index 000000000000..05a123c9ca3e --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2025-03-03/examples/galleryScriptExamples/GalleryScript_Update.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "api-version": "2025-03-03", + "galleryName": "myGalleryName", + "galleryScriptName": "myGalleryScriptName", + "galleryScript": { + "properties": { + "description": "This is the gallery script description.", + "eula": "This is the gallery script EULA.", + "privacyStatementUri": "{myPrivacyStatementUri}", + "releaseNoteUri": "{myReleaseNoteUri}", + "supportedOSType": "Windows" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "description": "This is the gallery script description.", + "eula": "This is the gallery script EULA.", + "privacyStatementUri": "myPrivacyStatementUri", + "releaseNoteUri": "myReleaseNoteUri", + "supportedOSType": "Windows" + }, + "location": "West US", + "name": "myGalleryScriptName", + "type": "Microsoft.Compute/galleries", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/scripts/myGalleryScriptName" + } + }, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/000000-8de3-42e7-b00e-8970003527749a/providers/Microsoft.Compute/locations/eastus/capsOperations/0012b61c-2d36-40bc-b7ed-1f0e48757277?api-version=2025-03-03", + "Location": "https://management.azure.com/subscriptions/000000-8de3-42e7-b00e-8970003527749a/providers/Microsoft.Compute/locations/eastus/capsOperations/0012b61c-2d36-40bc-b7ed-1f0e48757277?monitor=true&api-version=2025-03-03" + } + } + }, + "operationId": "GalleryScripts_Update", + "title": "Update a simple gallery Script." +}