-
Notifications
You must be signed in to change notification settings - Fork 5.9k
[cplat-2024-03-03] Update spec for ValidationProfile #30658
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
Merged
grizzlytheodore
merged 8 commits into
Azure:feature/cplat-2024-03-03
from
lkumaar:gallery-2024-03-03-validationsprofile
Oct 28, 2024
Merged
Changes from 6 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
0df10e5
Update spec with validationsProfile
lkumaar 0436cf4
Add examples for GetGalleryImageVersion with ValidationProfile
lkumaar d5d0b33
Run jq to format for prettier
lkumaar 011f429
LintDiff - add type:object for new definitions
lkumaar 1a2a5aa
Reorder validationsProfile to preserve param ordering
lkumaar 57c5d22
Make validations profile readonly
lkumaar c82d906
Merge branch 'feature/cplat-2024-03-03' into gallery-2024-03-03-valid…
ff6bb6d
Update gallery.json
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
118 changes: 118 additions & 0 deletions
118
...le/2024-03-03/examples/galleryExamples/GalleryImageVersion_Get_WithValidationProfile.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,118 @@ | ||
| { | ||
| "parameters": { | ||
| "subscriptionId": "{subscription-id}", | ||
| "resourceGroupName": "myResourceGroup", | ||
| "api-version": "2024-03-03", | ||
| "galleryName": "myGalleryName", | ||
| "galleryImageName": "myGalleryImageName", | ||
| "galleryImageVersionName": "1.0.0", | ||
| "$expand": "ValidationProfile" | ||
| }, | ||
| "responses": { | ||
| "200": { | ||
| "body": { | ||
| "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/locations/westus/Galleries/myGalleryName/Images/myGalleryImageName/Versions/1.0.0", | ||
| "properties": { | ||
| "publishingProfile": { | ||
| "targetRegions": [ | ||
| { | ||
| "name": "West US", | ||
| "regionalReplicaCount": 1, | ||
| "storageAccountType": "Standard_LRS", | ||
| "encryption": { | ||
| "osDiskImage": { | ||
| "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myDiskEncryptionSet" | ||
| }, | ||
| "dataDiskImages": [ | ||
| { | ||
| "lun": 0, | ||
| "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherDiskEncryptionSet" | ||
| }, | ||
| { | ||
| "lun": 1, | ||
| "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myDiskEncryptionSet" | ||
| } | ||
| ] | ||
| }, | ||
| "excludeFromLatest": false | ||
| }, | ||
| { | ||
| "name": "East US", | ||
| "regionalReplicaCount": 2, | ||
| "storageAccountType": "Standard_LRS", | ||
| "excludeFromLatest": false | ||
| } | ||
| ], | ||
| "replicaCount": 1, | ||
| "publishedDate": "2018-01-01T00:00:00Z", | ||
| "storageAccountType": "Standard_LRS" | ||
| }, | ||
| "storageProfile": { | ||
| "source": { | ||
| "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}" | ||
| }, | ||
| "osDiskImage": { | ||
| "sizeInGB": 10, | ||
| "hostCaching": "ReadOnly" | ||
| }, | ||
| "dataDiskImages": [ | ||
| { | ||
| "lun": 1, | ||
| "sizeInGB": 10, | ||
| "hostCaching": "None" | ||
| } | ||
| ] | ||
| }, | ||
| "safetyProfile": { | ||
| "allowDeletionOfReplicatedLocations": false, | ||
| "reportedForPolicyViolation": true, | ||
| "policyViolations": [ | ||
| { | ||
| "category": "ImageFlaggedUnsafe", | ||
| "details": "This is the policy violation details." | ||
| } | ||
| ] | ||
| }, | ||
| "validationsProfile": { | ||
| "executedValidations": [ | ||
| { | ||
| "type": "LinuxSecurityBaseline", | ||
| "status": "failed", | ||
| "version": "beta", | ||
| "executionTime": "2018-01-01T00:00:00Z" | ||
| }, | ||
| { | ||
| "type": "AzCertify", | ||
| "status": "success", | ||
| "version": "10.0.4", | ||
| "executionTime": "2018-01-01T00:00:00Z" | ||
| } | ||
| ], | ||
| "platformAttributes": [ | ||
| { | ||
| "name": "source_image_publisher", | ||
| "value": "publishValue" | ||
| }, | ||
| { | ||
| "name": "source_image_offer", | ||
| "value": "OfferValue" | ||
| }, | ||
| { | ||
| "name": "source_image_sku", | ||
| "value": "SkuValue" | ||
| }, | ||
| { | ||
| "name": "source_image_version", | ||
| "value": "1.0.0" | ||
| } | ||
| ], | ||
| "validationEtag": "2018-01-01T00:00:00Z" | ||
| }, | ||
| "provisioningState": "Succeeded" | ||
| }, | ||
| "location": "West US", | ||
| "name": "1.0.0" | ||
| } | ||
| } | ||
| } | ||
| } |
135 changes: 135 additions & 0 deletions
135
...es/galleryExamples/GalleryImageVersion_Get_WithValidationProfileAndReplicationStatus.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,135 @@ | ||
| { | ||
| "parameters": { | ||
| "subscriptionId": "{subscription-id}", | ||
| "resourceGroupName": "myResourceGroup", | ||
| "api-version": "2024-03-03", | ||
| "galleryName": "myGalleryName", | ||
| "galleryImageName": "myGalleryImageName", | ||
| "galleryImageVersionName": "1.0.0", | ||
| "$expand": "ValidationProfile,ReplicationStatus" | ||
| }, | ||
| "responses": { | ||
| "200": { | ||
| "body": { | ||
| "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/locations/westus/Galleries/myGalleryName/Images/myGalleryImageName/Versions/1.0.0", | ||
| "properties": { | ||
| "publishingProfile": { | ||
| "targetRegions": [ | ||
| { | ||
| "name": "West US", | ||
| "regionalReplicaCount": 1, | ||
| "storageAccountType": "Standard_LRS", | ||
| "encryption": { | ||
| "osDiskImage": { | ||
| "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myDiskEncryptionSet" | ||
| }, | ||
| "dataDiskImages": [ | ||
| { | ||
| "lun": 0, | ||
| "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherDiskEncryptionSet" | ||
| }, | ||
| { | ||
| "lun": 1, | ||
| "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myDiskEncryptionSet" | ||
| } | ||
| ] | ||
| }, | ||
| "excludeFromLatest": false | ||
| }, | ||
| { | ||
| "name": "East US", | ||
| "regionalReplicaCount": 2, | ||
| "storageAccountType": "Standard_LRS", | ||
| "excludeFromLatest": false | ||
| } | ||
| ], | ||
| "replicaCount": 1, | ||
| "publishedDate": "2018-01-01T00:00:00Z", | ||
| "storageAccountType": "Standard_LRS" | ||
| }, | ||
| "storageProfile": { | ||
| "source": { | ||
| "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}" | ||
| }, | ||
| "osDiskImage": { | ||
| "sizeInGB": 10, | ||
| "hostCaching": "ReadOnly" | ||
| }, | ||
| "dataDiskImages": [ | ||
| { | ||
| "lun": 1, | ||
| "sizeInGB": 10, | ||
| "hostCaching": "None" | ||
| } | ||
| ] | ||
| }, | ||
| "safetyProfile": { | ||
| "allowDeletionOfReplicatedLocations": false, | ||
| "reportedForPolicyViolation": true, | ||
| "policyViolations": [ | ||
| { | ||
| "category": "ImageFlaggedUnsafe", | ||
| "details": "This is the policy violation details." | ||
| } | ||
| ] | ||
| }, | ||
| "replicationStatus": { | ||
| "aggregatedState": "Completed", | ||
| "summary": [ | ||
| { | ||
| "region": "West US", | ||
| "state": "Completed", | ||
| "details": "", | ||
| "progress": 100 | ||
| }, | ||
| { | ||
| "region": "East US", | ||
| "state": "Completed", | ||
| "details": "", | ||
| "progress": 100 | ||
| } | ||
| ] | ||
| }, | ||
| "validationsProfile": { | ||
| "executedValidations": [ | ||
| { | ||
| "type": "LinuxSecurityBaseline", | ||
| "status": "failed", | ||
| "version": "beta", | ||
| "executionTime": "2018-01-01T00:00:00Z" | ||
| }, | ||
| { | ||
| "type": "AzCertify", | ||
| "status": "success", | ||
| "version": "10.0.4", | ||
| "executionTime": "2018-01-01T00:00:00Z" | ||
| } | ||
| ], | ||
| "platformAttributes": [ | ||
| { | ||
| "name": "source_image_publisher", | ||
| "value": "publishValue" | ||
| }, | ||
| { | ||
| "name": "source_image_offer", | ||
| "value": "OfferValue" | ||
| }, | ||
| { | ||
| "name": "source_image_sku", | ||
| "value": "SkuValue" | ||
| }, | ||
| { | ||
| "name": "source_image_version", | ||
| "value": "1.0.0" | ||
| } | ||
| ], | ||
| "validationEtag": "2018-01-01T00:00:00Z" | ||
| }, | ||
| "provisioningState": "Succeeded" | ||
| }, | ||
| "location": "West US", | ||
| "name": "1.0.0" | ||
| } | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we want this to be enum? model-as-string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
service has this as string, so would like to keep as is
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its possible to keep as string but have enum values. See:
azure-rest-api-specs/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/gallery.json
Lines 190 to 202 in 57c5d22