startConfigurationPolicyDisassociation method

Future<void> startConfigurationPolicyDisassociation({
  1. required String configurationPolicyIdentifier,
  2. Target? target,
})

Disassociates a target account, organizational unit, or the root from a specified configuration. When you disassociate a configuration from its target, the target inherits the configuration of the closest parent. If there’s no configuration to inherit, the target retains its settings but becomes a self-managed account. A target can be disassociated from a configuration policy or self-managed behavior. Only the Security Hub CSPM delegated administrator can invoke this operation from the home Region.

May throw AccessDeniedException. May throw InternalException. May throw InvalidAccessException. May throw InvalidInputException. May throw LimitExceededException. May throw ResourceNotFoundException.

Parameter configurationPolicyIdentifier : The Amazon Resource Name (ARN) of a configuration policy, the universally unique identifier (UUID) of a configuration policy, or a value of SELF_MANAGED_SECURITY_HUB for a self-managed configuration.

Parameter target : The identifier of the target account, organizational unit, or the root to disassociate from the specified configuration.

Implementation

Future<void> startConfigurationPolicyDisassociation({
  required String configurationPolicyIdentifier,
  Target? target,
}) async {
  final $payload = <String, dynamic>{
    'ConfigurationPolicyIdentifier': configurationPolicyIdentifier,
    if (target != null) 'Target': target,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/configurationPolicyAssociation/disassociate',
    exceptionFnMap: _exceptionFns,
  );
}