diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2022-03-01/examples/Pricings/GetPricingByName_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2022-03-01/examples/Pricings/GetPricingByName_example.json new file mode 100644 index 000000000000..614236b08bdb --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/stable/2022-03-01/examples/Pricings/GetPricingByName_example.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2022-03-01", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "pricingName": "VirtualMachines" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/VirtualMachines", + "name": "VirtualMachines", + "type": "Microsoft.Security/pricings", + "properties": { + "pricingTier": "Standard", + "freeTrialRemainingTime": "PT0S", + "subPlan": "P1" + } + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2022-03-01/examples/Pricings/ListPricings_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2022-03-01/examples/Pricings/ListPricings_example.json new file mode 100644 index 000000000000..5876f2bf22e1 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/stable/2022-03-01/examples/Pricings/ListPricings_example.json @@ -0,0 +1,123 @@ +{ + "parameters": { + "api-version": "2022-03-01", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/VirtualMachines", + "name": "VirtualMachines", + "type": "Microsoft.Security/pricings", + "properties": { + "pricingTier": "Standard", + "freeTrialRemainingTime": "PT0S", + "subPlan": "P2" + } + }, + { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/SqlServers", + "name": "SqlServers", + "type": "Microsoft.Security/pricings", + "properties": { + "pricingTier": "Standard", + "freeTrialRemainingTime": "PT0S" + } + }, + { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/AppServices", + "name": "AppServices", + "type": "Microsoft.Security/pricings", + "properties": { + "pricingTier": "Free", + "freeTrialRemainingTime": "PT0S" + } + }, + { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/StorageAccounts", + "name": "StorageAccounts", + "type": "Microsoft.Security/pricings", + "properties": { + "pricingTier": "Standard", + "freeTrialRemainingTime": "PT0S" + } + }, + { + "id": "/subscriptions/d34fd44c-ebfa-4a9c-bceb-9eeafe72ac15/providers/Microsoft.Security/pricings/SqlServerVirtualMachines", + "name": "SqlServerVirtualMachines", + "type": "Microsoft.Security/pricings", + "properties": { + "pricingTier": "Standard", + "freeTrialRemainingTime": "PT0S" + } + }, + { + "id": "/subscriptions/d34fd44c-ebfa-4a9c-bceb-9eeafe72ac15/providers/Microsoft.Security/pricings/KubernetesService", + "name": "KubernetesService", + "type": "Microsoft.Security/pricings", + "properties": { + "pricingTier": "Free", + "freeTrialRemainingTime": "PT0S" + } + }, + { + "id": "/subscriptions/d34fd44c-ebfa-4a9c-bceb-9eeafe72ac15/providers/Microsoft.Security/pricings/ContainerRegistry", + "name": "ContainerRegistry", + "type": "Microsoft.Security/pricings", + "properties": { + "pricingTier": "Free", + "freeTrialRemainingTime": "PT0S" + } + }, + { + "id": "/subscriptions/d34fd44c-ebfa-4a9c-bceb-9eeafe72ac15/providers/Microsoft.Security/pricings/KeyVaults", + "name": "KeyVaults", + "type": "Microsoft.Security/pricings", + "properties": { + "pricingTier": "Standard", + "freeTrialRemainingTime": "PT0S" + } + }, + { + "id": "/subscriptions/d34fd44c-ebfa-4a9c-bceb-9eeafe72ac15/providers/Microsoft.Security/pricings/Dns", + "name": "Dns", + "type": "Microsoft.Security/pricings", + "properties": { + "pricingTier": "Standard", + "freeTrialRemainingTime": "PT0S" + } + }, + { + "id": "/subscriptions/d34fd44c-ebfa-4a9c-bceb-9eeafe72ac15/providers/Microsoft.Security/pricings/Arm", + "name": "Arm", + "type": "Microsoft.Security/pricings", + "properties": { + "pricingTier": "Standard", + "freeTrialRemainingTime": "PT0S" + } + }, + { + "id": "/subscriptions/d34fd44c-ebfa-4a9c-bceb-9eeafe72ac15/providers/Microsoft.Security/pricings/OpenSourceRelationalDatabases", + "name": "OpenSourceRelationalDatabases", + "type": "Microsoft.Security/pricings", + "properties": { + "pricingTier": "Free", + "freeTrialRemainingTime": "PT0S" + } + }, + { + "id": "/subscriptions/d34fd44c-ebfa-4a9c-bceb-9eeafe72ac15/providers/Microsoft.Security/pricings/Containers", + "name": "Containers", + "type": "Microsoft.Security/pricings", + "properties": { + "pricingTier": "Standard", + "freeTrialRemainingTime": "PT0S" + } + } + ] + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2022-03-01/examples/Pricings/PutPricingByName_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2022-03-01/examples/Pricings/PutPricingByName_example.json new file mode 100644 index 000000000000..d5d1fd40fef9 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/stable/2022-03-01/examples/Pricings/PutPricingByName_example.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2022-03-01", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "pricingName": "VirtualMachines", + "pricing": { + "properties": { + "pricingTier": "Standard", + "subPlan": "P2" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/VirtualMachines", + "name": "VirtualMachines", + "type": "Microsoft.Security/pricings", + "properties": { + "pricingTier": "Standard", + "freeTrialRemainingTime": "PT0S", + "subPlan": "P2" + } + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2022-03-01/pricings.json b/specification/security/resource-manager/Microsoft.Security/stable/2022-03-01/pricings.json new file mode 100644 index 000000000000..156cc45020ad --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/stable/2022-03-01/pricings.json @@ -0,0 +1,247 @@ +{ + "swagger": "2.0", + "info": { + "title": "Security Center", + "description": "API spec for Microsoft.Security (Azure Security Center) resource provider", + "version": "2022-03-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/pricings": { + "get": { + "x-ms-examples": { + "Get pricings on subscription": { + "$ref": "./examples/Pricings/ListPricings_example.json" + } + }, + "tags": [ + "Pricings" + ], + "description": "Lists Security Center pricing configurations in the subscription.", + "operationId": "Pricings_List", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/PricingList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../common/v1/types.json#/definitions/CloudError" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Security/pricings/{pricingName}": { + "get": { + "x-ms-examples": { + "Get pricings on subscription": { + "$ref": "./examples/Pricings/GetPricingByName_example.json" + } + }, + "tags": [ + "Pricings" + ], + "description": "Gets a provided Security Center pricing configuration in the subscription.", + "operationId": "Pricings_Get", + "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/Pricing" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../common/v1/types.json#/definitions/CloudError" + } + } + } + }, + "put": { + "x-ms-examples": { + "Update pricing on subscription": { + "$ref": "./examples/Pricings/PutPricingByName_example.json" + } + }, + "tags": [ + "Pricings" + ], + "description": "Updates a provided Security Center pricing configuration in the subscription.", + "operationId": "Pricings_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" + }, + { + "$ref": "#/parameters/PricingName" + }, + { + "$ref": "#/parameters/Pricing" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Pricing" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../common/v1/types.json#/definitions/CloudError" + } + } + } + } + } + }, + "definitions": { + "PricingList": { + "description": "List of pricing configurations response.", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "description": "List of pricing configurations", + "items": { + "$ref": "#/definitions/Pricing" + } + } + } + }, + "Pricing": { + "type": "object", + "description": "Azure Security Center is provided in two pricing tiers: free and standard, with the standard tier available with a trial period. The standard tier offers advanced security capabilities, while the free tier offers basic security features.", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "description": "Pricing data", + "$ref": "#/definitions/PricingProperties" + } + }, + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/Resource" + } + ] + }, + "PricingProperties": { + "type": "object", + "description": "Pricing properties for the relevant scope", + "properties": { + "pricingTier": { + "type": "string", + "description": "The pricing tier value. Azure Security Center is provided in two pricing tiers: free and standard, with the standard tier available with a trial period. The standard tier offers advanced security capabilities, while the free tier offers basic security features.", + "enum": [ + "Free", + "Standard" + ], + "x-ms-enum": { + "name": "pricingTier", + "modelAsString": true, + "values": [ + { + "value": "Free", + "description": "Get free Azure security center experience with basic security features" + }, + { + "value": "Standard", + "description": "Get the standard Azure security center experience with advanced security features" + } + ] + } + }, + "subPlan": { + "type": "string", + "description": "The sub-plan selected for a Standard pricing configuration, when more than one sub-plan is available. Each sub-plan enables a set of security features. When not specified, full plan is applied." + }, + "freeTrialRemainingTime": { + "type": "string", + "format": "duration", + "readOnly": true, + "description": "The duration left for the subscriptions free trial period - in ISO 8601 format (e.g. P3Y6M4DT12H30M5S)." + } + }, + "required": [ + "pricingTier" + ] + } + }, + "parameters": { + "PricingName": { + "name": "pricingName", + "in": "path", + "required": true, + "type": "string", + "description": "name of the pricing configuration", + "x-ms-parameter-location": "method" + }, + "Pricing": { + "name": "pricing", + "in": "body", + "required": true, + "description": "Pricing object", + "schema": { + "$ref": "#/definitions/Pricing" + }, + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/security/resource-manager/readme.md b/specification/security/resource-manager/readme.md index abd1373a9744..ef369ee63ffa 100644 --- a/specification/security/resource-manager/readme.md +++ b/specification/security/resource-manager/readme.md @@ -66,13 +66,22 @@ These are the global settings for the Security API. title: SecurityCenter description: API spec for Microsoft.Security (Azure Security Center) resource provider openapi-type: arm -tag: package-composite-v3 +tag: package-2022-03 ``` ### Composite packages The following packages may be composed from multiple api-versions. + +### Tag: package-2022-03 + +These settings apply only when `--tag=package-2022-03` is specified on the command line. + +```yaml $(tag) == 'package-2022-03' +input-file: + - Microsoft.Security/stable/2022-03-01/pricings.json +``` ### Tag: package-preview-2021-08 These settings apply only when `--tag=package-preview-2021-08` is specified on the command line. @@ -84,7 +93,7 @@ input-file: override-info: title: SecurityCenter -``` +``` ### Tag: package-composite-v1 @@ -454,7 +463,7 @@ override-info: These settings apply only when `--tag=package-2021-07-preview-only` is specified on the command line. -```yaml $(tag) == 'package-2021-07-preview-only' +``` yaml $(tag) == 'package-2021-07-preview-only' input-file: - Microsoft.Security/preview/2021-07-01-preview/customAssessmentAutomation.json - Microsoft.Security/preview/2021-07-01-preview/customEntityStoreAssignment.json @@ -464,14 +473,16 @@ input-file: These settings apply only when `--tag=package-2021-10-preview-only` is specified on the command line. -```yaml $(tag) == 'package-2021-10-preview-only' +``` yaml $(tag) == 'package-2021-10-preview-only' input-file: - Microsoft.Security/preview/2021-10-01-preview/mdeOnboardings.json ``` # Needed when there is more than one input file + override-info: - title: SecurityCenter +title: SecurityCenter + ``` ### Tag: package-2021-06-only @@ -548,4 +559,4 @@ See configuration in [readme.ruby.md](./readme.ruby.md) ## Java -See configuration in [readme.java.md](./readme.java.md) \ No newline at end of file +See configuration in [readme.java.md](./readme.java.md)