From 0c9dd496723120df181f1b93f7244d0b577d26e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magdalena=20Bia=C5=82ecka?= <2598290+mbialecka@users.noreply.github.com> Date: Tue, 18 May 2021 11:33:45 -0700 Subject: [PATCH 01/11] Adds base for updating Microsoft.AzureStackHCI from version stable/2020-10-01 to version 2021-01-01-preview --- .../2021-01-01-preview/azurestackhci.json | 636 ++++++++++++++++++ .../examples/CreateCluster.json | 36 + .../examples/DeleteCluster.json | 12 + .../examples/GetCluster.json | 72 ++ .../examples/ListClustersByResourceGroup.json | 92 +++ .../examples/ListClustersBySubscription.json | 91 +++ .../examples/UpdateCluster.json | 81 +++ 7 files changed, 1020 insertions(+) create mode 100644 specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/azurestackhci.json create mode 100644 specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/CreateCluster.json create mode 100644 specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/DeleteCluster.json create mode 100644 specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/GetCluster.json create mode 100644 specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/ListClustersByResourceGroup.json create mode 100644 specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/ListClustersBySubscription.json create mode 100644 specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/UpdateCluster.json diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/azurestackhci.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/azurestackhci.json new file mode 100644 index 000000000000..7971c98d0d30 --- /dev/null +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/azurestackhci.json @@ -0,0 +1,636 @@ +{ + "swagger": "2.0", + "info": { + "version": "2020-10-01", + "title": "AzureStackHCI", + "description": "Azure Stack HCI management service" + }, + "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": { + "/providers/Microsoft.AzureStackHCI/operations": { + "get": { + "tags": [ + "Operations" + ], + "operationId": "Operations_List", + "description": "List all available Microsoft.AzureStackHCI provider operations", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/AvailableOperations" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/clusters": { + "get": { + "tags": [ + "Clusters" + ], + "operationId": "Clusters_ListBySubscription", + "x-ms-examples": { + "List clusters in a given subscription": { + "$ref": "./examples/ListClustersBySubscription.json" + } + }, + "description": "List all HCI clusters in a subscription.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ClusterList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters": { + "get": { + "tags": [ + "Clusters" + ], + "operationId": "Clusters_ListByResourceGroup", + "x-ms-examples": { + "List clusters in a given resource group": { + "$ref": "./examples/ListClustersByResourceGroup.json" + } + }, + "description": "List all HCI clusters in a resource group.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ClusterList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}": { + "get": { + "tags": [ + "Clusters" + ], + "operationId": "Clusters_Get", + "x-ms-examples": { + "Get cluster": { + "$ref": "./examples/GetCluster.json" + } + }, + "description": "Get HCI cluster.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ClusterNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Cluster" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "tags": [ + "Clusters" + ], + "operationId": "Clusters_Create", + "x-ms-examples": { + "Create cluster": { + "$ref": "./examples/CreateCluster.json" + } + }, + "description": "Create an HCI cluster.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ClusterNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "cluster", + "in": "body", + "description": "Details of the HCI cluster.", + "required": true, + "schema": { + "$ref": "#/definitions/Cluster" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Cluster" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + }, + "patch": { + "tags": [ + "Clusters" + ], + "operationId": "Clusters_Update", + "x-ms-examples": { + "Update cluster": { + "$ref": "./examples/UpdateCluster.json" + } + }, + "description": "Update an HCI cluster.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ClusterNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "cluster", + "in": "body", + "description": "Details of the HCI cluster.", + "required": true, + "schema": { + "$ref": "#/definitions/ClusterUpdate" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Cluster" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "tags": [ + "Clusters" + ], + "operationId": "Clusters_Delete", + "x-ms-examples": { + "Delete cluster": { + "$ref": "./examples/DeleteCluster.json" + } + }, + "description": "Delete an HCI cluster.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ClusterNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK" + }, + "204": { + "description": "No content" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": { + "ClusterList": { + "description": "List of clusters.", + "type": "object", + "properties": { + "value": { + "description": "List of clusters.", + "type": "array", + "items": { + "$ref": "#/definitions/Cluster" + } + }, + "nextLink": { + "description": "Link to the next set of results.", + "type": "string", + "readOnly": true + } + } + }, + "Cluster": { + "description": "Cluster details.", + "type": "object", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/TrackedResource" + } + ], + "properties": { + "systemData": { + "description": "System data of Cluster resource", + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData", + "x-ms-client-flatten": true, + "readOnly": true + }, + "properties": { + "description": "Cluster properties.", + "$ref": "#/definitions/ClusterProperties", + "x-ms-client-flatten": true + } + } + }, + "ClusterProperties": { + "description": "Cluster properties.", + "type": "object", + "required": [ + "aadClientId", + "aadTenantId" + ], + "properties": { + "provisioningState": { + "description": "Provisioning state.", + "type": "string", + "enum": [ + "Succeeded", + "Failed", + "Canceled", + "Accepted", + "Provisioning" + ], + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": true + }, + "readOnly": true + }, + "status": { + "description": "Status of the cluster agent.", + "type": "string", + "enum": [ + "NotYetRegistered", + "ConnectedRecently", + "NotConnectedRecently", + "Disconnected", + "Error" + ], + "x-ms-enum": { + "name": "Status", + "modelAsString": true + }, + "readOnly": true + }, + "cloudId": { + "description": "Unique, immutable resource id.", + "type": "string", + "readOnly": true + }, + "aadClientId": { + "description": "App id of cluster AAD identity.", + "type": "string" + }, + "aadTenantId": { + "description": "Tenant id of cluster AAD identity.", + "type": "string" + }, + "reportedProperties": { + "description": "Properties reported by cluster agent.", + "$ref": "#/definitions/ClusterReportedProperties" + }, + "trialDaysRemaining": { + "description": "Number of days remaining in the trial period.", + "type": "number", + "readOnly": true + }, + "billingModel": { + "description": "Type of billing applied to the resource.", + "type": "string", + "readOnly": true + }, + "registrationTimestamp": { + "description": "First cluster sync timestamp.", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "lastSyncTimestamp": { + "description": "Most recent cluster sync timestamp.", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "lastBillingTimestamp": { + "description": "Most recent billing meter timestamp.", + "type": "string", + "format": "date-time", + "readOnly": true + } + } + }, + "ClusterReportedProperties": { + "description": "Properties reported by cluster agent.", + "type": "object", + "properties": { + "clusterName": { + "description": "Name of the on-prem cluster connected to this resource.", + "type": "string", + "readOnly": true + }, + "clusterId": { + "description": "Unique id generated by the on-prem cluster.", + "type": "string", + "readOnly": true + }, + "clusterVersion": { + "description": "Version of the cluster software.", + "type": "string", + "readOnly": true + }, + "nodes": { + "description": "List of nodes reported by the cluster.", + "type": "array", + "items": { + "$ref": "#/definitions/ClusterNode" + }, + "readOnly": true + }, + "lastUpdated": { + "description": "Last time the cluster reported the data.", + "type": "string", + "format": "date-time", + "readOnly": true + } + } + }, + "ClusterNode": { + "description": "Cluster node details.", + "type": "object", + "properties": { + "name": { + "description": "Name of the cluster node.", + "type": "string", + "readOnly": true + }, + "id": { + "description": "Id of the node in the cluster.", + "type": "number", + "readOnly": true + }, + "manufacturer": { + "description": "Manufacturer of the cluster node hardware.", + "type": "string", + "readOnly": true + }, + "model": { + "description": "Model name of the cluster node hardware.", + "type": "string", + "readOnly": true + }, + "osName": { + "description": "Operating system running on the cluster node.", + "type": "string", + "readOnly": true + }, + "osVersion": { + "description": "Version of the operating system running on the cluster node.", + "type": "string", + "readOnly": true + }, + "serialNumber": { + "description": "Immutable id of the cluster node.", + "type": "string", + "readOnly": true + }, + "coreCount": { + "description": "Number of physical cores on the cluster node.", + "type": "number", + "readOnly": true + }, + "memoryInGiB": { + "description": "Total available memory on the cluster node (in GiB).", + "type": "number", + "readOnly": true + } + } + }, + "ClusterUpdate": { + "description": "Cluster details to update.", + "type": "object", + "properties": { + "tags": { + "description": "Resource tags.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "AvailableOperations": { + "description": "Available operations of the service", + "type": "object", + "properties": { + "value": { + "description": "Collection of available operation details", + "uniqueItems": false, + "type": "array", + "items": { + "$ref": "#/definitions/OperationDetail" + } + }, + "nextLink": { + "description": "URL client should use to fetch the next page (per server side paging).\r\nIt's null for now, added for future use.", + "type": "string" + } + } + }, + "OperationDetail": { + "description": "Operation detail payload", + "type": "object", + "properties": { + "name": { + "description": "Name of the operation", + "type": "string" + }, + "isDataAction": { + "description": "Indicates whether the operation is a data action", + "type": "boolean" + }, + "display": { + "$ref": "#/definitions/OperationDisplay", + "description": "Display of the operation" + }, + "origin": { + "description": "Origin of the operation", + "type": "string" + }, + "properties": { + "$ref": "#/definitions/OperationProperties", + "description": "Properties of the operation" + } + } + }, + "OperationDisplay": { + "description": "Operation display payload", + "type": "object", + "properties": { + "provider": { + "description": "Resource provider of the operation", + "type": "string" + }, + "resource": { + "description": "Resource of the operation", + "type": "string" + }, + "operation": { + "description": "Localized friendly name for the operation", + "type": "string" + }, + "description": { + "description": "Localized friendly description for the operation", + "type": "string" + } + } + }, + "OperationProperties": { + "description": "Operation properties.", + "type": "object", + "properties": {} + } + }, + "parameters": { + "ClusterNameParameter": { + "name": "clusterName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the cluster.", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/CreateCluster.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/CreateCluster.json new file mode 100644 index 000000000000..c41cd8a2e52e --- /dev/null +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/CreateCluster.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "subscriptionId": "fd3c3665-1729-4b7b-9a38-238e83b0f98b", + "resourceGroupName": "test-rg", + "clusterName": "myCluster", + "api-version": "2020-10-01", + "cluster": { + "location": "East US", + "properties": { + "aadClientId": "24a6e53d-04e5-44d2-b7cc-1b732a847dfc", + "aadTenantId": "7e589cc1-a8b6-4dff-91bd-5ec0fa18db94" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/test-rg/providers/Microsoft.AzureStackHCI/clusters/myCluster", + "name": "myCluster", + "type": "Microsoft.AzureStackHCI/clusters", + "location": "East US", + "tags": {}, + "properties": { + "provisioningState": "Succeeded", + "status": "NotYetRegistered", + "cloudId": "a3c0468f-e38e-4dda-ac48-817f620536f0", + "aadClientId": "24a6e53d-04e5-44d2-b7cc-1b732a847dfc", + "aadTenantId": "7e589cc1-a8b6-4dff-91bd-5ec0fa18db94", + "reportedProperties": {}, + "trialDaysRemaining": 30, + "billingModel": "Trial" + } + } + } + } +} diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/DeleteCluster.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/DeleteCluster.json new file mode 100644 index 000000000000..b0a231f2d232 --- /dev/null +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/DeleteCluster.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "subscriptionId": "fd3c3665-1729-4b7b-9a38-238e83b0f98b", + "resourceGroupName": "test-rg", + "clusterName": "myCluster", + "api-version": "2020-10-01" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/GetCluster.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/GetCluster.json new file mode 100644 index 000000000000..449f80e35488 --- /dev/null +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/GetCluster.json @@ -0,0 +1,72 @@ +{ + "parameters": { + "subscriptionId": "fd3c3665-1729-4b7b-9a38-238e83b0f98b", + "resourceGroupName": "test-rg", + "clusterName": "myCluster", + "api-version": "2020-10-01" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/test-rg/providers/Microsoft.AzureStackHCI/clusters/myCluster", + "name": "myCluster", + "type": "Microsoft.AzureStackHCI/clusters", + "location": "East US", + "tags": {}, + "properties": { + "provisioningState": "Succeeded", + "status": "ConnectedRecently", + "cloudId": "a3c0468f-e38e-4dda-ac48-817f620536f0", + "aadClientId": "24a6e53d-04e5-44d2-b7cc-1b732a847dfc", + "aadTenantId": "7e589cc1-a8b6-4dff-91bd-5ec0fa18db94", + "reportedProperties": { + "clusterName": "cluster1", + "clusterId": "a76ac23a-1819-4e82-9410-e3e4ec3d1425", + "clusterVersion": "10.0.17777", + "nodes": [ + { + "name": "Node1", + "id": 1, + "manufacturer": "Dell Inc.", + "model": "EMC AX740", + "osName": "Azure Stack HCI", + "osVersion": "10.0.17777.1061", + "serialNumber": "Q45CZC3", + "coreCount": 8, + "memoryInGiB": 128 + }, + { + "name": "Node2", + "id": 2, + "manufacturer": "Dell Inc.", + "model": "EMC AX740", + "osName": "Azure Stack HCI", + "osVersion": "10.0.17777.1061", + "serialNumber": "Q44BSC3", + "coreCount": 8, + "memoryInGiB": 128 + }, + { + "name": "Node3", + "id": 3, + "manufacturer": "Dell Inc.", + "model": "EMC AX740", + "osName": "Azure Stack HCI", + "osVersion": "10.0.17777.1061", + "serialNumber": "Q44RFC3", + "coreCount": 16, + "memoryInGiB": 256 + } + ], + "lastUpdated": "2020-03-11T19:24:42.1946017Z" + }, + "trialDaysRemaining": 30, + "billingModel": "Trial", + "registrationTimestamp": "2020-03-11T20:44:32.5625121Z", + "lastSyncTimestamp": "2020-03-11T20:44:32.5625121Z", + "lastBillingTimestamp": "2020-03-12T08:12:55.2312022Z" + } + } + } + } +} diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/ListClustersByResourceGroup.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/ListClustersByResourceGroup.json new file mode 100644 index 000000000000..fd2dcdcf0015 --- /dev/null +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/ListClustersByResourceGroup.json @@ -0,0 +1,92 @@ +{ + "parameters": { + "subscriptionId": "fd3c3665-1729-4b7b-9a38-238e83b0f98b", + "resourceGroupName": "test-rg", + "api-version": "2020-10-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/test-rg/providers/Microsoft.AzureStackHCI/clusters/myCluster1", + "name": "myCluster1", + "type": "Microsoft.AzureStackHCI/clusters", + "location": "East US", + "tags": {}, + "properties": { + "provisioningState": "Succeeded", + "status": "NotYetRegistered", + "cloudId": "91c2b355-4826-4e96-9164-e3f26dcf1cdd", + "aadClientId": "515da1c2-379e-49b4-9975-09e3e40c86be", + "aadTenantId": "7e589cc1-a8b6-4dff-91bd-5ec0fa18db94", + "reportedProperties": {}, + "trialDaysRemaining": 29, + "billingModel": "Trial" + } + }, + { + "id": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/test-rg/providers/Microsoft.AzureStackHCI/clusters/myCluster2", + "name": "myCluster2", + "type": "Microsoft.AzureStackHCI/clusters", + "location": "East US", + "tags": {}, + "properties": { + "provisioningState": "Succeeded", + "status": "ConnectedRecently", + "cloudId": "a3c0468f-e38e-4dda-ac48-817f620536f0", + "aadClientId": "24a6e53d-04e5-44d2-b7cc-1b732a847dfc", + "aadTenantId": "7e589cc1-a8b6-4dff-91bd-5ec0fa18db94", + "reportedProperties": { + "clusterName": "cluster1", + "clusterId": "a76ac23a-1819-4e82-9410-e3e4ec3d1425", + "clusterVersion": "10.0.17777", + "nodes": [ + { + "name": "Node1", + "id": 0, + "manufacturer": "Dell Inc.", + "model": "EMC AX740", + "osName": "Azure Stack HCI", + "osVersion": "10.0.17777.1061", + "serialNumber": "Q45CZC3", + "coreCount": 8, + "memoryInGiB": 128 + }, + { + "name": "Node2", + "id": 1, + "manufacturer": "Dell Inc.", + "model": "EMC AX740", + "osName": "Azure Stack HCI", + "osVersion": "10.0.17777.1061", + "serialNumber": "Q44BSC3", + "coreCount": 8, + "memoryInGiB": 128 + }, + { + "name": "Node3", + "id": 2, + "manufacturer": "Dell Inc.", + "model": "EMC AX740", + "osName": "Azure Stack HCI", + "osVersion": "10.0.17777.1061", + "serialNumber": "Q44RFC3", + "coreCount": 16, + "memoryInGiB": 256 + } + ], + "lastUpdated": "2020-03-11T19:24:42.1946017Z" + }, + "trialDaysRemaining": 30, + "billingModel": "Trial", + "registrationTimestamp": "2020-03-11T20:44:32.5625121Z", + "lastSyncTimestamp": "2020-03-11T20:44:32.5625121Z", + "lastBillingTimestamp": "2020-03-12T08:12:55.2312022Z" + } + } + ] + } + } + } +} diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/ListClustersBySubscription.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/ListClustersBySubscription.json new file mode 100644 index 000000000000..4c2a50dda8ea --- /dev/null +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/ListClustersBySubscription.json @@ -0,0 +1,91 @@ +{ + "parameters": { + "subscriptionId": "fd3c3665-1729-4b7b-9a38-238e83b0f98b", + "api-version": "2020-10-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/test-rg1/providers/Microsoft.AzureStackHCI/clusters/myCluster1", + "name": "myCluster1", + "type": "Microsoft.AzureStackHCI/clusters", + "location": "East US", + "tags": {}, + "properties": { + "provisioningState": "Succeeded", + "status": "NotYetRegistered", + "cloudId": "91c2b355-4826-4e96-9164-e3f26dcf1cdd", + "aadClientId": "515da1c2-379e-49b4-9975-09e3e40c86be", + "aadTenantId": "7e589cc1-a8b6-4dff-91bd-5ec0fa18db94", + "reportedProperties": {}, + "trialDaysRemaining": 29, + "billingModel": "Trial" + } + }, + { + "id": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/test-rg2/providers/Microsoft.AzureStackHCI/clusters/myCluster2", + "name": "myCluster2", + "type": "Microsoft.AzureStackHCI/clusters", + "location": "West US", + "tags": {}, + "properties": { + "provisioningState": "Succeeded", + "status": "ConnectedRecently", + "cloudId": "a3c0468f-e38e-4dda-ac48-817f620536f0", + "aadClientId": "24a6e53d-04e5-44d2-b7cc-1b732a847dfc", + "aadTenantId": "7e589cc1-a8b6-4dff-91bd-5ec0fa18db94", + "reportedProperties": { + "clusterName": "cluster1", + "clusterId": "a76ac23a-1819-4e82-9410-e3e4ec3d1425", + "clusterVersion": "10.0.17777", + "nodes": [ + { + "name": "Node1", + "id": 0, + "manufacturer": "Dell Inc.", + "model": "EMC AX740", + "osName": "Azure Stack HCI", + "osVersion": "10.0.17777.1061", + "serialNumber": "Q45CZC3", + "coreCount": 8, + "memoryInGiB": 128 + }, + { + "name": "Node2", + "id": 1, + "manufacturer": "Dell Inc.", + "model": "EMC AX740", + "osName": "Azure Stack HCI", + "osVersion": "10.0.17777.1061", + "serialNumber": "Q44BSC3", + "coreCount": 8, + "memoryInGiB": 128 + }, + { + "name": "Node3", + "id": 2, + "manufacturer": "Dell Inc.", + "model": "EMC AX740", + "osName": "Azure Stack HCI", + "osVersion": "10.0.17777.1061", + "serialNumber": "Q44RFC3", + "coreCount": 16, + "memoryInGiB": 256 + } + ], + "lastUpdated": "2020-03-11T19:24:42.1946017Z" + }, + "trialDaysRemaining": 30, + "billingModel": "Trial", + "registrationTimestamp": "2020-03-11T20:44:32.5625121Z", + "lastSyncTimestamp": "2020-03-11T20:44:32.5625121Z", + "lastBillingTimestamp": "2020-03-12T08:12:55.2312022Z" + } + } + ] + } + } + } +} diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/UpdateCluster.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/UpdateCluster.json new file mode 100644 index 000000000000..324a193b5145 --- /dev/null +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/UpdateCluster.json @@ -0,0 +1,81 @@ +{ + "parameters": { + "subscriptionId": "fd3c3665-1729-4b7b-9a38-238e83b0f98b", + "resourceGroupName": "test-rg", + "clusterName": "myCluster", + "api-version": "2020-10-01", + "cluster": { + "tags": { + "tag1": "value1", + "tag2": "value2" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/test-rg/providers/Microsoft.AzureStackHCI/clusters/myCluster", + "name": "myCluster", + "type": "Microsoft.AzureStackHCI/clusters", + "location": "East US", + "tags": { + "tag1": "value1", + "tag2": "value2" + }, + "properties": { + "provisioningState": "Succeeded", + "status": "ConnectedRecently", + "cloudId": "91c2b355-4826-4e96-9164-e3f26dcf1cdd", + "aadClientId": "515da1c2-379e-49b4-9975-09e3e40c86be", + "aadTenantId": "7e589cc1-a8b6-4dff-91bd-5ec0fa18db94", + "reportedProperties": { + "clusterName": "cluster1", + "clusterId": "a76ac23a-1819-4e82-9410-e3e4ec3d1425", + "clusterVersion": "10.0.17777", + "nodes": [ + { + "name": "Node1", + "id": 1, + "manufacturer": "Dell Inc.", + "model": "EMC AX740", + "osName": "Azure Stack HCI", + "osVersion": "10.0.17777.1061", + "serialNumber": "Q45CZC3", + "coreCount": 8, + "memoryInGiB": 128 + }, + { + "name": "Node2", + "id": 2, + "manufacturer": "Dell Inc.", + "model": "EMC AX740", + "osName": "Azure Stack HCI", + "osVersion": "10.0.17777.1061", + "serialNumber": "Q44BSC3", + "coreCount": 8, + "memoryInGiB": 128 + }, + { + "name": "Node3", + "id": 3, + "manufacturer": "Dell Inc.", + "model": "EMC AX740", + "osName": "Azure Stack HCI", + "osVersion": "10.0.17777.1061", + "serialNumber": "Q44RFC3", + "coreCount": 16, + "memoryInGiB": 256 + } + ], + "lastUpdated": "2020-03-11T19:24:42.1946017Z" + }, + "trialDaysRemaining": 30, + "billingModel": "Trial", + "registrationTimestamp": "2020-03-11T20:44:32.5625121Z", + "lastSyncTimestamp": "2020-03-11T20:44:32.5625121Z", + "lastBillingTimestamp": "2020-03-12T08:12:55.2312022Z" + } + } + } + } +} From 2c8b1d98af2206d4e3294102dd9b9578ea6bdb0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magdalena=20Bia=C5=82ecka?= <2598290+mbialecka@users.noreply.github.com> Date: Tue, 18 May 2021 11:34:06 -0700 Subject: [PATCH 02/11] Updates readme --- .../azurestackhci/resource-manager/readme.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/specification/azurestackhci/resource-manager/readme.md b/specification/azurestackhci/resource-manager/readme.md index db260de2b2ec..1628496f51f8 100644 --- a/specification/azurestackhci/resource-manager/readme.md +++ b/specification/azurestackhci/resource-manager/readme.md @@ -29,7 +29,7 @@ title: AzureStackHCIClient description: Azure Stack HCI management service openapi-type: arm openapi-subtype: rpaas -tag: package-2020-10 +tag: package-preview-2021-01 ``` ## Suppression @@ -42,14 +42,23 @@ directive: ``` +### Tag: package-preview-2021-01 + +These settings apply only when `--tag=package-preview-2021-01` is specified on the command line. + +```yaml $(tag) == 'package-preview-2021-01' +input-file: + - Microsoft.AzureStackHCI/preview/2021-01-01-preview/azurestackhci.json +``` ### Tag: package-2020-10 These settings apply only when `--tag=package-2020-10` is specified on the command line. -```yaml $(tag) == 'package-2020-10' +``` yaml $(tag) == 'package-2020-10' input-file: - Microsoft.AzureStackHCI/stable/2020-10-01/azurestackhci.json ``` + ### Tag: package-2020-03-01-preview These settings apply only when `--tag=package-2020-03-01-preview` is specified on the command line. @@ -103,5 +112,3 @@ See configuration in [readme.typescript.md](./readme.typescript.md) ## CSharp See configuration in [readme.csharp.md](./readme.csharp.md) - - From a7a43d8ffcdaac7c71997f0389c8458ba00e7b87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magdalena=20Bia=C5=82ecka?= <2598290+mbialecka@users.noreply.github.com> Date: Tue, 18 May 2021 11:34:08 -0700 Subject: [PATCH 03/11] Updates API version in new specs and examples --- .../preview/2021-01-01-preview/azurestackhci.json | 2 +- .../preview/2021-01-01-preview/examples/CreateCluster.json | 2 +- .../preview/2021-01-01-preview/examples/DeleteCluster.json | 2 +- .../preview/2021-01-01-preview/examples/GetCluster.json | 2 +- .../examples/ListClustersByResourceGroup.json | 2 +- .../2021-01-01-preview/examples/ListClustersBySubscription.json | 2 +- .../preview/2021-01-01-preview/examples/UpdateCluster.json | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/azurestackhci.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/azurestackhci.json index 7971c98d0d30..35ce4859ce57 100644 --- a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/azurestackhci.json +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/azurestackhci.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "version": "2020-10-01", + "version": "2021-01-01-preview", "title": "AzureStackHCI", "description": "Azure Stack HCI management service" }, diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/CreateCluster.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/CreateCluster.json index c41cd8a2e52e..38f0f74c0f8b 100644 --- a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/CreateCluster.json +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/CreateCluster.json @@ -3,7 +3,7 @@ "subscriptionId": "fd3c3665-1729-4b7b-9a38-238e83b0f98b", "resourceGroupName": "test-rg", "clusterName": "myCluster", - "api-version": "2020-10-01", + "api-version": "2021-01-01-preview", "cluster": { "location": "East US", "properties": { diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/DeleteCluster.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/DeleteCluster.json index b0a231f2d232..38424d9081e8 100644 --- a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/DeleteCluster.json +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/DeleteCluster.json @@ -3,7 +3,7 @@ "subscriptionId": "fd3c3665-1729-4b7b-9a38-238e83b0f98b", "resourceGroupName": "test-rg", "clusterName": "myCluster", - "api-version": "2020-10-01" + "api-version": "2021-01-01-preview" }, "responses": { "200": {}, diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/GetCluster.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/GetCluster.json index 449f80e35488..d58786581d7e 100644 --- a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/GetCluster.json +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/GetCluster.json @@ -3,7 +3,7 @@ "subscriptionId": "fd3c3665-1729-4b7b-9a38-238e83b0f98b", "resourceGroupName": "test-rg", "clusterName": "myCluster", - "api-version": "2020-10-01" + "api-version": "2021-01-01-preview" }, "responses": { "200": { diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/ListClustersByResourceGroup.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/ListClustersByResourceGroup.json index fd2dcdcf0015..9715fef2a452 100644 --- a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/ListClustersByResourceGroup.json +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/ListClustersByResourceGroup.json @@ -2,7 +2,7 @@ "parameters": { "subscriptionId": "fd3c3665-1729-4b7b-9a38-238e83b0f98b", "resourceGroupName": "test-rg", - "api-version": "2020-10-01" + "api-version": "2021-01-01-preview" }, "responses": { "200": { diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/ListClustersBySubscription.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/ListClustersBySubscription.json index 4c2a50dda8ea..67e889c76a47 100644 --- a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/ListClustersBySubscription.json +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/ListClustersBySubscription.json @@ -1,7 +1,7 @@ { "parameters": { "subscriptionId": "fd3c3665-1729-4b7b-9a38-238e83b0f98b", - "api-version": "2020-10-01" + "api-version": "2021-01-01-preview" }, "responses": { "200": { diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/UpdateCluster.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/UpdateCluster.json index 324a193b5145..1a7a5a6e7e1d 100644 --- a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/UpdateCluster.json +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/UpdateCluster.json @@ -3,7 +3,7 @@ "subscriptionId": "fd3c3665-1729-4b7b-9a38-238e83b0f98b", "resourceGroupName": "test-rg", "clusterName": "myCluster", - "api-version": "2020-10-01", + "api-version": "2021-01-01-preview", "cluster": { "tags": { "tag1": "value1", From d9fc36a6c8f111cfc935fbd0aaa6abe1cfdb8525 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magdalena=20Bia=C5=82ecka?= <2598290+mbialecka@users.noreply.github.com> Date: Tue, 18 May 2021 11:45:01 -0700 Subject: [PATCH 04/11] Split spec file per resource type --- .../{azurestackhci.json => clusters.json} | 99 ------------ .../2021-01-01-preview/operations.json | 141 ++++++++++++++++++ 2 files changed, 141 insertions(+), 99 deletions(-) rename specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/{azurestackhci.json => clusters.json} (84%) create mode 100644 specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/operations.json diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/azurestackhci.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/clusters.json similarity index 84% rename from specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/azurestackhci.json rename to specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/clusters.json index 35ce4859ce57..1166106c128d 100644 --- a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/azurestackhci.json +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/clusters.json @@ -34,34 +34,6 @@ } }, "paths": { - "/providers/Microsoft.AzureStackHCI/operations": { - "get": { - "tags": [ - "Operations" - ], - "operationId": "Operations_List", - "description": "List all available Microsoft.AzureStackHCI provider operations", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/AvailableOperations" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" - } - } - } - } - }, "/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/clusters": { "get": { "tags": [ @@ -550,77 +522,6 @@ } } } - }, - "AvailableOperations": { - "description": "Available operations of the service", - "type": "object", - "properties": { - "value": { - "description": "Collection of available operation details", - "uniqueItems": false, - "type": "array", - "items": { - "$ref": "#/definitions/OperationDetail" - } - }, - "nextLink": { - "description": "URL client should use to fetch the next page (per server side paging).\r\nIt's null for now, added for future use.", - "type": "string" - } - } - }, - "OperationDetail": { - "description": "Operation detail payload", - "type": "object", - "properties": { - "name": { - "description": "Name of the operation", - "type": "string" - }, - "isDataAction": { - "description": "Indicates whether the operation is a data action", - "type": "boolean" - }, - "display": { - "$ref": "#/definitions/OperationDisplay", - "description": "Display of the operation" - }, - "origin": { - "description": "Origin of the operation", - "type": "string" - }, - "properties": { - "$ref": "#/definitions/OperationProperties", - "description": "Properties of the operation" - } - } - }, - "OperationDisplay": { - "description": "Operation display payload", - "type": "object", - "properties": { - "provider": { - "description": "Resource provider of the operation", - "type": "string" - }, - "resource": { - "description": "Resource of the operation", - "type": "string" - }, - "operation": { - "description": "Localized friendly name for the operation", - "type": "string" - }, - "description": { - "description": "Localized friendly description for the operation", - "type": "string" - } - } - }, - "OperationProperties": { - "description": "Operation properties.", - "type": "object", - "properties": {} } }, "parameters": { diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/operations.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/operations.json new file mode 100644 index 000000000000..507cbf343042 --- /dev/null +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/operations.json @@ -0,0 +1,141 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-01-01-preview", + "title": "AzureStackHCI", + "description": "Azure Stack HCI management service" + }, + "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": { + "/providers/Microsoft.AzureStackHCI/operations": { + "get": { + "tags": [ + "Operations" + ], + "operationId": "Operations_List", + "description": "List all available Microsoft.AzureStackHCI provider operations", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/AvailableOperations" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": { + "AvailableOperations": { + "description": "Available operations of the service", + "type": "object", + "properties": { + "value": { + "description": "Collection of available operation details", + "uniqueItems": false, + "type": "array", + "items": { + "$ref": "#/definitions/OperationDetail" + } + }, + "nextLink": { + "description": "URL client should use to fetch the next page (per server side paging).\r\nIt's null for now, added for future use.", + "type": "string" + } + } + }, + "OperationDetail": { + "description": "Operation detail payload", + "type": "object", + "properties": { + "name": { + "description": "Name of the operation", + "type": "string" + }, + "isDataAction": { + "description": "Indicates whether the operation is a data action", + "type": "boolean" + }, + "display": { + "$ref": "#/definitions/OperationDisplay", + "description": "Display of the operation" + }, + "origin": { + "description": "Origin of the operation", + "type": "string" + }, + "properties": { + "$ref": "#/definitions/OperationProperties", + "description": "Properties of the operation" + } + } + }, + "OperationDisplay": { + "description": "Operation display payload", + "type": "object", + "properties": { + "provider": { + "description": "Resource provider of the operation", + "type": "string" + }, + "resource": { + "description": "Resource of the operation", + "type": "string" + }, + "operation": { + "description": "Localized friendly name for the operation", + "type": "string" + }, + "description": { + "description": "Localized friendly description for the operation", + "type": "string" + } + } + }, + "OperationProperties": { + "description": "Operation properties.", + "type": "object", + "properties": {} + } + }, + "parameters": { + } +} From f8598e0af612e021eb30c76f5644798f08335753 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magdalena=20Bia=C5=82ecka?= <2598290+mbialecka@users.noreply.github.com> Date: Tue, 18 May 2021 13:02:56 -0700 Subject: [PATCH 05/11] Use common type for operations response --- .../2021-01-01-preview/operations.json | 79 +------------------ 1 file changed, 3 insertions(+), 76 deletions(-) diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/operations.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/operations.json index 507cbf343042..d1c136c85e5a 100644 --- a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/operations.json +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/operations.json @@ -50,7 +50,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/AvailableOperations" + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/OperationListResult" } }, "default": { @@ -63,79 +63,6 @@ } } }, - "definitions": { - "AvailableOperations": { - "description": "Available operations of the service", - "type": "object", - "properties": { - "value": { - "description": "Collection of available operation details", - "uniqueItems": false, - "type": "array", - "items": { - "$ref": "#/definitions/OperationDetail" - } - }, - "nextLink": { - "description": "URL client should use to fetch the next page (per server side paging).\r\nIt's null for now, added for future use.", - "type": "string" - } - } - }, - "OperationDetail": { - "description": "Operation detail payload", - "type": "object", - "properties": { - "name": { - "description": "Name of the operation", - "type": "string" - }, - "isDataAction": { - "description": "Indicates whether the operation is a data action", - "type": "boolean" - }, - "display": { - "$ref": "#/definitions/OperationDisplay", - "description": "Display of the operation" - }, - "origin": { - "description": "Origin of the operation", - "type": "string" - }, - "properties": { - "$ref": "#/definitions/OperationProperties", - "description": "Properties of the operation" - } - } - }, - "OperationDisplay": { - "description": "Operation display payload", - "type": "object", - "properties": { - "provider": { - "description": "Resource provider of the operation", - "type": "string" - }, - "resource": { - "description": "Resource of the operation", - "type": "string" - }, - "operation": { - "description": "Localized friendly name for the operation", - "type": "string" - }, - "description": { - "description": "Localized friendly description for the operation", - "type": "string" - } - } - }, - "OperationProperties": { - "description": "Operation properties.", - "type": "object", - "properties": {} - } - }, - "parameters": { - } + "definitions": {}, + "parameters": {} } From 0de8555bb766780f042f676aa8e26b7c09738c8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magdalena=20Bia=C5=82ecka?= <2598290+mbialecka@users.noreply.github.com> Date: Tue, 18 May 2021 16:14:18 -0700 Subject: [PATCH 06/11] Add ArcSettings and Extensions resource types --- .../2021-01-01-preview/arcSettings.json | 357 +++++++++++++ .../2021-01-01-preview/extensions.json | 481 ++++++++++++++++++ 2 files changed, 838 insertions(+) create mode 100644 specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/arcSettings.json create mode 100644 specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/extensions.json diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/arcSettings.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/arcSettings.json new file mode 100644 index 000000000000..3c6d63d699ca --- /dev/null +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/arcSettings.json @@ -0,0 +1,357 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-01-01-preview", + "title": "AzureStackHCI", + "description": "Azure Stack HCI management service" + }, + "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/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings": { + "get": { + "operationId": "ArcSettings_ListByCluster", + "description": "Get ArcSetting resources of HCI Cluster.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ClusterNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ArcSettingList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "List ArcSetting resources by HCI Cluster": { + "$ref": "./examples/ListArcSettingsByCluster.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}": { + "get": { + "operationId": "ArcSettings_Get", + "description": "Get ArcSetting resource details of HCI Cluster.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ClusterNameParameter" + }, + { + "$ref": "#/parameters/ArcSettingNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ArcSetting" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Get ArcSetting": { + "$ref": "./examples/GetArcSetting.json" + } + } + }, + "put": { + "operationId": "ArcSettings_Create", + "description": "Create ArcSetting for HCI cluster.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ClusterNameParameter" + }, + { + "$ref": "#/parameters/ArcSettingNameParameter" + }, + { + "name": "arcSetting", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ArcSetting" + }, + "description": "Parameters supplied to the Create ArcSetting resource for this HCI cluster." + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ArcSetting" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Create ArcSetting": { + "$ref": "./examples/PutArcSetting.json" + } + } + }, + "delete": { + "operationId": "ArcSettings_Delete", + "description": "Delete ArcSetting resource details of HCI Cluster.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ClusterNameParameter" + }, + { + "$ref": "#/parameters/ArcSettingNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK" + }, + "204": { + "description": "No content" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-examples": { + "Delete ArcSetting": { + "$ref": "./examples/DeleteArcSetting.json" + } + } + } + } + }, + "definitions": { + "ArcSettingList": { + "description": "List of ArcSetting proxy resources for the HCI cluster.", + "type": "object", + "properties": { + "value": { + "description": "List of ArcSetting proxy resources.", + "type": "array", + "items": { + "$ref": "#/definitions/ArcSetting" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to the next set of results.", + "type": "string", + "readOnly": true + } + } + }, + "ArcSetting": { + "description": "ArcSetting details.", + "type": "object", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "systemData": { + "description": "System data of ArcSetting resource", + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData", + "x-ms-client-flatten": true + }, + "properties": { + "description": "ArcSetting properties.", + "$ref": "#/definitions/ArcSettingProperties", + "x-ms-client-flatten": true + } + } + }, + "ArcSettingProperties": { + "description": "ArcSetting properties.", + "type": "object", + "properties": { + "provisioningState": { + "description": "Provisioning state of the ArcSetting proxy resource.", + "type": "string", + "enum": [ + "Succeeded", + "Failed", + "Canceled", + "Accepted", + "Provisioning" + ], + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": true + }, + "readOnly": true + }, + "arcInstanceResourceGroup": { + "description": "The resource group that hosts the Arc agents, ie. Hybrid Compute Machine resources.", + "type": "string", + "readOnly": true + }, + "aggregateState": { + "description": "Aggregate state of Arc agent across the nodes in this HCI cluster.", + "type": "string", + "enum": [ + "Connected", + "Partially Connected", + "Disconnected", + "Installing", + "Error" + ], + "x-ms-enum": { + "name": "ArcSettingAggregateState", + "modelAsString": true + }, + "readOnly": true + }, + "perNodeDetails": { + "description": "State of Arc agent in each of the nodes.", + "type": "array", + "items": { + "$ref": "#/definitions/PerNodeState" + }, + "readOnly": true + } + } + }, + "PerNodeState": { + "description": "Status of Arc agent for a particular node in HCI Cluster.", + "type": "object", + "properties": { + "name": { + "type": "string", + "readOnly": true, + "description": "Name of the Node in HCI Cluster" + }, + "arcInstance": { + "description": "Fully qualified resource ID for the Arc agent of this node.", + "type": "string", + "readOnly": true + }, + "state": { + "description": "State of Arc agent in this node.", + "type": "string", + "enum": [ + "Connected", + "Disconnected", + "Installing", + "Error" + ], + "x-ms-enum": { + "name": "NodeArcState", + "modelAsString": true + }, + "readOnly": true + } + } + } + }, + "parameters": { + "ClusterNameParameter": { + "name": "clusterName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the cluster.", + "x-ms-parameter-location": "method" + }, + "ArcSettingNameParameter": { + "name": "arcSettingName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the proxy resource holding details of HCI ArcSetting information.", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/extensions.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/extensions.json new file mode 100644 index 000000000000..021b6cfb5f09 --- /dev/null +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/extensions.json @@ -0,0 +1,481 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-01-01-preview", + "title": "AzureStackHCI", + "description": "Azure Stack HCI management service" + }, + "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/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/extensions": { + "get": { + "operationId": "Extensions_ListByArcSetting", + "description": "List all Extensions under ArcSetting resource.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ClusterNameParameter" + }, + { + "$ref": "#/parameters/ArcSettingNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ExtensionList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "List Extensions under ArcSetting resource": { + "$ref": "./examples/ListExtensionsByArcSetting.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/extensions/{extensionName}": { + "get": { + "operationId": "Extensions_Get", + "description": "Get particular Arc Extension of HCI Cluster.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ClusterNameParameter" + }, + { + "$ref": "#/parameters/ArcSettingNameParameter" + }, + { + "$ref": "#/parameters/ExtensionNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Extension" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Get ArcSettings Extension": { + "$ref": "./examples/GetExtension.json" + } + } + }, + "put": { + "operationId": "Extensions_Create", + "description": "Create Extension for HCI cluster.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ClusterNameParameter" + }, + { + "$ref": "#/parameters/ArcSettingNameParameter" + }, + { + "$ref": "#/parameters/ExtensionNameParameter" + }, + { + "name": "extension", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Extension" + }, + "description": "Details of the Machine Extension to be created." + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Succeeded", + "schema": { + "$ref": "#/definitions/Extension" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/Extension" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-examples": { + "Create Arc Extension": { + "$ref": "./examples/PutExtension.json" + } + } + }, + "patch": { + "operationId": "Extensions_Update", + "description": "Update Extension for HCI cluster.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ClusterNameParameter" + }, + { + "$ref": "#/parameters/ArcSettingNameParameter" + }, + { + "$ref": "#/parameters/ExtensionNameParameter" + }, + { + "name": "extension", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Extension" + }, + "description": "Details of the Machine Extension to be created." + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "201": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Extension" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "original-uri" + }, + "x-ms-examples": { + "Update Arc Extension": { + "$ref": "./examples/PatchExtension.json" + } + } + }, + "delete": { + "operationId": "Extensions_Delete", + "description": "Delete particular Arc Extension of HCI Cluster.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ClusterNameParameter" + }, + { + "$ref": "#/parameters/ArcSettingNameParameter" + }, + { + "$ref": "#/parameters/ExtensionNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK" + }, + "204": { + "description": "OK" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-examples": { + "Delete Arc Extension": { + "$ref": "./examples/DeleteExtension.json" + } + } + } + } + }, + "definitions": { + "Extension": { + "description": "Details of a particular extension in HCI Cluster.", + "type": "object", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "systemData": { + "description": "System data of Extension resource.", + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData", + "x-ms-client-flatten": true + }, + "properties": { + "description": "Describes Machine Extension Properties.", + "$ref": "#/definitions/ExtensionProperties", + "x-ms-client-flatten": true + } + } + }, + "ExtensionProperties": { + "description": "Extension properties.", + "type": "object", + "properties": { + "provisioningState": { + "description": "Provisioning state of the Extension proxy resource", + "type": "string", + "enum": [ + "Succeeded", + "Failed", + "Canceled", + "Accepted", + "Provisioning" + ], + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": true + }, + "readOnly": true + }, + "extensionParameters": { + "description": "Parameters specific to this extension type.", + "$ref": "#/definitions/ExtensionParameters", + "x-ms-client-flatten": true + }, + "aggregateState": { + "description": "Aggregate state of Arc Extensions across the nodes in this HCI cluster.", + "type": "string", + "enum": [ + "Succeeded", + "Partially Succeeded", + "Failed", + "Not Started", + "Installing", + "Deleting", + "Error" + ], + "x-ms-enum": { + "name": "ExtensionAggregateState", + "modelAsString": true + }, + "readOnly": true + }, + "perNodeExtensionDetails": { + "description": "State of Arc Extension in each of the nodes.", + "type": "array", + "items": { + "$ref": "#/definitions/PerNodeExtensionState" + }, + "readOnly": true + } + } + }, + "PerNodeExtensionState": { + "description": "Status of Arc Extension for a particular node in HCI Cluster", + "type": "object", + "properties": { + "name": { + "description": "Name of the node in HCI Cluster.", + "type": "string", + "readOnly": true + }, + "extension": { + "description": "Fully qualified resource ID for the particular Arc Extension on this node.", + "type": "string", + "readOnly": true + }, + "state": { + "description": "State of Arc Extension in this node.", + "type": "string", + "enum": [ + "Succeeded", + "Failed", + "Not Started", + "Installing", + "Deleting", + "Error" + ], + "x-ms-enum": { + "name": "NodeExtensionState", + "modelAsString": true + }, + "readOnly": true + } + } + }, + "ExtensionList": { + "description": "List of Extensions in HCI cluster", + "type": "object", + "properties": { + "value": { + "description": "List of Extensions in HCI cluster.", + "type": "array", + "items": { + "$ref": "#/definitions/Extension" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to the next set of results.", + "type": "string", + "readOnly": true + } + } + }, + "ExtensionParameters": { + "description": "Describes the properties of a Machine Extension. This object mirrors the definition in HybridCompute.", + "type": "object", + "properties": { + "forceUpdateTag": { + "type": "string", + "description": "How the extension handler should be forced to update even if the extension configuration has not changed." + }, + "publisher": { + "type": "string", + "description": "The name of the extension handler publisher." + }, + "type": { + "type": "string", + "description": "Specifies the type of the extension; an example is \"CustomScriptExtension\"." + }, + "typeHandlerVersion": { + "type": "string", + "description": "Specifies the version of the script handler." + }, + "autoUpgradeMinorVersion": { + "type": "boolean", + "description": "Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true." + }, + "settings": { + "type": "object", + "description": "Json formatted public settings for the extension." + }, + "protectedSettings": { + "type": "object", + "description": "The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all." + } + } + } + }, + "parameters": { + "ClusterNameParameter": { + "name": "clusterName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the cluster.", + "x-ms-parameter-location": "method" + }, + "ArcSettingNameParameter": { + "name": "arcSettingName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the proxy resource holding details of HCI ArcSetting information.", + "x-ms-parameter-location": "method" + }, + "ExtensionNameParameter": { + "name": "extensionName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the machine extension.", + "x-ms-parameter-location": "method" + } + } +} From 639584ffd4d36923b61cc81910f1de976387e1ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magdalena=20Bia=C5=82ecka?= <2598290+mbialecka@users.noreply.github.com> Date: Tue, 18 May 2021 16:23:09 -0700 Subject: [PATCH 07/11] Fix readme.md --- .../azurestackhci/resource-manager/readme.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/specification/azurestackhci/resource-manager/readme.md b/specification/azurestackhci/resource-manager/readme.md index 1628496f51f8..1ccf280a1ac3 100644 --- a/specification/azurestackhci/resource-manager/readme.md +++ b/specification/azurestackhci/resource-manager/readme.md @@ -37,7 +37,11 @@ tag: package-preview-2021-01 ``` yaml directive: - suppress: R3020 - from: azurestackhci.json + from: + - arcSettings.json + - clusters.json + - extensions.json + - operations.json reason: Microsoft.AzureStackHCI is the correct name for our RP. ``` @@ -48,7 +52,10 @@ These settings apply only when `--tag=package-preview-2021-01` is specified on t ```yaml $(tag) == 'package-preview-2021-01' input-file: - - Microsoft.AzureStackHCI/preview/2021-01-01-preview/azurestackhci.json + - Microsoft.AzureStackHCI/preview/2021-01-01-preview/arcSettings.json + - Microsoft.AzureStackHCI/preview/2021-01-01-preview/clusters.json + - Microsoft.AzureStackHCI/preview/2021-01-01-preview/extensions.json + - Microsoft.AzureStackHCI/preview/2021-01-01-preview/operations.json ``` ### Tag: package-2020-10 From 55512592c45cf299ec541acf67e93c4f5f5b0eb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magdalena=20Bia=C5=82ecka?= <2598290+mbialecka@users.noreply.github.com> Date: Tue, 18 May 2021 16:44:58 -0700 Subject: [PATCH 08/11] Add examples --- .../examples/DeleteArcSetting.json | 13 +++ .../examples/DeleteExtension.json | 14 +++ .../examples/GetArcSetting.json | 42 +++++++ .../examples/GetExtension.json | 54 +++++++++ .../examples/ListArcSettingsByCluster.json | 45 ++++++++ .../examples/ListExtensionsByArcSetting.json | 96 +++++++++++++++ .../examples/PatchExtension.json | 67 +++++++++++ .../examples/PutArcSetting.json | 43 +++++++ .../examples/PutExtension.json | 109 ++++++++++++++++++ 9 files changed, 483 insertions(+) create mode 100644 specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/DeleteArcSetting.json create mode 100644 specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/DeleteExtension.json create mode 100644 specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/GetArcSetting.json create mode 100644 specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/GetExtension.json create mode 100644 specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/ListArcSettingsByCluster.json create mode 100644 specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/ListExtensionsByArcSetting.json create mode 100644 specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/PatchExtension.json create mode 100644 specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/PutArcSetting.json create mode 100644 specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/PutExtension.json diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/DeleteArcSetting.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/DeleteArcSetting.json new file mode 100644 index 000000000000..f2c042cf1996 --- /dev/null +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/DeleteArcSetting.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "fd3c3665-1729-4b7b-9a38-238e83b0f98b", + "resourceGroupName": "test-rg", + "clusterName": "myCluster", + "arcSettingName": "default", + "api-version": "2021-01-01-preview" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/DeleteExtension.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/DeleteExtension.json new file mode 100644 index 000000000000..d2d9a6b5088f --- /dev/null +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/DeleteExtension.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "fd3c3665-1729-4b7b-9a38-238e83b0f98b", + "resourceGroupName": "test-rg", + "clusterName": "myCluster", + "arcSettingName": "default", + "extensionName": "MicrosoftMonitoringAgent", + "api-version": "2021-01-01-preview" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/GetArcSetting.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/GetArcSetting.json new file mode 100644 index 000000000000..ec2de4f65fd0 --- /dev/null +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/GetArcSetting.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "subscriptionId": "fd3c3665-1729-4b7b-9a38-238e83b0f98b", + "resourceGroupName": "test-rg", + "clusterName": "myCluster", + "arcSettingName": "default", + "api-version": "2021-01-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/test-rg/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default", + "type": "Microsoft.AzureStackHCI/clusters/arcSettings", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2021-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-01-02T17:18:19.1234567Z" + }, + "properties": { + "provisioningState": "Succeeded", + "arcInstanceResourceGroup": "ArcInstance-rg", + "aggregateState": "Partially Connected", + "perNodeDetails": [ + { + "name": "Node-1", + "arcInstance": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machine/Node-1", + "state": "Connected" + }, + { + "name": "Node-2", + "arcInstance": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machine/Node-2", + "state": "Disconnected" + } + ] + } + } + } + } +} diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/GetExtension.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/GetExtension.json new file mode 100644 index 000000000000..b77b38ceb0c6 --- /dev/null +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/GetExtension.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "subscriptionId": "fd3c3665-1729-4b7b-9a38-238e83b0f98b", + "resourceGroupName": "test-rg", + "clusterName": "myCluster", + "arcSettingName": "default", + "extensionName": "MicrosoftMonitoringAgent", + "api-version": "2021-01-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/test-rg/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default/extensions/MicrosoftMonitoringAgent", + "name": "MicrosoftMonitoringAgent", + "type": "Microsoft.AzureStackHCI/clusters/arcSettings/extensions", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2021-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-01-02T17:18:19.1234567Z" + }, + "properties": { + "provisioningState": "Succeeded", + "extensionParameters": { + "publisher": "Microsoft.Compute", + "type": "string", + "typeHandlerVersion": "1.10.3", + "autoUpgradeMinorVersion": false, + "settings": { + "workspaceId": "xx", + "workspaceKey": "xx" + }, + "protectedSettings": {} + }, + "aggregateState": "Partially Succeeded", + "perNodeExtensionDetails": [ + { + "name": "Node-1", + "extension": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machine/Node-1/Extensions/MicrosoftMonitoringAgent", + "state": "Succeeded" + }, + { + "name": "Node-2", + "extension": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machine/Node-2/Extensions/MicrosoftMonitoringAgent", + "state": "Failed" + } + ] + } + } + } + } +} diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/ListArcSettingsByCluster.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/ListArcSettingsByCluster.json new file mode 100644 index 000000000000..f6db5d851bc4 --- /dev/null +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/ListArcSettingsByCluster.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "subscriptionId": "fd3c3665-1729-4b7b-9a38-238e83b0f98b", + "resourceGroupName": "test-rg", + "clusterName": "myCluster", + "api-version": "2021-01-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/test-rg/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default", + "type": "Microsoft.AzureStackHCI/clusters/arcSettings", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2021-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-01-02T17:18:19.1234567Z" + }, + "properties": { + "provisioningState": "Succeeded", + "arcInstanceResourceGroup": "ArcInstance-rg", + "aggregateState": "Partially Connected", + "perNodeDetails": [ + { + "name": "Node-1", + "arcInstance": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machine/Node-1", + "state": "Connected" + }, + { + "name": "Node-2", + "arcInstance": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machine/Node-2", + "state": "Disconnected" + } + ] + } + } + ] + } + } + } +} diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/ListExtensionsByArcSetting.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/ListExtensionsByArcSetting.json new file mode 100644 index 000000000000..8f84c2f1c220 --- /dev/null +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/ListExtensionsByArcSetting.json @@ -0,0 +1,96 @@ +{ + "parameters": { + "subscriptionId": "fd3c3665-1729-4b7b-9a38-238e83b0f98b", + "resourceGroupName": "test-rg", + "clusterName": "myCluster", + "arcSettingName": "default", + "api-version": "2021-01-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/test-rg/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default/extensions/MicrosoftMonitoringAgent", + "name": "MicrosoftMonitoringAgent", + "type": "Microsoft.AzureStackHCI/clusters/arcSettings/extensions", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2021-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-01-02T17:18:19.1234567Z" + }, + "properties": { + "provisioningState": "Succeeded", + "extensionParameters": { + "publisher": "Microsoft.Compute", + "type": "string", + "typeHandlerVersion": "1.10.3", + "autoUpgradeMinorVersion": false, + "settings": { + "workspaceId": "xx", + "workspaceKey": "xx" + }, + "protectedSettings": {} + }, + "aggregateState": "Partially Connected", + "perNodeExtensionDetails": [ + { + "name": "Node-1", + "extension": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machine/Node-1/Extensions/MicrosoftMonitoringAgent", + "state": "Connected" + }, + { + "name": "Node-2", + "extension": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machine/Node-2/Extensions/MicrosoftMonitoringAgent", + "state": "Disconnected" + } + ] + } + }, + { + "id": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/test-rg/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default/Extensions/SecurityExtension", + "name": "CustomScriptExtension", + "type": "Microsoft.AzureStackHCI/clusters/arcSettings/extensions", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2021-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-01-02T17:18:19.1234567Z" + }, + "properties": { + "provisioningState": "Succeeded", + "extensionParameters": { + "publisher": "Microsoft.CustomScriptExtension", + "type": "string", + "typeHandlerVersion": "1.10.3", + "autoUpgradeMinorVersion": false, + "settings": { + "scriptLocation": "xx" + }, + "protectedSettings": {} + }, + "aggregateState": "Partially Succeeded", + "perNodeExtensionDetails": [ + { + "name": "Node-1", + "extension": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machine/Node-1/Extensions/SecurityExtension", + "state": "Succeeded" + }, + { + "name": "Node-2", + "extension": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machine/Node-2/Extensions/SecurityExtension", + "state": "Failed" + } + ] + } + } + ] + } + } + } +} diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/PatchExtension.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/PatchExtension.json new file mode 100644 index 000000000000..80cc4dc3bfa6 --- /dev/null +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/PatchExtension.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "subscriptionId": "fd3c3665-1729-4b7b-9a38-238e83b0f98b", + "resourceGroupName": "test-rg", + "clusterName": "myCluster", + "arcSettingName": "default", + "extensionName": "MicrosoftMonitoringAgent", + "extension": { + "properties": { + "extensionParameters": { + "publisher": "Microsoft.Compute", + "typeHandlerVersion": "1.10", + "type": "MicrosoftMonitoringAgent", + "settings": { + "workspaceId": "xx", + "workspaceKey": "xx" + } + } + } + }, + "api-version": "2021-01-01-preview" + }, + "responses": { + "201": { + "body": { + "id": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/test-rg/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default/extensions/MicrosoftMonitoringAgent", + "name": "MicrosoftMonitoringAgent", + "type": "Microsoft.AzureStackHCI/clusters/arcSettings/extensions", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2021-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-01-02T17:18:19.1234567Z" + }, + "properties": { + "provisioningState": "Succeeded", + "extensionParameters": { + "publisher": "Microsoft.Compute", + "type": "string", + "typeHandlerVersion": "1.10.3", + "autoUpgradeMinorVersion": false, + "settings": { + "workspaceId": "xx", + "workspaceKey": "xx" + }, + "protectedSettings": {} + }, + "aggregateState": "Partially Connected", + "perNodeExtensionDetails": [ + { + "name": "Node-1", + "extension": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machine/Node-1/Extensions/MicrosoftMonitoringAgent", + "state": "Connected" + }, + { + "name": "Node-2", + "extension": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machine/Node-2/Extensions/MicrosoftMonitoringAgent", + "state": "Disconnected" + } + ] + } + } + } + } +} diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/PutArcSetting.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/PutArcSetting.json new file mode 100644 index 000000000000..398e28ef5ba1 --- /dev/null +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/PutArcSetting.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "subscriptionId": "fd3c3665-1729-4b7b-9a38-238e83b0f98b", + "resourceGroupName": "test-rg", + "clusterName": "myCluster", + "arcSettingName": "default", + "arcSetting": {}, + "api-version": "2021-01-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/test-rg/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default", + "type": "Microsoft.AzureStackHCI/clusters/arcSettings", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2021-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-01-02T17:18:19.1234567Z" + }, + "properties": { + "provisioningState": "Succeeded", + "arcInstanceResourceGroup": "ArcInstance-rg", + "aggregateState": "Installing", + "perNodeDetails": [ + { + "name": "Node-1", + "arcInstance": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machine/Node-1", + "state": "Installing" + }, + { + "name": "Node-2", + "arcInstance": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machine/Node-2", + "state": "Installing" + } + ] + } + } + } + } +} diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/PutExtension.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/PutExtension.json new file mode 100644 index 000000000000..f01c5a7cea51 --- /dev/null +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/PutExtension.json @@ -0,0 +1,109 @@ +{ + "parameters": { + "subscriptionId": "fd3c3665-1729-4b7b-9a38-238e83b0f98b", + "resourceGroupName": "test-rg", + "clusterName": "myCluster", + "arcSettingName": "default", + "extensionName": "MicrosoftMonitoringAgent", + "extension": { + "properties": { + "extensionParameters": { + "publisher": "Microsoft.Compute", + "typeHandlerVersion": "1.10", + "type": "MicrosoftMonitoringAgent", + "settings": { + "workspaceId": "xx", + "workspaceKey": "xx" + } + } + } + }, + "api-version": "2021-01-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/test-rg/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default/extensions/MicrosoftMonitoringAgent", + "name": "MicrosoftMonitoringAgent", + "type": "Microsoft.AzureStackHCI/clusters/arcSettings/extensions", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2021-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-01-02T17:18:19.1234567Z" + }, + "properties": { + "provisioningState": "Succeeded", + "extensionParameters": { + "publisher": "Microsoft.Compute", + "type": "string", + "typeHandlerVersion": "1.10.3", + "autoUpgradeMinorVersion": false, + "settings": { + "workspaceId": "xx", + "workspaceKey": "xx" + }, + "protectedSettings": {} + }, + "aggregateState": "Partially Succeeded", + "perNodeExtensionDetails": [ + { + "name": "Node-1", + "extension": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machine/Node-1/Extensions/MicrosoftMonitoringAgent", + "state": "Succeeded" + }, + { + "name": "Node-2", + "extension": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machine/Node-2/Extensions/MicrosoftMonitoringAgent", + "state": "Failed" + } + ] + } + } + }, + "201": { + "body": { + "id": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/test-rg/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default/extensions/MicrosoftMonitoringAgent", + "name": "MicrosoftMonitoringAgent", + "type": "Microsoft.AzureStackHCI/clusters/arcSettings/extensions", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2021-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-01-02T17:18:19.1234567Z" + }, + "properties": { + "provisioningState": "Succeeded", + "extensionParameters": { + "publisher": "Microsoft.Compute", + "type": "string", + "typeHandlerVersion": "1.10.3", + "autoUpgradeMinorVersion": false, + "settings": { + "workspaceId": "xx", + "workspaceKey": "xx" + }, + "protectedSettings": {} + }, + "aggregateState": "Partially Succeeded", + "perNodeExtensionDetails": [ + { + "name": "Node-1", + "extension": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machine/Node-1/Extensions/MicrosoftMonitoringAgent", + "state": "Succeeded" + }, + { + "name": "Node-2", + "extension": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machine/Node-2/Extensions/MicrosoftMonitoringAgent", + "state": "Failed" + } + ] + } + } + } + } +} From 0f89c370721d3fae097c5f54465debc34c6a50d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magdalena=20Bia=C5=82ecka?= <2598290+mbialecka@users.noreply.github.com> Date: Wed, 19 May 2021 11:02:15 -0700 Subject: [PATCH 09/11] Fix clusters spec --- .../preview/2021-01-01-preview/clusters.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/clusters.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/clusters.json index 1166106c128d..5981752b9481 100644 --- a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/clusters.json +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/clusters.json @@ -392,7 +392,8 @@ }, "reportedProperties": { "description": "Properties reported by cluster agent.", - "$ref": "#/definitions/ClusterReportedProperties" + "$ref": "#/definitions/ClusterReportedProperties", + "readOnly": true }, "trialDaysRemaining": { "description": "Number of days remaining in the trial period.", From 2fda9ab881131a723a866e22b5db8dbe00f1ae77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magdalena=20Bia=C5=82ecka?= <2598290+mbialecka@users.noreply.github.com> Date: Fri, 21 May 2021 14:32:36 -0700 Subject: [PATCH 10/11] Bring latest updates to clusters, extensions and arcSettings --- .../2021-01-01-preview/arcSettings.json | 33 ++++++++++--- .../preview/2021-01-01-preview/clusters.json | 48 +++++++++++++------ .../examples/CreateCluster.json | 10 ++++ .../examples/DeleteArcSetting.json | 1 + .../examples/DeleteExtension.json | 1 + .../examples/GetArcSetting.json | 2 +- .../examples/GetCluster.json | 9 ++++ .../examples/GetExtension.json | 8 ++-- .../examples/ListArcSettingsByCluster.json | 2 +- .../examples/ListClustersByResourceGroup.json | 18 +++++++ .../examples/ListClustersBySubscription.json | 18 +++++++ .../examples/ListExtensionsByArcSetting.json | 13 ++--- .../examples/PatchExtension.json | 11 ++--- .../examples/PutArcSetting.json | 6 +-- .../examples/PutExtension.json | 20 ++++---- .../examples/UpdateCluster.json | 9 ++++ .../2021-01-01-preview/extensions.json | 44 ++++++++++++----- 17 files changed, 183 insertions(+), 70 deletions(-) diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/arcSettings.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/arcSettings.json index 3c6d63d699ca..d3fcd7a6887b 100644 --- a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/arcSettings.json +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/arcSettings.json @@ -190,6 +190,9 @@ "200": { "description": "OK" }, + "202": { + "description": "OK" + }, "204": { "description": "No content" }, @@ -244,7 +247,7 @@ "systemData": { "description": "System data of ArcSetting resource", "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData", - "x-ms-client-flatten": true + "readOnly": true }, "properties": { "description": "ArcSetting properties.", @@ -282,11 +285,21 @@ "description": "Aggregate state of Arc agent across the nodes in this HCI cluster.", "type": "string", "enum": [ + "NotSpecified", + "Error", + "Succeeded", + "Canceled", + "Failed", "Connected", - "Partially Connected", "Disconnected", - "Installing", - "Error" + "Deleted", + "Creating", + "Updating", + "Deleting", + "Moving", + "PartiallySucceeded", + "PartiallyConnected", + "InProgress" ], "x-ms-enum": { "name": "ArcSettingAggregateState", @@ -322,10 +335,18 @@ "description": "State of Arc agent in this node.", "type": "string", "enum": [ + "NotSpecified", + "Error", + "Succeeded", + "Canceled", + "Failed", "Connected", "Disconnected", - "Installing", - "Error" + "Deleted", + "Creating", + "Updating", + "Deleting", + "Moving" ], "x-ms-enum": { "name": "NodeArcState", diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/clusters.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/clusters.json index 5981752b9481..47a656783765 100644 --- a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/clusters.json +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/clusters.json @@ -235,7 +235,7 @@ "description": "Details of the HCI cluster.", "required": true, "schema": { - "$ref": "#/definitions/ClusterUpdate" + "$ref": "#/definitions/ClusterPatch" } } ], @@ -327,7 +327,6 @@ "systemData": { "description": "System data of Cluster resource", "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData", - "x-ms-client-flatten": true, "readOnly": true }, "properties": { @@ -337,6 +336,24 @@ } } }, + "ClusterPatch": { + "description": "Cluster details to update.", + "type": "object", + "properties": { + "tags": { + "description": "Resource tags.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "properties": { + "description": "Cluster properties.", + "$ref": "#/definitions/ClusterPatchProperties", + "x-ms-client-flatten": true + } + } + }, "ClusterProperties": { "description": "Cluster properties.", "type": "object", @@ -382,6 +399,10 @@ "type": "string", "readOnly": true }, + "cloudManagementEndpoint": { + "type": "string", + "description": "Endpoint configured for management from the Azure portal" + }, "aadClientId": { "description": "App id of cluster AAD identity.", "type": "string" @@ -425,6 +446,16 @@ } } }, + "ClusterPatchProperties": { + "description": "Cluster properties.", + "type": "object", + "properties": { + "cloudManagementEndpoint": { + "type": "string", + "description": "Endpoint configured for management from the Azure portal" + } + } + }, "ClusterReportedProperties": { "description": "Properties reported by cluster agent.", "type": "object", @@ -510,19 +541,6 @@ "readOnly": true } } - }, - "ClusterUpdate": { - "description": "Cluster details to update.", - "type": "object", - "properties": { - "tags": { - "description": "Resource tags.", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } } }, "parameters": { diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/CreateCluster.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/CreateCluster.json index 38f0f74c0f8b..edb831c4487c 100644 --- a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/CreateCluster.json +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/CreateCluster.json @@ -7,6 +7,7 @@ "cluster": { "location": "East US", "properties": { + "cloudManagementEndpoint": "https://98294836-31be-4668-aeae-698667faf99b.waconazure.com", "aadClientId": "24a6e53d-04e5-44d2-b7cc-1b732a847dfc", "aadTenantId": "7e589cc1-a8b6-4dff-91bd-5ec0fa18db94" } @@ -20,10 +21,19 @@ "type": "Microsoft.AzureStackHCI/clusters", "location": "East US", "tags": {}, + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" + }, "properties": { "provisioningState": "Succeeded", "status": "NotYetRegistered", "cloudId": "a3c0468f-e38e-4dda-ac48-817f620536f0", + "cloudManagementEndpoint": "https://98294836-31be-4668-aeae-698667faf99b.waconazure.com", "aadClientId": "24a6e53d-04e5-44d2-b7cc-1b732a847dfc", "aadTenantId": "7e589cc1-a8b6-4dff-91bd-5ec0fa18db94", "reportedProperties": {}, diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/DeleteArcSetting.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/DeleteArcSetting.json index f2c042cf1996..33dea5921c34 100644 --- a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/DeleteArcSetting.json +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/DeleteArcSetting.json @@ -8,6 +8,7 @@ }, "responses": { "200": {}, + "202": {}, "204": {} } } diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/DeleteExtension.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/DeleteExtension.json index d2d9a6b5088f..c8e6f345ed2c 100644 --- a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/DeleteExtension.json +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/DeleteExtension.json @@ -9,6 +9,7 @@ }, "responses": { "200": {}, + "202": {}, "204": {} } } diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/GetArcSetting.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/GetArcSetting.json index ec2de4f65fd0..9e69a057c1a4 100644 --- a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/GetArcSetting.json +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/GetArcSetting.json @@ -22,7 +22,7 @@ "properties": { "provisioningState": "Succeeded", "arcInstanceResourceGroup": "ArcInstance-rg", - "aggregateState": "Partially Connected", + "aggregateState": "PartiallyConnected", "perNodeDetails": [ { "name": "Node-1", diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/GetCluster.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/GetCluster.json index d58786581d7e..693b2636ba04 100644 --- a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/GetCluster.json +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/GetCluster.json @@ -13,10 +13,19 @@ "type": "Microsoft.AzureStackHCI/clusters", "location": "East US", "tags": {}, + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" + }, "properties": { "provisioningState": "Succeeded", "status": "ConnectedRecently", "cloudId": "a3c0468f-e38e-4dda-ac48-817f620536f0", + "cloudManagementEndpoint": "https://98294836-31be-4668-aeae-698667faf99b.waconazure.com", "aadClientId": "24a6e53d-04e5-44d2-b7cc-1b732a847dfc", "aadTenantId": "7e589cc1-a8b6-4dff-91bd-5ec0fa18db94", "reportedProperties": { diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/GetExtension.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/GetExtension.json index b77b38ceb0c6..56d8fe6308dc 100644 --- a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/GetExtension.json +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/GetExtension.json @@ -29,12 +29,10 @@ "typeHandlerVersion": "1.10.3", "autoUpgradeMinorVersion": false, "settings": { - "workspaceId": "xx", - "workspaceKey": "xx" - }, - "protectedSettings": {} + "workspaceId": "xx" + } }, - "aggregateState": "Partially Succeeded", + "aggregateState": "PartiallySucceeded", "perNodeExtensionDetails": [ { "name": "Node-1", diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/ListArcSettingsByCluster.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/ListArcSettingsByCluster.json index f6db5d851bc4..f16546b83095 100644 --- a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/ListArcSettingsByCluster.json +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/ListArcSettingsByCluster.json @@ -23,7 +23,7 @@ "properties": { "provisioningState": "Succeeded", "arcInstanceResourceGroup": "ArcInstance-rg", - "aggregateState": "Partially Connected", + "aggregateState": "PartiallyConnected", "perNodeDetails": [ { "name": "Node-1", diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/ListClustersByResourceGroup.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/ListClustersByResourceGroup.json index 9715fef2a452..c0c5fc6ac4c6 100644 --- a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/ListClustersByResourceGroup.json +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/ListClustersByResourceGroup.json @@ -14,10 +14,19 @@ "type": "Microsoft.AzureStackHCI/clusters", "location": "East US", "tags": {}, + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" + }, "properties": { "provisioningState": "Succeeded", "status": "NotYetRegistered", "cloudId": "91c2b355-4826-4e96-9164-e3f26dcf1cdd", + "cloudManagementEndpoint": "https://98294836-31be-4668-aeae-698667faf99b.waconazure.com", "aadClientId": "515da1c2-379e-49b4-9975-09e3e40c86be", "aadTenantId": "7e589cc1-a8b6-4dff-91bd-5ec0fa18db94", "reportedProperties": {}, @@ -31,10 +40,19 @@ "type": "Microsoft.AzureStackHCI/clusters", "location": "East US", "tags": {}, + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" + }, "properties": { "provisioningState": "Succeeded", "status": "ConnectedRecently", "cloudId": "a3c0468f-e38e-4dda-ac48-817f620536f0", + "cloudManagementEndpoint": "https://98294836-31be-4668-aeae-698667faf99b.waconazure.com", "aadClientId": "24a6e53d-04e5-44d2-b7cc-1b732a847dfc", "aadTenantId": "7e589cc1-a8b6-4dff-91bd-5ec0fa18db94", "reportedProperties": { diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/ListClustersBySubscription.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/ListClustersBySubscription.json index 67e889c76a47..de736bc9c1de 100644 --- a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/ListClustersBySubscription.json +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/ListClustersBySubscription.json @@ -13,10 +13,19 @@ "type": "Microsoft.AzureStackHCI/clusters", "location": "East US", "tags": {}, + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" + }, "properties": { "provisioningState": "Succeeded", "status": "NotYetRegistered", "cloudId": "91c2b355-4826-4e96-9164-e3f26dcf1cdd", + "cloudManagementEndpoint": "https://98294836-31be-4668-aeae-698667faf99b.waconazure.com", "aadClientId": "515da1c2-379e-49b4-9975-09e3e40c86be", "aadTenantId": "7e589cc1-a8b6-4dff-91bd-5ec0fa18db94", "reportedProperties": {}, @@ -30,10 +39,19 @@ "type": "Microsoft.AzureStackHCI/clusters", "location": "West US", "tags": {}, + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" + }, "properties": { "provisioningState": "Succeeded", "status": "ConnectedRecently", "cloudId": "a3c0468f-e38e-4dda-ac48-817f620536f0", + "cloudManagementEndpoint": "https://98294836-31be-4668-aeae-698667faf99b.waconazure.com", "aadClientId": "24a6e53d-04e5-44d2-b7cc-1b732a847dfc", "aadTenantId": "7e589cc1-a8b6-4dff-91bd-5ec0fa18db94", "reportedProperties": { diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/ListExtensionsByArcSetting.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/ListExtensionsByArcSetting.json index 8f84c2f1c220..d648cc7d3c22 100644 --- a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/ListExtensionsByArcSetting.json +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/ListExtensionsByArcSetting.json @@ -30,12 +30,10 @@ "typeHandlerVersion": "1.10.3", "autoUpgradeMinorVersion": false, "settings": { - "workspaceId": "xx", - "workspaceKey": "xx" - }, - "protectedSettings": {} + "workspaceId": "xx" + } }, - "aggregateState": "Partially Connected", + "aggregateState": "PartiallyConnected", "perNodeExtensionDetails": [ { "name": "Node-1", @@ -71,10 +69,9 @@ "autoUpgradeMinorVersion": false, "settings": { "scriptLocation": "xx" - }, - "protectedSettings": {} + } }, - "aggregateState": "Partially Succeeded", + "aggregateState": "PartiallySucceeded", "perNodeExtensionDetails": [ { "name": "Node-1", diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/PatchExtension.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/PatchExtension.json index 80cc4dc3bfa6..659e0f8271cf 100644 --- a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/PatchExtension.json +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/PatchExtension.json @@ -12,8 +12,7 @@ "typeHandlerVersion": "1.10", "type": "MicrosoftMonitoringAgent", "settings": { - "workspaceId": "xx", - "workspaceKey": "xx" + "workspaceId": "xx" } } } @@ -42,12 +41,10 @@ "typeHandlerVersion": "1.10.3", "autoUpgradeMinorVersion": false, "settings": { - "workspaceId": "xx", - "workspaceKey": "xx" - }, - "protectedSettings": {} + "workspaceId": "xx" + } }, - "aggregateState": "Partially Connected", + "aggregateState": "PartiallyConnected", "perNodeExtensionDetails": [ { "name": "Node-1", diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/PutArcSetting.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/PutArcSetting.json index 398e28ef5ba1..0da113834792 100644 --- a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/PutArcSetting.json +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/PutArcSetting.json @@ -23,17 +23,17 @@ "properties": { "provisioningState": "Succeeded", "arcInstanceResourceGroup": "ArcInstance-rg", - "aggregateState": "Installing", + "aggregateState": "Creating", "perNodeDetails": [ { "name": "Node-1", "arcInstance": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machine/Node-1", - "state": "Installing" + "state": "Creating" }, { "name": "Node-2", "arcInstance": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machine/Node-2", - "state": "Installing" + "state": "Creating" } ] } diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/PutExtension.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/PutExtension.json index f01c5a7cea51..10c96ddf224e 100644 --- a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/PutExtension.json +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/PutExtension.json @@ -12,7 +12,9 @@ "typeHandlerVersion": "1.10", "type": "MicrosoftMonitoringAgent", "settings": { - "workspaceId": "xx", + "workspaceId": "xx" + }, + "protectedSettings": { "workspaceKey": "xx" } } @@ -42,12 +44,10 @@ "typeHandlerVersion": "1.10.3", "autoUpgradeMinorVersion": false, "settings": { - "workspaceId": "xx", - "workspaceKey": "xx" - }, - "protectedSettings": {} + "workspaceId": "xx" + } }, - "aggregateState": "Partially Succeeded", + "aggregateState": "PartiallySucceeded", "perNodeExtensionDetails": [ { "name": "Node-1", @@ -84,12 +84,10 @@ "typeHandlerVersion": "1.10.3", "autoUpgradeMinorVersion": false, "settings": { - "workspaceId": "xx", - "workspaceKey": "xx" - }, - "protectedSettings": {} + "workspaceId": "xx" + } }, - "aggregateState": "Partially Succeeded", + "aggregateState": "PartiallySucceeded", "perNodeExtensionDetails": [ { "name": "Node-1", diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/UpdateCluster.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/UpdateCluster.json index 1a7a5a6e7e1d..4a4a6d11f3dd 100644 --- a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/UpdateCluster.json +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/examples/UpdateCluster.json @@ -22,10 +22,19 @@ "tag1": "value1", "tag2": "value2" }, + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" + }, "properties": { "provisioningState": "Succeeded", "status": "ConnectedRecently", "cloudId": "91c2b355-4826-4e96-9164-e3f26dcf1cdd", + "cloudManagementEndpoint": "https://98294836-31be-4668-aeae-698667faf99b.waconazure.com", "aadClientId": "515da1c2-379e-49b4-9975-09e3e40c86be", "aadTenantId": "7e589cc1-a8b6-4dff-91bd-5ec0fa18db94", "reportedProperties": { diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/extensions.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/extensions.json index 021b6cfb5f09..8ba78d0e805f 100644 --- a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/extensions.json +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/extensions.json @@ -268,6 +268,9 @@ "200": { "description": "OK" }, + "202": { + "description": "OK" + }, "204": { "description": "OK" }, @@ -303,7 +306,7 @@ "systemData": { "description": "System data of Extension resource.", "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData", - "x-ms-client-flatten": true + "readOnly": true }, "properties": { "description": "Describes Machine Extension Properties.", @@ -313,11 +316,11 @@ } }, "ExtensionProperties": { - "description": "Extension properties.", + "description": "Status of Arc Extension for a particular node in HCI Cluster.", "type": "object", "properties": { "provisioningState": { - "description": "Provisioning state of the Extension proxy resource", + "description": "Provisioning state of the Extension proxy resource.", "type": "string", "enum": [ "Succeeded", @@ -341,13 +344,21 @@ "description": "Aggregate state of Arc Extensions across the nodes in this HCI cluster.", "type": "string", "enum": [ + "NotSpecified", + "Error", "Succeeded", - "Partially Succeeded", + "Canceled", "Failed", - "Not Started", - "Installing", + "Connected", + "Disconnected", + "Deleted", + "Creating", + "Updating", "Deleting", - "Error" + "Moving", + "PartiallySucceeded", + "PartiallyConnected", + "InProgress" ], "x-ms-enum": { "name": "ExtensionAggregateState", @@ -366,7 +377,7 @@ } }, "PerNodeExtensionState": { - "description": "Status of Arc Extension for a particular node in HCI Cluster", + "description": "Status of Arc Extension for a particular node in HCI Cluster.", "type": "object", "properties": { "name": { @@ -383,12 +394,18 @@ "description": "State of Arc Extension in this node.", "type": "string", "enum": [ + "NotSpecified", + "Error", "Succeeded", + "Canceled", "Failed", - "Not Started", - "Installing", + "Connected", + "Disconnected", + "Deleted", + "Creating", + "Updating", "Deleting", - "Error" + "Moving" ], "x-ms-enum": { "name": "NodeExtensionState", @@ -399,7 +416,7 @@ } }, "ExtensionList": { - "description": "List of Extensions in HCI cluster", + "description": "List of Extensions in HCI cluster.", "type": "object", "properties": { "value": { @@ -447,7 +464,8 @@ }, "protectedSettings": { "type": "object", - "description": "The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all." + "description": "Protected settings (may contain secrets).", + "x-ms-secret": true } } } From a001fe7ab97b46a648736731949518597553e486 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magdalena=20Bia=C5=82ecka?= <2598290+mbialecka@users.noreply.github.com> Date: Fri, 21 May 2021 14:44:23 -0700 Subject: [PATCH 11/11] Flatten system data --- .../preview/2021-01-01-preview/arcSettings.json | 1 + .../preview/2021-01-01-preview/clusters.json | 1 + .../preview/2021-01-01-preview/extensions.json | 1 + 3 files changed, 3 insertions(+) diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/arcSettings.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/arcSettings.json index d3fcd7a6887b..6b01d85d5b2b 100644 --- a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/arcSettings.json +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/arcSettings.json @@ -247,6 +247,7 @@ "systemData": { "description": "System data of ArcSetting resource", "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData", + "x-ms-client-flatten": true, "readOnly": true }, "properties": { diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/clusters.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/clusters.json index 47a656783765..bcfe0418f8e6 100644 --- a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/clusters.json +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/clusters.json @@ -327,6 +327,7 @@ "systemData": { "description": "System data of Cluster resource", "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData", + "x-ms-client-flatten": true, "readOnly": true }, "properties": { diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/extensions.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/extensions.json index 8ba78d0e805f..6140987c9459 100644 --- a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/extensions.json +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2021-01-01-preview/extensions.json @@ -306,6 +306,7 @@ "systemData": { "description": "System data of Extension resource.", "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData", + "x-ms-client-flatten": true, "readOnly": true }, "properties": {