Skip to content

Commit 0e2c3d1

Browse files
kerendshenyingjunAshraf Hamaddanieldahahansimanor
authored
[Hub Generated] Publish private branch 'security/dahandaniel/seurityOperators' (#23323)
* Add autoAdd field to indicate sku should be included during creation (#5849) * copy folder * Add autoAdd field * update readme * Add operation example * fix style Co-authored-by: Peter Shen <[email protected]> * Add previour Private PR for 2021-10-15-preview as a baseline * Update EventGrid.json with new features to be part of 2021-10-15-preview API * update readme file and add missing example files * fix typo * fix operation name for unauthorize * fix tag * New API version to Microsoft.Security 2023-01-01-preview * refactoring * Update readme * fix syntax error * Refactoring * Add pattern restriction * Fix readme * npm run prettier * Update naming in the examples * fix merge * merge fix * fix merge * fix merge * Update readme.md * Update readme.md --------- Co-authored-by: Peter Shen <[email protected]> Co-authored-by: Peter Shen <[email protected]> Co-authored-by: Ashraf Hamad <[email protected]> Co-authored-by: Daniel Dahan <[email protected]> Co-authored-by: Sivan Manor <[email protected]>
1 parent 7dc9785 commit 0e2c3d1

File tree

6 files changed

+348
-1
lines changed

6 files changed

+348
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"parameters": {
3+
"api-version": "2023-01-01-preview",
4+
"subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23",
5+
"pricingName": "CloudPosture",
6+
"securityOperatorName": "DefenderCSPMSecurityOperator"
7+
},
8+
"responses": {
9+
"200": {},
10+
"204": {}
11+
}
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"parameters": {
3+
"api-version": "2023-01-01-preview",
4+
"subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23",
5+
"pricingName": "CloudPosture",
6+
"securityOperatorName": "DefenderCSPMSecurityOperator"
7+
},
8+
"responses": {
9+
"200": {
10+
"body": {
11+
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/CloudPosture/securityOperators/DefenderCSPMSecurityOperator",
12+
"name": "DefenderCSPMSecurityOperator",
13+
"type": "Microsoft.Security/pricings/securityOperator",
14+
"identity": {
15+
"type": "SystemAssigned",
16+
"principalId": "44ee8e7e-7f52-4750-b937-27490fbf7663",
17+
"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47"
18+
}
19+
}
20+
}
21+
}
22+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"parameters": {
3+
"api-version": "2023-01-01-preview",
4+
"subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23",
5+
"pricingName": "CloudPosture"
6+
},
7+
"responses": {
8+
"200": {
9+
"body": {
10+
"value": [
11+
{
12+
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/CloudPosture/securityOperators/DefenderCSPMSecurityOperator",
13+
"name": "DefenderCSPMSecurityOperator",
14+
"type": "Microsoft.Security/pricings/securityOperator",
15+
"identity": {
16+
"type": "SystemAssigned",
17+
"principalId": "44ee8e7e-7f52-4750-b937-27490fbf7663",
18+
"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47"
19+
}
20+
}
21+
]
22+
}
23+
}
24+
}
25+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"parameters": {
3+
"api-version": "2023-01-01-preview",
4+
"subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23",
5+
"pricingName": "CloudPosture",
6+
"securityOperatorName": "DefenderCSPMSecurityOperator"
7+
},
8+
"responses": {
9+
"200": {
10+
"body": {
11+
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/CloudPosture/securityOperators/DefenderCSPMSecurityOperator",
12+
"name": "DefenderCSPMSecurityOperator",
13+
"type": "Microsoft.Security/pricings/securityOperator",
14+
"identity": {
15+
"type": "SystemAssigned",
16+
"principalId": "44ee8e7e-7f52-4750-b937-27490fbf7663",
17+
"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47"
18+
}
19+
}
20+
}
21+
}
22+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,265 @@
1+
{
2+
"swagger": "2.0",
3+
"info": {
4+
"title": "Microsoft Defender for Cloud",
5+
"description": "API spec for Microsoft.Security (Microsoft Defender for Cloud) resource provider",
6+
"version": "2023-01-01-preview"
7+
},
8+
"host": "management.azure.com",
9+
"schemes": [
10+
"https"
11+
],
12+
"consumes": [
13+
"application/json"
14+
],
15+
"produces": [
16+
"application/json"
17+
],
18+
"security": [
19+
{
20+
"azure_auth": [
21+
"user_impersonation"
22+
]
23+
}
24+
],
25+
"securityDefinitions": {
26+
"azure_auth": {
27+
"type": "oauth2",
28+
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
29+
"flow": "implicit",
30+
"description": "Azure Active Directory OAuth2 Flow",
31+
"scopes": {
32+
"user_impersonation": "impersonate your user account"
33+
}
34+
}
35+
},
36+
"paths": {
37+
"/subscriptions/{subscriptionId}/providers/Microsoft.Security/pricings/{pricingName}/securityOperators": {
38+
"get": {
39+
"x-ms-examples": {
40+
"List SecurityOperators": {
41+
"$ref": "./examples/SecurityOperators/ListSecurityOperators_example.json"
42+
}
43+
},
44+
"tags": [
45+
"SecurityOperators"
46+
],
47+
"description": "Lists Microsoft Defender for Cloud securityOperators in the subscription.",
48+
"operationId": "SecurityOperators_List",
49+
"parameters": [
50+
{
51+
"$ref": "../../../common/v1/types.json#/parameters/ApiVersion"
52+
},
53+
{
54+
"$ref": "../../../common/v1/types.json#/parameters/SubscriptionId"
55+
},
56+
{
57+
"$ref": "#/parameters/PricingName"
58+
}
59+
],
60+
"responses": {
61+
"200": {
62+
"description": "OK",
63+
"schema": {
64+
"$ref": "#/definitions/SecurityOperatorList"
65+
}
66+
},
67+
"default": {
68+
"description": "Error response describing why the operation failed.",
69+
"schema": {
70+
"$ref": "../../../common/v1/types.json#/definitions/CloudError"
71+
}
72+
}
73+
}
74+
}
75+
},
76+
"/subscriptions/{subscriptionId}/providers/Microsoft.Security/pricings/{pricingName}/securityOperators/{securityOperatorName}": {
77+
"get": {
78+
"x-ms-examples": {
79+
"Get a specific security operator by scope and securityOperatorName": {
80+
"$ref": "./examples/SecurityOperators/GetSecurityOperatorByName_example.json"
81+
}
82+
},
83+
"tags": [
84+
"SecurityOperators"
85+
],
86+
"description": "Get a specific security operator for the requested scope.",
87+
"operationId": "SecurityOperators_Get",
88+
"parameters": [
89+
{
90+
"$ref": "../../../common/v1/types.json#/parameters/ApiVersion"
91+
},
92+
{
93+
"$ref": "../../../common/v1/types.json#/parameters/SubscriptionId"
94+
},
95+
{
96+
"$ref": "#/parameters/PricingName"
97+
},
98+
{
99+
"$ref": "#/parameters/SecurityOperatorName"
100+
}
101+
],
102+
"responses": {
103+
"200": {
104+
"description": "OK",
105+
"schema": {
106+
"$ref": "#/definitions/SecurityOperator"
107+
}
108+
},
109+
"default": {
110+
"description": "Error response describing why the operation failed.",
111+
"schema": {
112+
"$ref": "../../../common/v1/types.json#/definitions/CloudError"
113+
}
114+
}
115+
}
116+
},
117+
"put": {
118+
"x-ms-examples": {
119+
"Create a security operator on the given scope": {
120+
"$ref": "./examples/SecurityOperators/PutSecurityOperatorByName_example.json"
121+
}
122+
},
123+
"tags": [
124+
"SecurityOperators"
125+
],
126+
"description": "Creates Microsoft Defender for Cloud security operator on the given scope.",
127+
"operationId": "SecurityOperators_CreateOrUpdate",
128+
"parameters": [
129+
{
130+
"$ref": "../../../common/v1/types.json#/parameters/ApiVersion"
131+
},
132+
{
133+
"$ref": "../../../common/v1/types.json#/parameters/SubscriptionId"
134+
},
135+
{
136+
"$ref": "#/parameters/PricingName"
137+
},
138+
{
139+
"$ref": "#/parameters/SecurityOperatorName"
140+
}
141+
],
142+
"responses": {
143+
"200": {
144+
"description": "Successful request to put Security Operator.",
145+
"schema": {
146+
"$ref": "#/definitions/SecurityOperator"
147+
}
148+
},
149+
"default": {
150+
"description": "Error response describing why the operation failed.",
151+
"schema": {
152+
"$ref": "../../../common/v1/types.json#/definitions/CloudError"
153+
}
154+
}
155+
}
156+
},
157+
"delete": {
158+
"x-ms-examples": {
159+
"Delete SecurityOperator on subscription": {
160+
"$ref": "./examples/SecurityOperators/DeleteSecurityOperatorByName_example.json"
161+
}
162+
},
163+
"tags": [
164+
"SecurityOperators"
165+
],
166+
"description": "Delete Microsoft Defender for Cloud securityOperator in the subscription.",
167+
"operationId": "SecurityOperators_Delete",
168+
"parameters": [
169+
{
170+
"$ref": "../../../common/v1/types.json#/parameters/ApiVersion"
171+
},
172+
{
173+
"$ref": "../../../common/v1/types.json#/parameters/SubscriptionId"
174+
},
175+
{
176+
"$ref": "#/parameters/PricingName"
177+
},
178+
{
179+
"$ref": "#/parameters/SecurityOperatorName"
180+
}
181+
],
182+
"responses": {
183+
"200": {
184+
"description": "OK - Security Operator was deleted"
185+
},
186+
"204": {
187+
"description": "No Content - Security Operator does not exist"
188+
},
189+
"default": {
190+
"description": "Error response describing why the operation failed.",
191+
"schema": {
192+
"$ref": "../../../common/v1/types.json#/definitions/CloudError"
193+
}
194+
}
195+
}
196+
}
197+
}
198+
},
199+
"definitions": {
200+
"SecurityOperatorList": {
201+
"type": "object",
202+
"description": "List of SecurityOperator response.",
203+
"required": [
204+
"value"
205+
],
206+
"properties": {
207+
"value": {
208+
"type": "array",
209+
"description": "List of SecurityOperator configurations",
210+
"items": {
211+
"$ref": "#/definitions/SecurityOperator"
212+
}
213+
}
214+
}
215+
},
216+
"SecurityOperator": {
217+
"type": "object",
218+
"description": "Security operator under a given subscription and pricing",
219+
"properties": {
220+
"identity": {
221+
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/Identity"
222+
}
223+
},
224+
"allOf": [
225+
{
226+
"$ref": "../../../common/v1/types.json#/definitions/Resource"
227+
}
228+
]
229+
}
230+
},
231+
"parameters": {
232+
"PricingName": {
233+
"name": "pricingName",
234+
"in": "path",
235+
"required": true,
236+
"type": "string",
237+
"description": "name of the pricing configuration",
238+
"pattern": "^[a-zA-Z][a-zA-Z0-9_]+$",
239+
"minLength": 3,
240+
"maxLength": 63,
241+
"x-ms-parameter-location": "method"
242+
},
243+
"SecurityOperatorName": {
244+
"name": "securityOperatorName",
245+
"in": "path",
246+
"required": true,
247+
"type": "string",
248+
"description": "name of the securityOperator",
249+
"pattern": "^[a-zA-Z][a-zA-Z0-9_]+$",
250+
"minLength": 3,
251+
"maxLength": 63,
252+
"x-ms-parameter-location": "method"
253+
},
254+
"SecurityOperator": {
255+
"name": "SecurityOperator",
256+
"in": "body",
257+
"required": true,
258+
"description": "SecurityOperator object",
259+
"schema": {
260+
"$ref": "#/definitions/SecurityOperator"
261+
},
262+
"x-ms-parameter-location": "method"
263+
}
264+
}
265+
}

specification/security/resource-manager/readme.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,14 @@ tag: package-composite-v3
8585
8686
The following packages may be composed from multiple api-versions.
8787
88-
8988
### Tag: package-preview-2023-03
9089
9190
These settings apply only when `--tag=package-preview-2023-03` is specified on the command line.
9291

9392
```yaml $(tag) == 'package-preview-2023-03'
9493
input-file:
9594
- Microsoft.Security/preview/2023-03-01-preview/securityConnectors.json
95+
- Microsoft.Security/preview/2023-01-01-preview/securityOperators.json
9696
```
9797
### Tag: package-preview-2023-02
9898

@@ -351,6 +351,7 @@ input-file:
351351
- Microsoft.Security/preview/2023-02-01-preview/sqlVulnerabilityAssessmentsScanResultsOperations.json
352352
- Microsoft.Security/preview/2023-02-01-preview/sqlVulnerabilityAssessmentsBaselineRuleOperations.json
353353
- Microsoft.Security/preview/2023-03-01-preview/securityConnectors.json
354+
- Microsoft.Security/preview/2023-01-01-preview/securityOperators.json
354355
355356
356357
# Needed when there is more than one input file

0 commit comments

Comments
 (0)