deleteOrganizationConfigRule method
Deletes the specified organization config rule and all of its evaluation results from all member accounts in that organization.
Only a master account and a delegated administrator account can delete an
organization config rule. When calling this API with a delegated
administrator, you must ensure AWS Organizations
ListDelegatedAdministrator
permissions are added.
AWS Config sets the state of a rule to DELETE_IN_PROGRESS until the deletion is complete. You cannot update a rule while it is in this state.
May throw NoSuchOrganizationConfigRuleException. May throw ResourceInUseException. May throw OrganizationAccessDeniedException.
Parameter organizationConfigRuleName
:
The name of organization config rule that you want to delete.
Implementation
Future<void> deleteOrganizationConfigRule({
required String organizationConfigRuleName,
}) async {
ArgumentError.checkNotNull(
organizationConfigRuleName, 'organizationConfigRuleName');
_s.validateStringLength(
'organizationConfigRuleName',
organizationConfigRuleName,
1,
64,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'StarlingDoveService.DeleteOrganizationConfigRule'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'OrganizationConfigRuleName': organizationConfigRuleName,
},
);
}