Interface AssessmentsClient
public interface AssessmentsClient
An instance of this class provides access to all the operations defined in AssessmentsClient.
-
Method Summary
Modifier and TypeMethodDescriptioncreateOrUpdate
(String resourceId, String assessmentName, SecurityAssessment assessment) Create a security assessment on your resource.com.azure.core.http.rest.Response<SecurityAssessmentResponseInner>
createOrUpdateWithResponse
(String resourceId, String assessmentName, SecurityAssessment assessment, com.azure.core.util.Context context) Create a security assessment on your resource.void
Delete a security assessment on your resource.com.azure.core.http.rest.Response<Void>
deleteWithResponse
(String resourceId, String assessmentName, com.azure.core.util.Context context) Delete a security assessment on your resource.Get a security assessment on your scanned resource.com.azure.core.http.rest.Response<SecurityAssessmentResponseInner>
getWithResponse
(String resourceId, String assessmentName, ExpandEnum expand, com.azure.core.util.Context context) Get a security assessment on your scanned resource.com.azure.core.http.rest.PagedIterable<SecurityAssessmentResponseInner>
Get security assessments on all your scanned resources inside a scope.com.azure.core.http.rest.PagedIterable<SecurityAssessmentResponseInner>
Get security assessments on all your scanned resources inside a scope.
-
Method Details
-
list
Get security assessments on all your scanned resources inside a scope.- Parameters:
scope
- Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group (/providers/Microsoft.Management/managementGroups/mgName).- Returns:
- security assessments on all your scanned resources inside a scope as paginated response with
PagedIterable
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
list
com.azure.core.http.rest.PagedIterable<SecurityAssessmentResponseInner> list(String scope, com.azure.core.util.Context context) Get security assessments on all your scanned resources inside a scope.- Parameters:
scope
- Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group (/providers/Microsoft.Management/managementGroups/mgName).context
- The context to associate with this operation.- Returns:
- security assessments on all your scanned resources inside a scope as paginated response with
PagedIterable
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
get
Get a security assessment on your scanned resource.- Parameters:
resourceId
- The identifier of the resource.assessmentName
- The Assessment Key - Unique key for the assessment type.- Returns:
- a security assessment on your scanned resource.
- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
getWithResponse
com.azure.core.http.rest.Response<SecurityAssessmentResponseInner> getWithResponse(String resourceId, String assessmentName, ExpandEnum expand, com.azure.core.util.Context context) Get a security assessment on your scanned resource.- Parameters:
resourceId
- The identifier of the resource.assessmentName
- The Assessment Key - Unique key for the assessment type.expand
- OData expand. Optional.context
- The context to associate with this operation.- Returns:
- a security assessment on your scanned resource along with
Response
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
createOrUpdate
SecurityAssessmentResponseInner createOrUpdate(String resourceId, String assessmentName, SecurityAssessment assessment) 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.- Parameters:
resourceId
- The identifier of the resource.assessmentName
- The Assessment Key - Unique key for the assessment type.assessment
- Calculated assessment on a pre-defined assessment metadata.- Returns:
- security assessment on a resource - response format.
- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
createOrUpdateWithResponse
com.azure.core.http.rest.Response<SecurityAssessmentResponseInner> createOrUpdateWithResponse(String resourceId, String assessmentName, SecurityAssessment assessment, com.azure.core.util.Context context) 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.- Parameters:
resourceId
- The identifier of the resource.assessmentName
- The Assessment Key - Unique key for the assessment type.assessment
- Calculated assessment on a pre-defined assessment metadata.context
- The context to associate with this operation.- Returns:
- security assessment on a resource - response format along with
Response
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
delete
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.- Parameters:
resourceId
- The identifier of the resource.assessmentName
- The Assessment Key - Unique key for the assessment type.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
deleteWithResponse
com.azure.core.http.rest.Response<Void> deleteWithResponse(String resourceId, String assessmentName, com.azure.core.util.Context context) 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.- Parameters:
resourceId
- The identifier of the resource.assessmentName
- The Assessment Key - Unique key for the assessment type.context
- The context to associate with this operation.- Returns:
- the
Response
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-