From e5412497b373a0deddec08ab5213346a92792c54 Mon Sep 17 00:00:00 2001 From: varun kumar kunchakuri <66476965+vakuncha@users.noreply.github.com> Date: Wed, 3 Mar 2021 13:29:27 +0530 Subject: [PATCH 01/31] New Readme Config File --- .../elastic/resource-manager/readme.md | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 specification/elastic/resource-manager/readme.md diff --git a/specification/elastic/resource-manager/readme.md b/specification/elastic/resource-manager/readme.md new file mode 100644 index 000000000000..4355eae409b9 --- /dev/null +++ b/specification/elastic/resource-manager/readme.md @@ -0,0 +1,83 @@ +# elastic + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for elastic. + +## Getting Started + +To build the SDKs for My API, simply install AutoRest via `npm` (`npm install -g autorest`) and then run: + +> `autorest readme.md` + +To see additional help and options, run: + +> `autorest --help` + +For other options on installation see [Installing AutoRest](https://aka.ms/autorest/install) on the AutoRest github page. + +--- + +## Configuration + +### Basic Information + +These are the global settings for the elastic. + +```yaml +openapi-type: arm +tag: package-2020-07-01-preview +``` + +### Tag: package-2020-07-01-preview + +These settings apply only when `--tag=package-2020-07-01-preview` is specified on the command line. + +```yaml $(tag) == 'package-2020-07-01-preview' +input-file: + - Microsoft.Elastic/preview/2020-07-01-preview/elastic.json +``` + +--- + +# Code Generation + +## Swagger to SDK + +This section describes what SDK should be generated by the automatic system. +This is not used by Autorest itself. + +```yaml $(swagger-to-sdk) +swagger-to-sdk: + - repo: azure-sdk-for-python-track2 + - repo: azure-sdk-for-java + - repo: azure-sdk-for-go + - repo: azure-sdk-for-js + - repo: azure-resource-manager-schemas + after_scripts: + - node sdkauto_afterscript.js elastic/resource-manager + - repo: azure-cli-extensions +``` +## Az + +See configuration in [readme.az.md](./readme.az.md) + +## Go + +See configuration in [readme.go.md](./readme.go.md) + +## Python + +See configuration in [readme.python.md](./readme.python.md) + +## TypeScript + +See configuration in [readme.typescript.md](./readme.typescript.md) + +## CSharp + +See configuration in [readme.csharp.md](./readme.csharp.md) + +## AzureResourceSchema + +See configuration in [readme.azureresourceschema.md](./readme.azureresourceschema.md) From 26c20f1cc155b028d388e7342b08b7870d82e104 Mon Sep 17 00:00:00 2001 From: varun kumar kunchakuri <66476965+vakuncha@users.noreply.github.com> Date: Wed, 3 Mar 2021 13:29:27 +0530 Subject: [PATCH 02/31] New Go Language Readme Config File --- .../elastic/resource-manager/readme.go.md | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 specification/elastic/resource-manager/readme.go.md diff --git a/specification/elastic/resource-manager/readme.go.md b/specification/elastic/resource-manager/readme.go.md new file mode 100644 index 000000000000..8f84a22f7d5e --- /dev/null +++ b/specification/elastic/resource-manager/readme.go.md @@ -0,0 +1,26 @@ +## Go + +These settings apply only when `--go` is specified on the command line. + +```yaml $(go) +go: + license-header: MICROSOFT_APACHE_NO_VERSION + namespace: elastic + clear-output-folder: true +``` + +### Go multi-api + +``` yaml $(go) && $(multiapi) +batch: + - tag: package-2020-07-01-preview-preview +``` + +### Tag: package-2020-07-01-preview-preview and go + +These settings apply only when `--tag=package-2020-07-01-preview-preview --go` is specified on the command line. +Please also specify `--go-sdk-folder=`. + +```yaml $(tag) == 'package-2020-07-01-preview-preview' && $(go) +output-folder: $(go-sdk-folder)/services/preview/$(namespace)/mgmt/2020-07-01-preview/$(namespace) +``` From 146285bbe6b86be9b3dbf01f6c8f08e35a917d59 Mon Sep 17 00:00:00 2001 From: varun kumar kunchakuri <66476965+vakuncha@users.noreply.github.com> Date: Wed, 3 Mar 2021 13:29:27 +0530 Subject: [PATCH 03/31] New Azure AZ Readme Config File --- .../elastic/resource-manager/readme.az.md | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 specification/elastic/resource-manager/readme.az.md diff --git a/specification/elastic/resource-manager/readme.az.md b/specification/elastic/resource-manager/readme.az.md new file mode 100644 index 000000000000..861172c17a99 --- /dev/null +++ b/specification/elastic/resource-manager/readme.az.md @@ -0,0 +1,28 @@ +## AZ + +These settings apply only when `--az` is specified on the command line. + +For new Resource Provider. It is highly recommended to onboard Azure CLI extensions. There's no differences in terms of customer usage. + +``` yaml $(az) && $(target-mode) != 'core' +az: + extensions: elastic + namespace: azure.mgmt.elastic + package-name: azure-mgmt-elastic +az-output-folder: $(azure-cli-extension-folder)/src/elastic +python-sdk-output-folder: "$(az-output-folder)/azext_elastic/vendored_sdks/elastic" +# add additinal configuration here specific for Azure CLI +# refer to the faq.md for more details +``` + + + +This is for command modules that already in azure cli main repo. +``` yaml $(az) && $(target-mode) == 'core' +az: + extensions: elastic + namespace: azure.mgmt.elastic + package-name: azure-mgmt-elastic +az-output-folder: $(azure-cli-folder)/src/azure-cli/azure/cli/command_modules/elastic +python-sdk-output-folder: "$(az-output-folder)/vendored_sdks/elastic" +``` \ No newline at end of file From 77c4b3aff0472aa0d6ce67c150362854492ccceb Mon Sep 17 00:00:00 2001 From: varun kumar kunchakuri <66476965+vakuncha@users.noreply.github.com> Date: Wed, 3 Mar 2021 13:29:28 +0530 Subject: [PATCH 04/31] New Azure CLI Readme Config File --- specification/elastic/resource-manager/readme.cli.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 specification/elastic/resource-manager/readme.cli.md diff --git a/specification/elastic/resource-manager/readme.cli.md b/specification/elastic/resource-manager/readme.cli.md new file mode 100644 index 000000000000..c6cf6ad37ea4 --- /dev/null +++ b/specification/elastic/resource-manager/readme.cli.md @@ -0,0 +1 @@ +## CLI Common Settings for all the command line tools \ No newline at end of file From ebbbe71c975faf344ed77a8eea0f64ae997539c7 Mon Sep 17 00:00:00 2001 From: varun kumar kunchakuri <66476965+vakuncha@users.noreply.github.com> Date: Wed, 3 Mar 2021 13:29:28 +0530 Subject: [PATCH 05/31] New Typescript Language Readme Config File --- .../elastic/resource-manager/readme.typescript.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 specification/elastic/resource-manager/readme.typescript.md diff --git a/specification/elastic/resource-manager/readme.typescript.md b/specification/elastic/resource-manager/readme.typescript.md new file mode 100644 index 000000000000..c71866e83f78 --- /dev/null +++ b/specification/elastic/resource-manager/readme.typescript.md @@ -0,0 +1,14 @@ +## TypeScript + +These settings apply only when `--typescript` is specified on the command line. +Please also specify `--typescript-sdks-folder=`. + +``` yaml $(typescript) +typescript: + azure-arm: true + package-name: "@azure/arm-elastic" + output-folder: "$(typescript-sdks-folder)/sdk/elastic/arm-elastic" + payload-flattening-threshold: 1 + clear-output-folder: true + generate-metadata: true +``` From 4c2a69f9ecf40f1e5d2b47c41547e5b314ebab51 Mon Sep 17 00:00:00 2001 From: varun kumar kunchakuri <66476965+vakuncha@users.noreply.github.com> Date: Wed, 3 Mar 2021 13:29:28 +0530 Subject: [PATCH 06/31] New Python Language Readme Config File --- .../elastic/resource-manager/readme.python.md | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 specification/elastic/resource-manager/readme.python.md diff --git a/specification/elastic/resource-manager/readme.python.md b/specification/elastic/resource-manager/readme.python.md new file mode 100644 index 000000000000..f9b3c352eb66 --- /dev/null +++ b/specification/elastic/resource-manager/readme.python.md @@ -0,0 +1,41 @@ +## Python + +These settings apply only when `--python` is specified on the command line. +Please also specify `--python-sdks-folder=`. + +``` yaml $(python) && !$(track2) +python: + azure-arm: true + license-header: MICROSOFT_MIT_NO_VERSION + package-name: azure-mgmt-elastic + no-namespace-folders: true + package-version: 1.0.0b1 +``` + +``` yaml $(python-mode) == 'update' && !$(track2) +python: + output-folder: $(python-sdks-folder)/elastic/azure-mgmt-elastic/azure/mgmt/elastic +``` +``` yaml $(python-mode) == 'create' && !$(track2) +python: + basic-setup-py: true + output-folder: $(python-sdks-folder)/elastic/azure-mgmt-elastic +``` + +``` yaml $(python) && $(track2) +azure-arm: true +license-header: MICROSOFT_MIT_NO_VERSION +package-name: azure-mgmt-elastic +no-namespace-folders: true +``` + +``` yaml $(python-mode) == 'update' +no-namespace-folders: true +output-folder: $(python-sdks-folder)/elastic/azure-mgmt-elastic/azure/mgmt/elastic +``` + +``` yaml $(python-mode) == 'create' && $(track2) +package-version: 1.0.0b1 +basic-setup-py: true +output-folder: $(python-sdks-folder)/elastic/azure-mgmt-elastic +``` From 7d33e67c8324e72f7b740b9efc12218efa9dbc24 Mon Sep 17 00:00:00 2001 From: varun kumar kunchakuri <66476965+vakuncha@users.noreply.github.com> Date: Wed, 3 Mar 2021 13:29:28 +0530 Subject: [PATCH 07/31] New C# Language Readme Config File --- .../elastic/resource-manager/readme.csharp.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 specification/elastic/resource-manager/readme.csharp.md diff --git a/specification/elastic/resource-manager/readme.csharp.md b/specification/elastic/resource-manager/readme.csharp.md new file mode 100644 index 000000000000..dffa1cd64c3a --- /dev/null +++ b/specification/elastic/resource-manager/readme.csharp.md @@ -0,0 +1,15 @@ +## C# + +These settings apply only when `--csharp` is specified on the command line. +Please also specify `--csharp-sdks-folder=`. + +```yaml $(csharp) +csharp: + azure-arm: true + license-header: MICROSOFT_MIT_NO_VERSION + payload-flattening-threshold: 1 + clear-output-folder: true + client-side-validation: false + namespace: Microsoft.Elastic + output-folder: $(csharp-sdks-folder)/elastic/management/Microsoft.Elastic/GeneratedProtocol +``` From c5172a99c82188084e6fdafd09060b51dce9dcaf Mon Sep 17 00:00:00 2001 From: varun kumar kunchakuri <66476965+vakuncha@users.noreply.github.com> Date: Wed, 3 Mar 2021 13:29:29 +0530 Subject: [PATCH 08/31] New AzureResourceSchema Readme Config File --- .../readme.azureresourceschema.md | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 specification/elastic/resource-manager/readme.azureresourceschema.md diff --git a/specification/elastic/resource-manager/readme.azureresourceschema.md b/specification/elastic/resource-manager/readme.azureresourceschema.md new file mode 100644 index 000000000000..b91e51939ef8 --- /dev/null +++ b/specification/elastic/resource-manager/readme.azureresourceschema.md @@ -0,0 +1,23 @@ +## AzureResourceSchema + +These settings apply only when `--azureresourceschema` is specified on the command line. + +### AzureResourceSchema multi-api + +``` yaml $(azureresourceschema) && $(multiapi) +batch: + - tag: schema-elastic-2020-07-01-preview + +``` + +Please also specify `--azureresourceschema-folder=`. + +### Tag: schema-elastic-2020-07-01-preview and azureresourceschema + +``` yaml $(tag) == 'schema-elastic-2020-07-01-preview' && $(azureresourceschema) +output-folder: $(azureresourceschema-folder)/schemas + +# all the input files in this apiVersion +input-file: + - Microsoft.Elastic/preview/2020-07-01-preview/elastic.json +``` From 5419382036e2b68f331358270b8b23e130a55c18 Mon Sep 17 00:00:00 2001 From: varun kumar kunchakuri <66476965+vakuncha@users.noreply.github.com> Date: Wed, 3 Mar 2021 13:29:29 +0530 Subject: [PATCH 09/31] New Swagger Spec File --- .../preview/2020-07-01-preview/elastic.json | 132 ++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json diff --git a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json new file mode 100644 index 000000000000..7c019ade75bf --- /dev/null +++ b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json @@ -0,0 +1,132 @@ +{ + "swagger": "2.0", + "info": { + "version": "2020-07-01-preview", + "title": "elastic", + "description": "Description of the new service", + "x-ms-code-generation-settings": { + "name": "elasticClient" + } + }, + "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.Elastic/operations": { + "get": { + "tags": ["Tag1"], + "operationId": "OperationGroup_Get", + "x-ms-examples": { + "BatchAccountDelete": { "$ref": "./examples/OperationGroupGet.json" } + }, + "description": "This is a sample get operation, please see guidelines in azure-rest-api-specs repository for more info", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + } + ], + "responses": { + "200": { + "description": "Describe the result of a successful operation.", + "schema": { + "$ref": "#/definitions/Result" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": { + "Result": { + "description": "Sample result definition", + "properties": { + "sampleProperty": { + "type": "string", + "description": "Sample property of type string" + } + } + }, + "ErrorResponse": { + "description": "Error response.", + "properties": { + "error": { + "$ref": "#/definitions/ErrorDefinition", + "description": "The error details." + } + } + }, + "ErrorDefinition": { + "description": "Error definition.", + "properties": { + "code": { + "description": "Service specific error code which serves as the substatus for the HTTP error code.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "Description of the error.", + "type": "string", + "readOnly": true + }, + "details": { + "description": "Internal error details.", + "type": "array", + "items": { + "$ref": "#/definitions/ErrorDefinition" + }, + "readOnly": true + } + } + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)" + }, + "ResourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group.", + "x-ms-parameter-location": "method" + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "The API version to be used with the HTTP request." + } + } +} From 669c24e40ac4293fcd41faa0974007f03f62310e Mon Sep 17 00:00:00 2001 From: varun kumar kunchakuri <66476965+vakuncha@users.noreply.github.com> Date: Wed, 3 Mar 2021 13:29:29 +0530 Subject: [PATCH 10/31] New Swagger Example Spec File --- .../examples/OperationGroupGet.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/examples/OperationGroupGet.json diff --git a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/examples/OperationGroupGet.json b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/examples/OperationGroupGet.json new file mode 100644 index 000000000000..8c49f5e48948 --- /dev/null +++ b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/examples/OperationGroupGet.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "accountName": "sampleacct", + "resourceGroupName": "elasticClient", + "api-version": "2020-07-01-preview", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "sampleProperty": "sampleProperty" + } + } + } +} From 994114777026b89e74cfa2f3c5ac9348df64cc29 Mon Sep 17 00:00:00 2001 From: Varun Kunchakuri Date: Wed, 3 Mar 2021 15:03:32 +0530 Subject: [PATCH 11/31] Addings examples and swagger from prod --- .../2020-07-01-preview/Swagger/elastic.json | 1338 +++++++++++++++++ .../Swagger/examples/DeploymentInfo_List.json | 18 + .../examples/MonitoredResources_List.json | 21 + .../Swagger/examples/Monitors_Create.json | 104 ++ .../Swagger/examples/Monitors_Delete.json | 13 + .../Swagger/examples/Monitors_Get.json | 43 + .../Swagger/examples/Monitors_List.json | 45 + .../Monitors_ListByResourceGroup.json | 46 + .../Swagger/examples/Monitors_Update.json | 86 ++ .../Swagger/examples/Operations_List.json | 23 + .../examples/TagRules_CreateOrUpdate.json | 59 + .../Swagger/examples/TagRules_Delete.json | 14 + .../Swagger/examples/TagRules_Get.json | 38 + .../Swagger/examples/TagRules_List.json | 41 + 14 files changed, 1889 insertions(+) create mode 100644 specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/elastic.json create mode 100644 specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/DeploymentInfo_List.json create mode 100644 specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/MonitoredResources_List.json create mode 100644 specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/Monitors_Create.json create mode 100644 specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/Monitors_Delete.json create mode 100644 specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/Monitors_Get.json create mode 100644 specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/Monitors_List.json create mode 100644 specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/Monitors_ListByResourceGroup.json create mode 100644 specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/Monitors_Update.json create mode 100644 specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/Operations_List.json create mode 100644 specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/TagRules_CreateOrUpdate.json create mode 100644 specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/TagRules_Delete.json create mode 100644 specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/TagRules_Get.json create mode 100644 specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/TagRules_List.json diff --git a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/elastic.json b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/elastic.json new file mode 100644 index 000000000000..cad1022109d2 --- /dev/null +++ b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/elastic.json @@ -0,0 +1,1338 @@ +{ + "swagger": "2.0", + "info": { + "title": "Microsoft.Elastic", + "version": "2020-07-01-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "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.Elastic/operations": { + "get": { + "tags": [ + "MonitorsResource" + ], + "summary": "List all operations provided by Microsoft.Elastic.", + "operationId": "Operations_List", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/OperationListResult" + } + }, + "default": { + "description": "Default error response.", + "schema": { + "$ref": "#/definitions/ResourceProviderDefaultErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Operations_List": { + "$ref": "./examples/Operations_List.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Elastic/monitors": { + "get": { + "tags": [ + "MonitorsResource" + ], + "summary": "List all monitors under the specified subscription.", + "operationId": "Monitors_List", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ElasticMonitorResourceListResponse" + } + }, + "default": { + "description": "Default error response.", + "schema": { + "$ref": "#/definitions/ResourceProviderDefaultErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Monitors_List": { + "$ref": "./examples/Monitors_List.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Elastic/monitors": { + "get": { + "tags": [ + "MonitorsResource" + ], + "summary": "List all monitors under the specified resource group.", + "operationId": "Monitors_ListByResourceGroup", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ElasticMonitorResourceListResponse" + } + }, + "default": { + "description": "Default error response.", + "schema": { + "$ref": "#/definitions/ResourceProviderDefaultErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Monitors_ListByResourceGroup": { + "$ref": "./examples/Monitors_ListByResourceGroup.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Elastic/monitors/{monitorName}": { + "get": { + "tags": [ + "MonitorsResource" + ], + "summary": "Get the properties of a specific monitor resource.", + "operationId": "Monitors_Get", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/MonitorNameParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ElasticMonitorResource" + } + }, + "default": { + "description": "Default error response.", + "schema": { + "$ref": "#/definitions/ResourceProviderDefaultErrorResponse" + } + } + }, + "x-ms-examples": { + "Monitors_Get": { + "$ref": "./examples/Monitors_Get.json" + } + } + }, + "put": { + "tags": [ + "MonitorsResource" + ], + "summary": "Create a monitor resource.", + "operationId": "Monitors_Create", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/MonitorNameParameter" + }, + { + "in": "body", + "name": "body", + "description": "Elastic monitor resource model", + "schema": { + "$ref": "#/definitions/ElasticMonitorResource" + } + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ElasticMonitorResource" + } + }, + "201": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ElasticMonitorResource" + } + }, + "default": { + "description": "Default error response.", + "schema": { + "$ref": "#/definitions/ResourceProviderDefaultErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-examples": { + "Monitors_Create": { + "$ref": "./examples/Monitors_Create.json" + } + } + }, + "patch": { + "tags": [ + "MonitorsResource" + ], + "summary": "Update a monitor resource.", + "operationId": "Monitors_Update", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/MonitorNameParameter" + }, + { + "in": "body", + "name": "body", + "description": "Elastic resource model update parameters.", + "schema": { + "$ref": "#/definitions/ElasticMonitorResourceUpdateParameters" + } + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ElasticMonitorResource" + } + }, + "default": { + "description": "Default error response.", + "schema": { + "$ref": "#/definitions/ResourceProviderDefaultErrorResponse" + } + } + }, + "x-ms-examples": { + "Monitors_Update": { + "$ref": "./examples/Monitors_Update.json" + } + } + }, + "delete": { + "tags": [ + "MonitorsResource" + ], + "summary": "Delete a monitor resource.", + "operationId": "Monitors_Delete", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/MonitorNameParameter" + } + ], + "responses": { + "200": { + "description": "Success" + }, + "202": { + "description": "Success" + }, + "204": { + "description": "Success" + }, + "default": { + "description": "Default error response.", + "schema": { + "$ref": "#/definitions/ResourceProviderDefaultErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Monitors_Delete": { + "$ref": "./examples/Monitors_Delete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Elastic/monitors/{monitorName}/listMonitoredResources": { + "post": { + "tags": [ + "MonitoredResources" + ], + "summary": "List the resources currently being monitored by the Elastic monitor resource.", + "operationId": "MonitoredResources_List", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/MonitorNameParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/MonitoredResourceListResponse" + } + }, + "default": { + "description": "Default error response.", + "schema": { + "$ref": "#/definitions/ResourceProviderDefaultErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "MonitoredResources_List": { + "$ref": "./examples/MonitoredResources_List.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Elastic/monitors/{monitorName}/listDeploymentInfo": { + "post": { + "tags": [ + "DeploymentInfo" + ], + "summary": "Fetch information regarding Elastic cloud deployment corresponding to the Elastic monitor resource.", + "operationId": "DeploymentInfo_List", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/MonitorNameParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeploymentInfoResponse" + } + }, + "default": { + "description": "Default error response.", + "schema": { + "$ref": "#/definitions/ResourceProviderDefaultErrorResponse" + } + } + }, + "x-ms-examples": { + "DeploymentInfo_List": { + "$ref": "./examples/DeploymentInfo_List.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Elastic/monitors/{monitorName}/tagRules": { + "get": { + "tags": [ + "Rules" + ], + "summary": "List the tag rules for a given monitor resource.", + "operationId": "TagRules_List", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/MonitorNameParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/MonitoringTagRulesListResponse" + } + }, + "default": { + "description": "Default error response.", + "schema": { + "$ref": "#/definitions/ResourceProviderDefaultErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "TagRules_List": { + "$ref": "./examples/TagRules_List.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Elastic/monitors/{monitorName}/tagRules/{ruleSetName}": { + "put": { + "tags": [ + "Rules" + ], + "summary": "Create or update a tag rule set for a given monitor resource.", + "operationId": "TagRules_CreateOrUpdate", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/MonitorNameParameter" + }, + { + "$ref": "#/parameters/RuleSetNameParameter" + }, + { + "description": "request body of MonitoringTagRules", + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/MonitoringTagRules" + } + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/MonitoringTagRules" + } + }, + "default": { + "description": "Default error response.", + "schema": { + "$ref": "#/definitions/ResourceProviderDefaultErrorResponse" + } + } + }, + "x-ms-examples": { + "TagRules_CreateOrUpdate": { + "$ref": "./examples/TagRules_CreateOrUpdate.json" + } + } + }, + "get": { + "tags": [ + "Rules" + ], + "summary": "Get a tag rule set for a given monitor resource.", + "operationId": "TagRules_Get", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/MonitorNameParameter" + }, + { + "$ref": "#/parameters/RuleSetNameParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/MonitoringTagRules" + } + }, + "default": { + "description": "Default error response.", + "schema": { + "$ref": "#/definitions/ResourceProviderDefaultErrorResponse" + } + } + }, + "x-ms-examples": { + "TagRules_Get": { + "$ref": "./examples/TagRules_Get.json" + } + } + }, + "delete": { + "tags": [ + "Rules" + ], + "summary": "Delete a tag rule set for a given monitor resource.", + "operationId": "TagRules_Delete", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/MonitorNameParameter" + }, + { + "$ref": "#/parameters/RuleSetNameParameter" + } + ], + "responses": { + "200": { + "description": "Success" + }, + "202": { + "description": "Success" + }, + "204": { + "description": "Success" + }, + "default": { + "description": "Default error response.", + "schema": { + "$ref": "#/definitions/ResourceProviderDefaultErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "TagRules_Delete": { + "$ref": "./examples/TagRules_Delete.json" + } + } + } + } + }, + "definitions": { + "ErrorResponseBody": { + "description": "Error response body.", + "title": "ErrorResponseBody", + "type": "object", + "properties": { + "code": { + "description": "Error code.", + "type": "string" + }, + "message": { + "description": "Error message.", + "type": "string" + }, + "target": { + "description": "Error target.", + "type": "string" + }, + "details": { + "description": "Error details.", + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResponseBody" + } + } + } + }, + "ResourceProviderDefaultErrorResponse": { + "description": "RP default error response.", + "type": "object", + "properties": { + "error": { + "description": "Response body of Error", + "readOnly": true, + "$ref": "#/definitions/ErrorResponseBody" + } + } + }, + "OperationDisplay": { + "description": "The object that represents the operation.", + "type": "object", + "properties": { + "provider": { + "description": "Service provider, i.e., Microsoft.Elastic.", + "type": "string" + }, + "resource": { + "description": "Type on which the operation is performed, e.g., 'monitors'.", + "type": "string" + }, + "operation": { + "description": "Operation type, e.g., read, write, delete, etc.", + "type": "string" + }, + "description": { + "description": "Description of the operation, e.g., 'Write monitors'.", + "type": "string" + } + } + }, + "OperationResult": { + "description": "A Microsoft.Elastic REST API operation.", + "type": "object", + "properties": { + "name": { + "description": "Operation name, i.e., {provider}/{resource}/{operation}.", + "type": "string" + }, + "display": { + "description": "The object that represents the operation.", + "$ref": "#/definitions/OperationDisplay" + } + } + }, + "OperationListResult": { + "description": "Result of GET request to list the Microsoft.Elastic operations.", + "type": "object", + "properties": { + "value": { + "description": "List of operations supported by the Microsoft.Elastic provider.", + "type": "array", + "items": { + "$ref": "#/definitions/OperationResult" + } + }, + "nextLink": { + "description": "URL to get the next set of operation list results if there are any.", + "type": "string" + } + } + }, + "ResourceSku": { + "description": "Microsoft.Elastic SKU.", + "required": [ + "name" + ], + "type": "object", + "properties": { + "name": { + "description": "Name of the SKU.", + "type": "string" + } + } + }, + "ProvisioningState": { + "enum": [ + "Accepted", + "Creating", + "Updating", + "Deleting", + "Succeeded", + "Failed", + "Canceled", + "Deleted", + "NotSpecified" + ], + "type": "string", + "description": "Provisioning state of Elastic resource.", + "title": "ProvisioningState", + "x-ms-enum": { + "modelAsString": true, + "name": "ProvisioningState" + } + }, + "MonitoringStatus": { + "description": "Flag specifying if the resource monitoring is enabled or disabled.", + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "modelAsString": true, + "name": "MonitoringStatus" + } + }, + "ElasticCloudUser": { + "description": "Details of the user's elastic account.", + "type": "object", + "properties": { + "emailAddress": { + "description": "Email of the Elastic User Account.", + "type": "string", + "readOnly": true + }, + "id": { + "description": "User Id of the elastic account of the User.", + "type": "string", + "readOnly": true + }, + "elasticCloudSsoDefaultUrl": { + "description": "Elastic cloud default dashboard sso URL of the Elastic user account.", + "type": "string", + "readOnly": true + } + } + }, + "ElasticCloudDeployment": { + "description": "Details of the user's elastic deployment associated with the monitor resource.", + "type": "object", + "properties": { + "name": { + "description": "Elastic deployment name", + "type": "string", + "readOnly": true + }, + "deploymentId": { + "description": "Elastic deployment Id", + "type": "string", + "readOnly": true + }, + "azureSubscriptionId": { + "description": "Associated Azure subscription Id for the elastic deployment.", + "type": "string", + "readOnly": true + }, + "elasticsearchRegion": { + "description": "Region where Deployment at Elastic side took place.", + "type": "string", + "readOnly": true + }, + "elasticsearchServiceUrl": { + "description": "Elasticsearch ingestion endpoint of the Elastic deployment.", + "type": "string", + "readOnly": true + }, + "kibanaServiceUrl": { + "description": "Kibana endpoint of the Elastic deployment.", + "type": "string", + "readOnly": true + }, + "kibanaSsoUrl": { + "description": "Kibana dashboard sso URL of the Elastic deployment.", + "type": "string", + "readOnly": true + } + } + }, + "ElasticProperties": { + "description": "Elastic Resource Properties.", + "type": "object", + "properties": { + "elasticCloudUser": { + "description": "Details of the user's elastic account.", + "$ref": "#/definitions/ElasticCloudUser" + }, + "elasticCloudDeployment": { + "description": "Details of the elastic cloud deployment.", + "$ref": "#/definitions/ElasticCloudDeployment" + } + } + }, + "CompanyInfo": { + "description": "Company information of the user to be passed to partners.", + "type": "object", + "properties": { + "domain": { + "description": "Domain of the company", + "maxLength": 250, + "type": "string" + }, + "business": { + "description": "Business of the company", + "maxLength": 50, + "type": "string" + }, + "employeesNumber": { + "description": "Number of employees in the company", + "maxLength": 20, + "type": "string" + }, + "state": { + "description": "State of the company location.", + "maxLength": 50, + "type": "string" + }, + "country": { + "description": "Country of the company location.", + "maxLength": 50, + "type": "string" + } + } + }, + "UserInfo": { + "description": "User Information to be passed to partners.", + "type": "object", + "properties": { + "firstName": { + "description": "First name of the user", + "maxLength": 50, + "type": "string" + }, + "lastName": { + "description": "Last name of the user", + "maxLength": 50, + "type": "string" + }, + "companyName": { + "description": "Company name of the user", + "maxLength": 50, + "type": "string" + }, + "emailAddress": { + "description": "Email of the user used by Elastic for contacting them if needed", + "pattern": "^([^<>()\\[\\]\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\.,;:\\s@\"]+)*)@(([a-zA-Z-_0-9]+\\.)+[a-zA-Z]{2,})$", + "type": "string" + }, + "companyInfo": { + "description": "Company information of the user to be passed to partners.", + "$ref": "#/definitions/CompanyInfo" + } + } + }, + "LiftrResourceCategories": { + "enum": [ + "Unknown", + "MonitorLogs" + ], + "type": "string", + "x-ms-enum": { + "modelAsString": true, + "name": "LiftrResourceCategories" + }, + "readOnly": true + }, + "MonitorProperties": { + "description": "Properties specific to the monitor resource.", + "type": "object", + "properties": { + "provisioningState": { + "description": "Provisioning state of the monitor resource.", + "$ref": "#/definitions/ProvisioningState" + }, + "monitoringStatus": { + "description": "Flag specifying if the resource monitoring is enabled or disabled.", + "$ref": "#/definitions/MonitoringStatus" + }, + "elasticProperties": { + "description": "Elastic cloud properties.", + "$ref": "#/definitions/ElasticProperties" + }, + "userInfo": { + "description": "User information.", + "$ref": "#/definitions/UserInfo", + "x-ms-mutability": [ + "create" + ] + }, + "liftrResourceCategory": { + "$ref": "#/definitions/LiftrResourceCategories" + }, + "liftrResourcePreference": { + "description": "The priority of the resource.", + "format": "int32", + "type": "integer", + "readOnly": true + } + } + }, + "ManagedIdentityTypes": { + "enum": [ + "SystemAssigned" + ], + "type": "string", + "description": "Managed Identity types.", + "x-ms-enum": { + "modelAsString": true, + "name": "ManagedIdentityTypes" + } + }, + "IdentityProperties": { + "description": "Identity properties.", + "type": "object", + "properties": { + "principalId": { + "description": "The identity ID.", + "type": "string", + "readOnly": true + }, + "tenantId": { + "description": "The tenant ID of resource.", + "type": "string", + "readOnly": true + }, + "type": { + "description": "Managed identity type.", + "$ref": "#/definitions/ManagedIdentityTypes" + } + } + }, + "ElasticMonitorResource": { + "description": "Monitor resource.", + "required": [ + "location" + ], + "type": "object", + "x-ms-azure-resource": true, + "properties": { + "id": { + "description": "ARM id of the monitor resource.", + "type": "string", + "readOnly": true + }, + "name": { + "description": "Name of the monitor resource.", + "type": "string", + "readOnly": true + }, + "type": { + "description": "The type of the monitor resource.", + "type": "string", + "readOnly": true + }, + "sku": { + "description": "SKU of the monitor resource.", + "$ref": "#/definitions/ResourceSku" + }, + "properties": { + "description": "Properties of the monitor resource.", + "$ref": "#/definitions/MonitorProperties", + "x-ms-client-flatten": false + }, + "identity": { + "description": "Identity properties of the monitor resource.", + "$ref": "#/definitions/IdentityProperties" + }, + "tags": { + "description": "The tags of the monitor resource.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "location": { + "description": "The location of the monitor resource", + "type": "string", + "x-ms-mutability": [ + "read", + "create" + ] + } + } + }, + "ElasticMonitorResourceListResponse": { + "description": "Response of a list operation.", + "type": "object", + "properties": { + "value": { + "description": "Results of a list operation.", + "type": "array", + "items": { + "$ref": "#/definitions/ElasticMonitorResource" + } + }, + "nextLink": { + "description": "Link to the next set of results, if any.", + "type": "string" + } + } + }, + "ElasticMonitorResourceUpdateParameters": { + "description": "Monitor resource update parameters.", + "type": "object", + "properties": { + "tags": { + "description": "elastic monitor resource tags.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "SendingLogs": { + "enum": [ + "True", + "False" + ], + "type": "string", + "description": "Flag indicating the status of the resource for sending logs operation to Elastic.", + "title": "SendingLogs", + "x-ms-enum": { + "modelAsString": true, + "name": "SendingLogs" + } + }, + "MonitoredResource": { + "description": "The properties of a resource currently being monitored by the Elastic monitor resource.", + "type": "object", + "properties": { + "id": { + "description": "The ARM id of the resource.", + "type": "string" + }, + "sendingLogs": { + "description": "Flag indicating the status of the resource for sending logs operation to Elastic.", + "$ref": "#/definitions/SendingLogs" + }, + "reasonForLogsStatus": { + "description": "Reason for why the resource is sending logs (or why it is not sending).", + "type": "string" + } + } + }, + "MonitoredResourceListResponse": { + "description": "Response of a list operation.", + "type": "object", + "properties": { + "value": { + "description": "Results of a list operation.", + "type": "array", + "items": { + "$ref": "#/definitions/MonitoredResource" + } + }, + "nextLink": { + "description": "Link to the next set of results, if any.", + "type": "string" + } + } + }, + "TagAction": { + "description": "Valid actions for a filtering tag. Exclusion takes priority over inclusion.", + "enum": [ + "Include", + "Exclude" + ], + "type": "string", + "x-ms-enum": { + "modelAsString": true, + "name": "TagAction" + } + }, + "FilteringTag": { + "description": "The definition of a filtering tag. Filtering tags are used for capturing resources and include/exclude them from being monitored.", + "type": "object", + "properties": { + "name": { + "description": "The name (also known as the key) of the tag.", + "type": "string" + }, + "value": { + "description": "The value of the tag.", + "type": "string" + }, + "action": { + "description": "Valid actions for a filtering tag.", + "$ref": "#/definitions/TagAction" + } + } + }, + "LogRules": { + "description": "Set of rules for sending logs for the Monitor resource.", + "type": "object", + "properties": { + "sendAadLogs": { + "description": "Flag specifying if AAD logs should be sent for the Monitor resource.", + "type": "boolean" + }, + "sendSubscriptionLogs": { + "description": "Flag specifying if subscription logs should be sent for the Monitor resource.", + "type": "boolean" + }, + "sendActivityLogs": { + "description": "Flag specifying if activity logs from Azure resources should be sent for the Monitor resource.", + "type": "boolean" + }, + "filteringTags": { + "description": "List of filtering tags to be used for capturing logs. This only takes effect if SendActivityLogs flag is enabled. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags.", + "type": "array", + "items": { + "$ref": "#/definitions/FilteringTag" + } + } + } + }, + "MonitoringTagRulesProperties": { + "description": "Definition of the properties for a TagRules resource.", + "type": "object", + "properties": { + "provisioningState": { + "description": "Provisioning state of the monitoring tag rules.", + "$ref": "#/definitions/ProvisioningState" + }, + "logRules": { + "description": "Rules for sending logs.", + "$ref": "#/definitions/LogRules" + } + } + }, + "MonitoringTagRules": { + "description": "Capture logs and metrics of Azure resources based on ARM tags.", + "type": "object", + "x-ms-azure-resource": true, + "properties": { + "name": { + "description": "Name of the rule set.", + "type": "string", + "readOnly": true + }, + "id": { + "description": "The id of the rule set.", + "type": "string", + "readOnly": true + }, + "type": { + "description": "The type of the rule set.", + "type": "string", + "readOnly": true + }, + "properties": { + "description": "Properties of the monitoring tag rules.", + "$ref": "#/definitions/MonitoringTagRulesProperties", + "x-ms-client-flatten": false + } + } + }, + "MonitoringTagRulesListResponse": { + "description": "Response of a list operation.", + "type": "object", + "properties": { + "value": { + "description": "Results of a list operation.", + "type": "array", + "items": { + "$ref": "#/definitions/MonitoringTagRules" + } + }, + "nextLink": { + "description": "Link to the next set of results, if any.", + "type": "string" + } + } + }, + "ElasticDeploymentStatus": { + "description": "Flag specifying if the Elastic deployment status is healthy or not.", + "enum": [ + "Healthy", + "Unhealthy" + ], + "type": "string", + "x-ms-enum": { + "modelAsString": true, + "name": "ElasticDeploymentStatus" + } + }, + "DeploymentInfoResponse": { + "description": "The properties of deployment in Elastic cloud corresponding to the Elastic monitor resource.", + "type": "object", + "properties": { + "status": { + "description": "The Elastic deployment status.", + "$ref": "#/definitions/ElasticDeploymentStatus", + "readOnly": true + }, + "version": { + "description": "Version of the elasticsearch in Elastic cloud deployment.", + "type": "string", + "readOnly": true + }, + "memoryCapacity": { + "description": "RAM capacity of the elasticsearch in Elastic cloud deployment.", + "type": "string", + "readOnly": true + }, + "diskCapacity": { + "description": "Disk capacity of the elasticsearch in Elastic cloud deployment.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "description": "The API version to be used with the HTTP request.", + "required": true, + "type": "string", + "enum": [ + "2020-07-01-preview" + ] + }, + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "description": "The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)", + "required": true, + "type": "string" + }, + "ResourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "description": "The name of the resource group to which the Elastic resource belongs.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "MonitorNameParameter": { + "in": "path", + "name": "monitorName", + "description": "Monitor resource name", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "RuleSetNameParameter": { + "in": "path", + "name": "ruleSetName", + "description": "Tag Rule Set resource name", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/DeploymentInfo_List.json b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/DeploymentInfo_List.json new file mode 100644 index 000000000000..334c276538dd --- /dev/null +++ b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/DeploymentInfo_List.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2020-07-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "monitorName": "myMonitor" + }, + "responses": { + "200": { + "body": { + "status": "Healthy", + "version": "7.9.3", + "memoryCapacity": "1024", + "diskCapacity": "245760" + } + } + } +} diff --git a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/MonitoredResources_List.json b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/MonitoredResources_List.json new file mode 100644 index 000000000000..fa4030ec7960 --- /dev/null +++ b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/MonitoredResources_List.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2020-07-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "monitorName": "myMonitor" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVault", + "sendingLogs": "True", + "reasonForLogsStatus": "CapturedByRules" + } + ] + } + } + } +} diff --git a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/Monitors_Create.json b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/Monitors_Create.json new file mode 100644 index 000000000000..6c53018b9684 --- /dev/null +++ b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/Monitors_Create.json @@ -0,0 +1,104 @@ +{ + "parameters": { + "api-version": "2020-07-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "monitorName": "myMonitor", + "requestBody": { + "name": "myMonitor", + "sku": { + "name": "free_Monthly" + }, + "properties": { + "userInfo": { + "firstName": "Alice", + "lastName": "Bob", + "companyName": "Microsoft", + "emailAddress": "alice@microsoft.com", + "companyInfo": { + "domain": "microsoft.com", + "business": "Technology", + "employeeNumber": "10000", + "state": "WA", + "country": "US" + } + } + }, + "tags": { + "Environment": "Dev" + }, + "location": "West US 2" + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/monitors/myMonitor", + "name": "myMonitor", + "type": "Microsoft.Elastic/monitors", + "sku": { + "name": "free_Monthly" + }, + "properties": { + "provisioningState": "Succeeded", + "elasticProperties": { + "elasticCloudUser": { + "emailAddress": "alice@microsoft.com", + "id": "myid123", + "elasticCloudSsoDefaultUrl": "https://examplessourl.com" + }, + "elasticCloudDeployment": { + "name": "deploymentname", + "deploymentId": "deployment_id", + "azureSubscriptionId": "00000000-0000-0000-0000-000000000000", + "elasticsearchRegion": "azure-westus2", + "elasticsearchServiceUrl": "https://elasticsearchendpoint.com", + "kibanaServiceUrl": "https://kibanaserviceurl.com", + "kibanaSsoUrl": "https://kibanssourl.com" + } + } + }, + "tags": { + "Environment": "Dev" + }, + "location": "West US 2" + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/monitors/myMonitor", + "name": "myMonitor", + "type": "Microsoft.Elastic/monitors", + "sku": { + "name": "free_Monthly" + }, + "properties": { + "provisioningState": "Accepted", + "monitoringStatus": "Enabled", + "elasticProperties": { + "elasticCloudUser": { + "emailAddress": "alice@microsoft.com", + "id": "myid123", + "elasticCloudSsoDefaultUrl": "https://examplessourl.com" + }, + "elasticCloudDeployment": { + "name": "deploymentname", + "deploymentId": "deployment_id", + "azureSubscriptionId": "00000000-0000-0000-0000-000000000000", + "elasticsearchRegion": "azure-westus2", + "elasticsearchServiceUrl": "https://elasticsearchendpoint.com", + "kibanaServiceUrl": "https://kibanaserviceurl.com", + "kibanaSsoUrl": "https://kibanssourl.com" + } + }, + "liftrResourceCategory": "MonitorLogs", + "liftrResourcePreference": 0 + }, + "tags": { + "Environment": "Dev" + }, + "location": "West US 2" + } + } + } +} diff --git a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/Monitors_Delete.json b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/Monitors_Delete.json new file mode 100644 index 000000000000..1c07f5cbf779 --- /dev/null +++ b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/Monitors_Delete.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "api-version": "2020-07-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "monitorName": "myMonitor" + }, + "responses": { + "200": {}, + "202": {}, + "204": {} + } +} diff --git a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/Monitors_Get.json b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/Monitors_Get.json new file mode 100644 index 000000000000..e483049e9e7d --- /dev/null +++ b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/Monitors_Get.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "api-version": "2020-07-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "monitorName": "myMonitor" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/monitors/myMonitor", + "name": "myMonitor", + "type": "Microsoft.Elastic/monitors", + "properties": { + "provisioningState": "Succeeded", + "monitoringStatus": "Enabled", + "elasticProperties": { + "elasticCloudUser": { + "emailAddress": "alice@microsoft.com", + "id": "myid123", + "elasticCloudSsoDefaultUrl": "https://examplessourl.com" + }, + "elasticCloudDeployment": { + "name": "deploymentname", + "deploymentId": "deployment_id", + "azureSubscriptionId": "00000000-0000-0000-0000-000000000000", + "elasticsearchRegion": "azure-westus2", + "elasticsearchServiceUrl": "https://elasticsearchendpoint.com", + "kibanaServiceUrl": "https://kibanaserviceurl.com", + "kibanaSsoUrl": "https://kibanssourl.com" + } + }, + "liftrResourceCategory": "MonitorLogs", + "liftrResourcePreference": 0 + }, + "tags": { + "Environment": "Dev" + }, + "location": "West US 2" + } + } + } +} diff --git a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/Monitors_List.json b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/Monitors_List.json new file mode 100644 index 000000000000..9083ac122807 --- /dev/null +++ b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/Monitors_List.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "api-version": "2020-07-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/monitors/myMonitor", + "name": "myMonitor", + "type": "Microsoft.Elastic/monitors", + "properties": { + "provisioningState": "Succeeded", + "monitoringStatus": "Enabled", + "elasticProperties": { + "elasticCloudUser": { + "emailAddress": "alice@microsoft.com", + "id": "myid123", + "elasticCloudSsoDefaultUrl": "https://examplessourl.com" + }, + "elasticCloudDeployment": { + "name": "deploymentname", + "deploymentId": "deployment_id", + "azureSubscriptionId": "00000000-0000-0000-0000-000000000000", + "elasticsearchRegion": "azure-westus2", + "elasticsearchServiceUrl": "https://elasticsearchendpoint.com", + "kibanaServiceUrl": "https://kibanaserviceurl.com", + "kibanaSsoUrl": "https://kibanssourl.com" + } + }, + "liftrResourceCategory": "MonitorLogs", + "liftrResourcePreference": 0 + }, + "tags": { + "Environment": "Dev" + }, + "location": "West US 2" + } + ] + } + } + } +} diff --git a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/Monitors_ListByResourceGroup.json b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/Monitors_ListByResourceGroup.json new file mode 100644 index 000000000000..9e4531d0437a --- /dev/null +++ b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/Monitors_ListByResourceGroup.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "api-version": "2020-07-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/monitors/myMonitor", + "name": "myMonitor", + "type": "Microsoft.Elastic/monitors", + "properties": { + "provisioningState": "Succeeded", + "monitoringStatus": "Enabled", + "elasticProperties": { + "elasticCloudUser": { + "emailAddress": "alice@microsoft.com", + "id": "myid123", + "elasticCloudSsoDefaultUrl": "https://examplessourl.com" + }, + "elasticCloudDeployment": { + "name": "deploymentname", + "deploymentId": "deployment_id", + "azureSubscriptionId": "00000000-0000-0000-0000-000000000000", + "elasticsearchRegion": "azure-westus2", + "elasticsearchServiceUrl": "https://elasticsearchendpoint.com", + "kibanaServiceUrl": "https://kibanaserviceurl.com", + "kibanaSsoUrl": "https://kibanssourl.com" + } + }, + "liftrResourceCategory": "MonitorLogs", + "liftrResourcePreference": 0 + }, + "tags": { + "Environment": "Dev" + }, + "location": "West US 2" + } + ] + } + } + } +} diff --git a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/Monitors_Update.json b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/Monitors_Update.json new file mode 100644 index 000000000000..248f8ed7a2d7 --- /dev/null +++ b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/Monitors_Update.json @@ -0,0 +1,86 @@ +{ + "parameters": { + "api-version": "2020-07-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "monitorName": "myMonitor", + "requestBody": { + "name": "myMonitor", + "sku": { + "name": "free_Monthly" + }, + "properties": { + "elasticProperties": { + "elasticCloudUser": { + "emailAddress": "alice@microsoft.com", + "id": "myid123", + "elasticCloudSsoDefaultUrl": "https://examplessourl.com" + }, + "elasticCloudDeployment": { + "name": "deploymentname", + "azureSubscriptionId": "00000000-0000-0000-0000-000000000000", + "elasticsearchRegion": "azure-westus2", + "elasticsearchServiceUrl": "https://elasticsearchendpoint.com", + "kibanaServiceUrl": "https://kibanaserviceurl.com", + "kibanaSsoUrl": "https://kibanssourl.com" + } + }, + "userInfo": { + "firstName": "Alice", + "lastName": "Bob", + "companyName": "Microsoft", + "emailAddress": "alice@microsoft.com", + "companyInfo": { + "domain": "microsoft.com", + "business": "Technology", + "employeeNumber": "10000", + "state": "WA", + "country": "US" + } + } + }, + "tags": { + "Environment": "Dev" + }, + "location": "West US 2" + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/monitors/myMonitor", + "name": "myMonitor", + "type": "Microsoft.Elastic/monitors", + "sku": { + "name": "free_Monthly" + }, + "properties": { + "provisioningState": "Succeeded", + "monitoringStatus": "Enabled", + "elasticProperties": { + "elasticCloudUser": { + "emailAddress": "alice@microsoft.com", + "id": "myid123", + "elasticCloudSsoDefaultUrl": "https://examplessourl.com" + }, + "elasticCloudDeployment": { + "name": "deploymentname", + "deploymentId": "deployment_id", + "azureSubscriptionId": "00000000-0000-0000-0000-000000000000", + "elasticsearchRegion": "azure-westus2", + "elasticsearchServiceUrl": "https://elasticsearchendpoint.com", + "kibanaServiceUrl": "https://kibanaserviceurl.com", + "kibanaSsoUrl": "https://kibanssourl.com" + } + }, + "liftrResourceCategory": "MonitorLogs", + "liftrResourcePreference": 0 + }, + "tags": { + "Environment": "Dev" + }, + "location": "West US 2" + } + } + } +} diff --git a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/Operations_List.json b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/Operations_List.json new file mode 100644 index 000000000000..179357984291 --- /dev/null +++ b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/Operations_List.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "api-version": "2020-07-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Microsoft.Elastic/monitors/write", + "display": { + "provider": "Microsoft.Elastic", + "resource": "monitors", + "operation": "write", + "description": "Write monitors resource" + } + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/TagRules_CreateOrUpdate.json b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/TagRules_CreateOrUpdate.json new file mode 100644 index 000000000000..edb352345e32 --- /dev/null +++ b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/TagRules_CreateOrUpdate.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "api-version": "2020-07-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "monitorName": "myMonitor", + "ruleSetName": "default", + "requestBody": { + "properties": { + "logRules": { + "sendAadLogs": false, + "sendSubscriptionLogs": true, + "sendActivityLogs": true, + "filteringTags": [ + { + "name": "Environment", + "value": "Prod", + "action": "Include" + }, + { + "name": "Environment", + "value": "Dev", + "action": "Exclude" + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "name": "default", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Datadog/monitors/myMonitor/tagRules/default", + "type": "Microsoft.Datadog/monitors/tagRules", + "properties": { + "provisioningState": "Succeeded", + "logRules": { + "sendAadLogs": false, + "sendSubscriptionLogs": true, + "sendActivityLogs": true, + "filteringTags": [ + { + "name": "Environment", + "value": "Prod", + "action": "Include" + }, + { + "name": "Environment", + "value": "Dev", + "action": "Exclude" + } + ] + } + } + } + } + } +} diff --git a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/TagRules_Delete.json b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/TagRules_Delete.json new file mode 100644 index 000000000000..b3269012a4e6 --- /dev/null +++ b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/TagRules_Delete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2020-07-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "monitorName": "myMonitor", + "ruleSetName": "default" + }, + "responses": { + "200": {}, + "202": {}, + "204": {} + } +} diff --git a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/TagRules_Get.json b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/TagRules_Get.json new file mode 100644 index 000000000000..abf649a1b34e --- /dev/null +++ b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/TagRules_Get.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2020-07-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "monitorName": "myMonitor", + "ruleSetName": "default" + }, + "responses": { + "200": { + "body": { + "name": "default", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Datadog/monitors/myMonitor/tagRules/default", + "type": "Microsoft.Datadog/monitors/tagRules", + "properties": { + "provisioningState": "Succeeded", + "logRules": { + "sendAadLogs": false, + "sendSubscriptionLogs": true, + "sendActivityLogs": true, + "filteringTags": [ + { + "name": "Environment", + "value": "Prod", + "action": "Include" + }, + { + "name": "Environment", + "value": "Dev", + "action": "Exclude" + } + ] + } + } + } + } + } +} diff --git a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/TagRules_List.json b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/TagRules_List.json new file mode 100644 index 000000000000..7d47d2de0855 --- /dev/null +++ b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/TagRules_List.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2020-07-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "monitorName": "myMonitor" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "default", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Datadog/monitors/myMonitor/tagRules/default", + "type": "Microsoft.Datadog/monitors/tagRules", + "properties": { + "provisioningState": "Succeeded", + "logRules": { + "sendAadLogs": false, + "sendSubscriptionLogs": true, + "sendActivityLogs": true, + "filteringTags": [ + { + "name": "Environment", + "value": "Prod", + "action": "Include" + }, + { + "name": "Environment", + "value": "Dev", + "action": "Exclude" + } + ] + } + } + } + ] + } + } + } +} From 30145906613022689672047d9bfbf35cc37d9f45 Mon Sep 17 00:00:00 2001 From: Varun Kunchakuri Date: Wed, 3 Mar 2021 15:23:30 +0530 Subject: [PATCH 12/31] removing autogenerated files --- .../preview/2020-07-01-preview/elastic.json | 132 ------------------ .../examples/OperationGroupGet.json | 15 -- 2 files changed, 147 deletions(-) delete mode 100644 specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json delete mode 100644 specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/examples/OperationGroupGet.json diff --git a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json deleted file mode 100644 index 7c019ade75bf..000000000000 --- a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json +++ /dev/null @@ -1,132 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "version": "2020-07-01-preview", - "title": "elastic", - "description": "Description of the new service", - "x-ms-code-generation-settings": { - "name": "elasticClient" - } - }, - "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.Elastic/operations": { - "get": { - "tags": ["Tag1"], - "operationId": "OperationGroup_Get", - "x-ms-examples": { - "BatchAccountDelete": { "$ref": "./examples/OperationGroupGet.json" } - }, - "description": "This is a sample get operation, please see guidelines in azure-rest-api-specs repository for more info", - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ResourceGroupNameParameter" - } - ], - "responses": { - "200": { - "description": "Describe the result of a successful operation.", - "schema": { - "$ref": "#/definitions/Result" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - } - }, - "definitions": { - "Result": { - "description": "Sample result definition", - "properties": { - "sampleProperty": { - "type": "string", - "description": "Sample property of type string" - } - } - }, - "ErrorResponse": { - "description": "Error response.", - "properties": { - "error": { - "$ref": "#/definitions/ErrorDefinition", - "description": "The error details." - } - } - }, - "ErrorDefinition": { - "description": "Error definition.", - "properties": { - "code": { - "description": "Service specific error code which serves as the substatus for the HTTP error code.", - "type": "string", - "readOnly": true - }, - "message": { - "description": "Description of the error.", - "type": "string", - "readOnly": true - }, - "details": { - "description": "Internal error details.", - "type": "array", - "items": { - "$ref": "#/definitions/ErrorDefinition" - }, - "readOnly": true - } - } - } - }, - "parameters": { - "SubscriptionIdParameter": { - "name": "subscriptionId", - "in": "path", - "required": true, - "type": "string", - "description": "The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)" - }, - "ResourceGroupNameParameter": { - "name": "resourceGroupName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the resource group.", - "x-ms-parameter-location": "method" - }, - "ApiVersionParameter": { - "name": "api-version", - "in": "query", - "required": true, - "type": "string", - "description": "The API version to be used with the HTTP request." - } - } -} diff --git a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/examples/OperationGroupGet.json b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/examples/OperationGroupGet.json deleted file mode 100644 index 8c49f5e48948..000000000000 --- a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/examples/OperationGroupGet.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "parameters": { - "accountName": "sampleacct", - "resourceGroupName": "elasticClient", - "api-version": "2020-07-01-preview", - "subscriptionId": "subid" - }, - "responses": { - "200": { - "body": { - "sampleProperty": "sampleProperty" - } - } - } -} From 4c0628c74ae295b64f6fb017fb044735c35bd7af Mon Sep 17 00:00:00 2001 From: Varun Kunchakuri Date: Wed, 3 Mar 2021 17:36:26 +0530 Subject: [PATCH 13/31] added kibana custom word --- .../elastic/resource-manager/Microsoft.Elastic/custom-words.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 specification/elastic/resource-manager/Microsoft.Elastic/custom-words.txt diff --git a/specification/elastic/resource-manager/Microsoft.Elastic/custom-words.txt b/specification/elastic/resource-manager/Microsoft.Elastic/custom-words.txt new file mode 100644 index 000000000000..0680a418b189 --- /dev/null +++ b/specification/elastic/resource-manager/Microsoft.Elastic/custom-words.txt @@ -0,0 +1 @@ +kibana From 7c0401b41fe74be6a201364b27d3545a68fd58ae Mon Sep 17 00:00:00 2001 From: Varun Kunchakuri Date: Wed, 3 Mar 2021 17:58:34 +0530 Subject: [PATCH 14/31] moving swagger files one directory up --- .../preview/2020-07-01-preview/{Swagger => }/elastic.json | 0 .../{Swagger => }/examples/DeploymentInfo_List.json | 0 .../{Swagger => }/examples/MonitoredResources_List.json | 0 .../{Swagger => }/examples/Monitors_Create.json | 0 .../{Swagger => }/examples/Monitors_Delete.json | 0 .../2020-07-01-preview/{Swagger => }/examples/Monitors_Get.json | 0 .../2020-07-01-preview/{Swagger => }/examples/Monitors_List.json | 0 .../{Swagger => }/examples/Monitors_ListByResourceGroup.json | 0 .../{Swagger => }/examples/Monitors_Update.json | 0 .../{Swagger => }/examples/Operations_List.json | 0 .../{Swagger => }/examples/TagRules_CreateOrUpdate.json | 0 .../{Swagger => }/examples/TagRules_Delete.json | 0 .../2020-07-01-preview/{Swagger => }/examples/TagRules_Get.json | 0 .../2020-07-01-preview/{Swagger => }/examples/TagRules_List.json | 0 14 files changed, 0 insertions(+), 0 deletions(-) rename specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/{Swagger => }/elastic.json (100%) rename specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/{Swagger => }/examples/DeploymentInfo_List.json (100%) rename specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/{Swagger => }/examples/MonitoredResources_List.json (100%) rename specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/{Swagger => }/examples/Monitors_Create.json (100%) rename specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/{Swagger => }/examples/Monitors_Delete.json (100%) rename specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/{Swagger => }/examples/Monitors_Get.json (100%) rename specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/{Swagger => }/examples/Monitors_List.json (100%) rename specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/{Swagger => }/examples/Monitors_ListByResourceGroup.json (100%) rename specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/{Swagger => }/examples/Monitors_Update.json (100%) rename specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/{Swagger => }/examples/Operations_List.json (100%) rename specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/{Swagger => }/examples/TagRules_CreateOrUpdate.json (100%) rename specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/{Swagger => }/examples/TagRules_Delete.json (100%) rename specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/{Swagger => }/examples/TagRules_Get.json (100%) rename specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/{Swagger => }/examples/TagRules_List.json (100%) diff --git a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/elastic.json b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json similarity index 100% rename from specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/elastic.json rename to specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json diff --git a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/DeploymentInfo_List.json b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/examples/DeploymentInfo_List.json similarity index 100% rename from specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/DeploymentInfo_List.json rename to specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/examples/DeploymentInfo_List.json diff --git a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/MonitoredResources_List.json b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/examples/MonitoredResources_List.json similarity index 100% rename from specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/MonitoredResources_List.json rename to specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/examples/MonitoredResources_List.json diff --git a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/Monitors_Create.json b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/examples/Monitors_Create.json similarity index 100% rename from specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/Monitors_Create.json rename to specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/examples/Monitors_Create.json diff --git a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/Monitors_Delete.json b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/examples/Monitors_Delete.json similarity index 100% rename from specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/Monitors_Delete.json rename to specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/examples/Monitors_Delete.json diff --git a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/Monitors_Get.json b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/examples/Monitors_Get.json similarity index 100% rename from specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/Monitors_Get.json rename to specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/examples/Monitors_Get.json diff --git a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/Monitors_List.json b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/examples/Monitors_List.json similarity index 100% rename from specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/Monitors_List.json rename to specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/examples/Monitors_List.json diff --git a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/Monitors_ListByResourceGroup.json b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/examples/Monitors_ListByResourceGroup.json similarity index 100% rename from specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/Monitors_ListByResourceGroup.json rename to specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/examples/Monitors_ListByResourceGroup.json diff --git a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/Monitors_Update.json b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/examples/Monitors_Update.json similarity index 100% rename from specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/Monitors_Update.json rename to specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/examples/Monitors_Update.json diff --git a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/Operations_List.json b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/examples/Operations_List.json similarity index 100% rename from specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/Operations_List.json rename to specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/examples/Operations_List.json diff --git a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/TagRules_CreateOrUpdate.json b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/examples/TagRules_CreateOrUpdate.json similarity index 100% rename from specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/TagRules_CreateOrUpdate.json rename to specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/examples/TagRules_CreateOrUpdate.json diff --git a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/TagRules_Delete.json b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/examples/TagRules_Delete.json similarity index 100% rename from specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/TagRules_Delete.json rename to specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/examples/TagRules_Delete.json diff --git a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/TagRules_Get.json b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/examples/TagRules_Get.json similarity index 100% rename from specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/TagRules_Get.json rename to specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/examples/TagRules_Get.json diff --git a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/TagRules_List.json b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/examples/TagRules_List.json similarity index 100% rename from specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/Swagger/examples/TagRules_List.json rename to specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/examples/TagRules_List.json From 181d2f6772efd93d1edb1a6100545fb6b2a2bc86 Mon Sep 17 00:00:00 2001 From: Varun Kunchakuri Date: Thu, 4 Mar 2021 09:36:16 +0530 Subject: [PATCH 15/31] moving custom words to swagger folder --- .../{ => preview/2020-07-01-preview}/custom-words.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename specification/elastic/resource-manager/Microsoft.Elastic/{ => preview/2020-07-01-preview}/custom-words.txt (100%) diff --git a/specification/elastic/resource-manager/Microsoft.Elastic/custom-words.txt b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/custom-words.txt similarity index 100% rename from specification/elastic/resource-manager/Microsoft.Elastic/custom-words.txt rename to specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/custom-words.txt From 9fb8302a26a92f6c63cd398ca8073e20b855978a Mon Sep 17 00:00:00 2001 From: Varun Kunchakuri Date: Thu, 4 Mar 2021 09:43:06 +0530 Subject: [PATCH 16/31] moving custom words to readme directory --- .../preview/2020-07-01-preview => }/custom-words.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename specification/elastic/resource-manager/{Microsoft.Elastic/preview/2020-07-01-preview => }/custom-words.txt (100%) diff --git a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/custom-words.txt b/specification/elastic/resource-manager/custom-words.txt similarity index 100% rename from specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/custom-words.txt rename to specification/elastic/resource-manager/custom-words.txt From 64df2bfd57ca68b9c604a9ac556c9df2ee67eb54 Mon Sep 17 00:00:00 2001 From: varun kumar kunchakuri <66476965+vakuncha@users.noreply.github.com> Date: Mon, 15 Mar 2021 12:44:44 +0530 Subject: [PATCH 17/31] removed custom words --- custom-words.txt | 3 ++- specification/elastic/resource-manager/custom-words.txt | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 specification/elastic/resource-manager/custom-words.txt diff --git a/custom-words.txt b/custom-words.txt index 3b86e0485a37..f659c147664c 100644 --- a/custom-words.txt +++ b/custom-words.txt @@ -2134,4 +2134,5 @@ unhide privatelinkservice natgateway defanged -Logz \ No newline at end of file +Logz +kibana diff --git a/specification/elastic/resource-manager/custom-words.txt b/specification/elastic/resource-manager/custom-words.txt deleted file mode 100644 index 0680a418b189..000000000000 --- a/specification/elastic/resource-manager/custom-words.txt +++ /dev/null @@ -1 +0,0 @@ -kibana From b933f0933a53a9f592ef12bae285b8e61aa502e3 Mon Sep 17 00:00:00 2001 From: Varun Kunchakuri Date: Thu, 4 Mar 2021 10:17:20 +0530 Subject: [PATCH 18/31] changed double preview to preview --- specification/elastic/resource-manager/readme.go.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/elastic/resource-manager/readme.go.md b/specification/elastic/resource-manager/readme.go.md index 8f84a22f7d5e..ea59b550830c 100644 --- a/specification/elastic/resource-manager/readme.go.md +++ b/specification/elastic/resource-manager/readme.go.md @@ -13,12 +13,12 @@ go: ``` yaml $(go) && $(multiapi) batch: - - tag: package-2020-07-01-preview-preview + - tag: package-2020-07-01-preview ``` ### Tag: package-2020-07-01-preview-preview and go -These settings apply only when `--tag=package-2020-07-01-preview-preview --go` is specified on the command line. +These settings apply only when `--tag=package-2020-07-01-preview --go` is specified on the command line. Please also specify `--go-sdk-folder=`. ```yaml $(tag) == 'package-2020-07-01-preview-preview' && $(go) From 0a9f49cfaad60278cf9fe22ee84cf03d02c9ff7d Mon Sep 17 00:00:00 2001 From: Varun Kunchakuri Date: Thu, 4 Mar 2021 11:36:20 +0530 Subject: [PATCH 19/31] added systemdata as part of the spec --- .../preview/2020-07-01-preview/elastic.json | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json index cad1022109d2..4f46ea1c4756 100644 --- a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json +++ b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json @@ -1059,6 +1059,9 @@ "read", "create" ] + }, + "systemData": { + "$ref": "#/definitions/systemData" } } }, @@ -1290,6 +1293,59 @@ "readOnly": true } } + }, + "systemData" : { + "description": "Metadata pertaining to creation and last modification of the resource.", + "type": "object", + "readOnly": true, + "properties": { + "createdBy": { + "type": "string", + "description": "The identity that created the resource." + }, + "createdByType": { + "type": "string", + "description": "The type of identity that created the resource.", + "enum": [ + "User", + "Application", + "ManagedIdentity", + "Key" + ], + "x-ms-enum": { + "name": "createdByType", + "modelAsString": true + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "The timestamp of resource creation (UTC)." + }, + "lastModifiedBy": { + "type": "string", + "description": "The identity that last modified the resource." + }, + "lastModifiedByType": { + "type": "string", + "description": "The type of identity that last modified the resource.", + "enum": [ + "User", + "Application", + "ManagedIdentity", + "Key" + ], + "x-ms-enum": { + "name": "createdByType", + "modelAsString": true + } + }, + "lastModifiedAt": { + "type": "string", + "format": "date-time", + "description": "The type of identity that last modified the resource." + } + } } }, "parameters": { From 3fa08125e854e8e4c199f13a65d678a430137bfe Mon Sep 17 00:00:00 2001 From: Varun Kunchakuri Date: Thu, 4 Mar 2021 11:50:29 +0530 Subject: [PATCH 20/31] fixing prettyness --- .../Microsoft.Elastic/preview/2020-07-01-preview/elastic.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json index 4f46ea1c4756..801f31d6b28c 100644 --- a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json +++ b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json @@ -1294,7 +1294,7 @@ } } }, - "systemData" : { + "systemData": { "description": "Metadata pertaining to creation and last modification of the resource.", "type": "object", "readOnly": true, From d18b9992827eda060900d19d9c1b896ec0f88d9b Mon Sep 17 00:00:00 2001 From: Varun Kunchakuri Date: Thu, 4 Mar 2021 12:08:52 +0530 Subject: [PATCH 21/31] added systemData for tagrules --- .../Microsoft.Elastic/preview/2020-07-01-preview/elastic.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json index 801f31d6b28c..0e39cfce3a92 100644 --- a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json +++ b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json @@ -1236,6 +1236,9 @@ "description": "Properties of the monitoring tag rules.", "$ref": "#/definitions/MonitoringTagRulesProperties", "x-ms-client-flatten": false + }, + "systemData": { + "$ref": "#/definitions/systemData" } } }, From 8a319096345f386cdfbb8a39a28c6ecf776e3f13 Mon Sep 17 00:00:00 2001 From: Varun Kunchakuri Date: Thu, 4 Mar 2021 12:40:21 +0530 Subject: [PATCH 22/31] moving system data to a level down --- .../preview/2020-07-01-preview/elastic.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json index 0e39cfce3a92..c7be743d817e 100644 --- a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json +++ b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json @@ -975,6 +975,9 @@ "format": "int32", "type": "integer", "readOnly": true + }, + "systemData": { + "$ref": "#/definitions/systemData" } } }, @@ -1059,9 +1062,6 @@ "read", "create" ] - }, - "systemData": { - "$ref": "#/definitions/systemData" } } }, @@ -1209,6 +1209,9 @@ "logRules": { "description": "Rules for sending logs.", "$ref": "#/definitions/LogRules" + }, + "systemData": { + "$ref": "#/definitions/systemData" } } }, @@ -1236,9 +1239,6 @@ "description": "Properties of the monitoring tag rules.", "$ref": "#/definitions/MonitoringTagRulesProperties", "x-ms-client-flatten": false - }, - "systemData": { - "$ref": "#/definitions/systemData" } } }, From fb761b6828d560608e8295946bb23c05d1de5cb5 Mon Sep 17 00:00:00 2001 From: Varun Kunchakuri Date: Thu, 4 Mar 2021 13:45:28 +0530 Subject: [PATCH 23/31] added a new type of response definition --- .../preview/2020-07-01-preview/elastic.json | 64 +++++++++++++++++-- 1 file changed, 57 insertions(+), 7 deletions(-) diff --git a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json index c7be743d817e..d38d5e8b1395 100644 --- a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json +++ b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json @@ -975,9 +975,6 @@ "format": "int32", "type": "integer", "readOnly": true - }, - "systemData": { - "$ref": "#/definitions/systemData" } } }, @@ -1065,6 +1062,62 @@ } } }, + "ElasticMonitorResourceResponse": { + "description": "Monitor resource response.", + "required": [ + "location" + ], + "type": "object", + "x-ms-azure-resource": true, + "properties": { + "id": { + "description": "ARM id of the monitor resource.", + "type": "string", + "readOnly": true + }, + "name": { + "description": "Name of the monitor resource.", + "type": "string", + "readOnly": true + }, + "type": { + "description": "The type of the monitor resource.", + "type": "string", + "readOnly": true + }, + "sku": { + "description": "SKU of the monitor resource.", + "$ref": "#/definitions/ResourceSku" + }, + "properties": { + "description": "Properties of the monitor resource.", + "$ref": "#/definitions/MonitorProperties", + "x-ms-client-flatten": false + }, + "identity": { + "description": "Identity properties of the monitor resource.", + "$ref": "#/definitions/IdentityProperties" + }, + "tags": { + "description": "The tags of the monitor resource.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "location": { + "description": "The location of the monitor resource", + "type": "string", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "systemData": { + "$ref": "#/definitions/systemData" + } + } + }, "ElasticMonitorResourceListResponse": { "description": "Response of a list operation.", "type": "object", @@ -1073,7 +1126,7 @@ "description": "Results of a list operation.", "type": "array", "items": { - "$ref": "#/definitions/ElasticMonitorResource" + "$ref": "#/definitions/ElasticMonitorResourceResponse" } }, "nextLink": { @@ -1209,9 +1262,6 @@ "logRules": { "description": "Rules for sending logs.", "$ref": "#/definitions/LogRules" - }, - "systemData": { - "$ref": "#/definitions/systemData" } } }, From 988d2934bc2ed8c5030653ece713e323cf2ad1f9 Mon Sep 17 00:00:00 2001 From: Varun Kunchakuri Date: Thu, 4 Mar 2021 16:58:26 +0530 Subject: [PATCH 24/31] changed theget type of montor --- .../preview/2020-07-01-preview/elastic.json | 65 ++----------------- 1 file changed, 7 insertions(+), 58 deletions(-) diff --git a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json index d38d5e8b1395..38c54d6d6ddf 100644 --- a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json +++ b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json @@ -180,7 +180,7 @@ "200": { "description": "Success", "schema": { - "$ref": "#/definitions/ElasticMonitorResource" + "$ref": "#/definitions/ElasticMonitorResourceResponse" } }, "default": { @@ -234,13 +234,13 @@ "200": { "description": "Success", "schema": { - "$ref": "#/definitions/ElasticMonitorResource" + "$ref": "#/definitions/ElasticMonitorResourceResponse" } }, "201": { "description": "Success", "schema": { - "$ref": "#/definitions/ElasticMonitorResource" + "$ref": "#/definitions/ElasticMonitorResourceResponse" } }, "default": { @@ -298,7 +298,7 @@ "200": { "description": "Success", "schema": { - "$ref": "#/definitions/ElasticMonitorResource" + "$ref": "#/definitions/ElasticMonitorResourceResponse" } }, "default": { @@ -1114,7 +1114,9 @@ ] }, "systemData": { - "$ref": "#/definitions/systemData" + "readOnly": true, + "description": "The system metadata relating to this resource", + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" } } }, @@ -1346,59 +1348,6 @@ "readOnly": true } } - }, - "systemData": { - "description": "Metadata pertaining to creation and last modification of the resource.", - "type": "object", - "readOnly": true, - "properties": { - "createdBy": { - "type": "string", - "description": "The identity that created the resource." - }, - "createdByType": { - "type": "string", - "description": "The type of identity that created the resource.", - "enum": [ - "User", - "Application", - "ManagedIdentity", - "Key" - ], - "x-ms-enum": { - "name": "createdByType", - "modelAsString": true - } - }, - "createdAt": { - "type": "string", - "format": "date-time", - "description": "The timestamp of resource creation (UTC)." - }, - "lastModifiedBy": { - "type": "string", - "description": "The identity that last modified the resource." - }, - "lastModifiedByType": { - "type": "string", - "description": "The type of identity that last modified the resource.", - "enum": [ - "User", - "Application", - "ManagedIdentity", - "Key" - ], - "x-ms-enum": { - "name": "createdByType", - "modelAsString": true - } - }, - "lastModifiedAt": { - "type": "string", - "format": "date-time", - "description": "The type of identity that last modified the resource." - } - } } }, "parameters": { From fdb7e8a7a301cdb9668e613a5321b770623da58e Mon Sep 17 00:00:00 2001 From: Varun Kunchakuri Date: Thu, 4 Mar 2021 17:11:34 +0530 Subject: [PATCH 25/31] reverting swagger to without systemdata --- .../preview/2020-07-01-preview/elastic.json | 68 ++----------------- 1 file changed, 5 insertions(+), 63 deletions(-) diff --git a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json index 38c54d6d6ddf..cad1022109d2 100644 --- a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json +++ b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json @@ -180,7 +180,7 @@ "200": { "description": "Success", "schema": { - "$ref": "#/definitions/ElasticMonitorResourceResponse" + "$ref": "#/definitions/ElasticMonitorResource" } }, "default": { @@ -234,13 +234,13 @@ "200": { "description": "Success", "schema": { - "$ref": "#/definitions/ElasticMonitorResourceResponse" + "$ref": "#/definitions/ElasticMonitorResource" } }, "201": { "description": "Success", "schema": { - "$ref": "#/definitions/ElasticMonitorResourceResponse" + "$ref": "#/definitions/ElasticMonitorResource" } }, "default": { @@ -298,7 +298,7 @@ "200": { "description": "Success", "schema": { - "$ref": "#/definitions/ElasticMonitorResourceResponse" + "$ref": "#/definitions/ElasticMonitorResource" } }, "default": { @@ -1062,64 +1062,6 @@ } } }, - "ElasticMonitorResourceResponse": { - "description": "Monitor resource response.", - "required": [ - "location" - ], - "type": "object", - "x-ms-azure-resource": true, - "properties": { - "id": { - "description": "ARM id of the monitor resource.", - "type": "string", - "readOnly": true - }, - "name": { - "description": "Name of the monitor resource.", - "type": "string", - "readOnly": true - }, - "type": { - "description": "The type of the monitor resource.", - "type": "string", - "readOnly": true - }, - "sku": { - "description": "SKU of the monitor resource.", - "$ref": "#/definitions/ResourceSku" - }, - "properties": { - "description": "Properties of the monitor resource.", - "$ref": "#/definitions/MonitorProperties", - "x-ms-client-flatten": false - }, - "identity": { - "description": "Identity properties of the monitor resource.", - "$ref": "#/definitions/IdentityProperties" - }, - "tags": { - "description": "The tags of the monitor resource.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "location": { - "description": "The location of the monitor resource", - "type": "string", - "x-ms-mutability": [ - "read", - "create" - ] - }, - "systemData": { - "readOnly": true, - "description": "The system metadata relating to this resource", - "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" - } - } - }, "ElasticMonitorResourceListResponse": { "description": "Response of a list operation.", "type": "object", @@ -1128,7 +1070,7 @@ "description": "Results of a list operation.", "type": "array", "items": { - "$ref": "#/definitions/ElasticMonitorResourceResponse" + "$ref": "#/definitions/ElasticMonitorResource" } }, "nextLink": { From 8aef94d7c29932ee4cbe11ee722aceaaff8027ad Mon Sep 17 00:00:00 2001 From: Varun Kunchakuri Date: Thu, 4 Mar 2021 17:45:19 +0530 Subject: [PATCH 26/31] added systemdata in properties --- .../preview/2020-07-01-preview/elastic.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json index cad1022109d2..fc8e7c572697 100644 --- a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json +++ b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json @@ -975,6 +975,11 @@ "format": "int32", "type": "integer", "readOnly": true + }, + "systemData": { + "readOnly": true, + "description": "The system metadata relating to this resource", + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" } } }, From 1a240a473c70e3d5e3494dd16f2397a082c6d010 Mon Sep 17 00:00:00 2001 From: Varun Kunchakuri Date: Fri, 5 Mar 2021 09:50:31 +0530 Subject: [PATCH 27/31] added system data elasticmonitor resource and tags --- .../preview/2020-07-01-preview/elastic.json | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json index fc8e7c572697..2d205b223fe3 100644 --- a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json +++ b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json @@ -975,11 +975,6 @@ "format": "int32", "type": "integer", "readOnly": true - }, - "systemData": { - "readOnly": true, - "description": "The system metadata relating to this resource", - "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" } } }, @@ -1064,6 +1059,11 @@ "read", "create" ] + }, + "systemData": { + "readOnly": true, + "description": "The system metadata relating to this resource", + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" } } }, @@ -1238,6 +1238,11 @@ "description": "Properties of the monitoring tag rules.", "$ref": "#/definitions/MonitoringTagRulesProperties", "x-ms-client-flatten": false + }, + "systemData": { + "readOnly": true, + "description": "The system metadata relating to this resource", + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" } } }, From 53b22307818099f9ec9162f9dcf01e0b4c701e43 Mon Sep 17 00:00:00 2001 From: Varun Kunchakuri Date: Fri, 5 Mar 2021 11:20:01 +0530 Subject: [PATCH 28/31] Added 2 new properties to operation result --- .../preview/2020-07-01-preview/elastic.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json index 2d205b223fe3..6de31a676f3a 100644 --- a/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json +++ b/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/elastic.json @@ -727,9 +727,17 @@ "description": "Operation name, i.e., {provider}/{resource}/{operation}.", "type": "string" }, + "isDataAction": { + "description": "Indicates whether the operation is a data action", + "type": "boolean" + }, "display": { "description": "The object that represents the operation.", "$ref": "#/definitions/OperationDisplay" + }, + "origin": { + "description": "Origin of the operation", + "type": "string" } } }, From 60f913fd2ac1da8178548d7ed57678ff43bbde82 Mon Sep 17 00:00:00 2001 From: Varun Kunchakuri Date: Fri, 5 Mar 2021 11:34:05 +0530 Subject: [PATCH 29/31] fixing go sdk generation --- specification/elastic/resource-manager/readme.go.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/elastic/resource-manager/readme.go.md b/specification/elastic/resource-manager/readme.go.md index ea59b550830c..a1925812f00d 100644 --- a/specification/elastic/resource-manager/readme.go.md +++ b/specification/elastic/resource-manager/readme.go.md @@ -16,11 +16,11 @@ batch: - tag: package-2020-07-01-preview ``` -### Tag: package-2020-07-01-preview-preview and go +### Tag: package-2020-07-01-preview and go These settings apply only when `--tag=package-2020-07-01-preview --go` is specified on the command line. Please also specify `--go-sdk-folder=`. -```yaml $(tag) == 'package-2020-07-01-preview-preview' && $(go) +```yaml $(tag) == 'package-2020-07-01-preview' && $(go) output-folder: $(go-sdk-folder)/services/preview/$(namespace)/mgmt/2020-07-01-preview/$(namespace) ``` From 80abeea772f6e98a72c698a50b4fb0939181ee90 Mon Sep 17 00:00:00 2001 From: varun kumar kunchakuri <66476965+vakuncha@users.noreply.github.com> Date: Fri, 5 Mar 2021 14:27:38 +0530 Subject: [PATCH 30/31] added no name space for track python --- specification/elastic/resource-manager/readme.python.md | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/elastic/resource-manager/readme.python.md b/specification/elastic/resource-manager/readme.python.md index f9b3c352eb66..db77998937f2 100644 --- a/specification/elastic/resource-manager/readme.python.md +++ b/specification/elastic/resource-manager/readme.python.md @@ -14,6 +14,7 @@ python: ``` yaml $(python-mode) == 'update' && !$(track2) python: + no-namespace-folders: true output-folder: $(python-sdks-folder)/elastic/azure-mgmt-elastic/azure/mgmt/elastic ``` ``` yaml $(python-mode) == 'create' && !$(track2) From 1f077688022b6b108ab9e50c75d5f07fe03b79df Mon Sep 17 00:00:00 2001 From: varun kumar kunchakuri <66476965+vakuncha@users.noreply.github.com> Date: Mon, 8 Mar 2021 09:54:00 +0530 Subject: [PATCH 31/31] Using confluent python.md --- .../elastic/resource-manager/readme.python.md | 34 +++++-------------- 1 file changed, 8 insertions(+), 26 deletions(-) diff --git a/specification/elastic/resource-manager/readme.python.md b/specification/elastic/resource-manager/readme.python.md index db77998937f2..af0e6a0b3c2e 100644 --- a/specification/elastic/resource-manager/readme.python.md +++ b/specification/elastic/resource-manager/readme.python.md @@ -2,41 +2,23 @@ These settings apply only when `--python` is specified on the command line. Please also specify `--python-sdks-folder=`. +Use `--python-mode=update` if you already have a setup.py and just want to update the code itself. -``` yaml $(python) && !$(track2) -python: - azure-arm: true - license-header: MICROSOFT_MIT_NO_VERSION - package-name: azure-mgmt-elastic - no-namespace-folders: true - package-version: 1.0.0b1 -``` - -``` yaml $(python-mode) == 'update' && !$(track2) -python: - no-namespace-folders: true - output-folder: $(python-sdks-folder)/elastic/azure-mgmt-elastic/azure/mgmt/elastic -``` -``` yaml $(python-mode) == 'create' && !$(track2) -python: - basic-setup-py: true - output-folder: $(python-sdks-folder)/elastic/azure-mgmt-elastic -``` - -``` yaml $(python) && $(track2) +``` yaml $(python) azure-arm: true license-header: MICROSOFT_MIT_NO_VERSION +namespace: azure.mgmt.elastic package-name: azure-mgmt-elastic -no-namespace-folders: true +package-version: 1.0.0b1 +clear-output-folder: true ``` -``` yaml $(python-mode) == 'update' +``` yaml $(python) && $(python-mode) == 'update' no-namespace-folders: true output-folder: $(python-sdks-folder)/elastic/azure-mgmt-elastic/azure/mgmt/elastic ``` -``` yaml $(python-mode) == 'create' && $(track2) -package-version: 1.0.0b1 +``` yaml $(python) && $(python-mode) == 'create' basic-setup-py: true output-folder: $(python-sdks-folder)/elastic/azure-mgmt-elastic -``` +``` \ No newline at end of file