UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 21.8 kB
{"openapi":"3.0.0","info":{"description":"API spec for Microsoft.Security (Azure Security Center) resource provider","title":"Security Center","version":"2020-01-01","x-apisguru-categories":["cloud"],"x-logo":{"url":"https://assets.onestore.ms/cdnfiles/onestorerolling-1606-01000/shell/v3/images/logo/microsoft.png"},"x-origin":[{"format":"swagger","url":"https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/assessments.json","version":"2.0"}],"x-preferred":true,"x-providerName":"azure.com","x-serviceName":"security-assessments","x-tags":["Azure","Microsoft"]},"security":[{"azure_auth":["user_impersonation"]}],"paths":{"/{resourceId}/providers/Microsoft.Security/assessments/{assessmentName}":{"delete":{"description":"Delete a security assessment on your resource. An assessment metadata that describes this assessment must be predefined with the same name before inserting the assessment result","operationId":"Assessments_Delete","parameters":[{"description":"API version for the operation","in":"query","name":"api-version","required":true,"schema":{"type":"string"},"examples":{"Delete a security recommendation task on a resource":{"value":"2020-01-01"}}},{"description":"The identifier of the resource.","in":"path","name":"resourceId","required":true,"x-ms-parameter-location":"method","schema":{"type":"string"},"examples":{"Delete a security recommendation task on a resource":{"value":"subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachineScaleSets/vmss2"}}},{"$ref":"#/components/parameters/AssessmentName"}],"responses":{"200":{"description":"OK - Assessment was deleted"},"204":{"description":"No Content - Assessment does not exist"},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"description":"Error response structure.","properties":{"error":{"description":"Error details.","properties":{"code":{"description":"An identifier for the error. Codes are invariant and are intended to be consumed programmatically.","readOnly":true,"type":"string"},"message":{"description":"A message describing the error, intended to be suitable for display in a user interface.","readOnly":true,"type":"string"}},"type":"object","x-ms-external":true}},"type":"object","x-ms-external":true}}}}},"tags":["Assessments"]},"get":{"description":"Get a security assessment on your scanned resource","operationId":"Assessments_Get","parameters":[{"description":"API version for the operation","in":"query","name":"api-version","required":true,"schema":{"type":"string"},"examples":{"Get security recommendation task from security data location":{"value":"2020-01-01"},"Get security recommendation task from security data location with expand parameter":{"value":"2020-01-01"}}},{"description":"The identifier of the resource.","in":"path","name":"resourceId","required":true,"x-ms-parameter-location":"method","schema":{"type":"string"},"examples":{"Get security recommendation task from security data location":{"value":"subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachineScaleSets/vmss2"},"Get security recommendation task from security data location with expand parameter":{"value":"subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachineScaleSets/vmss2"}}},{"$ref":"#/components/parameters/AssessmentName"},{"$ref":"#/components/parameters/ExpandAssessments"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecurityAssessment"},"examples":{"Get security recommendation task from security data location":{"$ref":"#/components/examples/Get_security_recommendation_task_from_security_data_location"},"Get security recommendation task from security data location with expand parameter":{"$ref":"#/components/examples/Get_security_recommendation_task_from_security_data_location_with_expand_parameter"}}}}},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"description":"Error response structure.","properties":{"error":{"description":"Error details.","properties":{"code":{"description":"An identifier for the error. Codes are invariant and are intended to be consumed programmatically.","readOnly":true,"type":"string"},"message":{"description":"A message describing the error, intended to be suitable for display in a user interface.","readOnly":true,"type":"string"}},"type":"object","x-ms-external":true}},"type":"object","x-ms-external":true}}}}},"tags":["Assessments"]},"put":{"description":"Create a security assessment on your resource. An assessment metadata that describes this assessment must be predefined with the same name before inserting the assessment result","operationId":"Assessments_CreateOrUpdate","parameters":[{"description":"API version for the operation","in":"query","name":"api-version","required":true,"schema":{"type":"string"},"examples":{"Create security recommendation task on a resource":{"value":"2020-01-01"}}},{"description":"The identifier of the resource.","in":"path","name":"resourceId","required":true,"x-ms-parameter-location":"method","schema":{"type":"string"},"examples":{"Create security recommendation task on a resource":{"value":"subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachineScaleSets/vmss2"}}},{"$ref":"#/components/parameters/AssessmentName"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecurityAssessment"}}},"description":"Calculated assessment on a pre-defined assessment metadata","required":true,"x-ms-parameter-location":"method"},"responses":{"200":{"description":"OK - Updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecurityAssessment"},"examples":{"Create security recommendation task on a resource":{"$ref":"#/components/examples/Create_security_recommendation_task_on_a_resource"}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecurityAssessment"},"examples":{"Create security recommendation task on a resource":{"$ref":"#/components/examples/Create_security_recommendation_task_on_a_resource"}}}}},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"description":"Error response structure.","properties":{"error":{"description":"Error details.","properties":{"code":{"description":"An identifier for the error. Codes are invariant and are intended to be consumed programmatically.","readOnly":true,"type":"string"},"message":{"description":"A message describing the error, intended to be suitable for display in a user interface.","readOnly":true,"type":"string"}},"type":"object","x-ms-external":true}},"type":"object","x-ms-external":true}}}}},"tags":["Assessments"]}},"/{scope}/providers/Microsoft.Security/assessments":{"get":{"description":"Get security assessments on all your scanned resources inside a scope","operationId":"Assessments_List","parameters":[{"description":"API version for the operation","in":"query","name":"api-version","required":true,"schema":{"type":"string"},"examples":{"List security assessments":{"value":"2020-01-01"}}},{"description":"Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group (/providers/Microsoft.Management/managementGroups/mgName).","in":"path","name":"scope","required":true,"x-ms-parameter-location":"method","schema":{"type":"string"},"examples":{"List security assessments":{"value":"subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23"}}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecurityAssessmentList"},"examples":{"List security assessments":{"$ref":"#/components/examples/List_security_assessments"}}}}},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"description":"Error response structure.","properties":{"error":{"description":"Error details.","properties":{"code":{"description":"An identifier for the error. Codes are invariant and are intended to be consumed programmatically.","readOnly":true,"type":"string"},"message":{"description":"A message describing the error, intended to be suitable for display in a user interface.","readOnly":true,"type":"string"}},"type":"object","x-ms-external":true}},"type":"object","x-ms-external":true}}}}},"tags":["Assessments"],"x-ms-pageable":{"nextLinkName":"nextLink"}}}},"servers":[{"url":"https://management.azure.com"}],"components":{"examples":{"Get_security_recommendation_task_from_security_data_location":{"value":{"id":"/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachineScaleSets/vmss2/providers/Microsoft.Security/assessments/21300918-b2e3-0346-785f-c77ff57d243b","name":"21300918-b2e3-0346-785f-c77ff57d243b","properties":{"additionalData":{"linkedWorkspaceId":"/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myLaWorkspace"},"displayName":"Install endpoint protection solution on virtual machine scale sets","resourceDetails":{"id":"/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachineScaleSets/vmss2","source":"Azure"},"status":{"cause":"OffByPolicy","code":"NotApplicable","description":"The effective policy for the assessment was evaluated to off - use Microsoft.Authorization/policyAssignments to turn this assessment on"}},"type":"Microsoft.Security/assessments"}},"Get_security_recommendation_task_from_security_data_location_with_expand_parameter":{"value":{"id":"/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachineScaleSets/vmss2/providers/Microsoft.Security/assessments/21300918-b2e3-0346-785f-c77ff57d243b","name":"21300918-b2e3-0346-785f-c77ff57d243b","properties":{"additionalData":{"linkedWorkspaceId":"/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myLaWorkspace"},"displayName":"Install endpoint protection solution on virtual machine scale sets","links":{"azurePortalUri":"https://www.portal.azure.com/?fea#blade/Microsoft_Azure_Security/RecommendationsBlade/assessmentKey/21300918-b2e3-0346-785f-c77ff57d243b"},"resourceDetails":{"id":"/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachineScaleSets/vmss2","source":"Azure"},"status":{"cause":"OffByPolicy","code":"NotApplicable","description":"The effective policy for the assessment was evaluated to off - use Microsoft.Authorization/policyAssignments to turn this assessment on"}},"type":"Microsoft.Security/assessments"}},"Create_security_recommendation_task_on_a_resource":{"value":{"id":"/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1/providers/Microsoft.Security/assessments/8bb8be0a-6010-4789-812f-e4d661c4ed0e","name":"8bb8be0a-6010-4789-812f-e4d661c4ed0e","properties":{"displayName":"Install internal agent on VM","resourceDetails":{"id":"/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1/providers/Microsoft.Security/assessments/8bb8be0a-6010-4789-812f-e4d661c4ed0e","source":"Azure"},"status":{"code":"Healthy"}},"type":"Microsoft.Security/assessments"}},"List_security_assessments":{"value":{"value":[{"id":"/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1/providers/Microsoft.Security/assessments/21300918-b2e3-0346-785f-c77ff57d243b","name":"21300918-b2e3-0346-785f-c77ff57d243b","properties":{"displayName":"Install endpoint protection solution on virtual machine scale sets","resourceDetails":{"id":"/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1","source":"Azure"},"status":{"code":"Healthy"}},"type":"Microsoft.Security/assessments"},{"id":"/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachineScaleSets/vmss2/providers/Microsoft.Security/assessments/21300918-b2e3-0346-785f-c77ff57d243b","name":"21300918-b2e3-0346-785f-c77ff57d243b","properties":{"additionalData":{"linkedWorkspaceId":"/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myLaWorkspace"},"displayName":"Install endpoint protection solution on virtual machine scale sets","resourceDetails":{"id":"/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachineScaleSets/vmss2","source":"Azure"},"status":{"cause":"OffByPolicy","code":"NotApplicable","description":"The effective policy for the assessment was evaluated to off - use Microsoft.Authorization/policyAssignments to turn this assessment on"}},"type":"Microsoft.Security/assessments"}]}}},"parameters":{"AssessmentName":{"description":"The Assessment Key - Unique key for the assessment type","in":"path","name":"assessmentName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string"},"examples":{"Delete a security recommendation task on a resource":{"value":"8bb8be0a-6010-4789-812f-e4d661c4ed0e"},"Get security recommendation task from security data location":{"value":"21300918-b2e3-0346-785f-c77ff57d243b"},"Get security recommendation task from security data location with expand parameter":{"value":"21300918-b2e3-0346-785f-c77ff57d243b"},"Create security recommendation task on a resource":{"value":"8bb8be0a-6010-4789-812f-e4d661c4ed0e"}}},"ExpandAssessments":{"description":"OData expand. Optional.","in":"query","name":"$expand","required":false,"x-ms-enum":{"modelAsString":true,"name":"ExpandEnum","values":[{"description":"All links associated with an assessment","value":"links"},{"description":"Assessment metadata","value":"metadata"}]},"x-ms-parameter-location":"method","schema":{"type":"string","enum":["links","metadata"]},"examples":{"Get security recommendation task from security data location with expand parameter":{"value":"links"}}}},"securitySchemes":{"azure_auth":{"description":"Azure Active Directory OAuth2 Flow","type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://login.microsoftonline.com/common/oauth2/authorize","scopes":{"user_impersonation":"impersonate your user account"}}}}},"schemas":{"AssessmentLinks":{"description":"Links relevant to the assessment","properties":{"azurePortalUri":{"description":"Link to assessment in Azure Portal","readOnly":true,"type":"string"}},"readOnly":true,"type":"object"},"AssessmentStatus":{"description":"The result of the assessment","properties":{"cause":{"description":"Programmatic code for the cause of the assessment status","type":"string"},"code":{"description":"Programmatic code for the status of the assessment","enum":["Healthy","Unhealthy","NotApplicable"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"AssessmentStatusCode","values":[{"description":"The resource is healthy","value":"Healthy"},{"description":"The resource has a security issue that needs to be addressed","value":"Unhealthy"},{"description":"Assessment for this resource did not happen","value":"NotApplicable"}]}},"description":{"description":"Human readable description of the assessment status","type":"string"}},"required":["code"],"type":"object"},"SecurityAssessment":{"allOf":[{"description":"Describes an Azure resource.","properties":{"id":{"description":"Resource Id","readOnly":true,"type":"string"},"name":{"description":"Resource name","readOnly":true,"type":"string"},"type":{"description":"Resource type","readOnly":true,"type":"string"}},"type":"object","x-ms-azure-resource":true}],"description":"Security assessment on a resource","properties":{"properties":{"$ref":"#/components/schemas/SecurityAssessmentProperties"}},"type":"object"},"SecurityAssessmentList":{"description":"Page of a security assessments list","properties":{"nextLink":{"description":"The URI to fetch the next page.","readOnly":true,"type":"string"},"value":{"description":"Collection of security assessments in this page","items":{"$ref":"#/components/schemas/SecurityAssessment"},"readOnly":true,"type":"array"}},"type":"object"},"SecurityAssessmentPartnerData":{"description":"Data regarding 3rd party partner integration","properties":{"secret":{"description":"secret to authenticate the partner - write only","type":"string","x-ms-secret":true}},"type":"object"},"SecurityAssessmentProperties":{"description":"Describes properties of an assessment.","properties":{"additionalData":{"additionalProperties":{"type":"string"},"description":"Additional data regarding the assessment","type":"object"},"displayName":{"description":"User friendly display name of the assessment","readOnly":true,"type":"string"},"links":{"$ref":"#/components/schemas/AssessmentLinks"},"metadata":{"description":"Describes properties of an assessment metadata.","properties":{"assessmentType":{"description":"BuiltIn if the assessment based on built-in Azure Policy definition, Custom if the assessment based on custom Azure Policy definition","enum":["BuiltIn","CustomPolicy","CustomerManaged","VerifiedPartner"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"assessmentType","values":[{"description":"Azure Security Center managed assessments","value":"BuiltIn"},{"description":"User defined policies that are automatically ingested from Azure Policy to Azure Security Center","value":"CustomPolicy"},{"description":"User assessments pushed directly by the user or other third party to Azure Security Center","value":"CustomerManaged"},{"description":"An assessment that was created by a verified 3rd party if the user connected it to ASC","value":"VerifiedPartner"}]}},"category":{"items":{"description":"The category of resource that is at risk when the assessment is unhealthy","enum":["Compute","Networking","Data","IdentityAndAccess","IoT"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"category","values":[{"value":"Compute"},{"value":"Networking"},{"value":"Data"},{"value":"IdentityAndAccess"},{"value":"IoT"}]}},"type":"array"},"description":{"description":"Human readable description of the assessment","type":"string"},"displayName":{"description":"User friendly display name of the assessment","type":"string"},"implementationEffort":{"description":"The implementation effort required to remediate this assessment","enum":["Low","Moderate","High"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"implementationEffort","values":[{"value":"Low"},{"value":"Moderate"},{"value":"High"}]}},"partnerData":{"description":"Describes the partner that created the assessment","properties":{"partnerName":{"description":"Name of the company of the partner","readOnly":true,"type":"string"},"productName":{"description":"Name of the product of the partner that created the assessment","type":"string"},"secret":{"description":"Secret to authenticate the partner and verify it created the assessment - write only","type":"string","x-ms-secret":true}},"type":"object"},"policyDefinitionId":{"description":"Azure resource ID of the policy definition that turns this assessment calculation on","readOnly":true,"type":"string"},"preview":{"description":"True if this assessment is in preview release status","type":"boolean"},"remediationDescription":{"description":"Human readable description of what you should do to mitigate this security issue","type":"string"},"severity":{"description":"The severity level of the assessment","enum":["Low","Medium","High"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"severity","values":[{"value":"Low"},{"value":"Medium"},{"value":"High"}]}},"threats":{"items":{"description":"Threats impact of the assessment","enum":["accountBreach","dataExfiltration","dataSpillage","maliciousInsider","elevationOfPrivilege","threatResistance","missingCoverage","denialOfService"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"threats","values":[{"value":"accountBreach"},{"value":"dataExfiltration"},{"value":"dataSpillage"},{"value":"maliciousInsider"},{"value":"elevationOfPrivilege"},{"value":"threatResistance"},{"value":"missingCoverage"},{"value":"denialOfService"}]}},"type":"array"},"userImpact":{"description":"The user impact of the assessment","enum":["Low","Moderate","High"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"userImpact","values":[{"value":"Low"},{"value":"Moderate"},{"value":"High"}]}}},"required":["displayName","severity","assessmentType"],"type":"object"},"partnersData":{"$ref":"#/components/schemas/SecurityAssessmentPartnerData"},"resourceDetails":{"description":"Details of the resource that was assessed","discriminator":{"propertyName":"source"},"properties":{"source":{"description":"The platform where the assessed resource resides","enum":["Azure","OnPremise"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"source","values":[{"description":"Resource is in Azure","value":"Azure"},{"description":"Resource in an on premise machine connected to Azure cloud","value":"OnPremise"}]}}},"required":["source"],"type":"object"},"status":{"$ref":"#/components/schemas/AssessmentStatus"}},"required":["resourceDetails","status"],"type":"object"}}}}