detachSecurityProfile method

Future<void> detachSecurityProfile({
  1. required String securityProfileName,
  2. required String securityProfileTargetArn,
})

Disassociates a Device Defender security profile from a thing group or from this account.

Requires permission to access the DetachSecurityProfile action.

May throw InternalFailureException. May throw InvalidRequestException. May throw ResourceNotFoundException. May throw ThrottlingException.

Parameter securityProfileName : The security profile that is detached.

Parameter securityProfileTargetArn : The ARN of the thing group from which the security profile is detached.

Implementation

Future<void> detachSecurityProfile({
  required String securityProfileName,
  required String securityProfileTargetArn,
}) async {
  final $query = <String, List<String>>{
    'securityProfileTargetArn': [securityProfileTargetArn],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri:
        '/security-profiles/${Uri.encodeComponent(securityProfileName)}/targets',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
}