attachSecurityProfile method
Associates a Device Defender security profile with a thing group or this account. Each thing group or account can have up to five security profiles associated with it.
Requires permission to access the AttachSecurityProfile action.
May throw InternalFailureException.
May throw InvalidRequestException.
May throw LimitExceededException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw VersionConflictException.
Parameter securityProfileName :
The security profile that is attached.
Parameter securityProfileTargetArn :
The ARN of the target (thing group) to which the security profile is
attached.
Implementation
Future<void> attachSecurityProfile({
required String securityProfileName,
required String securityProfileTargetArn,
}) async {
final $query = <String, List<String>>{
'securityProfileTargetArn': [securityProfileTargetArn],
};
final response = await _protocol.send(
payload: null,
method: 'PUT',
requestUri:
'/security-profiles/${Uri.encodeComponent(securityProfileName)}/targets',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
}