createAssessmentFramework method

Future<CreateAssessmentFrameworkResponse> createAssessmentFramework({
  1. required List<CreateAssessmentFrameworkControlSet> controlSets,
  2. required String name,
  3. String? complianceType,
  4. String? description,
  5. Map<String, String>? tags,
})

Creates a custom framework in Audit Manager.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ValidationException.

Parameter controlSets : The control sets that are associated with the framework.

Parameter name : The name of the new custom framework.

Parameter complianceType : The compliance type that the new custom framework supports, such as CIS or HIPAA.

Parameter description : An optional description for the new custom framework.

Parameter tags : The tags that are associated with the framework.

Implementation

Future<CreateAssessmentFrameworkResponse> createAssessmentFramework({
  required List<CreateAssessmentFrameworkControlSet> controlSets,
  required String name,
  String? complianceType,
  String? description,
  Map<String, String>? tags,
}) async {
  final $payload = <String, dynamic>{
    'controlSets': controlSets,
    'name': name,
    if (complianceType != null) 'complianceType': complianceType,
    if (description != null) 'description': description,
    if (tags != null) 'tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/assessmentFrameworks',
    exceptionFnMap: _exceptionFns,
  );
  return CreateAssessmentFrameworkResponse.fromJson(response);
}