deleteSecurityProfile method
Deletes a Device Defender security profile.
May throw InvalidRequestException. May throw ThrottlingException. May throw InternalFailureException. 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 {
ArgumentError.checkNotNull(securityProfileName, 'securityProfileName');
_s.validateStringLength(
'securityProfileName',
securityProfileName,
1,
128,
isRequired: true,
);
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,
);
}