deleteGitHubAccountToken method

Future<DeleteGitHubAccountTokenOutput> deleteGitHubAccountToken({
  1. String? tokenName,
})

Deletes a GitHub account connection.

May throw GitHubAccountTokenNameRequiredException. May throw GitHubAccountTokenDoesNotExistException. May throw InvalidGitHubAccountTokenNameException. May throw ResourceValidationException. May throw OperationNotSupportedException.

Parameter tokenName : The name of the GitHub account connection to delete.

Implementation

Future<DeleteGitHubAccountTokenOutput> deleteGitHubAccountToken({
  String? tokenName,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'CodeDeploy_20141006.DeleteGitHubAccountToken'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (tokenName != null) 'tokenName': tokenName,
    },
  );

  return DeleteGitHubAccountTokenOutput.fromJson(jsonResponse.body);
}