forked from Azure/azure-sdk-for-python
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Microsoft.IoTSecurity - Add locations and deviceSecurityGroups (Azure…
…#13091) * Locations * v1 * v2 * v3 * File rename * Rename resource * Update common types file path * add pageable option * Add missing nextLink property Co-authored-by: Liran Chen <lirche@microsoft.com>
- Loading branch information
Showing
10 changed files
with
629 additions
and
0 deletions.
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 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" | ||
} | ||
], | ||
"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 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 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 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 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.