Custom Assessment Automations - Create
Creates a custom assessment automation
Creates or updates a custom assessment automation for the provided subscription. Please note that providing an existing custom assessment automation will replace the existing record.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customAssessmentAutomations/{customAssessmentAutomationName}?api-version=2021-07-01-preview
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
custom
|
path | True |
string |
Name of the Custom Assessment Automation. |
resource
|
path | True |
string |
The name of the resource group within the user's subscription. The name is case insensitive. Regex pattern: |
subscription
|
path | True |
string |
Azure subscription ID Regex pattern: |
api-version
|
query | True |
string |
API version for the operation |
Request Body
Name | Type | Description |
---|---|---|
properties.compressedQuery |
string |
Base 64 encoded KQL query representing the assessment automation results required. |
properties.description |
string |
The description to relate to the assessments generated by this assessment automation. |
properties.displayName |
string |
The display name of the assessments generated by this assessment automation. |
properties.remediationDescription |
string |
The remediation description to relate to the assessments generated by this assessment automation. |
properties.severity |
The severity to relate to the assessments generated by this assessment automation. |
|
properties.supportedCloud |
Relevant cloud for the custom assessment automation. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
OK - Updated |
|
201 Created |
Created |
|
Other Status Codes |
Error response describing why the operation failed. |
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
Create a Custom Assessment Automation
Sample request
PUT https://management.azure.com/subscriptions/e5d1b86c-3051-44d5-8802-aa65d45a279b/resourcegroups/TestResourceGroup/providers/Microsoft.Security/customAssessmentAutomations/MyCustomAssessmentAutomation?api-version=2021-07-01-preview
{
"properties": {
"compressedQuery": "DQAKAEkAYQBtAF8ARwByAG8AdQBwAA0ACgB8ACAAZQB4AHQAZQBuAGQAIABIAGUAYQBsAHQAaABTAHQAYQB0AHUAcwAgAD0AIABpAGYAZgAoAHQAbwBzAHQAcgBpAG4AZwAoAFIAZQBjAG8AcgBkAC4AVQBzAGUAcgBOAGEAbQBlACkAIABjAG8AbgB0AGEAaQBuAHMAIAAnAHUAcwBlAHIAJwAsACAAJwBVAE4ASABFAEEATABUAEgAWQAnACwAIAAnAEgARQBBAEwAVABIAFkAJwApAA0ACgA=",
"supportedCloud": "AWS",
"severity": "Medium",
"displayName": "Password Policy",
"description": "Data should be encrypted",
"remediationDescription": "Encrypt store by..."
}
}
Sample response
{
"id": "/subscriptions/e5d1b86c-3051-44d5-8802-aa65d45a279b/resourcegroups/TestResourceGroup/providers/Microsoft.Security/customAssessmentAutomations/33e7cc6e-a139-4723-a0e5-76993aee0771",
"name": "33e7cc6e-a139-4723-a0e5-76993aee0771",
"type": "Microsoft.Security/customAssessmentAutomations",
"systemData": {
"createdBy": "user@contoso.com",
"createdByType": "User",
"createdAt": "2021-08-31T13:47:50.328Z",
"lastModifiedBy": "user@contoso.com",
"lastModifiedByType": "User",
"lastModifiedAt": "2021-08-31T13:47:50.328Z"
},
"properties": {
"compressedQuery": "DQAKAEkAYQBtAF8ARwByAG8AdQBwAA0ACgB8ACAAZQB4AHQAZQBuAGQAIABIAGUAYQBsAHQAaABTAHQAYQB0AHUAcwAgAD0AIABpAGYAZgAoAHQAbwBzAHQAcgBpAG4AZwAoAFIAZQBjAG8AcgBkAC4AVQBzAGUAcgBOAGEAbQBlACkAIABjAG8AbgB0AGEAaQBuAHMAIAAnAHUAcwBlAHIAJwAsACAAJwBVAE4ASABFAEEATABUAEgAWQAnACwAIAAnAEgARQBBAEwAVABIAFkAJwApAA0ACgA=",
"supportedCloud": "AWS",
"severity": "Medium",
"displayName": "Password Policy",
"description": "organization passwords policy",
"remediationDescription": "Change password policy to...",
"assessmentKey": "d5f442f7-7e77-4bcf-a450-a9c1b9a94eeb"
}
}
{
"id": "/subscriptions/e5d1b86c-3051-44d5-8802-aa65d45a279b/resourcegroups/TestResourceGroup/providers/Microsoft.Security/customAssessmentAutomations/33e7cc6e-a139-4723-a0e5-76993aee0771",
"name": "33e7cc6e-a139-4723-a0e5-76993aee0771",
"type": "Microsoft.Security/customAssessmentAutomations",
"systemData": {
"createdBy": "user@contoso.com",
"createdByType": "User",
"createdAt": "2021-08-31T13:01:50.328Z",
"lastModifiedBy": "user@contoso.com",
"lastModifiedByType": "User",
"lastModifiedAt": "2021-08-31T13:01:50.328Z"
},
"properties": {
"compressedQuery": "DQAKAEkAYQBtAF8AUABhAHMAcwB3AG8AcgBkAFAAbwBsAGkAYwB5ACAADQAKAHwAIABlAHgAdABlAG4AZAAgAEgAZQBhAGwAdABoAFMAdABhAHQAdQBzACAAPQAgAGkAZgBmACgAdABvAGkAbgB0ACgAUgBlAGMAbwByAGQALgBNAGkAbgBpAG0AdQBtAFAAYQBzAHMAdwBvAHIAZABMAGUAbgBnAHQAaAApACAAPAAgADgALAAgACcAVQBOAEgARQBBAEwAVABIAFkAJwAsACAAJwBIAEUAQQBMAFQASABZACcAKQANAAoA",
"supportedCloud": "AWS",
"severity": "Medium",
"displayName": "Customized Encryption Rules",
"description": "Data should be encrypted",
"remediationDescription": "Encrypt store by...",
"assessmentKey": "fc1dbcd0-502c-4eab-9312-4014cfc8ea56"
}
}
Definitions
Name | Description |
---|---|
Cloud |
Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). |
Cloud |
The error detail. |
created |
The type of identity that created the resource. |
custom |
Custom Assessment Automation |
custom |
Custom Assessment Automation request |
Error |
The resource management error additional info. |
severity |
The severity to relate to the assessments generated by this assessment automation. |
supported |
Relevant cloud for the custom assessment automation. |
system |
Metadata pertaining to creation and last modification of the resource. |
CloudError
Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).
Name | Type | Description |
---|---|---|
error.additionalInfo |
The error additional info. |
|
error.code |
string |
The error code. |
error.details |
The error details. |
|
error.message |
string |
The error message. |
error.target |
string |
The error target. |
CloudErrorBody
The error detail.
Name | Type | Description |
---|---|---|
additionalInfo |
The error additional info. |
|
code |
string |
The error code. |
details |
The error details. |
|
message |
string |
The error message. |
target |
string |
The error target. |
createdByType
The type of identity that created the resource.
Name | Type | Description |
---|---|---|
Application |
string |
|
Key |
string |
|
ManagedIdentity |
string |
|
User |
string |
customAssessmentAutomation
Custom Assessment Automation
Name | Type | Description |
---|---|---|
id |
string |
Resource Id |
name |
string |
Resource name |
properties.assessmentKey |
string |
The assessment metadata key used when an assessment is generated for this assessment automation. |
properties.compressedQuery |
string |
GZip encoded KQL query representing the assessment automation results required. |
properties.description |
string |
The description to relate to the assessments generated by this assessment automation. |
properties.displayName |
string |
The display name of the assessments generated by this assessment automation. |
properties.remediationDescription |
string |
The remediation description to relate to the assessments generated by this assessment automation. |
properties.severity |
The severity to relate to the assessments generated by this assessment automation. |
|
properties.supportedCloud |
Relevant cloud for the custom assessment automation. |
|
systemData |
Azure Resource Manager metadata containing createdBy and modifiedBy information. |
|
type |
string |
Resource type |
customAssessmentAutomationRequest
Custom Assessment Automation request
Name | Type | Description |
---|---|---|
id |
string |
Resource Id |
name |
string |
Resource name |
properties.compressedQuery |
string |
Base 64 encoded KQL query representing the assessment automation results required. |
properties.description |
string |
The description to relate to the assessments generated by this assessment automation. |
properties.displayName |
string |
The display name of the assessments generated by this assessment automation. |
properties.remediationDescription |
string |
The remediation description to relate to the assessments generated by this assessment automation. |
properties.severity |
The severity to relate to the assessments generated by this assessment automation. |
|
properties.supportedCloud |
Relevant cloud for the custom assessment automation. |
|
type |
string |
Resource type |
ErrorAdditionalInfo
The resource management error additional info.
Name | Type | Description |
---|---|---|
info |
object |
The additional info. |
type |
string |
The additional info type. |
severityEnum
The severity to relate to the assessments generated by this assessment automation.
Name | Type | Description |
---|---|---|
High |
string |
|
Low |
string |
|
Medium |
string |
supportedCloudEnum
Relevant cloud for the custom assessment automation.
Name | Type | Description |
---|---|---|
AWS |
string |
|
GCP |
string |
systemData
Metadata pertaining to creation and last modification of the resource.
Name | Type | Description |
---|---|---|
createdAt |
string |
The timestamp of resource creation (UTC). |
createdBy |
string |
The identity that created the resource. |
createdByType |
The type of identity that created the resource. |
|
lastModifiedAt |
string |
The timestamp of resource last modification (UTC) |
lastModifiedBy |
string |
The identity that last modified the resource. |
lastModifiedByType |
The type of identity that last modified the resource. |