Skip to content

Commit 3f59f46

Browse files
authored
Manually moving DataCollectionRules from Private PR. (Azure#17845)
* Create readme.md * Create post_IngestUsingDataCollectionRule.json * Create DataCollectionRules.json
1 parent d850f41 commit 3f59f46

File tree

3 files changed

+196
-0
lines changed

3 files changed

+196
-0
lines changed
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
{
2+
"swagger": "2.0",
3+
"info": {
4+
"title": "Ingestion Using Data Collection Rules",
5+
"version": "2021-11-01-preview"
6+
},
7+
"x-ms-parameterized-host": {
8+
"hostTemplate": "{endpoint}",
9+
"useSchemePrefix": false,
10+
"parameters": [
11+
{
12+
"$ref": "#/parameters/Endpoint"
13+
}
14+
]
15+
},
16+
"schemes": [
17+
"https"
18+
],
19+
"securityDefinitions": {
20+
"azure_auth": {
21+
"type": "oauth2",
22+
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
23+
"flow": "implicit",
24+
"description": "Azure Active Directory OAuth2 Flow",
25+
"scopes": {
26+
"user_impersonation": "impersonate your user account"
27+
}
28+
}
29+
},
30+
"security": [
31+
{
32+
"azure_auth": [
33+
"user_impersonation"
34+
]
35+
}
36+
],
37+
"paths": {
38+
"/dataCollectionRules/{ruleId}/streams/{stream}": {
39+
"post": {
40+
"tags": [
41+
"Data Collection Rules"
42+
],
43+
"summary": "Ingestion API used to directly ingest data using Data Collection Rules",
44+
"description": "See error response code and error response message for more detail.",
45+
"operationId": "DataCollectionRule_Ingest",
46+
"consumes": [
47+
"application/json"
48+
],
49+
"produces": [
50+
"application/json"
51+
],
52+
"parameters": [
53+
{
54+
"in": "path",
55+
"name": "ruleId",
56+
"description": "The immutable Id of the Data Collection Rule resource.",
57+
"required": true,
58+
"type": "string"
59+
},
60+
{
61+
"in": "path",
62+
"name": "stream",
63+
"description": "The streamDeclaration name as defined in the Data Collection Rule.",
64+
"required": true,
65+
"type": "string"
66+
},
67+
{
68+
"in": "query",
69+
"name": "api-version",
70+
"required": true,
71+
"type": "string",
72+
"description": "The API version to use for this operation."
73+
},
74+
{
75+
"in": "header",
76+
"name": "Content-Encoding",
77+
"description": "gzip",
78+
"type": "string"
79+
},
80+
{
81+
"in": "header",
82+
"name": "x-ms-client-request-id",
83+
"description": "Client request Id",
84+
"type": "string"
85+
},
86+
{
87+
"in": "body",
88+
"name": "body",
89+
"description": "An array of objects matching the schema defined by the provided stream.",
90+
"required": true,
91+
"schema": {
92+
"type": "array",
93+
"items": {
94+
"type": "object"
95+
}
96+
}
97+
}
98+
],
99+
"x-ms-examples": {
100+
"postIngestUsingDataCollectionRule": {
101+
"$ref": "./examples/post_IngestUsingDataCollectionRule.json"
102+
}
103+
},
104+
"responses": {
105+
"204": {
106+
"description": "Ingestion request accepted"
107+
},
108+
"default": {
109+
"description": "An error response object.",
110+
"schema": {
111+
"$ref": "../../../../../common-types/data-plane/v1/types.json#/definitions/ErrorResponse"
112+
},
113+
"headers": {
114+
"x-ms-error-code": {
115+
"description": "A value that indicates the ingestion service error code.",
116+
"type": "string"
117+
}
118+
}
119+
}
120+
}
121+
}
122+
}
123+
},
124+
"definitions": {},
125+
"parameters": {
126+
"Endpoint": {
127+
"name": "endpoint",
128+
"description": "The Data Collection Endpoint for the Data Collection Rule, for example https://dce-name.eastus-2.ingest.monitor.azure.com.",
129+
"required": true,
130+
"type": "string",
131+
"in": "path",
132+
"x-ms-skip-url-encoding": true,
133+
"x-ms-parameter-location": "client"
134+
}
135+
}
136+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"title": "Post Ingest Using Data Collection Rule",
3+
"description": "Allows data to be ingested directly using Data Collection Rules",
4+
"parameters": {
5+
"endpoint": "https://dce-name.eastus-2.ingest.monitor.azure.com",
6+
"ruleId": "c512b59c-4005-40e2-b13d-ac29cfb46af4",
7+
"stream": "test-rg",
8+
"api-version": "2021-11-01-preview",
9+
"Authorization": "Bearer ey...",
10+
"Content-Type": "application/json",
11+
"Content-Encoding": "gzip",
12+
"x-ms-client-request-id": "",
13+
"body": [
14+
{
15+
"Time": "2021-12-08T23:51:14.1104269Z",
16+
"Computer": "Computer1",
17+
"AdditionalContext": {
18+
"InstanceName": "user1",
19+
"TimeZone": "Pacific Time",
20+
"Level": 4,
21+
"CounterName": "AppMetric1",
22+
"CounterValue": 15.3
23+
}
24+
},
25+
{
26+
"Time": "2021-12-08T23:51:14.1104269Z",
27+
"Computer": "Computer2",
28+
"AdditionalContext": {
29+
"InstanceName": "user2",
30+
"TimeZone": "Central Time",
31+
"Level": 3,
32+
"CounterName": "AppMetric1",
33+
"CounterValue": 23.5
34+
}
35+
}
36+
]
37+
},
38+
"responses": {
39+
"204": {}
40+
}
41+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# My API
2+
> see https://aka.ms/autorest
3+
4+
### Basic Information
5+
These are the global settings for the Ingestion API.
6+
7+
``` yaml
8+
openapi-type: data-plane
9+
tag: package-2021-11-preview
10+
```
11+
12+
### Tag: package-2021-11-preview
13+
14+
These settings apply only when `--tag=package-2021-11-preview` is specified on the command line.
15+
16+
``` yaml $(tag) == 'package-2021-11-preview'
17+
input-file:
18+
- preview/2021-11-01-preview/DataCollectionRules.json
19+
```

0 commit comments

Comments
 (0)