deleteOrganizationConformancePack method

Future<void> deleteOrganizationConformancePack({
  1. required String organizationConformancePackName,
})

Deletes the specified organization conformance pack and all of the config rules and remediation actions from all member accounts in that organization.

Only a master account or a delegated administrator account can delete an organization conformance pack. When calling this API with a delegated administrator, you must ensure AWS Organizations ListDelegatedAdministrator permissions are added.

AWS Config sets the state of a 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 NoSuchOrganizationConformancePackException. May throw ResourceInUseException. May throw OrganizationAccessDeniedException.

Parameter organizationConformancePackName : The name of organization conformance pack that you want to delete.

Implementation

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