-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Microsoft.IoTSecurity - Add locations and deviceSecurityGroups #13091
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
Ruoxuan Wang (ruowan)
merged 13 commits into
Azure:master
from
liranc:lirche/deviceGroups
Mar 17, 2021
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
bcd18c2
Locations
be541c3
v1
c9bf082
v2
60eaf8d
v3
6627779
File rename
5d8c870
Rename resource
214a43b
Merge branch 'master' into lirche/deviceGroups
e30d4b7
Update common types file path
97a076f
Merge branch 'master' into lirche/deviceGroups
c5dee05
Merge branch 'master' into lirche/deviceGroups
4611975
add pageable option
504798f
Merge branch 'master' into lirche/deviceGroups
369b757
Add missing nextLink property
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
279 changes: 279 additions & 0 deletions
279
...urity/resource-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/deviceGroups.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,279 @@ | ||
| { | ||
| "swagger": "2.0", | ||
| "info": { | ||
| "title": "Azure Defender for IoT", | ||
| "description": "API spec for Microsoft.IoTSecurity (Azure Defender for IoT) resource provider", | ||
| "version": "2021-02-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.IoTSecurity/locations/{iotDefenderLocation}/deviceGroups": { | ||
| "get": { | ||
| "x-ms-examples": { | ||
| "List device groups": { | ||
| "$ref": "./examples/DeviceGroups/List.json" | ||
| } | ||
| }, | ||
| "tags": [ | ||
| "Device Groups" | ||
| ], | ||
| "description": "List device groups", | ||
| "operationId": "DeviceGroups_List", | ||
| "parameters": [ | ||
| { | ||
| "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" | ||
| }, | ||
| { | ||
| "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" | ||
| }, | ||
| { | ||
| "$ref": "../../../common/1.0/types.json#/parameters/IotDefenderLocation" | ||
| } | ||
| ], | ||
| "responses": { | ||
| "200": { | ||
| "description": "OK", | ||
| "schema": { | ||
| "$ref": "#/definitions/DeviceGroupList" | ||
| } | ||
| }, | ||
| "default": { | ||
| "description": "Error response describing why the operation failed.", | ||
| "schema": { | ||
| "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" | ||
| } | ||
| } | ||
| }, | ||
| "x-ms-pageable": { | ||
| "nextLinkName": "nextLink" | ||
| } | ||
| } | ||
| }, | ||
| "/subscriptions/{subscriptionId}/providers/Microsoft.IoTSecurity/locations/{iotDefenderLocation}/deviceGroups/{deviceGroupName}": { | ||
| "get": { | ||
| "x-ms-examples": { | ||
| "Get device group": { | ||
| "$ref": "./examples/DeviceGroups/Get.json" | ||
| } | ||
| }, | ||
| "tags": [ | ||
| "Device Groups" | ||
| ], | ||
| "operationId": "DeviceGroups_Get", | ||
| "description": "Get device group", | ||
| "parameters": [ | ||
| { | ||
| "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" | ||
| }, | ||
| { | ||
| "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" | ||
| }, | ||
| { | ||
| "$ref": "../../../common/1.0/types.json#/parameters/IotDefenderLocation" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/DeviceGroupName" | ||
| } | ||
| ], | ||
| "responses": { | ||
| "200": { | ||
| "description": "OK", | ||
| "schema": { | ||
| "$ref": "#/definitions/DeviceGroupModel" | ||
| } | ||
| }, | ||
| "default": { | ||
| "description": "Error response describing why the operation failed.", | ||
| "schema": { | ||
| "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "put": { | ||
| "x-ms-examples": { | ||
| "Create or update device group": { | ||
| "$ref": "./examples/DeviceGroups/Put.json" | ||
| } | ||
| }, | ||
| "tags": [ | ||
| "Device Groups" | ||
| ], | ||
| "operationId": "DeviceGroups_CreateOrUpdate", | ||
| "description": "Create or update device group", | ||
| "parameters": [ | ||
| { | ||
| "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" | ||
| }, | ||
| { | ||
| "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" | ||
| }, | ||
| { | ||
| "$ref": "../../../common/1.0/types.json#/parameters/IotDefenderLocation" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/DeviceGroupName" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/DeviceGroupModel" | ||
| } | ||
|
liranc marked this conversation as resolved.
|
||
| ], | ||
| "responses": { | ||
| "200": { | ||
| "description": "Updated device group", | ||
| "schema": { | ||
| "$ref": "#/definitions/DeviceGroupModel" | ||
| } | ||
| }, | ||
| "201": { | ||
| "description": "Created device group", | ||
| "schema": { | ||
| "$ref": "#/definitions/DeviceGroupModel" | ||
| } | ||
| }, | ||
| "default": { | ||
| "description": "Error response describing why the operation failed.", | ||
| "schema": { | ||
| "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "delete": { | ||
| "x-ms-examples": { | ||
| "Delete device group": { | ||
| "$ref": "./examples/DeviceGroups/Delete.json" | ||
| } | ||
| }, | ||
| "tags": [ | ||
| "Device Groups" | ||
| ], | ||
| "operationId": "DeviceGroups_Delete", | ||
| "description": "Delete device group", | ||
| "parameters": [ | ||
| { | ||
| "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" | ||
| }, | ||
| { | ||
| "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" | ||
| }, | ||
| { | ||
| "$ref": "../../../common/1.0/types.json#/parameters/IotDefenderLocation" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/DeviceGroupName" | ||
| } | ||
| ], | ||
| "responses": { | ||
| "200": { | ||
| "description": "Device group deleted" | ||
| }, | ||
| "204": { | ||
| "description": "Device group does not exist" | ||
| }, | ||
| "default": { | ||
| "description": "Error response describing why the operation failed.", | ||
| "schema": { | ||
| "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "definitions": { | ||
| "DeviceGroupList": { | ||
| "description": "List of device groups", | ||
| "type": "object", | ||
| "properties": { | ||
| "value": { | ||
| "description": "List data", | ||
| "readOnly": true, | ||
| "type": "array", | ||
| "items": { | ||
| "$ref": "#/definitions/DeviceGroupModel" | ||
| } | ||
| }, | ||
| "nextLink": { | ||
| "description": "Link to next page of resources.", | ||
| "type": "string", | ||
| "readOnly": true | ||
| } | ||
| } | ||
| }, | ||
| "DeviceGroupModel": { | ||
| "type": "object", | ||
| "description": "Device group", | ||
| "properties": { | ||
| "properties": { | ||
| "x-ms-client-flatten": true, | ||
| "description": "Device group properties", | ||
| "$ref": "#/definitions/DeviceGroupProperties" | ||
| }, | ||
| "systemData": { | ||
| "readOnly": true, | ||
| "type": "object", | ||
| "description": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", | ||
| "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" | ||
| } | ||
| }, | ||
| "allOf": [ | ||
| { | ||
| "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ProxyResource" | ||
| } | ||
| ] | ||
| }, | ||
| "DeviceGroupProperties": { | ||
| "type": "object", | ||
| "description": "Device group properties", | ||
| "properties": {} | ||
| } | ||
| }, | ||
| "parameters": { | ||
| "DeviceGroupName": { | ||
| "name": "deviceGroupName", | ||
| "in": "path", | ||
| "required": true, | ||
| "type": "string", | ||
| "description": "Device group name", | ||
| "x-ms-parameter-location": "method" | ||
| }, | ||
| "DeviceGroupModel": { | ||
| "name": "deviceGroupModel", | ||
| "in": "body", | ||
| "required": true, | ||
| "description": "Device group model", | ||
| "schema": { | ||
| "$ref": "#/definitions/DeviceGroupModel" | ||
| }, | ||
| "x-ms-parameter-location": "method" | ||
| } | ||
| } | ||
| } | ||
12 changes: 12 additions & 0 deletions
12
...anager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/DeviceGroups/Delete.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": "2021-02-01-preview", | ||
| "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", | ||
| "iotDefenderLocation": "eastus", | ||
| "deviceGroupName": "myGroup" | ||
| }, | ||
| "responses": { | ||
| "200": {}, | ||
| "204": {} | ||
| } | ||
| } |
26 changes: 26 additions & 0 deletions
26
...e-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/DeviceGroups/Get.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,26 @@ | ||
| { | ||
| "parameters": { | ||
| "api-version": "2021-02-01-preview", | ||
| "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", | ||
| "iotDefenderLocation": "eastus", | ||
| "deviceGroupName": "myGroup" | ||
| }, | ||
| "responses": { | ||
| "200": { | ||
| "body": { | ||
| "name": "myGroup", | ||
| "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.IoTSecurity/locations/eastus/deviceGroups/myGroup", | ||
| "type": "Microsoft.IoTSecurity/locations/deviceGroups", | ||
| "properties": {}, | ||
| "systemData": { | ||
| "createdBy": "string", | ||
| "createdByType": "User", | ||
| "createdAt": "2020-04-27T21:53:29.0928001Z", | ||
| "lastModifiedBy": "string", | ||
| "lastModifiedByType": "User", | ||
| "lastModifiedAt": "2020-04-27T21:53:29.0928001Z" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
29 changes: 29 additions & 0 deletions
29
...-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/DeviceGroups/List.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,29 @@ | ||
| { | ||
| "parameters": { | ||
| "api-version": "2021-02-01-preview", | ||
| "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", | ||
| "iotDefenderLocation": "eastus" | ||
| }, | ||
| "responses": { | ||
| "200": { | ||
| "body": { | ||
| "value": [ | ||
| { | ||
| "name": "myGroup", | ||
| "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.IoTSecurity/locations/eastus/deviceGroups/myGroup", | ||
| "type": "Microsoft.IoTSecurity/locations/deviceGroups", | ||
| "properties": {}, | ||
| "systemData": { | ||
| "createdBy": "string", | ||
| "createdByType": "User", | ||
| "createdAt": "2020-04-27T21:53:29.0928001Z", | ||
| "lastModifiedBy": "string", | ||
| "lastModifiedByType": "User", | ||
| "lastModifiedAt": "2020-04-27T21:53:29.0928001Z" | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| } | ||
| } |
45 changes: 45 additions & 0 deletions
45
...e-manager/Microsoft.IoTSecurity/preview/2021-02-01-preview/examples/DeviceGroups/Put.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,45 @@ | ||
| { | ||
| "parameters": { | ||
| "api-version": "2021-02-01-preview", | ||
| "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", | ||
| "iotDefenderLocation": "eastus", | ||
| "deviceGroupName": "myGroup", | ||
| "deviceGroupModel": { | ||
| "properties": {} | ||
| } | ||
| }, | ||
| "responses": { | ||
| "200": { | ||
| "body": { | ||
| "name": "myGroup", | ||
| "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.IoTSecurity/deviceGroups/myGroup", | ||
| "type": "Microsoft.IoTSecurity/locations/deviceGroups", | ||
| "properties": {}, | ||
| "systemData": { | ||
| "createdBy": "string", | ||
| "createdByType": "User", | ||
| "createdAt": "2020-04-27T21:53:29.0928001Z", | ||
| "lastModifiedBy": "string", | ||
| "lastModifiedByType": "User", | ||
| "lastModifiedAt": "2020-04-27T21:53:29.0928001Z" | ||
| } | ||
| } | ||
| }, | ||
| "201": { | ||
| "body": { | ||
| "name": "myGroup", | ||
| "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.IoTSecurity/deviceGroups/myGroup", | ||
| "type": "Microsoft.IoTSecurity/locations/deviceGroups", | ||
| "properties": {}, | ||
| "systemData": { | ||
| "createdBy": "string", | ||
| "createdByType": "User", | ||
| "createdAt": "2020-04-27T21:53:29.0928001Z", | ||
| "lastModifiedBy": "string", | ||
| "lastModifiedByType": "User", | ||
| "lastModifiedAt": "2020-04-27T21:53:29.0928001Z" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.