Skip to content

Draft: getLatestVersionName test branch #24688

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

Draft
wants to merge 1 commit into
base: feature/cplat-2022-08-03-2nd
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"parameters": {
"subscriptionId": "{subscription-id}",
"resourceGroupName": "myResourceGroup",
"api-version": "2022-08-03",
"galleryName": "myGalleryName",
"galleryImageName": "myGalleryImageName"
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/images/myGalleryImageName/versionNames/latest",
"name": "latest",
"type": "Microsoft.Compute/galleries/images/versionNames",
"properties": {
"latestVersionName": "1.0.0",
"location": "West US"
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -845,6 +845,61 @@
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versionNames/latest": {
"get": {
"tags": [
"GalleryImageVersions"
],
"operationId": "GalleryImageVersions_GetLatest",
"description": "Retrieves information about the latest version of an image.",
"parameters": [
{
"$ref": "../../../common-types/v1/common.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/ResourceGroupNameParameter"
},
{
"name": "galleryName",
"in": "path",
"required": true,
"type": "string",
"pattern": "^.*$",
"description": "The name of the Shared Image Gallery in which the Image Definition resides."
},
{
"name": "galleryImageName",
"in": "path",
"required": true,
"type": "string",
"pattern": "^.*$",
"description": "The name of the gallery image definition in which the Image Version resides."
},
{
"$ref": "../../../common-types/v1/common.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/LatestVersion"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../../../common-types/v1/common.json#/definitions/CloudError"
}
}
},
"x-ms-examples": {
"Get latest version of an image.": {
"$ref": "./examples/galleryExamples/GalleryImageVersion_Get_LatestVersionName.json"
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}": {
"put": {
"tags": [
Expand Down Expand Up @@ -3133,7 +3188,7 @@
"LatestGalleryImageVersion": {
"type": "object",
"readOnly": true,
"description": "The gallery image version with latest version in a particular region.",
"description": "The property latestVersion. It contains two value, the latest version name and the region.",
"properties": {
"latestVersionName": {
"type": "string",
Expand All @@ -3144,6 +3199,30 @@
"description": "region of the Gallery Image Version."
}
}
},
"LatestVersion": {
"readOnly": true,
"description": "latestVersion is an ARM resource. It follows the schema of ARM resource, which has id, name, type and properties. The name of the latest version in the region is in the properties.",
"properties": {
"id": {
"readOnly": true,
"type": "string",
"description": "Resource Id"
},
"name": {
"readOnly": true,
"type": "string",
"description": "Resource name"
},
"type": {
"readOnly": true,
"type": "string",
"description": "Resource type"
},
"properties": {
"$ref": "#/definitions/LatestGalleryImageVersion"
}
}
}
},
"parameters": {
Expand Down