-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Add GetLatestVersionName api in Gallery #23633
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
base: feature/cplat-2022-08-03
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
jackyChenAzure marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"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 |
---|---|---|
|
@@ -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": [ | ||
|
@@ -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", | ||
|
@@ -3144,6 +3199,30 @@ | |
"description": "region of the Gallery Image Version." | ||
} | ||
} | ||
}, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hold your horses. The two descriptions for these 2 properties are literally identical. Why id your property being added at all? How is it different? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's nested. LatestGalleryImageVersion is a property of latestVersion. latestVersion is an ARM resource which has id, name, type. LatestGalleryImageVersion is the property of it, which contains only region and version name. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think I should change the description of them, to make them clear |
||
"latestVersion": { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Standalone definitions should start with a capital letter. |
||
"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" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Make these descriptions more specific. ex: 'Resource Id of the latest version of a specific image.' (if that description is correct). Same for the other 2 properties here. |
||
}, | ||
"name": { | ||
"readOnly": true, | ||
"type": "string", | ||
"description": "Resource name" | ||
}, | ||
"type": { | ||
"readOnly": true, | ||
"type": "string", | ||
"description": "Resource type" | ||
}, | ||
"properties": { | ||
"$ref": "#/definitions/LatestGalleryImageVersion" | ||
} | ||
} | ||
} | ||
}, | ||
"parameters": { | ||
|
Uh oh!
There was an error while loading. Please reload this page.