forked from Azure/azure-rest-api-specs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Manually moving DataCollectionRules from Private PR. (Azure#17845)
* Create readme.md * Create post_IngestUsingDataCollectionRule.json * Create DataCollectionRules.json
- Loading branch information
1 parent
94b5965
commit adcb573
Showing
3 changed files
with
196 additions
and
0 deletions.
There are no files selected for viewing
136 changes: 136 additions & 0 deletions
136
...fication/monitor/data-plane/ingestion/preview/2021-11-01-preview/DataCollectionRules.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"title": "Ingestion Using Data Collection Rules", | ||
"version": "2021-11-01-preview" | ||
}, | ||
"x-ms-parameterized-host": { | ||
"hostTemplate": "{endpoint}", | ||
"useSchemePrefix": false, | ||
"parameters": [ | ||
{ | ||
"$ref": "#/parameters/Endpoint" | ||
} | ||
] | ||
}, | ||
"schemes": [ | ||
"https" | ||
], | ||
"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" | ||
} | ||
} | ||
}, | ||
"security": [ | ||
{ | ||
"azure_auth": [ | ||
"user_impersonation" | ||
] | ||
} | ||
], | ||
"paths": { | ||
"/dataCollectionRules/{ruleId}/streams/{stream}": { | ||
"post": { | ||
"tags": [ | ||
"Data Collection Rules" | ||
], | ||
"summary": "Ingestion API used to directly ingest data using Data Collection Rules", | ||
"description": "See error response code and error response message for more detail.", | ||
"operationId": "DataCollectionRule_Ingest", | ||
"consumes": [ | ||
"application/json" | ||
], | ||
"produces": [ | ||
"application/json" | ||
], | ||
"parameters": [ | ||
{ | ||
"in": "path", | ||
"name": "ruleId", | ||
"description": "The immutable Id of the Data Collection Rule resource.", | ||
"required": true, | ||
"type": "string" | ||
}, | ||
{ | ||
"in": "path", | ||
"name": "stream", | ||
"description": "The streamDeclaration name as defined in the Data Collection Rule.", | ||
"required": true, | ||
"type": "string" | ||
}, | ||
{ | ||
"in": "query", | ||
"name": "api-version", | ||
"required": true, | ||
"type": "string", | ||
"description": "The API version to use for this operation." | ||
}, | ||
{ | ||
"in": "header", | ||
"name": "Content-Encoding", | ||
"description": "gzip", | ||
"type": "string" | ||
}, | ||
{ | ||
"in": "header", | ||
"name": "x-ms-client-request-id", | ||
"description": "Client request Id", | ||
"type": "string" | ||
}, | ||
{ | ||
"in": "body", | ||
"name": "body", | ||
"description": "An array of objects matching the schema defined by the provided stream.", | ||
"required": true, | ||
"schema": { | ||
"type": "array", | ||
"items": { | ||
"type": "object" | ||
} | ||
} | ||
} | ||
], | ||
"x-ms-examples": { | ||
"postIngestUsingDataCollectionRule": { | ||
"$ref": "./examples/post_IngestUsingDataCollectionRule.json" | ||
} | ||
}, | ||
"responses": { | ||
"204": { | ||
"description": "Ingestion request accepted" | ||
}, | ||
"default": { | ||
"description": "An error response object.", | ||
"schema": { | ||
"$ref": "../../../../../common-types/data-plane/v1/types.json#/definitions/ErrorResponse" | ||
}, | ||
"headers": { | ||
"x-ms-error-code": { | ||
"description": "A value that indicates the ingestion service error code.", | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"definitions": {}, | ||
"parameters": { | ||
"Endpoint": { | ||
"name": "endpoint", | ||
"description": "The Data Collection Endpoint for the Data Collection Rule, for example https://dce-name.eastus-2.ingest.monitor.azure.com.", | ||
"required": true, | ||
"type": "string", | ||
"in": "path", | ||
"x-ms-skip-url-encoding": true, | ||
"x-ms-parameter-location": "client" | ||
} | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
...ane/ingestion/preview/2021-11-01-preview/examples/post_IngestUsingDataCollectionRule.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"title": "Post Ingest Using Data Collection Rule", | ||
"description": "Allows data to be ingested directly using Data Collection Rules", | ||
"parameters": { | ||
"endpoint": "https://dce-name.eastus-2.ingest.monitor.azure.com", | ||
"ruleId": "c512b59c-4005-40e2-b13d-ac29cfb46af4", | ||
"stream": "test-rg", | ||
"api-version": "2021-11-01-preview", | ||
"Authorization": "Bearer ey...", | ||
"Content-Type": "application/json", | ||
"Content-Encoding": "gzip", | ||
"x-ms-client-request-id": "", | ||
"body": [ | ||
{ | ||
"Time": "2021-12-08T23:51:14.1104269Z", | ||
"Computer": "Computer1", | ||
"AdditionalContext": { | ||
"InstanceName": "user1", | ||
"TimeZone": "Pacific Time", | ||
"Level": 4, | ||
"CounterName": "AppMetric1", | ||
"CounterValue": 15.3 | ||
} | ||
}, | ||
{ | ||
"Time": "2021-12-08T23:51:14.1104269Z", | ||
"Computer": "Computer2", | ||
"AdditionalContext": { | ||
"InstanceName": "user2", | ||
"TimeZone": "Central Time", | ||
"Level": 3, | ||
"CounterName": "AppMetric1", | ||
"CounterValue": 23.5 | ||
} | ||
} | ||
] | ||
}, | ||
"responses": { | ||
"204": {} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# My API | ||
> see https://aka.ms/autorest | ||
### Basic Information | ||
These are the global settings for the Ingestion API. | ||
|
||
``` yaml | ||
openapi-type: data-plane | ||
tag: package-2021-11-preview | ||
``` | ||
### Tag: package-2021-11-preview | ||
These settings apply only when `--tag=package-2021-11-preview` is specified on the command line. | ||
|
||
``` yaml $(tag) == 'package-2021-11-preview' | ||
input-file: | ||
- preview/2021-11-01-preview/DataCollectionRules.json | ||
``` |