Skip to content
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 subscription scope to assessment metadata API #6445

Merged
merged 15 commits into from
Jul 11, 2019
Prev Previous commit
Next Next commit
fix CR comments
  • Loading branch information
Tal Rosler committed Jun 27, 2019
commit 1083840be9b633292066549bfc575e3374065089
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,22 @@
"version": "2019-01-01-preview"
},
"host": "management.azure.com",
"schemes": ["https"],
"consumes": ["application/json"],
"produces": ["application/json"],
"security": [{
"azure_auth": ["user_impersonation"]
}],
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
],
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
Expand All @@ -31,12 +41,16 @@
"$ref": "./examples/AssessmentsMetadata/ListAssessmentsMetadata_example.json"
}
},
"tags": ["Assessments Metadata"],
"tags": [
"Assessments Metadata"
],
"description": "Get metadata information on all assessment types",
"operationId": "AssessmentsMetadata_List",
"parameters": [{
"$ref": "../../../common/v1/types.json#/parameters/ApiVersion"
}],
"parameters": [
{
"$ref": "../../../common/v1/types.json#/parameters/ApiVersion"
}
],
"responses": {
"200": {
"description": "OK",
Expand All @@ -63,10 +77,13 @@
"$ref": "./examples/AssessmentsMetadata/GetAssessmentsMetadata_example.json"
}
},
"tags": ["Assessments Metadata"],
"tags": [
"Assessments Metadata"
],
"description": "Get metadata information on an assessment type",
"operationId": "AssessmentsMetadata_Get",
"parameters": [{
"parameters": [
{
"$ref": "../../../common/v1/types.json#/parameters/ApiVersion"
},
{
Expand All @@ -89,23 +106,25 @@
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.Security/assessmentsMetadata": {
"/subscriptions/{subscriptionId}/providers/Microsoft.Security/assessmentsMetadata": {
"get": {
"x-ms-examples": {
"List security assessment metadata for subscription": {
"$ref": "./examples/AssessmentsMetadata/ListAssessmentsMetadata_example.json"
}
},
"tags": ["Assessments Metadata"],
"tags": [
"Assessments Metadata"
],
"description": "Get metadata information on all assessment types in a specific subscription",
"operationId": "AssessmentsMetadata_Subscription_List",
"parameters": [
{
"$ref": "../../../common/v1/types.json#/parameters/ApiVersion"
},
{
"$ref": "#/parameters/SubscriptionId"
}
"$ref": "../../../common/v1/types.json#/parameters/ApiVersion"
},
{
"$ref": "#/parameters/SubscriptionId"
}
],
"responses": {
"200": {
Expand Down Expand Up @@ -133,10 +152,13 @@
"$ref": "./examples/AssessmentsMetadata/GetAssessmentsMetadata_example.json"
}
},
"tags": ["Assessments Metadata"],
"tags": [
"Assessments Metadata"
],
"description": "Get metadata information on an assessment type in a specific subscription",
tarosler marked this conversation as resolved.
Show resolved Hide resolved
"operationId": "AssessmentsMetadata_Subscription_Get",
"parameters": [{
"parameters": [
{
"$ref": "../../../common/v1/types.json#/parameters/ApiVersion"
},
{
Expand Down Expand Up @@ -191,9 +213,11 @@
"$ref": "#/definitions/SecurityAssessmentMetadataProperties"
}
},
"allOf": [{
"$ref": "../../../common/v1/types.json#/definitions/Resource"
}]
"allOf": [
{
"$ref": "../../../common/v1/types.json#/definitions/Resource"
}
]
},
"SecurityAssessmentMetadataProperties": {
"type": "object",
Expand Down Expand Up @@ -225,11 +249,18 @@
"items": {
"type": "string",
"description": "The category of resource that is at risk when the assessment is unhealthy",
"enum": ["Compute", "Network", "Data", "IdentityAndAccess", "IoT"],
"enum": [
"Compute",
"Network",
"Data",
"IdentityAndAccess",
"IoT"
],
"x-ms-enum": {
"name": "category",
"modelAsString": true,
"values": [{
"values": [
{
"value": "Compute"
},
{
Expand Down Expand Up @@ -259,11 +290,17 @@
"items": {
"type": "string",
"description": "The required Azure Security Center pricing bundle name. One of the bundles must be Standard. Empty list is a free assessment.",
"enum": ["VirtualMachines", "SqlServers", "AppServices", "StorageAccounts"],
"enum": [
"VirtualMachines",
"SqlServers",
"AppServices",
"StorageAccounts"
],
"x-ms-enum": {
"name": "requiredPricingBundle",
"modelAsString": true,
"values": [{
"values": [
{
"value": "VirtualMachines"
},
{
Expand All @@ -284,15 +321,19 @@
"type": "boolean",
"description": "True if this assessment is in preview release status"
},
"assessmentType": {
"assessmentType": {
"readOnly": true,
"type": "string",
"description": "BuiltIn if the assessment based on built-in Azure Policy definition, Custom if the assessment based on custom Azure Policy definition",
"enum": ["BuiltIn", "Custom"],
"enum": [
"BuiltIn",
"Custom"
],
"x-ms-enum": {
"name": "assessmentType",
"modelAsString": true,
"values": [{
"values": [
{
"value": "BuiltIn"
},
{
Expand Down Expand Up @@ -322,4 +363,4 @@
"x-ms-parameter-location": "method"
}
}
}
}