From 0507ec1cf7398b3c3648cee5bebe73c1fd8c3a1d Mon Sep 17 00:00:00 2001 From: Daniel Hu Date: Wed, 28 Sep 2022 14:30:18 -0700 Subject: [PATCH 01/13] Add new snapshots type --- .../examples/GetSnapshot.json | 70 ++++++ .../examples/ListSnapshots.json | 102 ++++++++ .../preview/2022-11-01-preview/snapshots.json | 233 ++++++++++++++++++ 3 files changed, 405 insertions(+) create mode 100644 specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/examples/GetSnapshot.json create mode 100644 specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/examples/ListSnapshots.json create mode 100644 specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/snapshots.json diff --git a/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/examples/GetSnapshot.json b/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/examples/GetSnapshot.json new file mode 100644 index 000000000000..f6722a94c241 --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/examples/GetSnapshot.json @@ -0,0 +1,70 @@ +{ + "parameters": { + "subscriptionId": "subscriptionId1", + "resourceGroupName": "resourceGroup1", + "resourceProviderNamespace": "resourceProvider1", + "resourceType": "resourceType1", + "resourceName": "resourceName1", + "api-version": "2022-09-01", + "snapshotId": "snapshotId1" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/subscriptionId1/resourceGroups/resourceGroup1/providers/resourceProvider1/resourceType1/resourceName1/providers/Microsoft.Resources/snapshots/snapshotId1", + "name": "snapshotId1", + "type": "Microsoft.Resources/snapshots", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/someSubscriptionId/resourceGroups/someResourceGroupid/providers/Microsoft.Network/networkInterfaces/NetworkInterfacev1" + } + ] + }, + "osProfile": { + "adminUsername": "someAdminUsername", + "computerName": "v1", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "enableVMAgentPlatformUpdates": false, + "patchSettings": { + "assessmentMode": "ImageDefault", + "patchMode": "AutomaticByOS" + }, + "provisionVMAgent": true + } + }, + "provisioningState": "Succeeded", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "exactVersion": "9200.23817.220805", + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2012-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "deleteOption": "Detach", + "diskSizeGB": 127, + "name": "firstvmOSDisk", + "osType": "Windows", + "vhd": { + "uri": "http://storageoner7wc724nv74o2.blob.core.windows.net/vhds/firstvmOSDisk.vhd" + } + } + }, + "timeCreated": "2022-08-15T07:58:21.486774Z", + "vmId": "00000000-0000-0000-0000-0000000000" + } + } + } + } +} diff --git a/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/examples/ListSnapshots.json b/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/examples/ListSnapshots.json new file mode 100644 index 000000000000..a8111a6f7f56 --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/examples/ListSnapshots.json @@ -0,0 +1,102 @@ +{ + "parameters": { + "subscriptionId": "subscriptionId1", + "resourceGroupName": "resourceGroup1", + "resourceProviderNamespace": "resourceProvider1", + "resourceType": "resourceType1", + "resourceName": "resourceName1", + "api-version": "2022-09-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/subscriptionId1/resourceGroups/resourceGroup1/providers/resourceProvider1/resourceType1/resourceName1/providers/Microsoft.Resources/snapshots/snapshotId1", + "name": "snapshotId1", + "type": "Microsoft.Resources/snapshots", + "properties": { + "allowBlobPublicAccess": true, + "creationTime": "2022-08-15T07:57:50.6791424Z", + "encryption": { + "keySource": "Microsoft.Storage", + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2022-08-15T07:57:50.8197664Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2022-08-15T07:57:50.8197664Z" + } + } + }, + "minimumTlsVersion": "TLS1_0", + "networkAcls": { + "bypass": "AzureServices", + "defaultAction": "Allow", + "ipRules": [], + "virtualNetworkRules": [] + }, + "primaryEndpoints": { + "blob": "https://storageaccount.blob.core.windows.net/", + "file": "https://storageaccount.file.core.windows.net/", + "queue": "https://storageaccount.queue.core.windows.net/", + "table": "https://storageaccount.table.core.windows.net/" + }, + "primaryLocation": "westeurope", + "privateEndpointConnections": [], + "provisioningState": "Succeeded", + "statusOfPrimary": "available", + "supportsHttpsTrafficOnly": false + } + }, + { + "id": "/subscriptions/subscriptionId1/resourceGroups/resourceGroup1/providers/resourceProvider1/resourceType1/resourceName1/providers/Microsoft.Resources/snapshots/snapshotId2", + "name": "snapshotId2", + "type": "Microsoft.Resources/snapshots", + "properties": { + "allowBlobPublicAccess": true, + "creationTime": "2022-08-15T07:57:50.6791424Z", + "encryption": { + "keySource": "Microsoft.Storage", + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2022-08-15T07:57:50.8197664Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2022-08-15T07:57:50.8197664Z" + } + } + }, + "minimumTlsVersion": "TLS2_0", + "networkAcls": { + "bypass": "AzureServices", + "defaultAction": "Disable", + "ipRules": [], + "virtualNetworkRules": [] + }, + "primaryEndpoints": { + "blob": "https://storageaccount.blob.core.windows.net/", + "file": "https://storageaccount.file.core.windows.net/", + "queue": "https://storageaccount.queue.core.windows.net/", + "table": "https://storageaccount.table.core.windows.net/" + }, + "primaryLocation": "westeurope", + "privateEndpointConnections": [], + "provisioningState": "Succeeded", + "statusOfPrimary": "available", + "supportsHttpsTrafficOnly": true + } + } + ] + } + } + } +} diff --git a/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/snapshots.json b/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/snapshots.json new file mode 100644 index 000000000000..15fd3964976e --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/snapshots.json @@ -0,0 +1,233 @@ +{ + "swagger": "2.0", + "info": { + "version": "2022-11-01", + "title": "SnapshotsClient", + "description": "The Resource Snapshots Client" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Resources/snapshots": { + "get": { + "tags": [ + "ListSnapshots" + ], + "operationId": "Snapshots_List", + "x-ms-examples": { + "ListSnapshots": { + "$ref": "./examples/ListSnapshots.json" + } + }, + "description": "Obtains a list of snapshots from the past 14 days for the target resource", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ResourceProviderNamespaceParameter" + }, + { + "$ref": "#/parameters/ResourceTypeParameter" + }, + { + "$ref": "#/parameters/ResourceNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/$top" + }, + { + "$ref": "#/parameters/$skipToken" + } + ], + "responses": { + "200": { + "description": "OK.", + "schema": { + "$ref": "#/definitions/SnapshotListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Resources/snapshots/{snapshotId}": { + "get": { + "tags": [ + "GetSnapshot" + ], + "operationId": "Snapshots_Get", + "x-ms-examples": { + "GetSnapshot": { + "$ref": "./examples/GetSnapshot.json" + } + }, + "description": "Obtains the specified snapshot for the target resource", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ResourceProviderNamespaceParameter" + }, + { + "$ref": "#/parameters/ResourceTypeParameter" + }, + { + "$ref": "#/parameters/ResourceNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/snapshotIdParameter" + } + ], + "responses": { + "200": { + "description": "OK.", + "schema": { + "$ref": "#/definitions/Snapshot" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": { + "Snapshot": { + "type": "object", + "description": "A generic resource snapshot", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "type": "object" + } + } + }, + "SnapshotListResult": { + "description": "The list of snapshots", + "type": "object", + "properties": { + "nextLink": { + "type": "string", + "description": "The link used to get the next page of Snapshots" + }, + "value": { + "description": "The list of snapshots", + "type": "array", + "items": { + "$ref": "#/definitions/Snapshot" + } + } + } + } + }, + "parameters": { + "ResourceProviderNamespaceParameter": { + "name": "resourceProviderNamespace", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource provider namespace.", + "x-ms-parameter-location": "method" + }, + "ResourceTypeParameter": { + "name": "resourceType", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource type.", + "x-ms-parameter-location": "method" + }, + "ResourceNameParameter": { + "name": "resourceName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource.", + "x-ms-parameter-location": "method" + }, + "snapshotIdParameter": { + "name": "snapshotId", + "in": "path", + "required": true, + "type": "string", + "description": "The ID of the snapshot", + "x-ms-parameter-location": "method" + }, + "$top": { + "required": false, + "default": 20, + "description": "(Optional) Set the maximum number of results per response.", + "in": "query", + "maximum": 100, + "minimum": 1, + "name": "$top", + "type": "integer", + "format": "int64", + "x-ms-parameter-location": "method" + }, + "$skipToken": { + "required": false, + "description": "(Optional) The page-continuation token", + "in": "query", + "name": "$skipToken", + "type": "string", + "x-ms-parameter-location": "method" + } + } +} From e1dad02d3ed0cdee9032aa56ddb61fa3ec7347e5 Mon Sep 17 00:00:00 2001 From: Daniel Hu Date: Wed, 28 Sep 2022 14:39:56 -0700 Subject: [PATCH 02/13] Readme --- specification/resources/resource-manager/readme.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/specification/resources/resource-manager/readme.md b/specification/resources/resource-manager/readme.md index 83994fb5e305..f7b0eb825b60 100644 --- a/specification/resources/resource-manager/readme.md +++ b/specification/resources/resource-manager/readme.md @@ -72,6 +72,20 @@ tag: package-templatespecs-2022-02 ``` yaml $(package-changes) tag: package-changes-2022-05 ``` + +``` yaml $(package-snapshots) +tag: package-snapshots-2022-11 +``` + +### Tag: package-snapshots-2022-11 + +These settings apply only when `--tag=package-snapshots-2022-11` is specified on the command line. + +``` yaml $(tag) == 'package-snapshots-2022-11' +input-file: +- Microsoft.Resources/preview/2022-11-01/snapshots.json +``` + ### Tag: package-changes-2022-05 These settings apply only when `--tag=package-changes-2022-05` is specified on the command line. From c724f82a028c7d8ff3897b59fa3546134484fef9 Mon Sep 17 00:00:00 2001 From: Daniel Hu Date: Wed, 28 Sep 2022 14:54:26 -0700 Subject: [PATCH 03/13] Readme typo --- specification/resources/resource-manager/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/resources/resource-manager/readme.md b/specification/resources/resource-manager/readme.md index f7b0eb825b60..fda121b5f133 100644 --- a/specification/resources/resource-manager/readme.md +++ b/specification/resources/resource-manager/readme.md @@ -83,7 +83,7 @@ These settings apply only when `--tag=package-snapshots-2022-11` is specified on ``` yaml $(tag) == 'package-snapshots-2022-11' input-file: -- Microsoft.Resources/preview/2022-11-01/snapshots.json +- Microsoft.Resources/preview/2022-11-01-preview/snapshots.json ``` ### Tag: package-changes-2022-05 From 17022b618dbe472214cd71faa6edc5e2f74eac29 Mon Sep 17 00:00:00 2001 From: Daniel Hu Date: Wed, 28 Sep 2022 15:52:54 -0700 Subject: [PATCH 04/13] suppressions --- specification/resources/resource-manager/readme.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/specification/resources/resource-manager/readme.md b/specification/resources/resource-manager/readme.md index fda121b5f133..b12d64ddbeb5 100644 --- a/specification/resources/resource-manager/readme.md +++ b/specification/resources/resource-manager/readme.md @@ -903,6 +903,13 @@ directive: suppress: OperationsAPIImplementation where: $.paths reason: 'Duplicate Operations API causes generation issues' + - from: snapshots.json + suppress: OperationsAPIImplementation + where: $.paths + reason: 'Duplicate Operations API causes generation issues' + - suppress: TopLevelResourcesListBySubscription + from: snapshots.json + reason: We will be pushing customers to use Azure Resource Graph for those at scale scenarios. - suppress: RequiredReadOnlySystemData from: changes.json reason: System Metadata from a change resource perspective is irrelevant From 2347d16d5b6a9847e9982b709b5e24a954b7da68 Mon Sep 17 00:00:00 2001 From: Daniel Hu Date: Wed, 28 Sep 2022 16:02:47 -0700 Subject: [PATCH 05/13] readme --- specification/resources/resource-manager/readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/resources/resource-manager/readme.md b/specification/resources/resource-manager/readme.md index b12d64ddbeb5..2b514e0f1321 100644 --- a/specification/resources/resource-manager/readme.md +++ b/specification/resources/resource-manager/readme.md @@ -963,6 +963,7 @@ batch: - package-deploymentscripts: true - package-templatespecs: true - package-changes: true + - package-snapshots: true ``` ### Tag: profile-hybrid-2019-03-01 From 43604363049799bf8c94d78425db0b57e934d35b Mon Sep 17 00:00:00 2001 From: Daniel Hu Date: Thu, 29 Sep 2022 15:46:52 -0700 Subject: [PATCH 06/13] Preview --- .../preview/2022-11-01-preview/examples/GetSnapshot.json | 2 +- .../preview/2022-11-01-preview/examples/ListSnapshots.json | 2 +- .../preview/2022-11-01-preview/snapshots.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/examples/GetSnapshot.json b/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/examples/GetSnapshot.json index f6722a94c241..e1afce900039 100644 --- a/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/examples/GetSnapshot.json +++ b/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/examples/GetSnapshot.json @@ -5,7 +5,7 @@ "resourceProviderNamespace": "resourceProvider1", "resourceType": "resourceType1", "resourceName": "resourceName1", - "api-version": "2022-09-01", + "api-version": "2022-11-01-preview", "snapshotId": "snapshotId1" }, "responses": { diff --git a/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/examples/ListSnapshots.json b/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/examples/ListSnapshots.json index a8111a6f7f56..b6c56bd33eac 100644 --- a/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/examples/ListSnapshots.json +++ b/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/examples/ListSnapshots.json @@ -5,7 +5,7 @@ "resourceProviderNamespace": "resourceProvider1", "resourceType": "resourceType1", "resourceName": "resourceName1", - "api-version": "2022-09-01" + "api-version": "2022-11-01-preview" }, "responses": { "200": { diff --git a/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/snapshots.json b/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/snapshots.json index 15fd3964976e..a53e0924f678 100644 --- a/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/snapshots.json +++ b/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/snapshots.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "version": "2022-11-01", + "version": "2022-11-01-preview", "title": "SnapshotsClient", "description": "The Resource Snapshots Client" }, From 1c624525d3c12a8cd922da933b60390941df999d Mon Sep 17 00:00:00 2001 From: Daniel Hu Date: Mon, 3 Oct 2022 22:29:19 -0700 Subject: [PATCH 07/13] Make augmented properties siblings of the original ARM resource --- .../examples/GetSnapshot.json | 93 ++++++------ .../examples/ListSnapshots.json | 142 +++++++++--------- .../preview/2022-11-01-preview/snapshots.json | 7 +- 3 files changed, 128 insertions(+), 114 deletions(-) diff --git a/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/examples/GetSnapshot.json b/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/examples/GetSnapshot.json index e1afce900039..0feba6f74de1 100644 --- a/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/examples/GetSnapshot.json +++ b/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/examples/GetSnapshot.json @@ -15,54 +15,57 @@ "name": "snapshotId1", "type": "Microsoft.Resources/snapshots", "properties": { - "hardwareProfile": { - "vmSize": "Standard_D1_v2" - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "/subscriptions/someSubscriptionId/resourceGroups/someResourceGroupid/providers/Microsoft.Network/networkInterfaces/NetworkInterfacev1" + "apiVersion": "2022-05-01", + "content": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/someSubscriptionId/resourceGroups/someResourceGroupid/providers/Microsoft.Network/networkInterfaces/NetworkInterfacev1" + } + ] + }, + "osProfile": { + "adminUsername": "someAdminUsername", + "computerName": "v1", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "enableVMAgentPlatformUpdates": false, + "patchSettings": { + "assessmentMode": "ImageDefault", + "patchMode": "AutomaticByOS" + }, + "provisionVMAgent": true } - ] - }, - "osProfile": { - "adminUsername": "someAdminUsername", - "computerName": "v1", - "secrets": [], - "windowsConfiguration": { - "enableAutomaticUpdates": true, - "enableVMAgentPlatformUpdates": false, - "patchSettings": { - "assessmentMode": "ImageDefault", - "patchMode": "AutomaticByOS" - }, - "provisionVMAgent": true - } - }, - "provisioningState": "Succeeded", - "storageProfile": { - "dataDisks": [], - "imageReference": { - "exactVersion": "9200.23817.220805", - "offer": "WindowsServer", - "publisher": "MicrosoftWindowsServer", - "sku": "2012-Datacenter", - "version": "latest" }, - "osDisk": { - "caching": "ReadWrite", - "createOption": "FromImage", - "deleteOption": "Detach", - "diskSizeGB": 127, - "name": "firstvmOSDisk", - "osType": "Windows", - "vhd": { - "uri": "http://storageoner7wc724nv74o2.blob.core.windows.net/vhds/firstvmOSDisk.vhd" + "provisioningState": "Succeeded", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "exactVersion": "9200.23817.220805", + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2012-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "deleteOption": "Detach", + "diskSizeGB": 127, + "name": "firstvmOSDisk", + "osType": "Windows", + "vhd": { + "uri": "http://storageoner7wc724nv74o2.blob.core.windows.net/vhds/firstvmOSDisk.vhd" + } } - } - }, - "timeCreated": "2022-08-15T07:58:21.486774Z", - "vmId": "00000000-0000-0000-0000-0000000000" + }, + "timeCreated": "2022-08-15T07:58:21.486774Z", + "vmId": "00000000-0000-0000-0000-0000000000" + } } } } diff --git a/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/examples/ListSnapshots.json b/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/examples/ListSnapshots.json index b6c56bd33eac..1d43f337497f 100644 --- a/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/examples/ListSnapshots.json +++ b/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/examples/ListSnapshots.json @@ -16,41 +16,44 @@ "name": "snapshotId1", "type": "Microsoft.Resources/snapshots", "properties": { - "allowBlobPublicAccess": true, - "creationTime": "2022-08-15T07:57:50.6791424Z", - "encryption": { - "keySource": "Microsoft.Storage", - "services": { - "blob": { - "enabled": true, - "keyType": "Account", - "lastEnabledTime": "2022-08-15T07:57:50.8197664Z" - }, - "file": { - "enabled": true, - "keyType": "Account", - "lastEnabledTime": "2022-08-15T07:57:50.8197664Z" + "apiVersion": "2021-04-01", + "content": { + "allowBlobPublicAccess": true, + "creationTime": "2022-08-15T07:57:50.6791424Z", + "encryption": { + "keySource": "Microsoft.Storage", + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2022-08-15T07:57:50.8197664Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2022-08-15T07:57:50.8197664Z" + } } - } - }, - "minimumTlsVersion": "TLS1_0", - "networkAcls": { - "bypass": "AzureServices", - "defaultAction": "Allow", - "ipRules": [], - "virtualNetworkRules": [] - }, - "primaryEndpoints": { - "blob": "https://storageaccount.blob.core.windows.net/", - "file": "https://storageaccount.file.core.windows.net/", - "queue": "https://storageaccount.queue.core.windows.net/", - "table": "https://storageaccount.table.core.windows.net/" - }, - "primaryLocation": "westeurope", - "privateEndpointConnections": [], - "provisioningState": "Succeeded", - "statusOfPrimary": "available", - "supportsHttpsTrafficOnly": false + }, + "minimumTlsVersion": "TLS1_0", + "networkAcls": { + "bypass": "AzureServices", + "defaultAction": "Allow", + "ipRules": [], + "virtualNetworkRules": [] + }, + "primaryEndpoints": { + "blob": "https://storageaccount.blob.core.windows.net/", + "file": "https://storageaccount.file.core.windows.net/", + "queue": "https://storageaccount.queue.core.windows.net/", + "table": "https://storageaccount.table.core.windows.net/" + }, + "primaryLocation": "westeurope", + "privateEndpointConnections": [], + "provisioningState": "Succeeded", + "statusOfPrimary": "available", + "supportsHttpsTrafficOnly": false + } } }, { @@ -58,41 +61,44 @@ "name": "snapshotId2", "type": "Microsoft.Resources/snapshots", "properties": { - "allowBlobPublicAccess": true, - "creationTime": "2022-08-15T07:57:50.6791424Z", - "encryption": { - "keySource": "Microsoft.Storage", - "services": { - "blob": { - "enabled": true, - "keyType": "Account", - "lastEnabledTime": "2022-08-15T07:57:50.8197664Z" - }, - "file": { - "enabled": true, - "keyType": "Account", - "lastEnabledTime": "2022-08-15T07:57:50.8197664Z" + "apiVersion": "2021-04-01", + "content": { + "allowBlobPublicAccess": true, + "creationTime": "2022-08-15T07:57:50.6791424Z", + "encryption": { + "keySource": "Microsoft.Storage", + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2022-08-15T07:57:50.8197664Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2022-08-15T07:57:50.8197664Z" + } } - } - }, - "minimumTlsVersion": "TLS2_0", - "networkAcls": { - "bypass": "AzureServices", - "defaultAction": "Disable", - "ipRules": [], - "virtualNetworkRules": [] - }, - "primaryEndpoints": { - "blob": "https://storageaccount.blob.core.windows.net/", - "file": "https://storageaccount.file.core.windows.net/", - "queue": "https://storageaccount.queue.core.windows.net/", - "table": "https://storageaccount.table.core.windows.net/" - }, - "primaryLocation": "westeurope", - "privateEndpointConnections": [], - "provisioningState": "Succeeded", - "statusOfPrimary": "available", - "supportsHttpsTrafficOnly": true + }, + "minimumTlsVersion": "TLS1_0", + "networkAcls": { + "bypass": "AzureServices", + "defaultAction": "Allow", + "ipRules": [], + "virtualNetworkRules": [] + }, + "primaryEndpoints": { + "blob": "https://storageaccount.blob.core.windows.net/", + "file": "https://storageaccount.file.core.windows.net/", + "queue": "https://storageaccount.queue.core.windows.net/", + "table": "https://storageaccount.table.core.windows.net/" + }, + "primaryLocation": "westeurope", + "privateEndpointConnections": [], + "provisioningState": "Succeeded", + "statusOfPrimary": "available", + "supportsHttpsTrafficOnly": false + } } } ] diff --git a/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/snapshots.json b/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/snapshots.json index a53e0924f678..a719d3030729 100644 --- a/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/snapshots.json +++ b/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/snapshots.json @@ -153,7 +153,12 @@ } ], "properties": { - "properties": { + "apiVersion": { + "type": "string", + "description": "The API Version of the resource captured" + }, + "content": { + "description": "The actual ARM Resource", "type": "object" } } From 4e74ad90411ca3e88c897b199ac5c728df0491e9 Mon Sep 17 00:00:00 2001 From: Daniel Hu Date: Mon, 3 Oct 2022 22:41:46 -0700 Subject: [PATCH 08/13] Snapshot --- .../preview/2022-11-01-preview/snapshots.json | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/snapshots.json b/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/snapshots.json index a719d3030729..735133339d14 100644 --- a/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/snapshots.json +++ b/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/snapshots.json @@ -146,12 +146,21 @@ "definitions": { "Snapshot": { "type": "object", - "description": "A generic resource snapshot", + "description": "A generic resource snapshot with additional metadata", "allOf": [ { "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ProxyResource" } ], + "properties": { + "properties": { + "$ref": "#/definitions/SnapshotProperties" + } + } + }, + "SnapshotProperties" : { + "description": "The properties of a snapshot", + "type": "object", "properties": { "apiVersion": { "type": "string", From 3935dcd41b9b34600176af6e73dac967c024ef17 Mon Sep 17 00:00:00 2001 From: Daniel Hu Date: Mon, 3 Oct 2022 23:02:39 -0700 Subject: [PATCH 09/13] prettier --- .../preview/2022-11-01-preview/snapshots.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/snapshots.json b/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/snapshots.json index 735133339d14..a4351441051d 100644 --- a/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/snapshots.json +++ b/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/snapshots.json @@ -158,7 +158,7 @@ } } }, - "SnapshotProperties" : { + "SnapshotProperties": { "description": "The properties of a snapshot", "type": "object", "properties": { From a0f7350ccf3931ed99c586bc72a23f182cf16fa0 Mon Sep 17 00:00:00 2001 From: Daniel Hu Date: Mon, 3 Oct 2022 23:30:08 -0700 Subject: [PATCH 10/13] fix examples --- .../examples/GetSnapshot.json | 102 ++++++---- .../examples/ListSnapshots.json | 190 +++++++++++------- 2 files changed, 180 insertions(+), 112 deletions(-) diff --git a/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/examples/GetSnapshot.json b/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/examples/GetSnapshot.json index 0feba6f74de1..f5d4d2a64f2e 100644 --- a/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/examples/GetSnapshot.json +++ b/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/examples/GetSnapshot.json @@ -17,54 +17,68 @@ "properties": { "apiVersion": "2022-05-01", "content": { - "hardwareProfile": { - "vmSize": "Standard_D1_v2" + "sku": { + "name": "Standard_GZRS", + "tier": "Standard" }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "/subscriptions/someSubscriptionId/resourceGroups/someResourceGroupid/providers/Microsoft.Network/networkInterfaces/NetworkInterfacev1" - } - ] + "kind": "StorageV2", + "id": "/subscriptions/subscriptionId1/resourceGroups/resourceGroup1/providers/resourceProvider1/resourceType1/resourceName1", + "name": "resourceName1", + "type": "resourceProvider1/resourceType1", + "location": "eastus", + "tags": { + "aaa": "aaaa", + "dfasdf": "dfsadfsf" }, - "osProfile": { - "adminUsername": "someAdminUsername", - "computerName": "v1", - "secrets": [], - "windowsConfiguration": { - "enableAutomaticUpdates": true, - "enableVMAgentPlatformUpdates": false, - "patchSettings": { - "assessmentMode": "ImageDefault", - "patchMode": "AutomaticByOS" + "properties": { + "defaultToOAuthAuthentication": false, + "keyCreationTime": { + "key1": "2021-04-15T20:12:24.1028866Z", + "key2": "2021-04-15T19:58:00.3691784Z" + }, + "privateEndpointConnections": [], + "minimumTlsVersion": "TLS1_0", + "allowBlobPublicAccess": true, + "allowSharedKeyAccess": true, + "networkAcls": { + "bypass": "AzureServices", + "virtualNetworkRules": [], + "ipRules": [], + "defaultAction": "Allow" + }, + "supportsHttpsTrafficOnly": true, + "encryption": { + "services": { + "file": { + "keyType": "Account", + "enabled": true, + "lastEnabledTime": "2021-04-15T19:58:00.3848008Z" + }, + "blob": { + "keyType": "Account", + "enabled": true, + "lastEnabledTime": "2021-04-15T19:58:00.3848008Z" + } }, - "provisionVMAgent": true - } - }, - "provisioningState": "Succeeded", - "storageProfile": { - "dataDisks": [], - "imageReference": { - "exactVersion": "9200.23817.220805", - "offer": "WindowsServer", - "publisher": "MicrosoftWindowsServer", - "sku": "2012-Datacenter", - "version": "latest" + "keySource": "Microsoft.Storage" }, - "osDisk": { - "caching": "ReadWrite", - "createOption": "FromImage", - "deleteOption": "Detach", - "diskSizeGB": 127, - "name": "firstvmOSDisk", - "osType": "Windows", - "vhd": { - "uri": "http://storageoner7wc724nv74o2.blob.core.windows.net/vhds/firstvmOSDisk.vhd" - } - } - }, - "timeCreated": "2022-08-15T07:58:21.486774Z", - "vmId": "00000000-0000-0000-0000-0000000000" + "accessTier": "Hot", + "provisioningState": "Succeeded", + "creationTime": "2021-04-15T19:58:00.2285507Z", + "primaryEndpoints": { + "dfs": "https://resourceName1.dfs.core.windows.net/", + "web": "https://resourceName1.z13.web.core.windows.net/", + "blob": "https://resourceName1.blob.core.windows.net/", + "queue": "https://resourceName1.queue.core.windows.net/", + "table": "https://resourceName1.table.core.windows.net/", + "file": "https://resourceName1.file.core.windows.net/" + }, + "primaryLocation": "eastus", + "statusOfPrimary": "available", + "lastGeoFailoverTime": "2022-07-21T22:11:20.3670939Z", + "secondaryLocation": "westus", + "statusOfSecondary": "available" + } } } } diff --git a/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/examples/ListSnapshots.json b/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/examples/ListSnapshots.json index 1d43f337497f..ba07b914e7d2 100644 --- a/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/examples/ListSnapshots.json +++ b/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/examples/ListSnapshots.json @@ -16,43 +16,70 @@ "name": "snapshotId1", "type": "Microsoft.Resources/snapshots", "properties": { - "apiVersion": "2021-04-01", + "apiVersion": "2022-05-01", "content": { - "allowBlobPublicAccess": true, - "creationTime": "2022-08-15T07:57:50.6791424Z", - "encryption": { - "keySource": "Microsoft.Storage", - "services": { - "blob": { - "enabled": true, - "keyType": "Account", - "lastEnabledTime": "2022-08-15T07:57:50.8197664Z" - }, - "file": { - "enabled": true, - "keyType": "Account", - "lastEnabledTime": "2022-08-15T07:57:50.8197664Z" - } - } - }, - "minimumTlsVersion": "TLS1_0", - "networkAcls": { - "bypass": "AzureServices", - "defaultAction": "Allow", - "ipRules": [], - "virtualNetworkRules": [] + "sku": { + "name": "Standard_GZRS", + "tier": "Standard" }, - "primaryEndpoints": { - "blob": "https://storageaccount.blob.core.windows.net/", - "file": "https://storageaccount.file.core.windows.net/", - "queue": "https://storageaccount.queue.core.windows.net/", - "table": "https://storageaccount.table.core.windows.net/" + "kind": "StorageV2", + "id": "/subscriptions/subscriptionId1/resourceGroups/resourceGroup1/providers/resourceProvider1/resourceType1/resourceName1", + "name": "resourceName1", + "type": "resourceProvider1/resourceType1", + "location": "eastus", + "tags": { + "aaa": "aaaa", + "dfasdf": "dfsadfsf" }, - "primaryLocation": "westeurope", - "privateEndpointConnections": [], - "provisioningState": "Succeeded", - "statusOfPrimary": "available", - "supportsHttpsTrafficOnly": false + "properties": { + "defaultToOAuthAuthentication": false, + "keyCreationTime": { + "key1": "2021-04-15T20:12:24.1028866Z", + "key2": "2021-04-15T19:58:00.3691784Z" + }, + "privateEndpointConnections": [], + "minimumTlsVersion": "TLS1_0", + "allowBlobPublicAccess": true, + "allowSharedKeyAccess": true, + "networkAcls": { + "bypass": "AzureServices", + "virtualNetworkRules": [], + "ipRules": [], + "defaultAction": "Allow" + }, + "supportsHttpsTrafficOnly": true, + "encryption": { + "services": { + "file": { + "keyType": "Account", + "enabled": true, + "lastEnabledTime": "2021-04-15T19:58:00.3848008Z" + }, + "blob": { + "keyType": "Account", + "enabled": true, + "lastEnabledTime": "2021-04-15T19:58:00.3848008Z" + } + }, + "keySource": "Microsoft.Storage" + }, + "accessTier": "Hot", + "provisioningState": "Succeeded", + "creationTime": "2021-04-15T19:58:00.2285507Z", + "primaryEndpoints": { + "dfs": "https://resourceName1.dfs.core.windows.net/", + "web": "https://resourceName1.z13.web.core.windows.net/", + "blob": "https://resourceName1.blob.core.windows.net/", + "queue": "https://resourceName1.queue.core.windows.net/", + "table": "https://resourceName1.table.core.windows.net/", + "file": "https://resourceName1.file.core.windows.net/" + }, + "primaryLocation": "eastus", + "statusOfPrimary": "available", + "lastGeoFailoverTime": "2022-07-21T22:11:20.3670939Z", + "secondaryLocation": "westus", + "statusOfSecondary": "available" + } } } }, @@ -61,43 +88,70 @@ "name": "snapshotId2", "type": "Microsoft.Resources/snapshots", "properties": { - "apiVersion": "2021-04-01", + "apiVersion": "2022-05-01", "content": { - "allowBlobPublicAccess": true, - "creationTime": "2022-08-15T07:57:50.6791424Z", - "encryption": { - "keySource": "Microsoft.Storage", - "services": { - "blob": { - "enabled": true, - "keyType": "Account", - "lastEnabledTime": "2022-08-15T07:57:50.8197664Z" - }, - "file": { - "enabled": true, - "keyType": "Account", - "lastEnabledTime": "2022-08-15T07:57:50.8197664Z" - } - } - }, - "minimumTlsVersion": "TLS1_0", - "networkAcls": { - "bypass": "AzureServices", - "defaultAction": "Allow", - "ipRules": [], - "virtualNetworkRules": [] + "sku": { + "name": "Standard_GZRS", + "tier": "Standard" }, - "primaryEndpoints": { - "blob": "https://storageaccount.blob.core.windows.net/", - "file": "https://storageaccount.file.core.windows.net/", - "queue": "https://storageaccount.queue.core.windows.net/", - "table": "https://storageaccount.table.core.windows.net/" + "kind": "StorageV2", + "id": "/subscriptions/subscriptionId1/resourceGroups/resourceGroup1/providers/resourceProvider1/resourceType1/resourceName1", + "name": "resourceName1", + "type": "resourceProvider1/resourceType1", + "location": "eastus", + "tags": { + "aaa": "aaaa", + "dfasdf": "dfsadfsf" }, - "primaryLocation": "westeurope", - "privateEndpointConnections": [], - "provisioningState": "Succeeded", - "statusOfPrimary": "available", - "supportsHttpsTrafficOnly": false + "properties": { + "defaultToOAuthAuthentication": false, + "keyCreationTime": { + "key1": "2021-04-15T20:12:24.1028866Z", + "key2": "2021-04-15T19:58:00.3691784Z" + }, + "privateEndpointConnections": [], + "minimumTlsVersion": "TLS1_0", + "allowBlobPublicAccess": true, + "allowSharedKeyAccess": true, + "networkAcls": { + "bypass": "AzureServices", + "virtualNetworkRules": [], + "ipRules": [], + "defaultAction": "Allow" + }, + "supportsHttpsTrafficOnly": true, + "encryption": { + "services": { + "file": { + "keyType": "Account", + "enabled": true, + "lastEnabledTime": "2021-04-15T19:58:00.3848008Z" + }, + "blob": { + "keyType": "Account", + "enabled": true, + "lastEnabledTime": "2021-04-15T19:58:00.3848008Z" + } + }, + "keySource": "Microsoft.Storage" + }, + "accessTier": "Hot", + "provisioningState": "Succeeded", + "creationTime": "2021-04-15T19:58:00.2285507Z", + "primaryEndpoints": { + "dfs": "https://resourceName1.dfs.core.windows.net/", + "web": "https://resourceName1.z13.web.core.windows.net/", + "blob": "https://resourceName1.blob.core.windows.net/", + "queue": "https://resourceName1.queue.core.windows.net/", + "table": "https://resourceName1.table.core.windows.net/", + "file": "https://resourceName1.file.core.windows.net/" + }, + "primaryLocation": "eastus", + "statusOfPrimary": "available", + "lastGeoFailoverTime": "2022-07-21T22:11:20.3670939Z", + "secondaryLocation": "westus", + "statusOfSecondary": "available" + } } } } From 5d3b73e109492c24b958c0eafd682e1c6b1783d2 Mon Sep 17 00:00:00 2001 From: Daniel Hu Date: Tue, 4 Oct 2022 19:51:31 -0700 Subject: [PATCH 11/13] comments --- .../preview/2022-11-01-preview/snapshots.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/snapshots.json b/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/snapshots.json index a4351441051d..e5f6d062e398 100644 --- a/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/snapshots.json +++ b/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/snapshots.json @@ -168,7 +168,8 @@ }, "content": { "description": "The actual ARM Resource", - "type": "object" + "type": "object", + "additionalProperties": true } } }, @@ -183,6 +184,9 @@ "value": { "description": "The list of snapshots", "type": "array", + "x-ms-identifiers": [ + "id" + ], "items": { "$ref": "#/definitions/Snapshot" } From c4b3e7e2b0cbb0f0e64f1d68ab303fdc6eacee8c Mon Sep 17 00:00:00 2001 From: Daniel Hu Date: Tue, 4 Oct 2022 20:01:42 -0700 Subject: [PATCH 12/13] comments --- .../preview/2022-11-01-preview/snapshots.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/snapshots.json b/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/snapshots.json index e5f6d062e398..6a43ffa5d152 100644 --- a/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/snapshots.json +++ b/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/snapshots.json @@ -168,8 +168,8 @@ }, "content": { "description": "The actual ARM Resource", - "type": "object", - "additionalProperties": true + "additionalProperties": true, + "type": "object" } } }, From abc25a3d26d89bb984755286ee7ed0e3d2145df1 Mon Sep 17 00:00:00 2001 From: Daniel Hu Date: Tue, 4 Oct 2022 20:06:44 -0700 Subject: [PATCH 13/13] comments --- .../preview/2022-11-01-preview/snapshots.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/snapshots.json b/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/snapshots.json index 6a43ffa5d152..678eb0c7ab00 100644 --- a/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/snapshots.json +++ b/specification/resources/resource-manager/Microsoft.Resources/preview/2022-11-01-preview/snapshots.json @@ -168,7 +168,7 @@ }, "content": { "description": "The actual ARM Resource", - "additionalProperties": true, + "additionalProperties": {}, "type": "object" } }