deleteAccessPolicy method

Future<void> deleteAccessPolicy({
  1. required String accessPolicyId,
  2. String? clientToken,
})

Deletes an access policy that grants the specified identity access to the specified IoT SiteWise Monitor resource. You can use this operation to revoke access to an IoT SiteWise Monitor resource.

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

Parameter accessPolicyId : The ID of the access policy to be deleted.

Parameter clientToken : A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.

Implementation

Future<void> deleteAccessPolicy({
  required String accessPolicyId,
  String? clientToken,
}) async {
  final $query = <String, List<String>>{
    if (clientToken != null) 'clientToken': [clientToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri: '/access-policies/${Uri.encodeComponent(accessPolicyId)}',
    queryParams: $query,
    hostPrefix: 'monitor.',
    exceptionFnMap: _exceptionFns,
  );
}