From 3373a52a54c963b0c2ef572726dedf27fbd69cee Mon Sep 17 00:00:00 2001 From: Charlie Li Date: Fri, 6 Aug 2021 17:57:58 -0700 Subject: [PATCH 1/7] Add CreationData property to Agentpool level in 2021-08-01 API --- .../examples/AgentPoolsCreate_Snapshot.json | 61 +++++ .../ManagedClustersCreate_Snapshot.json | 245 ++++++++++++++++++ .../stable/2021-08-01/managedClusters.json | 22 +- 3 files changed, 327 insertions(+), 1 deletion(-) create mode 100644 specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/AgentPoolsCreate_Snapshot.json create mode 100644 specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/ManagedClustersCreate_Snapshot.json diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/AgentPoolsCreate_Snapshot.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/AgentPoolsCreate_Snapshot.json new file mode 100644 index 000000000000..82c5194dfd13 --- /dev/null +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/AgentPoolsCreate_Snapshot.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "subscriptionId": "subid1", + "resourceGroupName": "rg1", + "resourceName": "clustername1", + "agentPoolName": "agentpool1", + "parameters": { + "properties": { + "orchestratorVersion": "", + "count": 3, + "vmSize": "Standard_DS2_v2", + "osType": "Linux", + "enableFIPS": true, + "creationData": { + "sourceResourceId": "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1" + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1", + "type": "Microsoft.ContainerService/managedClusters/agentPools", + "name": "agentpool1", + "properties": { + "provisioningState": "Succeeded", + "orchestratorVersion": "1.19.6", + "count": 3, + "vmSize": "Standard_DS2_v2", + "maxPods": 110, + "osType": "Linux", + "enableFIPS": true, + "creationData": { + "sourceResourceId": "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1" + } + } + } + }, + "201": { + "body": { + "id": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1", + "type": "Microsoft.ContainerService/managedClusters/agentPools", + "name": "agentpool1", + "properties": { + "provisioningState": "Creating", + "orchestratorVersion": "1.19.6", + "count": 3, + "vmSize": "Standard_DS2_v2", + "maxPods": 110, + "osType": "Linux", + "enableFIPS": true, + "creationData": { + "sourceResourceId": "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1" + } + } + } + } + } +} diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/ManagedClustersCreate_Snapshot.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/ManagedClustersCreate_Snapshot.json new file mode 100644 index 000000000000..8b5425d6476a --- /dev/null +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/ManagedClustersCreate_Snapshot.json @@ -0,0 +1,245 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "subscriptionId": "subid1", + "resourceGroupName": "rg1", + "resourceName": "clustername1", + "parameters": { + "location": "location1", + "tags": { + "tier": "production", + "archv2": "" + }, + "sku": { + "name": "Basic", + "tier": "Free" + }, + "properties": { + "kubernetesVersion": "", + "dnsPrefix": "dnsprefix1", + "agentPoolProfiles": [ + { + "name": "nodepool1", + "count": 3, + "vmSize": "Standard_DS2_v2", + "osType": "Linux", + "type": "VirtualMachineScaleSets", + "enableNodePublicIP": true, + "mode": "System", + "enableFIPS": true, + "creationData": { + "sourceResourceId": "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1" + } + } + ], + "linuxProfile": { + "adminUsername": "azureuser", + "ssh": { + "publicKeys": [ + { + "keyData": "keydata" + } + ] + } + }, + "networkProfile": { + "loadBalancerSku": "standard", + "outboundType": "loadBalancer", + "loadBalancerProfile": { + "managedOutboundIPs": { + "count": 2 + } + } + }, + "autoScalerProfile": { + "scan-interval": "20s", + "scale-down-delay-after-add": "15m" + }, + "windowsProfile": { + "adminUsername": "azureuser", + "adminPassword": "replacePassword1234$" + }, + "servicePrincipalProfile": { + "clientId": "clientid", + "secret": "secret" + }, + "addonProfiles": {}, + "enableRBAC": true, + "diskEncryptionSetID": "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "enablePodSecurityPolicy": false + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1", + "location": "location1", + "name": "clustername1", + "tags": { + "archv2": "", + "tier": "production" + }, + "type": "Microsoft.ContainerService/ManagedClusters", + "properties": { + "provisioningState": "Succeeded", + "maxAgentPools": 1, + "kubernetesVersion": "1.9.6", + "dnsPrefix": "dnsprefix1", + "agentPoolProfiles": [ + { + "name": "nodepool1", + "count": 3, + "vmSize": "Standard_DS2_v2", + "maxPods": 110, + "osType": "Linux", + "provisioningState": "Succeeded", + "orchestratorVersion": "1.9.6", + "type": "VirtualMachineScaleSets", + "enableNodePublicIP": true, + "mode": "System", + "nodeImageVersion": "AKSUbuntu:1604:2020.03.11", + "enableFIPS": true, + "creationData": { + "sourceResourceId": "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1" + } + } + ], + "linuxProfile": { + "adminUsername": "azureuser", + "ssh": { + "publicKeys": [ + { + "keyData": "keydata" + } + ] + } + }, + "windowsProfile": { + "adminUsername": "azureuser" + }, + "servicePrincipalProfile": { + "clientId": "clientid" + }, + "nodeResourceGroup": "MC_rg1_clustername1_location1", + "enableRBAC": true, + "diskEncryptionSetID": "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "enablePodSecurityPolicy": false, + "fqdn": "dnsprefix1-abcd1234.hcp.eastus.azmk8s.io", + "networkProfile": { + "loadBalancerSku": "basic", + "networkPlugin": "kubenet", + "podCidr": "10.244.0.0/16", + "serviceCidr": "10.0.0.0/16", + "dnsServiceIP": "10.0.0.10", + "dockerBridgeCidr": "172.17.0.1/16", + "outboundType": "loadBalancer", + "loadBalancerProfile": { + "allocatedOutboundPorts": 2000, + "idleTimeoutInMinutes": 10, + "managedOutboundIPs": { + "count": 2 + }, + "effectiveOutboundIPs": [ + { + "id": "/subscriptions/subid1/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1" + }, + { + "id": "/subscriptions/subid1/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2" + } + ] + } + }, + "autoScalerProfile": { + "scan-interval": "20s", + "scale-down-delay-after-add": "15m" + } + } + } + }, + "201": { + "body": { + "id": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1", + "location": "location1", + "name": "clustername1", + "tags": { + "archv2": "", + "tier": "production" + }, + "type": "Microsoft.ContainerService/ManagedClusters", + "properties": { + "provisioningState": "Creating", + "maxAgentPools": 1, + "kubernetesVersion": "1.9.6", + "dnsPrefix": "dnsprefix1", + "agentPoolProfiles": [ + { + "name": "nodepool1", + "count": 3, + "vmSize": "Standard_DS2_v2", + "maxPods": 110, + "osType": "Linux", + "provisioningState": "Creating", + "orchestratorVersion": "1.9.6", + "type": "VirtualMachineScaleSets", + "enableNodePublicIP": true, + "mode": "System", + "enableFIPS": true, + "creationData": { + "sourceResourceId": "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1" + } + } + ], + "linuxProfile": { + "adminUsername": "azureuser", + "ssh": { + "publicKeys": [ + { + "keyData": "keydata" + } + ] + } + }, + "windowsProfile": { + "adminUsername": "azureuser" + }, + "servicePrincipalProfile": { + "clientId": "clientid" + }, + "nodeResourceGroup": "MC_rg1_clustername1_location1", + "enableRBAC": true, + "diskEncryptionSetID": "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "enablePodSecurityPolicy": false, + "networkProfile": { + "networkPlugin": "kubenet", + "podCidr": "10.244.0.0/16", + "serviceCidr": "10.0.0.0/16", + "dnsServiceIP": "10.0.0.10", + "dockerBridgeCidr": "172.17.0.1/16", + "loadBalancerSku": "standard", + "outboundType": "loadBalancer", + "loadBalancerProfile": { + "allocatedOutboundPorts": 2000, + "idleTimeoutInMinutes": 10, + "managedOutboundIPs": { + "count": 2 + }, + "effectiveOutboundIPs": [ + { + "id": "/subscriptions/subid1/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1" + }, + { + "id": "/subscriptions/subid1/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2" + } + ] + } + }, + "autoScalerProfile": { + "scan-interval": "20s", + "scale-down-delay-after-add": "15m" + } + } + } + } + } +} diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/managedClusters.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/managedClusters.json index 0c68c6fd34fd..44c486a3afc8 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/managedClusters.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/managedClusters.json @@ -561,7 +561,10 @@ }, "Create Managed Cluster with user-assigned NAT gateway as outbound type": { "$ref": "./examples/ManagedClustersCreate_UserAssignedNATGateway.json" - } + }, + "Create Managed Cluster using a nodepool snapshot": { + "$ref": "./examples/ManagedClustersCreate_Snapshot.json" + }, } }, "patch": { @@ -1038,6 +1041,9 @@ }, "Create Agent Pool with FIPS enabled OS": { "$ref": "./examples/AgentPoolsCreate_EnableFIPS.json" + }, + "Create Agent Pool using a nodepool snapshot": { + "$ref": "./examples/AgentPoolsCreate_Snapshot.json" } } }, @@ -2496,6 +2502,10 @@ "gpuInstanceProfile": { "$ref": "#/definitions/GPUInstanceProfile", "description": "GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU." + }, + "creationData": { + "$ref": "#/definitions/CreationData", + "description": "CreationData to be used to specify the source Snapshot ID if the node pool will be created/upgraded using a snapshot." } }, "description": "Properties for the container service agent pool profile." @@ -5054,6 +5064,16 @@ } }, "description": "Azure Defender settings for the security profile." + }, + "CreationData": { + "description": "Data used when creating a target resource from a source resource.", + "type": "object", + "properties": { + "sourceResourceId": { + "type": "string", + "description": "This is the ARM ID of the source object to be used to create the target object." + } + } } }, "parameters": { From 841fa9a4b18ba016a9251daff72a48862d30c5c9 Mon Sep 17 00:00:00 2001 From: Charlie Li Date: Mon, 9 Aug 2021 14:12:00 -0700 Subject: [PATCH 2/7] Add snapshot related APIs and properties to AKS 2021-08-01 swagger --- .../2021-08-01/examples/SnapshotsCreate.json | 49 +++ .../2021-08-01/examples/SnapshotsDelete.json | 11 + .../2021-08-01/examples/SnapshotsGet.json | 37 +++ .../SnapshotsListByResourceGroup.json | 36 +++ .../examples/SnapshotsListBySubscription.json | 35 +++ .../stable/2021-08-01/managedClusters.json | 278 ++++++++++++++++++ 6 files changed, 446 insertions(+) create mode 100644 specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsCreate.json create mode 100644 specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsDelete.json create mode 100644 specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsGet.json create mode 100644 specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsListByResourceGroup.json create mode 100644 specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsListBySubscription.json diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsCreate.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsCreate.json new file mode 100644 index 000000000000..d36be6284d68 --- /dev/null +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsCreate.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "subscriptionId": "subid1", + "resourceGroupName": "rg1", + "resourceName": "snapshot1", + "parameters": { + "location": "westus", + "tags": { + "key1": "val1", + "key2": "val2" + }, + "properties": { + "creationData": { + "sourceResourceId": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1/agentPools/pool0" + } + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "snapshot1", + "id": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1", + "type": "Microsoft.ContainerService/Snapshots", + "location": "westus", + "tags": { + "key1": "val1", + "key2": "val2" + }, + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2021-08-09T20:13:23.298420761Z" + }, + "properties": { + "creationData": { + "sourceResourceId": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1/agentPools/pool0" + }, + "snapshotType": "Nodepool" + } + } + ] + } + } + } +} diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsDelete.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsDelete.json new file mode 100644 index 000000000000..48fd91286a00 --- /dev/null +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsDelete.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "subscriptionId": "subid1", + "resourceGroupName": "rg1", + "resourceName": "snapshot1" + }, + "responses": { + "200": {} + } +} diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsGet.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsGet.json new file mode 100644 index 000000000000..5cc93e8e84f1 --- /dev/null +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsGet.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "subscriptionId": "subid1", + "resourceGroupName": "rg1", + "resourceName": "snapshot1" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "snapshot1", + "id": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1", + "type": "Microsoft.ContainerService/Snapshots", + "location": "westus", + "tags": { + "key1": "val1", + "key2": "val2" + }, + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2021-08-09T20:13:23.298420761Z" + }, + "properties": { + "creationData": { + "sourceResourceId": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1/agentPools/pool0" + }, + "snapshotType": "Nodepool" + } + } + ] + } + } + } +} diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsListByResourceGroup.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsListByResourceGroup.json new file mode 100644 index 000000000000..41d5af8a6ee7 --- /dev/null +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsListByResourceGroup.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "subscriptionId": "subid1", + "resourceGroupName": "rg1" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "snapshot1", + "id": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1", + "type": "Microsoft.ContainerService/Snapshots", + "location": "westus", + "tags": { + "key1": "val1", + "key2": "val2" + }, + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2021-08-09T20:13:23.298420761Z" + }, + "properties": { + "creationData": { + "sourceResourceId": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1/agentPools/pool0" + }, + "snapshotType": "Nodepool" + } + } + ] + } + } + } +} diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsListBySubscription.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsListBySubscription.json new file mode 100644 index 000000000000..6b9bf0d15ef3 --- /dev/null +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsListBySubscription.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "subscriptionId": "subid1" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "snapshot1", + "id": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1", + "type": "Microsoft.ContainerService/Snapshots", + "location": "westus", + "tags": { + "key1": "val1", + "key2": "val2" + }, + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2021-08-09T20:13:23.298420761Z" + }, + "properties": { + "creationData": { + "sourceResourceId": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1/agentPools/pool0" + }, + "snapshotType": "Nodepool" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/managedClusters.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/managedClusters.json index 1171c5fce6d1..98fc787bd3a0 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/managedClusters.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/managedClusters.json @@ -1920,6 +1920,217 @@ "nextLinkName": "nextLink" } } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/snapshots": { + "get": { + "tags": [ + "Snapshots" + ], + "operationId": "Snapshots_ListBySubscription", + "summary": "Gets a list of snapshots in the specified subscription.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/SnapshotListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List Snapshots": { + "$ref": "./examples/SnapshotsListBySubscription.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots": { + "get": { + "tags": [ + "Snapshots" + ], + "operationId": "Snapshots_ListByResourceGroup", + "summary": "Lists snapshots in the specified subscription and resource group.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/SnapshotListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List Snapshots by Resource Group": { + "$ref": "./examples/SnapshotsListByResourceGroup.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}": { + "get": { + "tags": [ + "Snapshots" + ], + "operationId": "Snapshots_Get", + "summary": "Gets a snapshot.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ResourceNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Snapshot" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "Get Snapshot": { + "$ref": "./examples/SnapshotsGet.json" + } + } + }, + "put": { + "tags": [ + "Snapshots" + ], + "operationId": "Snapshots_CreateOrUpdate", + "summary": "Creates a snapshot.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ResourceNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Snapshot" + }, + "description": "The snapshot to create or update." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Snapshot" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-long-running-operation": false, + "x-ms-examples": { + "Create/Update Snapshot": { + "$ref": "./examples/SnapshotsCreate.json" + } + } + }, + "delete": { + "tags": [ + "Snapshots" + ], + "operationId": "Snapshots_Delete", + "summary": "Deletes a snapshot.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ResourceNameParameter" + } + ], + "responses": { + "200": { + "description": "OK" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-long-running-operation": false, + "x-ms-examples": { + "Delete Snapshot": { + "$ref": "./examples/SnapshotsDelete.json" + } + } + } } }, "definitions": { @@ -5082,6 +5293,73 @@ "description": "This is the ARM ID of the source object to be used to create the target object." } } + }, + "SnapshotListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Snapshot" + }, + "description": "The list of snapshots." + }, + "nextLink": { + "type": "string", + "description": "The URL to get the next set of snapshot results.", + "readOnly": true + } + }, + "description": "The response from the List Snapshots operation." + }, + "Snapshot": { + "properties": { + "systemData": { + "$ref": "#/definitions/SystemData", + "readOnly": true, + "description": "The system metadata relating to this snapshot." + }, + "properties": { + "description": "Properties of a snapshot.", + "$ref": "#/definitions/SnapshotProperties", + "x-ms-client-flatten": true + } + }, + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "description": "Snapshot." + }, + "SnapshotProperties": { + "properties": { + "creationData": { + "$ref": "#/definitions/CreationData", + "description": "CreationData to be used to specify the source agent pool resource ID to create this snapshot." + }, + "snapshotType": { + "$ref": "#/definitions/SnapshotType" + } + }, + "description": "Properties used to configure an agent pool snapshot." + }, + "SnapshotType": { + "type": "string", + "default": "Nodepool", + "enum": [ + "Nodepool" + ], + "x-ms-enum": { + "name": "SnapshotType", + "modelAsString": true, + "values": [ + { + "value": "Nodepool", + "description": "The snapshot is a snapshot of a node pool." + } + ] + }, + "description": "The type of a snapshot. The default is Nodepool." } }, "parameters": { From 96b1eaa191edd8180a762c2637f4677a8ee588cf Mon Sep 17 00:00:00 2001 From: Charlie Li Date: Mon, 9 Aug 2021 15:13:07 -0700 Subject: [PATCH 3/7] fix lint and spell checks --- custom-words.txt | 1 + .../2021-08-01/examples/SnapshotsDelete.json | 3 +- .../examples/SnapshotsUpdateTags.json | 43 ++++++++++++++ .../stable/2021-08-01/managedClusters.json | 58 ++++++++++++++++++- 4 files changed, 103 insertions(+), 2 deletions(-) create mode 100644 specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsUpdateTags.json diff --git a/custom-words.txt b/custom-words.txt index cfe6420bea89..4ad0a1a9de0c 100644 --- a/custom-words.txt +++ b/custom-words.txt @@ -2259,3 +2259,4 @@ XLSM DOCM multislot Tebibytes +Nodepool diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsDelete.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsDelete.json index 48fd91286a00..5db108e83393 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsDelete.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsDelete.json @@ -6,6 +6,7 @@ "resourceName": "snapshot1" }, "responses": { - "200": {} + "200": {}, + "204": {} } } diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsUpdateTags.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsUpdateTags.json new file mode 100644 index 000000000000..40dec766cc44 --- /dev/null +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsUpdateTags.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "subscriptionId": "subid1", + "resourceGroupName": "rg1", + "resourceName": "snapshot1", + "parameters": { + "tags": { + "key2": "new-val2", + "key3": "val3" + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "snapshot1", + "id": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1", + "type": "Microsoft.ContainerService/Snapshots", + "location": "westus", + "tags": { + "key2": "new-val2", + "key3": "val3" + }, + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2021-08-09T20:13:23.298420761Z" + }, + "properties": { + "creationData": { + "sourceResourceId": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1/agentPools/pool0" + }, + "snapshotType": "Nodepool" + } + } + ] + } + } + } +} diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/managedClusters.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/managedClusters.json index 98fc787bd3a0..8655da9ce5ff 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/managedClusters.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/managedClusters.json @@ -2093,6 +2093,56 @@ } } }, + "patch": { + "tags": [ + "Snapshots" + ], + "operationId": "Snapshots_UpdateTags", + "summary": "Updates tags on a snapshot.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ResourceNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/TagsObject" + }, + "description": "Parameters supplied to the Update snapshot Tags operation." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Snapshot" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-long-running-operation": false, + "x-ms-examples": { + "Update Snapshot Tags": { + "$ref": "./examples/SnapshotsUpdateTags.json" + } + } + }, "delete": { "tags": [ "Snapshots" @@ -2117,6 +2167,9 @@ "200": { "description": "OK" }, + "204": { + "description": "NoContent" + }, "default": { "description": "Error response describing why the operation failed.", "schema": { @@ -5295,6 +5348,7 @@ } }, "SnapshotListResult": { + "type": "object", "properties": { "value": { "type": "array", @@ -5312,6 +5366,7 @@ "description": "The response from the List Snapshots operation." }, "Snapshot": { + "type": "object", "properties": { "systemData": { "$ref": "#/definitions/SystemData", @@ -5329,9 +5384,10 @@ "$ref": "#/definitions/Resource" } ], - "description": "Snapshot." + "description": "An agent pool snapshot resource." }, "SnapshotProperties": { + "type": "object", "properties": { "creationData": { "$ref": "#/definitions/CreationData", From 197ed037c42bb622e580046a36e1d2fdb992b887 Mon Sep 17 00:00:00 2001 From: Charlie Li Date: Mon, 9 Aug 2021 15:49:23 -0700 Subject: [PATCH 4/7] fix lint and spell checks --- .../2021-08-01/examples/SnapshotsCreate.json | 42 +++++++++---------- .../2021-08-01/examples/SnapshotsGet.json | 42 +++++++++---------- ...BySubscription.json => SnapshotsList.json} | 0 .../examples/SnapshotsUpdateTags.json | 42 +++++++++---------- .../stable/2021-08-01/managedClusters.json | 4 +- 5 files changed, 59 insertions(+), 71 deletions(-) rename specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/{SnapshotsListBySubscription.json => SnapshotsList.json} (100%) diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsCreate.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsCreate.json index d36be6284d68..529c43ec4889 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsCreate.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsCreate.json @@ -20,29 +20,25 @@ "responses": { "200": { "body": { - "value": [ - { - "name": "snapshot1", - "id": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1", - "type": "Microsoft.ContainerService/Snapshots", - "location": "westus", - "tags": { - "key1": "val1", - "key2": "val2" - }, - "systemData": { - "createdBy": "user1", - "createdByType": "User", - "createdAt": "2021-08-09T20:13:23.298420761Z" - }, - "properties": { - "creationData": { - "sourceResourceId": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1/agentPools/pool0" - }, - "snapshotType": "Nodepool" - } - } - ] + "name": "snapshot1", + "id": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1", + "type": "Microsoft.ContainerService/Snapshots", + "location": "westus", + "tags": { + "key1": "val1", + "key2": "val2" + }, + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2021-08-09T20:13:23.298420761Z" + }, + "properties": { + "creationData": { + "sourceResourceId": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1/agentPools/pool0" + }, + "snapshotType": "Nodepool" + } } } } diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsGet.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsGet.json index 5cc93e8e84f1..da7e22ea2149 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsGet.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsGet.json @@ -8,29 +8,25 @@ "responses": { "200": { "body": { - "value": [ - { - "name": "snapshot1", - "id": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1", - "type": "Microsoft.ContainerService/Snapshots", - "location": "westus", - "tags": { - "key1": "val1", - "key2": "val2" - }, - "systemData": { - "createdBy": "user1", - "createdByType": "User", - "createdAt": "2021-08-09T20:13:23.298420761Z" - }, - "properties": { - "creationData": { - "sourceResourceId": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1/agentPools/pool0" - }, - "snapshotType": "Nodepool" - } - } - ] + "name": "snapshot1", + "id": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1", + "type": "Microsoft.ContainerService/Snapshots", + "location": "westus", + "tags": { + "key1": "val1", + "key2": "val2" + }, + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2021-08-09T20:13:23.298420761Z" + }, + "properties": { + "creationData": { + "sourceResourceId": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1/agentPools/pool0" + }, + "snapshotType": "Nodepool" + } } } } diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsListBySubscription.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsList.json similarity index 100% rename from specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsListBySubscription.json rename to specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsList.json diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsUpdateTags.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsUpdateTags.json index 40dec766cc44..07e8c1412cd9 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsUpdateTags.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsUpdateTags.json @@ -14,29 +14,25 @@ "responses": { "200": { "body": { - "value": [ - { - "name": "snapshot1", - "id": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1", - "type": "Microsoft.ContainerService/Snapshots", - "location": "westus", - "tags": { - "key2": "new-val2", - "key3": "val3" - }, - "systemData": { - "createdBy": "user1", - "createdByType": "User", - "createdAt": "2021-08-09T20:13:23.298420761Z" - }, - "properties": { - "creationData": { - "sourceResourceId": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1/agentPools/pool0" - }, - "snapshotType": "Nodepool" - } - } - ] + "name": "snapshot1", + "id": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1", + "type": "Microsoft.ContainerService/Snapshots", + "location": "westus", + "tags": { + "key1": "val1", + "key2": "val2" + }, + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2021-08-09T20:13:23.298420761Z" + }, + "properties": { + "creationData": { + "sourceResourceId": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1/agentPools/pool0" + }, + "snapshotType": "Nodepool" + } } } } diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/managedClusters.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/managedClusters.json index 8655da9ce5ff..382fded96711 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/managedClusters.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/managedClusters.json @@ -1926,7 +1926,7 @@ "tags": [ "Snapshots" ], - "operationId": "Snapshots_ListBySubscription", + "operationId": "Snapshots_List", "summary": "Gets a list of snapshots in the specified subscription.", "parameters": [ { @@ -1955,7 +1955,7 @@ }, "x-ms-examples": { "List Snapshots": { - "$ref": "./examples/SnapshotsListBySubscription.json" + "$ref": "./examples/SnapshotsList.json" } } } From 82c8e2a9b45db864b586a3fc68253587316afa3c Mon Sep 17 00:00:00 2001 From: Charlie Li Date: Mon, 9 Aug 2021 16:09:56 -0700 Subject: [PATCH 5/7] fix PrettierCheck --- .../stable/2021-08-01/examples/SnapshotsList.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsList.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsList.json index 6b9bf0d15ef3..d60c0cab3a30 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsList.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsList.json @@ -32,4 +32,4 @@ } } } -} \ No newline at end of file +} From e317307644de8e922cfc580aecf09bc11524d7eb Mon Sep 17 00:00:00 2001 From: Charlie Li Date: Tue, 10 Aug 2021 21:00:35 -0700 Subject: [PATCH 6/7] Change some Nodepool to NodePool --- custom-words.txt | 2 +- .../2021-08-01/examples/SnapshotsCreate.json | 2 +- .../stable/2021-08-01/examples/SnapshotsGet.json | 2 +- .../stable/2021-08-01/examples/SnapshotsList.json | 2 +- .../examples/SnapshotsListByResourceGroup.json | 2 +- .../2021-08-01/examples/SnapshotsUpdateTags.json | 2 +- .../stable/2021-08-01/managedClusters.json | 14 +++++++------- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/custom-words.txt b/custom-words.txt index 4ad0a1a9de0c..56144162c328 100644 --- a/custom-words.txt +++ b/custom-words.txt @@ -2259,4 +2259,4 @@ XLSM DOCM multislot Tebibytes -Nodepool +NodePool diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsCreate.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsCreate.json index 529c43ec4889..f4c4202b44e7 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsCreate.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsCreate.json @@ -37,7 +37,7 @@ "creationData": { "sourceResourceId": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1/agentPools/pool0" }, - "snapshotType": "Nodepool" + "snapshotType": "NodePool" } } } diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsGet.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsGet.json index da7e22ea2149..b8f0bacfc973 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsGet.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsGet.json @@ -25,7 +25,7 @@ "creationData": { "sourceResourceId": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1/agentPools/pool0" }, - "snapshotType": "Nodepool" + "snapshotType": "NodePool" } } } diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsList.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsList.json index d60c0cab3a30..dafca72b4df6 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsList.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsList.json @@ -25,7 +25,7 @@ "creationData": { "sourceResourceId": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1/agentPools/pool0" }, - "snapshotType": "Nodepool" + "snapshotType": "NodePool" } } ] diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsListByResourceGroup.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsListByResourceGroup.json index 41d5af8a6ee7..89b58abe2329 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsListByResourceGroup.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsListByResourceGroup.json @@ -26,7 +26,7 @@ "creationData": { "sourceResourceId": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1/agentPools/pool0" }, - "snapshotType": "Nodepool" + "snapshotType": "NodePool" } } ] diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsUpdateTags.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsUpdateTags.json index 07e8c1412cd9..d0f4396951d8 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsUpdateTags.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsUpdateTags.json @@ -31,7 +31,7 @@ "creationData": { "sourceResourceId": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1/agentPools/pool0" }, - "snapshotType": "Nodepool" + "snapshotType": "NodePool" } } } diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/managedClusters.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/managedClusters.json index bec16008d52e..29ff0b1bdc73 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/managedClusters.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/managedClusters.json @@ -2048,7 +2048,7 @@ "Snapshots" ], "operationId": "Snapshots_CreateOrUpdate", - "summary": "Creates a snapshot.", + "summary": "Creates or updates a snapshot.", "parameters": [ { "$ref": "#/parameters/ApiVersionParameter" @@ -5388,7 +5388,7 @@ "$ref": "#/definitions/Resource" } ], - "description": "An agent pool snapshot resource." + "description": "A node pool snapshot resource." }, "SnapshotProperties": { "type": "object", @@ -5401,25 +5401,25 @@ "$ref": "#/definitions/SnapshotType" } }, - "description": "Properties used to configure an agent pool snapshot." + "description": "Properties used to configure a node pool snapshot." }, "SnapshotType": { "type": "string", - "default": "Nodepool", + "default": "NodePool", "enum": [ - "Nodepool" + "NodePool" ], "x-ms-enum": { "name": "SnapshotType", "modelAsString": true, "values": [ { - "value": "Nodepool", + "value": "NodePool", "description": "The snapshot is a snapshot of a node pool." } ] }, - "description": "The type of a snapshot. The default is Nodepool." + "description": "The type of a snapshot. The default is NodePool." } }, "parameters": { From 812b9a9090bb3bed09016dade8b29c9038b10b55 Mon Sep 17 00:00:00 2001 From: Charlie Li Date: Wed, 11 Aug 2021 18:01:10 -0700 Subject: [PATCH 7/7] some changes according to ARM team's review comments --- .../2021-08-01/examples/SnapshotsCreate.json | 23 +++++++++++++++++++ .../stable/2021-08-01/managedClusters.json | 9 +++++--- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsCreate.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsCreate.json index f4c4202b44e7..562c800c041f 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsCreate.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/examples/SnapshotsCreate.json @@ -40,6 +40,29 @@ "snapshotType": "NodePool" } } + }, + "201": { + "body": { + "name": "snapshot1", + "id": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1", + "type": "Microsoft.ContainerService/Snapshots", + "location": "westus", + "tags": { + "key1": "val1", + "key2": "val2" + }, + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2021-08-09T20:13:23.298420761Z" + }, + "properties": { + "creationData": { + "sourceResourceId": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1/agentPools/pool0" + }, + "snapshotType": "NodePool" + } + } } } } diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/managedClusters.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/managedClusters.json index 29ff0b1bdc73..2c915f97670e 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/managedClusters.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-08-01/managedClusters.json @@ -2079,6 +2079,12 @@ "$ref": "#/definitions/Snapshot" } }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/Snapshot" + } + }, "default": { "description": "Error response describing why the operation failed.", "schema": { @@ -2086,7 +2092,6 @@ } } }, - "x-ms-long-running-operation": false, "x-ms-examples": { "Create/Update Snapshot": { "$ref": "./examples/SnapshotsCreate.json" @@ -2136,7 +2141,6 @@ } } }, - "x-ms-long-running-operation": false, "x-ms-examples": { "Update Snapshot Tags": { "$ref": "./examples/SnapshotsUpdateTags.json" @@ -2177,7 +2181,6 @@ } } }, - "x-ms-long-running-operation": false, "x-ms-examples": { "Delete Snapshot": { "$ref": "./examples/SnapshotsDelete.json"