-
Notifications
You must be signed in to change notification settings - Fork 5.5k
[Hub Generated] Publish private branch 'security/dahandaniel/seurityOperators' #23323
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
Merged
chunyu3
merged 25 commits into
main
from
published/Azure/azure-rest-api-specs-pr/security/dahandaniel/seurityOperators
Mar 28, 2023
Merged
Changes from 24 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
852e796
Add autoAdd field to indicate sku should be included during creation …
shenyingjun c6decea
Add previour Private PR for 2021-10-15-preview as a baseline
0f328c1
Update EventGrid.json with new features to be part of 2021-10-15-prev…
7f3c446
update readme file and add missing example files
a64a553
fix typo
8ee8aa6
fix operation name for unauthorize
b89c900
fix tag
9be85cc
New API version to Microsoft.Security 2023-01-01-preview
danieldahahan 7a55e94
refactoring
danieldahahan 43300e7
Update readme
danieldahahan 8b9fc1b
fix syntax error
danieldahahan 501a217
Refactoring
danieldahahan f807cc9
Add pattern restriction
danieldahahan 571e304
Fix readme
danieldahahan e22f811
npm run prettier
simanor 870fc24
Update naming in the examples
danieldahahan ca52a38
Merge branch 'security/dahandaniel/seurityOperators' of https://githu…
danieldahahan feaadbb
merge
kerend e980727
merge
kerend 6ae6017
fix merge
kerend cd6425a
merge fix
kerend e682447
fix merge
kerend b39bd3d
fix merge
kerend 984cd51
Update readme.md
kerend 6225b13
Update readme.md
kerend File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
...w/2023-01-01-preview/examples/SecurityOperators/DeleteSecurityOperatorByName_example.json
This file contains hidden or 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,12 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2023-01-01-preview", | ||
"subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", | ||
"pricingName": "CloudPosture", | ||
"securityOperatorName": "DefenderCSPMSecurityOperator" | ||
}, | ||
"responses": { | ||
"200": {}, | ||
"204": {} | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
...view/2023-01-01-preview/examples/SecurityOperators/GetSecurityOperatorByName_example.json
This file contains hidden or 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,22 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2023-01-01-preview", | ||
"subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", | ||
"pricingName": "CloudPosture", | ||
"securityOperatorName": "DefenderCSPMSecurityOperator" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/CloudPosture/securityOperators/DefenderCSPMSecurityOperator", | ||
"name": "DefenderCSPMSecurityOperator", | ||
"type": "Microsoft.Security/pricings/securityOperator", | ||
"identity": { | ||
"type": "SystemAssigned", | ||
"principalId": "44ee8e7e-7f52-4750-b937-27490fbf7663", | ||
"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" | ||
} | ||
} | ||
} | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
.../preview/2023-01-01-preview/examples/SecurityOperators/ListSecurityOperators_example.json
This file contains hidden or 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,25 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2023-01-01-preview", | ||
"subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", | ||
"pricingName": "CloudPosture" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"value": [ | ||
{ | ||
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/CloudPosture/securityOperators/DefenderCSPMSecurityOperator", | ||
"name": "DefenderCSPMSecurityOperator", | ||
"type": "Microsoft.Security/pricings/securityOperator", | ||
"identity": { | ||
"type": "SystemAssigned", | ||
"principalId": "44ee8e7e-7f52-4750-b937-27490fbf7663", | ||
"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
...view/2023-01-01-preview/examples/SecurityOperators/PutSecurityOperatorByName_example.json
This file contains hidden or 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,22 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2023-01-01-preview", | ||
"subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", | ||
"pricingName": "CloudPosture", | ||
"securityOperatorName": "DefenderCSPMSecurityOperator" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/CloudPosture/securityOperators/DefenderCSPMSecurityOperator", | ||
"name": "DefenderCSPMSecurityOperator", | ||
"type": "Microsoft.Security/pricings/securityOperator", | ||
"identity": { | ||
"type": "SystemAssigned", | ||
"principalId": "44ee8e7e-7f52-4750-b937-27490fbf7663", | ||
"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" | ||
} | ||
} | ||
} | ||
} | ||
} |
265 changes: 265 additions & 0 deletions
265
...ity/resource-manager/Microsoft.Security/preview/2023-01-01-preview/securityOperators.json
This file contains hidden or 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,265 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"title": "Microsoft Defender for Cloud", | ||
"description": "API spec for Microsoft.Security (Microsoft Defender for Cloud) resource provider", | ||
"version": "2023-01-01-preview" | ||
}, | ||
"host": "management.azure.com", | ||
"schemes": [ | ||
"https" | ||
], | ||
"consumes": [ | ||
"application/json" | ||
], | ||
"produces": [ | ||
"application/json" | ||
], | ||
"security": [ | ||
{ | ||
"azure_auth": [ | ||
"user_impersonation" | ||
] | ||
} | ||
], | ||
"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" | ||
} | ||
} | ||
}, | ||
"paths": { | ||
"/subscriptions/{subscriptionId}/providers/Microsoft.Security/pricings/{pricingName}/securityOperators": { | ||
"get": { | ||
"x-ms-examples": { | ||
"List SecurityOperators": { | ||
"$ref": "./examples/SecurityOperators/ListSecurityOperators_example.json" | ||
} | ||
}, | ||
"tags": [ | ||
"SecurityOperators" | ||
], | ||
"description": "Lists Microsoft Defender for Cloud securityOperators in the subscription.", | ||
"operationId": "SecurityOperators_List", | ||
"parameters": [ | ||
{ | ||
"$ref": "../../../common/v1/types.json#/parameters/ApiVersion" | ||
}, | ||
{ | ||
"$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" | ||
}, | ||
{ | ||
"$ref": "#/parameters/PricingName" | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "OK", | ||
"schema": { | ||
"$ref": "#/definitions/SecurityOperatorList" | ||
} | ||
}, | ||
"default": { | ||
"description": "Error response describing why the operation failed.", | ||
"schema": { | ||
"$ref": "../../../common/v1/types.json#/definitions/CloudError" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"/subscriptions/{subscriptionId}/providers/Microsoft.Security/pricings/{pricingName}/securityOperators/{securityOperatorName}": { | ||
"get": { | ||
"x-ms-examples": { | ||
"Get a specific security operator by scope and securityOperatorName": { | ||
"$ref": "./examples/SecurityOperators/GetSecurityOperatorByName_example.json" | ||
} | ||
}, | ||
"tags": [ | ||
"SecurityOperators" | ||
], | ||
"description": "Get a specific security operator for the requested scope.", | ||
"operationId": "SecurityOperators_Get", | ||
"parameters": [ | ||
{ | ||
"$ref": "../../../common/v1/types.json#/parameters/ApiVersion" | ||
}, | ||
{ | ||
"$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" | ||
}, | ||
{ | ||
"$ref": "#/parameters/PricingName" | ||
}, | ||
{ | ||
"$ref": "#/parameters/SecurityOperatorName" | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "OK", | ||
"schema": { | ||
"$ref": "#/definitions/SecurityOperator" | ||
} | ||
}, | ||
"default": { | ||
"description": "Error response describing why the operation failed.", | ||
"schema": { | ||
"$ref": "../../../common/v1/types.json#/definitions/CloudError" | ||
} | ||
} | ||
} | ||
}, | ||
"put": { | ||
"x-ms-examples": { | ||
"Create a security operator on the given scope": { | ||
"$ref": "./examples/SecurityOperators/PutSecurityOperatorByName_example.json" | ||
} | ||
}, | ||
"tags": [ | ||
"SecurityOperators" | ||
], | ||
"description": "Creates Microsoft Defender for Cloud security operator on the given scope.", | ||
"operationId": "SecurityOperators_CreateOrUpdate", | ||
"parameters": [ | ||
{ | ||
"$ref": "../../../common/v1/types.json#/parameters/ApiVersion" | ||
}, | ||
{ | ||
"$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" | ||
}, | ||
{ | ||
"$ref": "#/parameters/PricingName" | ||
}, | ||
{ | ||
"$ref": "#/parameters/SecurityOperatorName" | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "Successful request to put Security Operator.", | ||
"schema": { | ||
"$ref": "#/definitions/SecurityOperator" | ||
} | ||
}, | ||
"default": { | ||
"description": "Error response describing why the operation failed.", | ||
"schema": { | ||
"$ref": "../../../common/v1/types.json#/definitions/CloudError" | ||
} | ||
} | ||
} | ||
}, | ||
"delete": { | ||
"x-ms-examples": { | ||
"Delete SecurityOperator on subscription": { | ||
"$ref": "./examples/SecurityOperators/DeleteSecurityOperatorByName_example.json" | ||
} | ||
}, | ||
"tags": [ | ||
"SecurityOperators" | ||
], | ||
"description": "Delete Microsoft Defender for Cloud securityOperator in the subscription.", | ||
"operationId": "SecurityOperators_Delete", | ||
"parameters": [ | ||
{ | ||
"$ref": "../../../common/v1/types.json#/parameters/ApiVersion" | ||
}, | ||
{ | ||
"$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" | ||
}, | ||
{ | ||
"$ref": "#/parameters/PricingName" | ||
}, | ||
{ | ||
"$ref": "#/parameters/SecurityOperatorName" | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "OK - Security Operator was deleted" | ||
}, | ||
"204": { | ||
"description": "No Content - Security Operator does not exist" | ||
}, | ||
"default": { | ||
"description": "Error response describing why the operation failed.", | ||
"schema": { | ||
"$ref": "../../../common/v1/types.json#/definitions/CloudError" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"definitions": { | ||
"SecurityOperatorList": { | ||
"type": "object", | ||
"description": "List of SecurityOperator response.", | ||
"required": [ | ||
"value" | ||
], | ||
"properties": { | ||
"value": { | ||
"type": "array", | ||
"description": "List of SecurityOperator configurations", | ||
"items": { | ||
"$ref": "#/definitions/SecurityOperator" | ||
} | ||
} | ||
} | ||
}, | ||
"SecurityOperator": { | ||
"type": "object", | ||
"description": "Security operator under a given subscription and pricing", | ||
"properties": { | ||
"identity": { | ||
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/Identity" | ||
} | ||
}, | ||
"allOf": [ | ||
{ | ||
"$ref": "../../../common/v1/types.json#/definitions/Resource" | ||
} | ||
] | ||
} | ||
}, | ||
"parameters": { | ||
"PricingName": { | ||
"name": "pricingName", | ||
"in": "path", | ||
"required": true, | ||
"type": "string", | ||
"description": "name of the pricing configuration", | ||
"pattern": "^[a-zA-Z][a-zA-Z0-9_]+$", | ||
"minLength": 3, | ||
"maxLength": 63, | ||
"x-ms-parameter-location": "method" | ||
}, | ||
"SecurityOperatorName": { | ||
"name": "securityOperatorName", | ||
"in": "path", | ||
"required": true, | ||
"type": "string", | ||
"description": "name of the securityOperator", | ||
"pattern": "^[a-zA-Z][a-zA-Z0-9_]+$", | ||
"minLength": 3, | ||
"maxLength": 63, | ||
"x-ms-parameter-location": "method" | ||
}, | ||
"SecurityOperator": { | ||
"name": "SecurityOperator", | ||
"in": "body", | ||
"required": true, | ||
"description": "SecurityOperator object", | ||
"schema": { | ||
"$ref": "#/definitions/SecurityOperator" | ||
}, | ||
"x-ms-parameter-location": "method" | ||
} | ||
} | ||
} |
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why define an tag without any content?