startConfigurationPolicyAssociation method

Future<StartConfigurationPolicyAssociationResponse> startConfigurationPolicyAssociation({
  1. required String configurationPolicyIdentifier,
  2. required Target target,
})

Associates a target account, organizational unit, or the root with a specified configuration. The target can be associated with 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 associate with the specified configuration.

Implementation

Future<StartConfigurationPolicyAssociationResponse>
    startConfigurationPolicyAssociation({
  required String configurationPolicyIdentifier,
  required Target target,
}) async {
  final $payload = <String, dynamic>{
    'ConfigurationPolicyIdentifier': configurationPolicyIdentifier,
    'Target': target,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/configurationPolicyAssociation/associate',
    exceptionFnMap: _exceptionFns,
  );
  return StartConfigurationPolicyAssociationResponse.fromJson(response);
}