-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Creating stable version for settings type (#5435)
* Adding stable API version for Settings * Changing new version Settings file
- Loading branch information
1 parent
04b1040
commit d75670d
Showing
5 changed files
with
362 additions
and
1 deletion.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
...ce-manager/Microsoft.Security/stable/2019-01-01/examples/Settings/GetSetting_example.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,20 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2019-01-01", | ||
"subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", | ||
"settingName": "MCAS" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/settings/MCAS", | ||
"name": "MCAS", | ||
"kind": "DataExportSetting", | ||
"type": "Microsoft.Security/settings", | ||
"properties": { | ||
"enabled": true | ||
} | ||
} | ||
} | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
...e-manager/Microsoft.Security/stable/2019-01-01/examples/Settings/GetSettings_example.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,32 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2019-01-01", | ||
"subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"value": [ | ||
{ | ||
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/settings/MCAS", | ||
"name": "MCAS", | ||
"kind": "DataExportSetting", | ||
"type": "Microsoft.Security/settings", | ||
"properties": { | ||
"enabled": true | ||
} | ||
}, | ||
{ | ||
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/settings/WDATP", | ||
"name": "WDATP", | ||
"kind": "DataExportSetting", | ||
"type": "Microsoft.Security/settings", | ||
"properties": { | ||
"enabled": false | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
...manager/Microsoft.Security/stable/2019-01-01/examples/Settings/UpdateSetting_example.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": "2019-01-01", | ||
"subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", | ||
"settingName": "MCAS", | ||
"setting": { | ||
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/settings/MCAS", | ||
"name": "MCAS", | ||
"kind": "DataExportSetting", | ||
"type": "Microsoft.Security/settings", | ||
"properties": { | ||
"enabled": true | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/settings/MCAS", | ||
"name": "MCAS", | ||
"kind": "DataExportSetting", | ||
"type": "Microsoft.Security/settings", | ||
"properties": { | ||
"enabled": true | ||
} | ||
} | ||
} | ||
} | ||
} |
251 changes: 251 additions & 0 deletions
251
specification/security/resource-manager/Microsoft.Security/stable/2019-01-01/settings.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,251 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"title": "Security Center", | ||
"description": "API spec for Microsoft.Security (Azure Security Center) resource provider", | ||
"version": "2019-01-01" | ||
}, | ||
"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/settings": { | ||
"get": { | ||
"x-ms-examples": { | ||
"Get settings of subscription": { | ||
"$ref": "./examples/Settings/GetSettings_example.json" | ||
} | ||
}, | ||
"tags": ["Settings"], | ||
"description": "Settings about different configurations in security center", | ||
"operationId": "Settings_List", | ||
"parameters": [ | ||
{ | ||
"$ref": "../../../common/v1/types.json#/parameters/ApiVersion" | ||
}, | ||
{ | ||
"$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "OK", | ||
"schema": { | ||
"$ref": "#/definitions/SettingsList" | ||
} | ||
}, | ||
"default": { | ||
"description": "Error response describing why the operation failed.", | ||
"schema": { | ||
"$ref": "../../../common/v1/types.json#/definitions/CloudError" | ||
} | ||
} | ||
}, | ||
"x-ms-pageable": { | ||
"nextLinkName": "nextLink" | ||
} | ||
} | ||
}, | ||
"/subscriptions/{subscriptionId}/providers/Microsoft.Security/settings/{settingName}": { | ||
"get": { | ||
"x-ms-examples": { | ||
"Get a setting on subscription": { | ||
"$ref": "./examples/Settings/GetSetting_example.json" | ||
} | ||
}, | ||
"tags": ["Settings"], | ||
"description": "Settings of different configurations in security center", | ||
"operationId": "Settings_Get", | ||
"parameters": [ | ||
{ | ||
"$ref": "../../../common/v1/types.json#/parameters/ApiVersion" | ||
}, | ||
{ | ||
"$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" | ||
}, | ||
{ | ||
"$ref": "#/parameters/SettingName" | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "OK", | ||
"schema": { | ||
"$ref": "#/definitions/Setting" | ||
} | ||
}, | ||
"default": { | ||
"description": "Error response describing why the operation failed.", | ||
"schema": { | ||
"$ref": "../../../common/v1/types.json#/definitions/CloudError" | ||
} | ||
} | ||
} | ||
}, | ||
"put": { | ||
"x-ms-examples": { | ||
"Update a setting for subscription": { | ||
"$ref": "./examples/Settings/UpdateSetting_example.json" | ||
} | ||
}, | ||
"tags": ["Settings"], | ||
"description": "updating settings about different configurations in security center", | ||
"operationId": "Settings_Update", | ||
"parameters": [ | ||
{ | ||
"$ref": "../../../common/v1/types.json#/parameters/ApiVersion" | ||
}, | ||
{ | ||
"$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" | ||
}, | ||
{ | ||
"$ref": "#/parameters/SettingName" | ||
}, | ||
{ | ||
"$ref": "#/parameters/Setting" | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "OK", | ||
"schema": { | ||
"$ref": "#/definitions/Setting" | ||
} | ||
}, | ||
"default": { | ||
"description": "Error response describing why the operation failed.", | ||
"schema": { | ||
"$ref": "../../../common/v1/types.json#/definitions/CloudError" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"definitions": { | ||
"SettingsList": { | ||
"type": "object", | ||
"description": "Subscription settings list.", | ||
"properties": { | ||
"value": { | ||
"type": "array", | ||
"description": "The settings list.", | ||
"items": { | ||
"$ref": "#/definitions/Setting" | ||
} | ||
}, | ||
"nextLink": { | ||
"readOnly": true, | ||
"type": "string", | ||
"description": "The URI to fetch the next page." | ||
} | ||
} | ||
}, | ||
"Setting": { | ||
"type": "object", | ||
"description": "Represents a security setting in Azure Security Center.", | ||
"discriminator": "kind", | ||
"properties": {}, | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/SettingResource" | ||
} | ||
] | ||
}, | ||
"DataExportSetting": { | ||
"type": "object", | ||
"description": "Represents a data export setting", | ||
"x-ms-discriminator-value": "DataExportSetting", | ||
"properties": { | ||
"properties": { | ||
"x-ms-client-flatten": true, | ||
"description": "Data export setting data", | ||
"$ref": "#/definitions/DataExportSettingProperties" | ||
} | ||
}, | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/Setting" | ||
} | ||
] | ||
}, | ||
"SettingResource": { | ||
"type": "object", | ||
"description": "The kind of the security setting", | ||
"properties": { | ||
"kind": { | ||
"type": "string", | ||
"description": "the kind of the settings string (DataExportSetting)", | ||
"enum": ["DataExportSetting", "AlertSuppressionSetting"], | ||
"x-ms-enum": { | ||
"name": "SettingKind", | ||
"modelAsString": true, | ||
"values": [ | ||
{ | ||
"value": "DataExportSetting" | ||
}, | ||
{ | ||
"value": "AlertSuppressionSetting" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"required": ["kind"], | ||
"allOf": [ | ||
{ | ||
"$ref": "../../../common/v1/types.json#/definitions/Resource" | ||
} | ||
] | ||
}, | ||
"DataExportSettingProperties": { | ||
"type": "object", | ||
"description": "The data export setting properties", | ||
"properties": { | ||
"enabled": { | ||
"type": "boolean", | ||
"description": "Is the data export setting is enabled" | ||
} | ||
}, | ||
"required": ["enabled"] | ||
} | ||
}, | ||
"parameters": { | ||
"SettingName": { | ||
"name": "settingName", | ||
"in": "path", | ||
"required": true, | ||
"type": "string", | ||
"description": "Name of setting: (MCAS/WDATP)", | ||
"enum": ["MCAS", "WDATP"], | ||
"x-ms-parameter-location": "method" | ||
}, | ||
"Setting": { | ||
"name": "setting", | ||
"in": "body", | ||
"required": true, | ||
"description": "Setting object", | ||
"schema": { | ||
"$ref": "#/definitions/Setting" | ||
}, | ||
"x-ms-parameter-location": "method" | ||
} | ||
} | ||
} |
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