deleteConformancePack method

Future<void> deleteConformancePack({
  1. required String conformancePackName,
})

Deletes the specified conformance pack and all the AWS Config rules, remediation actions, and all evaluation results within that conformance pack.

AWS Config sets the conformance pack to DELETE_IN_PROGRESS until the deletion is complete. You cannot update a conformance pack while it is in this state.

May throw NoSuchConformancePackException. May throw ResourceInUseException.

Parameter conformancePackName : Name of the conformance pack you want to delete.

Implementation

Future<void> deleteConformancePack({
  required String conformancePackName,
}) async {
  ArgumentError.checkNotNull(conformancePackName, 'conformancePackName');
  _s.validateStringLength(
    'conformancePackName',
    conformancePackName,
    1,
    256,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'StarlingDoveService.DeleteConformancePack'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ConformancePackName': conformancePackName,
    },
  );
}