Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gallery 01-03 release #17985

Merged
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
}
},
"x-ms-examples": {
"Get a gallery.": {
"Get a community gallery.": {
"$ref": "./examples/communityGalleryExamples/CommunityGallery_Get.json"
}
}
Expand Down Expand Up @@ -115,7 +115,7 @@
}
},
"x-ms-examples": {
"Get a gallery.": {
"Get a community gallery image.": {
"$ref": "./examples/communityGalleryExamples/CommunityGalleryImage_Get.json"
}
}
Expand Down Expand Up @@ -163,11 +163,104 @@
}
},
"x-ms-examples": {
"Get a gallery.": {
"Get a community gallery image version.": {
"$ref": "./examples/communityGalleryExamples/CommunityGalleryImageVersion_Get.json"
}
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/communityGalleries/{publicGalleryName}/images": {
"get": {
"tags": [
"CommunityGalleryImages"
],
"operationId": "CommunityGalleryImages_List",
"description": "List community gallery images inside a gallery.",
"parameters": [
{
"$ref": "../common.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "./galleryRPCommon.json#/parameters/LocationNameParameter"
},
{
"$ref": "../common.json#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/PublicGalleryNameParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/CommunityGalleryImageList"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../common.json#/definitions/CloudError"
}
}
},
"x-ms-examples": {
"List community gallery images.": {
"$ref": "./examples/communityGalleryExamples/CommunityGalleryImage_List.json"
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/communityGalleries/{publicGalleryName}/images/{galleryImageName}/versions": {
"get": {
"tags": [
"CommunityGalleryImageVersions"
],
"operationId": "CommunityGalleryImageVersions_List",
"description": "List community gallery image versions inside an image.",
"parameters": [
{
"$ref": "../common.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "./galleryRPCommon.json#/parameters/LocationNameParameter"
},
{
"$ref": "../common.json#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/PublicGalleryNameParameter"
},
{
"$ref": "#/parameters/GalleryImageNameParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/CommunityGalleryImageVersionList"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../common.json#/definitions/CloudError"
}
}
},
"x-ms-examples": {
"List community gallery image versions.": {
"$ref": "./examples/communityGalleryExamples/CommunityGalleryImageVersion_List.json"
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
}
}
},
"definitions": {
Expand Down Expand Up @@ -213,6 +306,27 @@
],
"description": "Specifies information about the Community Gallery that you want to create or update."
},
"CommunityGalleryImageList": {
"type": "object",
"description": "The List Community Gallery Images operation response.",
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/CommunityGalleryImage"
},
"x-ms-identifiers": [],
"description": "A list of community gallery images."
},
"nextLink": {
"type": "string",
"description": "The uri to fetch the next page of community gallery images. Call ListNext() with this to fetch the next page of community gallery images."
}
},
"required": [
"value"
]
},
"CommunityGalleryImage": {
"properties": {
"properties": {
Expand Down Expand Up @@ -291,6 +405,9 @@
},
"purchasePlan": {
"$ref": "./galleryRPCommon.json#/definitions/ImagePurchasePlan"
},
"architecture": {
"$ref": "./galleryRPCommon.json#/definitions/Architecture"
}
},
"required": [
Expand All @@ -300,6 +417,27 @@
],
"description": "Describes the properties of a gallery image definition."
},
"CommunityGalleryImageVersionList": {
"type": "object",
"description": "The List Community Gallery Image versions operation response.",
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/CommunityGalleryImageVersion"
},
"x-ms-identifiers": [],
"description": "A list of community gallery image versions."
},
"nextLink": {
"type": "string",
"description": "The uri to fetch the next page of community gallery image versions. Call ListNext() with this to fetch the next page of community gallery image versions."
}
},
"required": [
"value"
]
},
"CommunityGalleryImageVersion": {
"properties": {
"properties": {
Expand All @@ -325,6 +463,14 @@
"type": "string",
"format": "date-time",
"description": "The end of life date of the gallery image version Definition. This property can be used for decommissioning purposes. This property is updatable."
},
"excludeFromLatest": {
Copy link
Member

@mentat9 mentat9 Mar 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

excludeFromLatest

ARM recommends string enums instead of booleans. Rather than adding booleans for selection filters, you could think of an include or exclude property with enum values, e.g. include: { All, AllButLatest }. If you use modelAsString: true, then over time you can add more enum values without adding a new API version. #Resolved

Copy link
Contributor Author

@kangsun-ctrl kangsun-ctrl Mar 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are the same api model in the backend as https://github.com/kangsun-ctrl/azure-rest-api-specs/blob/4d0adaa99964df094beae44cecb08f01ea6e66e0/specification/compute/resource-manager/Microsoft.Compute/stable/2021-10-01/gallery.json#L2440-L2443. So I think we can try to change them all in the new api version since we need this release go in fast for our public preview.

"type": "boolean",
"description": "If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version."
},
"storageProfile": {
"$ref": "./galleryRPCommon.json#/definitions/SharedGalleryImageVersionStorageProfile",
"description": "Describes the storage profile of the image version."
}
},
"description": "Describes the properties of a gallery image version."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,14 @@
"body": {
"properties": {
"publishedDate": "2018-03-20T09:12:28Z",
"endOfLifeDate": "2022-03-20T09:12:28Z"
"endOfLifeDate": "2022-03-20T09:12:28Z",
"excludeFromLatest": false,
"storageProfile": {
"osDiskImage": {
"diskSizeGB": 29,
"hostCaching": "None"
}
}
},
"location": "myLocation",
"name": "myGalleryImageVersionName",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"parameters": {
"subscriptionId": "{subscription-id}",
"location": "myLocation",
"api-version": "2022-01-03",
"publicGalleryName": "publicGalleryName",
"galleryImageName": "myGalleryImageName"
},
"responses": {
"200": {
"body": {
"value": [
{
"properties": {
"publishedDate": "2018-03-20T09:12:28Z",
"endOfLifeDate": "2022-03-20T09:12:28Z",
"excludeFromLatest": false,
"storageProfile": {
"osDiskImage": {
"diskSizeGB": 29,
"hostCaching": "None"
}
}
},
"location": "myLocation",
"name": "myGalleryImageVersionName",
"identifier": {
"uniqueId": "/CommunityGalleries/publicGalleryName/Images/myGalleryImageName/Versions/myGalleryImageVersionName"
}
}
],
"nextLink": "http://svchost:99/subscriptions/{subscription-Id}/providers/Microsoft.Compute/communityGalleries/publicGalleryName/images/myGalleryImageName/versions?$skiptoken={token}/communityGalleries/publicGalleryName/images/myGalleryImageName/versions/myGalleryImageVersionName"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"parameters": {
"subscriptionId": "{subscription-id}",
"location": "myLocation",
"api-version": "2022-01-03",
"publicGalleryName": "publicGalleryName"
},
"responses": {
"200": {
"body": {
"value": [
{
"properties": {
"osType": "Windows",
"osState": "Generalized",
"hyperVGeneration": "V1",
"identifier": {
"publisher": "myPublisherName",
"offer": "myOfferName",
"sku": "mySkuName"
}
},
"location": "myLocation",
"name": "myGalleryImageName",
"identifier": {
"uniqueId": "/CommunityGalleries/publicGalleryName/Images/myGalleryImageName"
}
}
],
"nextLink": "http://svchost:99/subscriptions/{subscription-Id}/providers/Microsoft.Compute/communityGalleries/publicGalleryName/images?$skiptoken={token}/communityGalleries/publicGalleryName/images/myGalleryImageName"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"targetRegions": [
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you for catching this error @kangsun-ctrl

"name": "West US",
"regionalReplicaCount": 1,
"regionalReplicaCount": 2,
"encryption": {
"osDiskImage": {
"diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet"
Expand Down Expand Up @@ -68,7 +68,7 @@
"targetRegions": [
{
"name": "West US",
"regionalReplicaCount": 1,
"regionalReplicaCount": 2,
"storageAccountType": "Standard_LRS",
"encryption": {
"osDiskImage": {
Expand Down Expand Up @@ -140,7 +140,7 @@
"targetRegions": [
{
"name": "West US",
"regionalReplicaCount": 1,
"regionalReplicaCount": 2,
"storageAccountType": "Standard_LRS",
"encryption": {
"osDiskImage": {
Expand Down Expand Up @@ -212,7 +212,7 @@
"targetRegions": [
{
"name": "West US",
"regionalReplicaCount": 1,
"regionalReplicaCount": 2,
"storageAccountType": "Standard_LRS",
"encryption": {
"osDiskImage": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,14 @@
"body": {
"properties": {
"publishedDate": "2018-03-20T09:12:28Z",
"endOfLifeDate": "2022-03-20T09:12:28Z"
"endOfLifeDate": "2022-03-20T09:12:28Z",
"excludeFromLatest": false,
"storageProfile": {
"osDiskImage": {
"diskSizeGB": 29,
"hostCaching": "None"
}
}
},
"location": "myLocation",
"name": "myGalleryImageVersionName",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,14 @@
{
"properties": {
"publishedDate": "2018-03-20T09:12:28Z",
"endOfLifeDate": "2022-03-20T09:12:28Z"
"endOfLifeDate": "2022-03-20T09:12:28Z",
"excludeFromLatest": false,
"storageProfile": {
"osDiskImage": {
"diskSizeGB": 29,
"hostCaching": "None"
}
}
},
"location": "myLocation",
"name": "myGalleryImageVersionName",
Expand Down
Loading