Skip to content

Commit

Permalink
AssociatedWorkspaces and CapacityReservationProperties added to clust…
Browse files Browse the repository at this point in the history
…er (#11736)

* AssociatedWorkspaces and CapacityReservationProperties added to cluster. Cluser defualt error bug fixed

* change AssociatedWorkspaces to array

* fix validation errors

* fix validation errors

* missing token added

* read only properties deleted

* read only properties deleted

* LintDIff Errors Fixed

* LACluster added to WorkspaceSku

* update error description

* revert types.json changes

* add prettier

* change default error response to use V2 format

* use V2 types.json file

Co-authored-by: Arie Olshanezky <arolshan@microsoft.com>
  • Loading branch information
dhaiman and arolshan authored Nov 24, 2020
1 parent 03adb71 commit d4d7ea6
Show file tree
Hide file tree
Showing 6 changed files with 212 additions and 106 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@
"description": "Gets Log Analytics clusters in a resource group.",
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter"
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter"
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter"
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
Expand All @@ -67,7 +67,7 @@
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ClusterErrorResponse"
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
}
}
},
Expand All @@ -90,10 +90,10 @@
"description": "Gets the Log Analytics clusters in a subscription.",
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter"
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter"
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
Expand All @@ -106,7 +106,7 @@
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ClusterErrorResponse"
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
}
}
},
Expand All @@ -129,13 +129,13 @@
"description": "Create or update a Log Analytics cluster.",
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter"
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter"
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter"
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter"
},
{
"name": "clusterName",
Expand Down Expand Up @@ -176,7 +176,7 @@
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ClusterErrorResponse"
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
}
}
},
Expand All @@ -195,7 +195,7 @@
"description": "Deletes a cluster instance.",
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter"
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
},
{
"name": "clusterName",
Expand All @@ -205,10 +205,10 @@
"description": "Name of the Log Analytics Cluster."
},
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter"
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter"
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
Expand All @@ -221,7 +221,7 @@
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ClusterErrorResponse"
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
}
}
},
Expand All @@ -240,13 +240,13 @@
"description": "Gets a Log Analytics cluster instance.",
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter"
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter"
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter"
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
},
{
"name": "clusterName",
Expand All @@ -266,7 +266,7 @@
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ClusterErrorResponse"
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
}
}
}
Expand All @@ -284,7 +284,7 @@
"description": "Updates a Log Analytics cluster.",
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter"
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
},
{
"name": "clusterName",
Expand All @@ -303,10 +303,10 @@
"description": "The parameters required to patch a Log Analytics cluster."
},
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter"
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter"
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
Expand All @@ -319,7 +319,7 @@
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ClusterErrorResponse"
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
}
}
}
Expand Down Expand Up @@ -381,20 +381,31 @@
"keyVaultProperties": {
"$ref": "#/definitions/keyVaultProperties",
"description": "The associated key properties."
},
"lastModifiedDate": {
"type": "string",
"description": "The last time the cluster was updated.",
"readOnly": true
},
"createdDate": {
"type": "string",
"description": "The cluster creation time",
"readOnly": true
},
"associatedWorkspaces": {
"description": "The list of Log Analytics workspaces associated with the cluster",
"type": "array",
"items": {
"$ref": "#/definitions/AssociatedWorkspace"
}
},
"capacityReservationProperties": {
"$ref": "#/definitions/CapacityReservationProperties",
"description": "Additional properties for capacity reservation"
}
},
"description": "Cluster properties."
},
"ClusterErrorResponse": {
"description": "Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.",
"type": "object",
"properties": {
"error": {
"description": "The details of the error.",
"$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/ErrorResponse"
}
}
},
"ClusterPatchProperties": {
"properties": {
"keyVaultProperties": {
Expand Down Expand Up @@ -453,7 +464,7 @@
},
"allOf": [
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/TrackedResource"
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/TrackedResource"
}
],
"description": "The top level Log Analytics cluster resource container."
Expand Down Expand Up @@ -573,6 +584,54 @@
"type": "string"
}
}
},
"AssociatedWorkspace": {
"type": "object",
"description": "The list of Log Analytics workspaces associated with the cluster.",
"properties": {
"workspaceId": {
"readOnly": true,
"description": "The id of the assigned workspace.",
"type": "string"
},
"workspaceName": {
"readOnly": true,
"description": "The name id the assigned workspace.",
"type": "string"
},
"resourceId": {
"readOnly": true,
"description": "The ResourceId id the assigned workspace.",
"type": "string"
},
"associateDate": {
"readOnly": true,
"description": "The time of workspace association.",
"type": "string"
}
}
},
"CapacityReservationProperties": {
"description": "The Capacity Reservation properties.",
"properties": {
"lastSkuUpdate": {
"readOnly": true,
"description": "The last time Sku was updated.",
"type": "string"
},
"minCapacity": {
"readOnly": true,
"description": "Minimum CapacityReservation value in GB.",
"type": "integer",
"format": "int64"
},
"maxCapacity": {
"readOnly": true,
"description": "Maximum CapacityReservation value in GB.",
"type": "integer",
"format": "int64"
}
}
}
},
"parameters": {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"description": "Lists all of the available OperationalInsights Rest API operations.",
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter"
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
}
],
"responses": {
Expand All @@ -57,6 +57,12 @@
"schema": {
"$ref": "#/definitions/OperationListResult"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
Expand Down
Loading

0 comments on commit d4d7ea6

Please sign in to comment.