deleteGrant method

Future<DeleteGrantResponse> deleteGrant({
  1. required String grantArn,
  2. required String version,
})

Deletes the specified grant.

May throw ValidationException. May throw InvalidParameterValueException. May throw AuthorizationException. May throw AccessDeniedException. May throw RateLimitExceededException. May throw ResourceLimitExceededException. May throw ServerInternalException.

Parameter grantArn : Amazon Resource Name (ARN) of the grant.

Parameter version : Current version of the grant.

Implementation

Future<DeleteGrantResponse> deleteGrant({
  required String grantArn,
  required String version,
}) async {
  ArgumentError.checkNotNull(grantArn, 'grantArn');
  _s.validateStringLength(
    'grantArn',
    grantArn,
    0,
    2048,
    isRequired: true,
  );
  ArgumentError.checkNotNull(version, 'version');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSLicenseManager.DeleteGrant'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'GrantArn': grantArn,
      'Version': version,
    },
  );

  return DeleteGrantResponse.fromJson(jsonResponse.body);
}