detachSecurityProfile method
Disassociates a Device Defender security profile from a thing group or from this account.
May throw InvalidRequestException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw InternalFailureException.
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 {
ArgumentError.checkNotNull(securityProfileName, 'securityProfileName');
_s.validateStringLength(
'securityProfileName',
securityProfileName,
1,
128,
isRequired: true,
);
ArgumentError.checkNotNull(
securityProfileTargetArn, 'securityProfileTargetArn');
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,
);
}