Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update elastic swagger #14076

Merged
merged 4 commits into from
Apr 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,149 @@
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Elastic/monitors/{monitorName}/listVMHost": {
"post": {
"tags": [
"VMHHostList"
],
"summary": "List the vm resources currently being monitored by the Elastic monitor resource.",
"operationId": "VMHost_List",
"produces": [
"application/json"
],
"parameters": [
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/MonitorNameParameter"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/VMHostListResponse"
}
},
"default": {
"description": "Default error response.",
"schema": {
"$ref": "#/definitions/ResourceProviderDefaultErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-examples": {
"VMHost_List": {
"$ref": "./examples/VMHost_List.json"
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Elastic/monitors/{monitorName}/vmIngestionDetails": {
"post": {
"tags": [
"VMIngestionDetails"
],
"summary": "List the vm ingestion details that will be monitored by the Elastic monitor resource.",
"operationId": "VMIngestion_Details",
"produces": [
"application/json"
],
"parameters": [
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/MonitorNameParameter"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/VMIngestionDetailsResponse"
}
},
"default": {
"description": "Default error response.",
"schema": {
"$ref": "#/definitions/ResourceProviderDefaultErrorResponse"
}
}
},
"x-ms-examples": {
"VMIngestion_Details": {
"$ref": "./examples/VMIngestion_Details.json"
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Elastic/monitors/{monitorName}/vmCollectionUpdate": {
"post": {
"tags": [
"VMCollectionUpdate"
],
"summary": "Update the vm details that will be monitored by the Elastic monitor resource.",
"operationId": "VMCollection_Update",
"produces": [
"application/json"
],
"parameters": [
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/MonitorNameParameter"
},
{
"in": "body",
"name": "body",
"description": "VM resource Id",
"schema": {
"$ref": "#/definitions/VMCollectionUpdate"
}
}
],
"responses": {
"200": {
"description": "Success"
},
"default": {
"description": "Default error response.",
"schema": {
"$ref": "#/definitions/ResourceProviderDefaultErrorResponse"
}
}
},
"x-ms-examples": {
"VMCollection_Update": {
"$ref": "./examples/VMCollection_Update.json"
}
}
}
}
},
"definitions": {
Expand Down Expand Up @@ -1308,6 +1451,76 @@
"readOnly": true
}
}
},
"VMHostListResponse": {
"description": "Response of a list operation.",
"type": "object",
"properties": {
"value": {
"description": "Results of a list operation.",
"type": "array",
"items": {
"$ref": "#/definitions/VMResources"
}
},
"nextLink": {
"description": "Link to the next Vm resource Id, if any.",
"type": "string"
}
}
},
"VMResources": {
"description": "The vm resource properties that is currently being monitored by the Elastic monitor resource.",
"type": "object",
"properties": {
"vmResourceId": {
"description": "The ARM id of the VM resource.",
"type": "string"
}
}
},
"VMIngestionDetailsResponse": {
"description": "The vm ingestion details to install an agent.",
"type": "object",
"properties": {
"cloudId": {
"description": "The cloudId of given Elastic monitor resource.",
"type": "string"
},
"ingestionKey": {
"description": "Ingestion details to install agent on given VM.",
"type": "string",
"x-ms-secret": true
}
}
},
"OperationName": {
"enum": [
"Add",
"Delete"
],
"type": "string",
"description": "Operation to be performed on the given vm resource id.",
"title": "OperationName",
"x-ms-enum": {
"modelAsString": true,
"name": "OperationName"
}
},
"VMCollectionUpdate": {
"description": "Update VM resource collection.",
"type": "object",
"x-ms-azure-resource": true,
"properties": {
"vmResourceId": {
"description": "ARM id of the VM resource.",
"type": "string"
},
"operationName": {
"description": "Operation to be performed for given VM.",
"$ref": "#/definitions/OperationName"
}
}
}
},
"parameters": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"parameters": {
"api-version": "2020-07-01-preview",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resourceGroupName": "myResourceGroup",
"monitorName": "myMonitor",
"requestBody": {
"vmResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualmachines/myVM",
"operationName": "Add"
}
},
"responses": {
"200": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"parameters": {
"api-version": "2020-07-01-preview",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resourceGroupName": "myResourceGroup",
"monitorName": "myMonitor"
},
"responses": {
"200": {
"body": {
"value": [
{
"vmResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualmachines/myVM"
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"parameters": {
"api-version": "2020-07-01-preview",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resourceGroupName": "myResourceGroup",
"monitorName": "myMonitor"
},
"responses": {
"200": {
"body": {
"cloudId": "myid123",
"ingestionKey": "Vmingeationkey"
}
}
}
}
11 changes: 11 additions & 0 deletions specification/elastic/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,17 @@ swagger-to-sdk:
- node sdkauto_afterscript.js elastic/resource-manager
- repo: azure-cli-extensions
```
## Suppression
```
directive:
- suppress: SECRET_PROPERTY
from:
- Microsoft.Elastic/preview/2020-07-01-preview/elastic.json
where:
- $.definitions.VMIngestionDetailsResponse.properties.ingestionKey
reason: Secrets are OK to return in a POST response.
```

## Az

See configuration in [readme.az.md](./readme.az.md)
Expand Down