-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Add version 2018-06-01 with pricing configuration (second time) #4978
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2018-06-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" | ||
} | ||
} | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2018-06-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" | ||
} | ||
}, | ||
{ | ||
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/SqlServers", | ||
"name": "SqlServers", | ||
"type": "Microsoft.Security/pricings", | ||
"properties": { | ||
"pricingTier": "Standard" | ||
} | ||
}, | ||
{ | ||
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/AppServices", | ||
"name": "AppServices", | ||
"type": "Microsoft.Security/pricings", | ||
"properties": { | ||
"pricingTier": "Free" | ||
} | ||
}] | ||
} | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2018-06-01", | ||
"subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", | ||
"pricingName": "VirtualMachines", | ||
"pricing": { | ||
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/VirtualMachines", | ||
"name": "VirtualMachines", | ||
"type": "Microsoft.Security/pricings", | ||
"properties": { | ||
"pricingTier": "Standard" | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/pricings/VirtualMachines", | ||
"name": "VirtualMachines", | ||
"type": "Microsoft.Security/pricings", | ||
"properties": { | ||
"pricingTier": "Standard" | ||
} | ||
} | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,278 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"title": "Security Center", | ||
"description": "API spec for Microsoft.Security (Azure Security Center) resource provider", | ||
"version": "2018-06-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": "Security pricing configurations in the subscription", | ||
"operationId": "Pricings_List", | ||
"parameters": [{ | ||
"$ref": "#/parameters/ApiVersion" | ||
}, { | ||
"$ref": "#/parameters/SubscriptionId" | ||
}], | ||
"responses": { | ||
"200": { | ||
"description": "OK", | ||
"schema": { | ||
"$ref": "#/definitions/PricingList" | ||
} | ||
}, | ||
"default": { | ||
"description": "Error response describing why the operation failed.", | ||
"schema": { | ||
"$ref": "#/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": "Security pricing configuration in the subscription", | ||
"operationId": "Pricings_Get", | ||
"parameters": [{ | ||
"$ref": "#/parameters/ApiVersion" | ||
}, { | ||
"$ref": "#/parameters/SubscriptionId" | ||
}, { | ||
"$ref": "#/parameters/PricingName" | ||
}], | ||
"responses": { | ||
"200": { | ||
"description": "OK", | ||
"schema": { | ||
"$ref": "#/definitions/Pricing" | ||
} | ||
}, | ||
"default": { | ||
"description": "Error response describing why the operation failed.", | ||
"schema": { | ||
"$ref": "#/definitions/CloudError" | ||
} | ||
} | ||
} | ||
}, | ||
"put": { | ||
"x-ms-examples": { | ||
"Update pricing on subscription": { | ||
"$ref": "./examples/Pricings/PutPricingByName_example.json" | ||
} | ||
}, | ||
"tags": ["Pricings"], | ||
"description": "Security pricing configuration in the subscription", | ||
"operationId": "Pricings_Update", | ||
"parameters": [{ | ||
"$ref": "#/parameters/ApiVersion" | ||
}, { | ||
"$ref": "#/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": "#/definitions/CloudError" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"definitions": { | ||
"CloudError": { | ||
"x-ms-external": true, | ||
"type": "object", | ||
"description": "Error response structure.", | ||
"properties": { | ||
"error": { | ||
"x-ms-client-flatten": true, | ||
"description": "Error data", | ||
"$ref": "#/definitions/CloudErrorBody" | ||
} | ||
} | ||
}, | ||
"CloudErrorBody": { | ||
"x-ms-external": true, | ||
"type": "object", | ||
"description": "Error details.", | ||
"properties": { | ||
"code": { | ||
"readOnly": true, | ||
"type": "string", | ||
"description": "An identifier for the error. Codes are invariant and are intended to be consumed programmatically." | ||
}, | ||
"message": { | ||
"readOnly": true, | ||
"type": "string", | ||
"description": "A message describing the error, intended to be suitable for display in a user interface." | ||
} | ||
} | ||
}, | ||
"Resource": { | ||
"type": "object", | ||
"description": "Describes an Azure resource.", | ||
"properties": { | ||
"id": { | ||
"readOnly": true, | ||
"type": "string", | ||
"description": "Resource Id" | ||
}, | ||
"name": { | ||
"readOnly": true, | ||
"type": "string", | ||
"description": "Resource name" | ||
}, | ||
"type": { | ||
"readOnly": true, | ||
"type": "string", | ||
"description": "Resource type" | ||
} | ||
}, | ||
"x-ms-azure-resource": true | ||
}, | ||
"PricingList": { | ||
"description": "List of pricing configurations response", | ||
"required": [ | ||
"value" | ||
], | ||
"properties": { | ||
"value": { | ||
"type": "array", | ||
"description": "List of pricing configurations", | ||
"items": { | ||
"$ref": "#/definitions/Pricing" | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do you support pagination? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no, the number of returned items is limited. |
||
} | ||
} | ||
}, | ||
"Pricing": { | ||
"type": "object", | ||
"description": "Pricing tier will be applied for the scope based on the resource ID", | ||
"properties": { | ||
"properties": { | ||
"x-ms-client-flatten": true, | ||
"description": "Pricing data", | ||
"$ref": "#/definitions/PricingProperties" | ||
} | ||
}, | ||
"allOf": [{ | ||
"$ref": "#/definitions/Resource" | ||
}] | ||
}, | ||
"PricingProperties": { | ||
"type": "object", | ||
"description": "Pricing properties for the relevant scope", | ||
"properties": { | ||
"pricingTier": { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Isnt this similar notion as a SKU? If yes, it should be modeled using the sku property which is a top level property. More details can be found in ARM Resource provider contract. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's a new API version to an existing type, customers are using it and used to use it. I don't think we want to deprecate it and use the SKU propery instead as it will be very confusing to existing customers. |
||
"type": "string", | ||
"description": "The pricing tier value", | ||
"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" | ||
} | ||
] | ||
} | ||
}, | ||
"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": { | ||
"SubscriptionId": { | ||
"name": "subscriptionId", | ||
"in": "path", | ||
"required": true, | ||
"pattern": "^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$", | ||
"type": "string", | ||
"description": "Azure subscription ID" | ||
}, | ||
"ApiVersion": { | ||
"name": "api-version", | ||
"in": "query", | ||
"required": true, | ||
"type": "string", | ||
"enum": ["2018-06-01"], | ||
"description": "API version for the operation" | ||
}, | ||
"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" | ||
} | ||
} | ||
} |
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.
Did you had a meeting earlier with Simon about this new resource type? I wanted to get some more context on the usecase for the pricing resource type. what scenario is it enabling.
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.
Please note it's an existing type, I'm adding a new API version. The previous version is already documented.