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

Manually moving DataCollectionRules from Private PR. #17845

Merged
merged 3 commits into from
Feb 16, 2022
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
@@ -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"
}
}
}
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": {}
}
}
19 changes: 19 additions & 0 deletions specification/monitor/data-plane/ingestion/readme.md
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
```