Skip to content

API for AWS CodeCommit

ABAP Package /AWS1/API_CMT_IMPL
ABAP SDK "TLA" CMT
ABAP Interface /AWS1/IF_CMT

The "TLA" is a Three Letter Abbreviation that appears in ABAP class names, data dictionary objects and other ABAP objects throughout the AWS SDK for SAP ABAP. The TLA for AWS CodeCommit is CMT. This TLA helps squeeze ABAP objects into the 30-character length limit of the ABAP data dictionary.

Installation

To install the AWS SDK for SAP ABAP, import the Core transport, along with the transport for the CodeCommit module and other API modules you are interested in. A few modules are included in the Core transport itself. For more information, see the Developer Guide guide.

About The Service

CodeCommit

This is the CodeCommit API Reference. This reference provides descriptions of the operations and data types for CodeCommit API along with usage examples.

You can use the CodeCommit API to work with the following objects:

Repositories, by calling the following:

  • BatchGetRepositories, which returns information about one or more repositories associated with your Amazon Web Services account.

  • CreateRepository, which creates an CodeCommit repository.

  • DeleteRepository, which deletes an CodeCommit repository.

  • GetRepository, which returns information about a specified repository.

  • ListRepositories, which lists all CodeCommit repositories associated with your Amazon Web Services account.

  • UpdateRepositoryDescription, which sets or updates the description of the repository.

  • UpdateRepositoryEncryptionKey, which updates the Key Management Service encryption key used to encrypt and decrypt a repository.

  • UpdateRepositoryName, which changes the name of the repository. If you change the name of a repository, no other users of that repository can access it until you send them the new HTTPS or SSH URL to use.

Branches, by calling the following:

  • CreateBranch, which creates a branch in a specified repository.

  • DeleteBranch, which deletes the specified branch in a repository unless it is the default branch.

  • GetBranch, which returns information about a specified branch.

  • ListBranches, which lists all branches for a specified repository.

  • UpdateDefaultBranch, which changes the default branch for a repository.

Files, by calling the following:

  • DeleteFile, which deletes the content of a specified file from a specified branch.

  • GetBlob, which returns the base-64 encoded content of an individual Git blob object in a repository.

  • GetFile, which returns the base-64 encoded content of a specified file.

  • GetFolder, which returns the contents of a specified folder or directory.

  • ListFileCommitHistory, which retrieves a list of commits and changes to a specified file.

  • PutFile, which adds or modifies a single file in a specified repository and branch.

Commits, by calling the following:

  • BatchGetCommits, which returns information about one or more commits in a repository.

  • CreateCommit, which creates a commit for changes to a repository.

  • GetCommit, which returns information about a commit, including commit messages and author and committer information.

  • GetDifferences, which returns information about the differences in a valid commit specifier (such as a branch, tag, HEAD, commit ID, or other fully qualified reference).

Merges, by calling the following:

  • BatchDescribeMergeConflicts, which returns information about conflicts in a merge between commits in a repository.

  • CreateUnreferencedMergeCommit, which creates an unreferenced commit between two branches or commits for the purpose of comparing them and identifying any potential conflicts.

  • DescribeMergeConflicts, which returns information about merge conflicts between the base, source, and destination versions of a file in a potential merge.

  • GetMergeCommit, which returns information about the merge between a source and destination commit.

  • GetMergeConflicts, which returns information about merge conflicts between the source and destination branch in a pull request.

  • GetMergeOptions, which returns information about the available merge options between two branches or commit specifiers.

  • MergeBranchesByFastForward, which merges two branches using the fast-forward merge option.

  • MergeBranchesBySquash, which merges two branches using the squash merge option.

  • MergeBranchesByThreeWay, which merges two branches using the three-way merge option.

Pull requests, by calling the following:

Approval rule templates, by calling the following:

Comments in a repository, by calling the following:

Tags used to tag resources in CodeCommit (not Git tags), by calling the following:

  • ListTagsForResource, which gets information about Amazon Web Servicestags for a specified Amazon Resource Name (ARN) in CodeCommit.

  • TagResource, which adds or updates tags for a resource in CodeCommit.

  • UntagResource, which removes tags for a resource in CodeCommit.

Triggers, by calling the following:

  • GetRepositoryTriggers, which returns information about triggers configured for a repository.

  • PutRepositoryTriggers, which replaces all triggers for a repository and can be used to create or delete triggers.

  • TestRepositoryTriggers, which tests the functionality of a repository trigger by sending data to the trigger target.

For information about how to use CodeCommit, see the CodeCommit User Guide.

Using the SDK

In your code, create a client using the SDK module for AWS CodeCommit, which is created with factory method /AWS1/CL_CMT_FACTORY=>create(). In this example we will assume you have configured an SDK profile in transaction /AWS1/IMG called ZFINANCE.

DATA(go_session)   = /aws1/cl_rt_session_aws=>create( 'ZFINANCE' ).
DATA(go_cmt)       = /aws1/cl_cmt_factory=>create( go_session ).

Your variable go_cmt is an instance of /AWS1/IF_CMT, and all of the operations in the AWS CodeCommit service are accessed by calling methods in /AWS1/IF_CMT.

API Operations

For an overview of ABAP method calls corresponding to API operations in AWS CodeCommit, see the Operation List.

Factory Method

/AWS1/CL_CMT_FACTORY=>create( )

Creates an object of type /AWS1/IF_CMT.

IMPORTING

Optional arguments:

IV_PROTOCOL TYPE /AWS1/RT_PROTOCOL /AWS1/RT_PROTOCOL

IO_SESSION TYPE REF TO /AWS1/CL_RT_SESSION_BASE /AWS1/CL_RT_SESSION_BASE

IV_REGION TYPE /AWS1/RT_REGION_ID /AWS1/RT_REGION_ID

IV_CUSTOM_ENDPOINT TYPE /AWS1/RT_ENDPOINT /AWS1/RT_ENDPOINT

RETURNING

OO_CLIENT TYPE REF TO /AWS1/IF_CMT /AWS1/IF_CMT

/AWS1/IF_CMT represents the ABAP client for the CodeCommit service, representing each operation as a method call. For more information see the API Page page.

Configuring Programmatically

DATA(lo_config) = DATA(go_cmt)->get_config( ).

lo_config is a variable of type /AWS1/CL_CMT_CONFIG. See the documentation for /AWS1/CL_CMT_CONFIG for details on the settings that can be configured.

Paginators

Paginators for AWS CodeCommit can be created via get_paginator() which returns a paginator object of type /AWS1/IF_CMT_PAGINATOR. The operation method that is being paginated is called using the paginator object, which accepts any necessary parameters to provide to the underlying API operation. This returns an iterator object which can be used to iterate over paginated results using has_next() and get_next() methods.

Details about the paginator methods available for service AWS CodeCommit can be found in interface /AWS1/IF_CMT_PAGINATOR.