diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2019-08-01-preview/Clusters.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2019-08-01-preview/Clusters.json new file mode 100644 index 000000000000..3d54b258332e --- /dev/null +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2019-08-01-preview/Clusters.json @@ -0,0 +1,562 @@ +{ + "swagger": "2.0", + "info": { + "title": "Azure Log Analytics", + "description": "Azure Log Analytics API reference", + "version": "2019-08-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/clusters": { + "get": { + "tags": [ + "Clusters" + ], + "x-ms-examples": { + "ClustersGet": { + "$ref": "./examples/ClustersListByResourceGroup.json" + } + }, + "operationId": "Clusters_ListByResourceGroup", + "description": "Gets Log Analytics clusters in a resource group.", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK response definition.", + "schema": { + "$ref": "#/definitions/ClusterListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/clusters": { + "get": { + "tags": [ + "Clusters" + ], + "x-ms-examples": { + "ClustersSubscriptionList": { + "$ref": "./examples/ClustersSubscriptionList.json" + } + }, + "operationId": "Clusters_List", + "description": "Gets the Log Analytics clusters in a subscription.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK response definition.", + "schema": { + "$ref": "#/definitions/ClusterListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}": { + "put": { + "tags": [ + "Clusters" + ], + "x-ms-examples": { + "ClustersCreate": { + "$ref": "./examples/ClustersCreate.json" + } + }, + "operationId": "Clusters_CreateOrUpdate", + "description": "Create or update a Log Analytics cluster.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The resource group name of the Log Analytics cluster." + }, + { + "name": "clusterName", + "in": "path", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$", + "minLength": 4, + "maxLength": 63, + "description": "The name of the Log Analytics cluster." + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Cluster" + }, + "description": "The parameters required to create or update a Log Analytics cluster." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK response definition.", + "schema": { + "$ref": "#/definitions/Cluster" + } + }, + "201": { + "description": "Created response definition.", + "schema": { + "$ref": "#/definitions/Cluster" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true + }, + "delete": { + "tags": [ + "Clusters" + ], + "x-ms-examples": { + "ClustersDelete": { + "$ref": "./examples/ClustersDelete.json" + } + }, + "operationId": "Clusters_Delete", + "description": "Deletes a cluster instance.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The resource group name of the Log Analytics cluster." + }, + { + "name": "clusterName", + "in": "path", + "required": true, + "type": "string", + "description": "Name of the Log Analytics Cluster." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK response definition." + }, + "204": { + "description": "NoContent response definition." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "get": { + "tags": [ + "Clusters" + ], + "x-ms-examples": { + "ClustersGet": { + "$ref": "./examples/ClustersGet.json" + } + }, + "operationId": "Clusters_Get", + "description": "Gets a Log Analytics cluster instance.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The resource group name of the Log Analytics cluster." + }, + { + "name": "clusterName", + "in": "path", + "required": true, + "type": "string", + "description": "Name of the Log Analytics Cluster." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK response definition.", + "schema": { + "$ref": "#/definitions/Cluster" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "patch": { + "tags": [ + "Clusters" + ], + "x-ms-examples": { + "ClustersPatch": { + "$ref": "./examples/ClustersUpdate.json" + } + }, + "operationId": "Clusters_Update", + "description": "Updates a Log Analytics cluster.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The resource group name of the cluster." + }, + { + "name": "clusterName", + "in": "path", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$", + "minLength": 4, + "maxLength": 63, + "description": "The name of the cluster." + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ClusterPatch" + }, + "description": "The parameters required to patch a Log Analytics cluster." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "The existing cluster was successfully updated. Check provisioningStatus to see detailed status.", + "schema": { + "$ref": "#/definitions/Cluster" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": { + "ClusterProperties": { + "properties": { + "nextLink": { + "description": "The link used to get the next page of recommendations.", + "type": "string" + }, + "clusterId": { + "type": "string", + "readOnly": true, + "description": "The ID associated with the cluster." + }, + "provisioningState": { + "type": "string", + "readOnly": true, + "description": "The provisioning state of the cluster.", + "enum": [ + "Creating", + "Succeeded", + "Failed", + "Canceled", + "Deleting", + "ProvisioningAccount" + ], + "x-ms-enum": { + "name": "EntityStatus", + "modelAsString": true + } + }, + "encryptionKeyUri": { + "type": "string", + "description": "The Key Vault key or certificate path associated with the Log Analytics cluster." + } + }, + "description": "Cluster properties." + }, + "ErrorResponse": { + "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": "#/definitions/ErrorDetails" + } + } + }, + "ErrorDetails": { + "description": "The details of the error.", + "properties": { + "code": { + "description": "Error code.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "Error message indicating why the operation failed.", + "type": "string", + "readOnly": true + }, + "target": { + "description": "The target of the particular error.", + "type": "string", + "readOnly": true + } + } + }, + "ClusterPatchProperties": { + "properties": { + "encryptionKeyUri": { + "type": "string", + "description": "The Key Vault key or certificate path associated with the Log Analytics cluster." + } + }, + "description": "Log Analytics cluster patch properties." + }, + "ClusterPatch": { + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ClusterPatchProperties", + "description": "Log Analytics cluster properties." + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Resource tags" + } + }, + "description": "The top level Log Analytics cluster resource container.", + "x-ms-azure-resource": true + }, + "Cluster": { + "properties": { + "identity": { + "$ref": "#/definitions/Identity", + "description": "The identity of the resource." + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ClusterProperties", + "description": "Log Analytics cluster properties." + } + }, + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "description": "The top level Log Analytics cluster resource container.", + "x-ms-azure-resource": true + }, + "ClusterListResult": { + "properties": { + "nextLink": { + "description": "The link used to get the next page of recommendations.", + "type": "string" + }, + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Cluster" + }, + "description": "A list of Log Analytics clusters." + } + }, + "description": "The list clusters operation response." + }, + "Identity": { + "properties": { + "principalId": { + "readOnly": true, + "type": "string", + "description": "The principal ID of resource identity." + }, + "tenantId": { + "readOnly": true, + "type": "string", + "description": "The tenant ID of resource." + }, + "type": { + "type": "string", + "description": "The identity type.", + "enum": [ + "SystemAssigned" + ], + "x-ms-enum": { + "name": "IdentityType", + "modelAsString": false + } + } + }, + "required": [ + "type" + ], + "description": "Identity for the resource." + }, + "Resource": { + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "Resource Id" + }, + "name": { + "readOnly": true, + "type": "string", + "description": "Resource name" + }, + "type": { + "readOnly": true, + "type": "string", + "description": "Resource type" + }, + "location": { + "type": "string", + "description": "Resource location" + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Resource tags" + } + }, + "description": "The resource definition.", + "x-ms-azure-resource": true + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call." + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "Client Api Version." + }, + "ResourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "x-ms-parameter-location": "method", + "description": "The name of the resource group to get. The name is case insensitive.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 90 + } + } +} diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2019-08-01-preview/examples/ClustersCreate.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2019-08-01-preview/examples/ClustersCreate.json new file mode 100644 index 000000000000..7b1b0ca8bda4 --- /dev/null +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2019-08-01-preview/examples/ClustersCreate.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "resourceGroupName": "oiautorest6685", + "clusterName": "oiautorest6685", + "parameters": { + "properties": { + "encryptionKeyUri": "https://aztest2170.vault.azure.net/certificates/aztest2170cert/654ft6c4e63845cbb50fd6fg51540429" + }, + "location": "australiasoutheast", + "tags": { + "tag1": "val1" + } + }, + "api-version": "2019-08-01-preview", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000005/resourcegroups/oiautorest6685/providers/microsoft.operationalinsights/clusters/aztest2170", + "identity": { + "principalId": "356d057d-cba5-44dd-8a30-b2e547bc416b", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "type": "SystemAssigned" + }, + "name": "AzTest2170", + "type": "Microsoft.OperationalInsights/clusters", + "location": "australiasoutheast", + "tags": { + "tag1": "val1" + }, + "properties": { + "clusterId": "bc089d7b-485c-4aff-a71e-c00f362d8d2f", + "provisioningState": "Creating", + "encryptionKeyUri": "https://aztest2170.vault.azure.net/certificates/aztest2170cert/654ft6c4e63845cbb50fd6fg51540429" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000005/resourcegroups/oiautorest6685/providers/microsoft.operationalinsights/clusters/aztest2170", + "identity": { + "principalId": "356d057d-cba5-44dd-8a30-b2e547bc416b", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "type": "SystemAssigned" + }, + "name": "AzTest2170", + "type": "Microsoft.OperationalInsights/clusters", + "location": "australiasoutheast", + "tags": { + "tag1": "val1" + }, + "properties": { + "clusterId": "bc089d7b-485c-4aff-a71e-c00f362d8d2f", + "provisioningState": "Creating", + "encryptionKeyUri": "https://aztest2170.vault.azure.net/certificates/aztest2170cert/654ft6c4e63845cbb50fd6fg51540429" + } + } + } + } +} diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2019-08-01-preview/examples/ClustersDelete.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2019-08-01-preview/examples/ClustersDelete.json new file mode 100644 index 000000000000..ef5a1aa640e8 --- /dev/null +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2019-08-01-preview/examples/ClustersDelete.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "resourceGroupName": "oiautorest6685", + "clusterName": "oiautorest6685", + "api-version": "2019-08-01-preview", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2019-08-01-preview/examples/ClustersGet.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2019-08-01-preview/examples/ClustersGet.json new file mode 100644 index 000000000000..bbbd3287a60c --- /dev/null +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2019-08-01-preview/examples/ClustersGet.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "resourceGroupName": "oiautorest6685", + "clusterName": "oiautorest6685", + "api-version": "2019-08-01-preview", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "responses": { + "200": { + "body": [ + { + "properties": { + "clusterId": "5b02755b-5bf4-430c-9487-45502a2a7e62", + "provisioningState": "Succeeded", + "encryptionKeyUri": "https://aztest2170.vault.azure.net/certificates/aztest2170cert/654ft6c4e63845cbb50fd6fg51540429" + }, + "id": "/subscriptions/594038b5-1093-476e-a366-482775671c11/resourcegroups/calbot-rg/providers/microsoft.operationalinsights/clusters/testresourcelock", + "identity": { + "principalId": "356d057d-cba5-44dd-8a30-b2e547bc416b", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "type": "SystemAssigned" + }, + "name": "TestResourceLock", + "type": "Microsoft.OperationalInsights/clusters", + "location": "eastus" + }, + { + "properties": { + "clusterId": "5b02755b-5bf4-430c-9487-45502a2a7e62", + "provisioningState": "Succeeded", + "encryptionKeyUri": "https://aztest2170.vault.azure.net/certificates/aztest2170cert/654ft6c4e63845cbb50fd6fg51540429" + }, + "id": "/subscriptions/594038b5-1093-476e-a366-482775671c11/resourcegroups/mms-eus/providers/microsoft.operationalinsights/clusters/southukws", + "identity": { + "principalId": "356d057d-cba5-44dd-8a30-b2e547bc416b", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "type": "SystemAssigned" + }, + "name": "SouthUKWS", + "type": "Microsoft.OperationalInsights/clusters", + "location": "East US" + } + ] + } + } +} diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2019-08-01-preview/examples/ClustersListByResourceGroup.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2019-08-01-preview/examples/ClustersListByResourceGroup.json new file mode 100644 index 000000000000..a1ff7a25d694 --- /dev/null +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2019-08-01-preview/examples/ClustersListByResourceGroup.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "resourceGroupName": "oiautorest6685", + "api-version": "2019-08-01-preview", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "responses": { + "200": { + "body": [ + { + "properties": { + "clusterId": "5b02755b-5bf4-430c-9487-45502a2a7e62", + "provisioningState": "Succeeded", + "encryptionKeyUri": "https://aztest2170.vault.azure.net/certificates/aztest2170cert/654ft6c4e63845cbb50fd6fg51540429" + }, + "id": "/subscriptions/594038b5-1093-476e-a366-482775671c11/resourcegroups/calbot-rg/providers/microsoft.operationalinsights/clusters/testresourcelock", + "identity": { + "principalId": "356d057d-cba5-44dd-8a30-b2e547bc416b", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "type": "SystemAssigned" + }, + "name": "TestResourceLock", + "type": "Microsoft.OperationalInsights/clusters", + "location": "eastus" + } + ] + } + } +} diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2019-08-01-preview/examples/ClustersSubscriptionList.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2019-08-01-preview/examples/ClustersSubscriptionList.json new file mode 100644 index 000000000000..1e7b4fe07231 --- /dev/null +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2019-08-01-preview/examples/ClustersSubscriptionList.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "api-version": "2019-08-01-preview", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "responses": { + "200": { + "body": [ + { + "properties": { + "clusterId": "5b02755b-5bf4-430c-9487-45502a2a7e62", + "provisioningState": "Succeeded", + "encryptionKeyUri": "https://aztest2170.vault.azure.net/certificates/aztest2170cert/654ft6c4e63845cbb50fd6fg51540429" + }, + "id": "/subscriptions/594038b5-1093-476e-a366-482775671c11/resourcegroups/calbot-rg/providers/microsoft.operationalinsights/clusters/testresourcelock", + "identity": { + "principalId": "356d057d-cba5-44dd-8a30-b2e547bc416b", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "type": "SystemAssigned" + }, + "name": "TestResourceLock", + "type": "Microsoft.OperationalInsights/clusters", + "location": "eastus" + } + ] + } + } +} diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2019-08-01-preview/examples/ClustersUpdate.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2019-08-01-preview/examples/ClustersUpdate.json new file mode 100644 index 000000000000..4c58b3ab8e8a --- /dev/null +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2019-08-01-preview/examples/ClustersUpdate.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "resourceGroupName": "oiautorest6685", + "clusterName": "oiautorest6685", + "parameters": { + "properties": { + "encryptionKeyUri": "https://aztest2170.vault.azure.net/certificates/aztest2170cert/654ft6c4e63845cbb50fd6fg51540429" + }, + "tags": { + "tag1": "val1" + } + }, + "api-version": "2019-08-01-preview", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "responses": { + "200": { + "body": { + "properties": { + "encryptionKeyUri": "https://aztest2170.vault.azure.net/certificates/aztest2170cert/654ft6c4e63845cbb50fd6fg51540429" + }, + "location": "australiasoutheast", + "tags": { + "tag1": "val1" + } + } + } + } +} diff --git a/specification/operationalinsights/resource-manager/readme.md b/specification/operationalinsights/resource-manager/readme.md index 7b2b5e8d19e1..19a7cc378fac 100644 --- a/specification/operationalinsights/resource-manager/readme.md +++ b/specification/operationalinsights/resource-manager/readme.md @@ -50,6 +50,15 @@ input-file: - Microsoft.OperationalInsights/stable/2015-03-20/OperationalInsights.json ``` +### Tag: package-2019-08-preview + +These settings apply only when `--tag=package-2019-08-preview` is specified on the command line. + +``` yaml $(tag) == 'package-2019-08-preview' +input-file: +- Microsoft.OperationalInsights/preview/2019-08-01-preview/Clusters.json +``` + --- # Code Generation