deleteSecurityProfile method
Deletes a Device Defender security profile.
Requires permission to access the DeleteSecurityProfile action.
May throw InternalFailureException.
May throw InvalidRequestException.
May throw ThrottlingException.
May throw VersionConflictException.
Parameter securityProfileName :
The name of the security profile to be deleted.
Parameter expectedVersion :
The expected version of the security profile. A new version is generated
whenever the security profile is updated. If you specify a value that is
different from the actual version, a VersionConflictException
is thrown.
Implementation
Future<void> deleteSecurityProfile({
required String securityProfileName,
int? expectedVersion,
}) async {
final $query = <String, List<String>>{
if (expectedVersion != null)
'expectedVersion': [expectedVersion.toString()],
};
final response = await _protocol.send(
payload: null,
method: 'DELETE',
requestUri:
'/security-profiles/${Uri.encodeComponent(securityProfileName)}',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
}