diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/Tables.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/Tables.json new file mode 100644 index 000000000000..cf4e21a219ef --- /dev/null +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/Tables.json @@ -0,0 +1,241 @@ +{ + "swagger": "2.0", + "info": { + "title": "Azure Log Analytics", + "description": "Azure Log Analytics API reference", + "version": "2020-03-01-preview" + }, + "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.OperationalInsights/workspaces/{workspaceName}/tables": { + "get": { + "tags": [ + "Tables" + ], + "x-ms-examples": { + "TablesListByWorkspace": { + "$ref": "./examples/TablesList.json" + } + }, + "operationId": "Tables_ListByWorkspace", + "description": "Gets all the tables for the specified Log Analytics workspace.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/WorkspaceNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK response definition.", + "schema": { + "$ref": "#/definitions/TablesListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorContract" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/tables/{tableName}": { + "patch": { + "tags": [ + "Tables" + ], + "x-ms-examples": { + "TablesSet": { + "$ref": "./examples/TablesUpdate.json" + } + }, + "operationId": "Tables_Update", + "description": "Updates a Log Analytics workspace table properties.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/WorkspaceNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/TableNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Table" + }, + "description": "The parameters required to update table properties." + } + ], + "responses": { + "200": { + "description": "OK response definition.", + "schema": { + "$ref": "#/definitions/Table" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorContract" + } + } + } + }, + "get": { + "tags": [ + "Tables" + ], + "x-ms-examples": { + "TablesGet": { + "$ref": "./examples/TablesGet.json" + } + }, + "operationId": "Tables_Get", + "description": "Gets a Log Analytics workspace table.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/WorkspaceNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/TableNameParameter" + } + ], + "responses": { + "200": { + "description": "OK response definition.", + "schema": { + "$ref": "#/definitions/Table" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorContract" + } + } + } + } + } + }, + "definitions": { + "TableProperties": { + "properties": { + "retentionInDays": { + "type": "integer", + "format": "int32", + "minimum": 30, + "maximum": 730, + "description": "The data table data retention in days, between 30 and 730. Setting this property to null will default to the workspace retention." + } + }, + "description": "Table properties." + }, + "Table": { + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/TableProperties", + "description": "Table properties." + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/ProxyResource" + } + ], + "description": "Workspace data table definition." + }, + "TablesListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Table" + }, + "description": "A list of data tables." + } + }, + "description": "The list tables operation response." + }, + "ErrorContract": { + "title": "Error details.", + "description": "Contains details when the response code indicates an error.", + "properties": { + "error": { + "description": "The details of the error.", + "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/ErrorResponse" + } + } + } + }, + "parameters": { + "TableNameParameter": { + "name": "tableName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the table.", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/Workspaces.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/Workspaces.json index e59d71422c38..ba83bc703b01 100644 --- a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/Workspaces.json +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/Workspaces.json @@ -369,6 +369,23 @@ "name": "WorkspaceSkuNameEnum", "modelAsString": true } + }, + "capacityReservationLevel": { + "type": "integer", + "format": "int32", + "description": "The capacity reservation level for this workspace, when CapacityReservation sku is selected." + }, + "maxCapacityReservationLevel": { + "type": "integer", + "format": "int32", + "description": "The maximum capacity reservation level available for this workspace, when CapacityReservation sku is selected.", + "readOnly": true + }, + "lastSkuUpdate": { + "type": "string", + "format": "date-time", + "description": "The last time when the sku was updated.", + "readOnly": true } }, "required": [ @@ -376,6 +393,39 @@ ], "description": "The SKU (tier) of a workspace." }, + "WorkspaceCapping": { + "description": "The daily volume cap for ingestion.", + "properties": { + "dailyQuotaGb": { + "type": "number", + "format": "double", + "description": "The workspace daily quota for ingestion. -1 means unlimited." + }, + "quotaNextResetTime": { + "type": "string", + "format": "date-time", + "description": "The time when the quota will be rest.", + "readOnly": true + }, + "dataIngestionStatus": { + "type": "string", + "readOnly": true, + "description": "The status of data ingestion for this workspace.", + "enum": [ + "RespectQuota", + "ForceOn", + "ForceOff", + "OverQuota", + "SubscriptionSuspended", + "ApproachingQuota" + ], + "x-ms-enum": { + "name": "DataIngestionStatus", + "modelAsString": true + } + } + } + }, "WorkspaceProperties": { "properties": { "provisioningState": { @@ -411,6 +461,10 @@ "maximum": 730, "description": "The workspace data retention in days. -1 means Unlimited retention for the Unlimited Sku. 730 days is the maximum allowed for all other Skus. " }, + "workspaceCapping": { + "$ref": "#/definitions/WorkspaceCapping", + "description": "The daily volume cap for ingestion." + }, "publicNetworkAccessForIngestion": { "description": "The network access type for accessing Log Analytics ingestion.", "$ref": "#/definitions/PublicNetworkAccessType" diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/examples/TablesGet.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/examples/TablesGet.json new file mode 100644 index 000000000000..917972b62b21 --- /dev/null +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/examples/TablesGet.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "resourceGroupName": "oiautorest6685", + "workspaceName": "oiautorest6685", + "api-version": "2020-03-01-preview", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "tableName": "table1" + }, + "responses": { + "200": { + "body": { + "properties": { + "retentionInDays": 30 + }, + "id": "/subscriptions/594038b5-1093-476e-a366-482775671c11/resourcegroups/calbot-rg/providers/microsoft.operationalinsights/workspaces/testresourcelock/tables/table1", + "name": "table1" + } + } + } +} diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/examples/TablesList.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/examples/TablesList.json new file mode 100644 index 000000000000..3cce506d888d --- /dev/null +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/examples/TablesList.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "resourceGroupName": "oiautorest6685", + "workspaceName": "oiautorest6685", + "api-version": "2020-03-01-preview", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "responses": { + "200": { + "body": [ + { + "properties": { + "retentionInDays": 7 + }, + "id": "/subscriptions/594038b5-1093-476e-a366-482775671c11/resourcegroups/calbot-rg/providers/microsoft.operationalinsights/workspaces/testresourcelock/tables/table1", + "name": "table1" + }, + { + "properties": { + "retentionInDays": 7 + }, + "id": "/subscriptions/594038b5-1093-476e-a366-482775671c11/resourcegroups/calbot-rg/providers/microsoft.operationalinsights/workspaces/testresourcelock/tables/table2", + "name": "table2" + }, + { + "properties": { + "retentionInDays": 7 + }, + "id": "/subscriptions/594038b5-1093-476e-a366-482775671c11/resourcegroups/calbot-rg/providers/microsoft.operationalinsights/workspaces/testresourcelock/tables/table3", + "name": "table3" + } + ] + } + } +} diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/examples/TablesUpdate.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/examples/TablesUpdate.json new file mode 100644 index 000000000000..4005ab95a59a --- /dev/null +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/examples/TablesUpdate.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "resourceGroupName": "oiautorest6685", + "workspaceName": "oiautorest6685", + "api-version": "2020-03-01-preview", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "tableName": "table1", + "parameters": { + "properties": { + "retentionInDays": 30 + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "retentionInDays": 30 + }, + "id": "/subscriptions/594038b5-1093-476e-a366-482775671c11/resourcegroups/calbot-rg/providers/microsoft.operationalinsights/workspaces/testresourcelock/tables/table1", + "name": "table1" + } + } + } +} diff --git a/specification/operationalinsights/resource-manager/readme.md b/specification/operationalinsights/resource-manager/readme.md index d05cc07729fb..738ae481fc00 100644 --- a/specification/operationalinsights/resource-manager/readme.md +++ b/specification/operationalinsights/resource-manager/readme.md @@ -87,6 +87,7 @@ input-file: - Microsoft.OperationalInsights/preview/2020-03-01-preview/Schema.json - Microsoft.OperationalInsights/preview/2020-03-01-preview/SharedKeys.json - Microsoft.OperationalInsights/preview/2020-03-01-preview/WorkspacePurge.json +- Microsoft.OperationalInsights/preview/2020-03-01-preview/Tables.json ``` --- @@ -216,6 +217,7 @@ input-file: - $(this-folder)/Microsoft.OperationalInsights/preview/2020-03-01-preview/Gateways.json - $(this-folder)/Microsoft.OperationalInsights/preview/2020-03-01-preview/Schema.json - $(this-folder)/Microsoft.OperationalInsights/preview/2020-03-01-preview/WorkspacePurge.json + - $(this-folder)/Microsoft.OperationalInsights/preview/2020-03-01-preview/Tables.json ```