Class: AWS.CodeCommit

Inherits:
AWS.Service show all
Identifier:
codecommit
API Version:
2015-04-13
Defined in:
(unknown)

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Service Description

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

You can use the AWS 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 AWS account.

  • CreateRepository, which creates an AWS CodeCommit repository.

  • DeleteRepository, which deletes an AWS CodeCommit repository.

  • GetRepository, which returns information about a specified repository.

  • ListRepositories, which lists all AWS CodeCommit repositories associated with your AWS account.

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

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

Branches, by calling the following:

  • CreateBranch, which creates a new 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.

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

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

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

Information about committed code in a repository, by calling the following:

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

  • GetBlob, which returns the base-64 encoded content of an individual Git blob object within 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).

Pull requests, by calling the following:

Information about comments in a repository, by calling the following:

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 AWS CodeCommit, see the AWS CodeCommit User Guide.

Sending a Request Using CodeCommit

var codecommit = new AWS.CodeCommit();
codecommit.batchGetRepositories(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the CodeCommit object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var codecommit = new AWS.CodeCommit({apiVersion: '2015-04-13'});

You can also set the API version globally in AWS.config.apiVersions using the codecommit service identifier:

AWS.config.apiVersions = {
  codecommit: '2015-04-13',
  // other service API versions
};

var codecommit = new AWS.CodeCommit();

Version:

  • 2015-04-13

Constructor Summary

Property Summary

Properties inherited from AWS.Service

apiVersions

Method Summary

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService

Constructor Details

new AWS.CodeCommit(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Examples:

Constructing a CodeCommit object

var codecommit = new AWS.CodeCommit({apiVersion: '2015-04-13'});

Options Hash (options):

  • params (map)

    An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.

  • endpoint (String)

    The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like 'https://{service}.{region}.amazonaws.com'.

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

    the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.

  • credentialProvider (AWS.CredentialProviderChain)

    the provider chain used to resolve credentials if no static credentials property is set.

  • region (String)

    the region to send service requests to. See AWS.CodeCommit.region for more information.

  • maxRetries (Integer)

    the maximum amount of retries to attempt with a request. See AWS.CodeCommit.maxRetries for more information.

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.CodeCommit.maxRedirects for more information.

  • sslEnabled (Boolean)

    whether to enable SSL for requests.

  • paramValidation (Boolean|map)

    whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:

    • min [Boolean] — Validates that a value meets the min constraint. This is enabled by default when paramValidation is set to true.
    • max [Boolean] — Validates that a value meets the max constraint.
    • pattern [Boolean] — Validates that a string value matches a regular expression.
    • enum [Boolean] — Validates that a string value matches one of the allowable enum values.
  • computeChecksums (Boolean)

    whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)

  • convertResponseTypes (Boolean)

    whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to true.

  • correctClockSkew (Boolean)

    whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to false.

  • s3ForcePathStyle (Boolean)

    whether to force path style URLs for S3 objects.

  • s3BucketEndpoint (Boolean)

    whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an endpoint to be provided explicitly to the service constructor.

  • s3DisableBodySigning (Boolean)

    whether S3 body signing should be disabled when using signature version v4. Body signing can only be disabled when using https. Defaults to true.

  • retryDelayOptions (map)

    A set of options to configure the retry delay on retryable errors. Currently supported options are:

    • base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
    • customBackoff [function] — A custom function that accepts a retry count and returns the amount of time to delay in milliseconds. The base option will be ignored if this option is supplied.
  • httpOptions (map)

    A set of options to pass to the low-level HTTP request. Currently supported options are:

    • proxy [String] — the URL to proxy requests through
    • agent [http.Agent, https.Agent] — the Agent object to perform HTTP requests with. Used for connection pooling. Defaults to the global agent (http.globalAgent) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment.
    • connectTimeout [Integer] — Sets the socket to timeout after failing to establish a connection with the server after connectTimeout milliseconds. This timeout has no effect once a socket connection has been established.
    • timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
    • xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
    • xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
  • apiVersion (String, Date)

    a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by apiVersions). Specify 'latest' to use the latest possible version.

  • apiVersions (map<String, String|Date>)

    a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.

  • logger (#write, #log)

    an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests

  • systemClockOffset (Number)

    an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global AWS.config object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds.

  • signatureVersion (String)

    the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.

  • signatureCache (Boolean)

    whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to true.

  • dynamoDbCrc32 (Boolean)

    whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default: true.

  • useAccelerateEndpoint (Boolean)

    Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default: false.

  • clientSideMonitoring (Boolean)

    whether to collect and publish this client's performance metrics of all its API requests.

  • endpointDiscoveryEnabled (Boolean)

    whether to enable endpoint discovery for operations that allow optionally using an endpoint returned by the service. Defaults to 'false'

  • endpointCacheSize (Number)

    the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000

  • hostPrefixEnabled (Boolean)

    whether to marshal request parameters to the prefix of hostname. Defaults to true.

Property Details

endpointAWS.Endpoint (readwrite)

Returns an Endpoint object representing the endpoint URL for service requests.

Returns:

  • (AWS.Endpoint)

    an Endpoint object representing the endpoint URL for service requests.

Method Details

batchGetRepositories(params = {}, callback) ⇒ AWS.Request

Returns information about one or more repositories.

Note: The description field for a repository accepts all HTML characters and all valid Unicode characters. Applications that do not HTML-encode the description and display it in a web page could expose users to potentially malicious code. Make sure that you HTML-encode the description field in any application that uses this API to display the repository description on a web page.

Service Reference:

Examples:

Calling the batchGetRepositories operation

var params = {
  repositoryNames: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
codecommit.batchGetRepositories(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • repositoryNames — (Array<String>)

      The names of the repositories to get information about.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • repositories — (Array<map>)

        A list of repositories returned by the batch get repositories operation.

        • accountId — (String)

          The ID of the AWS account associated with the repository.

        • repositoryId — (String)

          The ID of the repository.

        • repositoryName — (String)

          The repository's name.

        • repositoryDescription — (String)

          A comment or description about the repository.

        • defaultBranch — (String)

          The repository's default branch name.

        • lastModifiedDate — (Date)

          The date and time the repository was last modified, in timestamp format.

        • creationDate — (Date)

          The date and time the repository was created, in timestamp format.

        • cloneUrlHttp — (String)

          The URL to use for cloning the repository over HTTPS.

        • cloneUrlSsh — (String)

          The URL to use for cloning the repository over SSH.

        • Arn — (String)

          The Amazon Resource Name (ARN) of the repository.

      • repositoriesNotFound — (Array<String>)

        Returns a list of repository names for which information could not be found.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createBranch(params = {}, callback) ⇒ AWS.Request

Creates a new branch in a repository and points the branch to a commit.

Note: Calling the create branch operation does not set a repository's default branch. To do this, call the update default branch operation.

Service Reference:

Examples:

Calling the createBranch operation

var params = {
  branchName: 'STRING_VALUE', /* required */
  commitId: 'STRING_VALUE', /* required */
  repositoryName: 'STRING_VALUE' /* required */
};
codecommit.createBranch(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • repositoryName — (String)

      The name of the repository in which you want to create the new branch.

    • branchName — (String)

      The name of the new branch to create.

    • commitId — (String)

      The ID of the commit to point the new branch to.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createCommit(params = {}, callback) ⇒ AWS.Request

Creates a commit for a repository on the tip of a specified branch.

Service Reference:

Examples:

Calling the createCommit operation

var params = {
  branchName: 'STRING_VALUE', /* required */
  repositoryName: 'STRING_VALUE', /* required */
  authorName: 'STRING_VALUE',
  commitMessage: 'STRING_VALUE',
  deleteFiles: [
    {
      filePath: 'STRING_VALUE' /* required */
    },
    /* more items */
  ],
  email: 'STRING_VALUE',
  keepEmptyFolders: true || false,
  parentCommitId: 'STRING_VALUE',
  putFiles: [
    {
      filePath: 'STRING_VALUE', /* required */
      fileContent: new Buffer('...') || 'STRING_VALUE' /* Strings will be Base-64 encoded on your behalf */,
      fileMode: EXECUTABLE | NORMAL | SYMLINK,
      sourceFile: {
        filePath: 'STRING_VALUE', /* required */
        isMove: true || false
      }
    },
    /* more items */
  ],
  setFileModes: [
    {
      fileMode: EXECUTABLE | NORMAL | SYMLINK, /* required */
      filePath: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
codecommit.createCommit(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • repositoryName — (String)

      The name of the repository where you will create the commit.

    • branchName — (String)

      The name of the branch where you will create the commit.

    • parentCommitId — (String)

      The ID of the commit that is the parent of the commit you will create. If this is an empty repository, this is not required.

    • authorName — (String)

      The name of the author who created the commit. This information will be used as both the author and committer for the commit.

    • email — (String)

      The email address of the person who created the commit.

    • commitMessage — (String)

      The commit message you want to include as part of creating the commit. Commit messages are limited to 256 KB. If no message is specified, a default message will be used.

    • keepEmptyFolders — (Boolean)

      If the commit contains deletions, whether to keep a folder or folder structure if the changes leave the folders empty. If this is specified as true, a .gitkeep file will be created for empty folders.

    • putFiles — (Array<map>)

      The files to add or update in this commit.

      • filePathrequired — (String)

        The full path to the file in the repository, including the name of the file.

      • fileMode — (String)

        The extrapolated file mode permissions for the file. Valid values include EXECUTABLE and NORMAL.

        Possible values include:
        • "EXECUTABLE"
        • "NORMAL"
        • "SYMLINK"
      • fileContent — (Buffer, Typed Array, Blob, String)

        The content of the file, if a source file is not specified.

      • sourceFile — (map)

        The name and full path of the file that contains the changes you want to make as part of the commit, if you are not providing the file content directly.

        • filePathrequired — (String)

          The full path to the file, including the name of the file.

        • isMove — (Boolean)

          Whether to remove the source file from the parent commit.

    • deleteFiles — (Array<map>)

      The files to delete in this commit. These files will still exist in prior commits.

      • filePathrequired — (String)

        The full path of the file that will be deleted, including the name of the file.

    • setFileModes — (Array<map>)

      The file modes to update for files in this commit.

      • filePathrequired — (String)

        The full path to the file, including the name of the file.

      • fileModerequired — (String)

        The file mode for the file.

        Possible values include:
        • "EXECUTABLE"
        • "NORMAL"
        • "SYMLINK"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • commitId — (String)

        The full commit ID of the commit that contains your committed file changes.

      • treeId — (String)

        The full SHA-1 pointer of the tree information for the commit that contains the commited file changes.

      • filesAdded — (Array<map>)

        The files added as part of the committed file changes.

        • absolutePath — (String)

          The full path to the file that will be added or updated, including the name of the file.

        • blobId — (String)

          The blob ID that contains the file information.

        • fileMode — (String)

          The extrapolated file mode permissions for the file. Valid values include EXECUTABLE and NORMAL.

          Possible values include:
          • "EXECUTABLE"
          • "NORMAL"
          • "SYMLINK"
      • filesUpdated — (Array<map>)

        The files updated as part of the commited file changes.

        • absolutePath — (String)

          The full path to the file that will be added or updated, including the name of the file.

        • blobId — (String)

          The blob ID that contains the file information.

        • fileMode — (String)

          The extrapolated file mode permissions for the file. Valid values include EXECUTABLE and NORMAL.

          Possible values include:
          • "EXECUTABLE"
          • "NORMAL"
          • "SYMLINK"
      • filesDeleted — (Array<map>)

        The files deleted as part of the committed file changes.

        • absolutePath — (String)

          The full path to the file that will be added or updated, including the name of the file.

        • blobId — (String)

          The blob ID that contains the file information.

        • fileMode — (String)

          The extrapolated file mode permissions for the file. Valid values include EXECUTABLE and NORMAL.

          Possible values include:
          • "EXECUTABLE"
          • "NORMAL"
          • "SYMLINK"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createPullRequest(params = {}, callback) ⇒ AWS.Request

Creates a pull request in the specified repository.

Service Reference:

Examples:

Calling the createPullRequest operation

var params = {
  targets: [ /* required */
    {
      repositoryName: 'STRING_VALUE', /* required */
      sourceReference: 'STRING_VALUE', /* required */
      destinationReference: 'STRING_VALUE'
    },
    /* more items */
  ],
  title: 'STRING_VALUE', /* required */
  clientRequestToken: 'STRING_VALUE',
  description: 'STRING_VALUE'
};
codecommit.createPullRequest(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • title — (String)

      The title of the pull request. This title will be used to identify the pull request to other users in the repository.

    • description — (String)

      A description of the pull request.

    • targets — (Array<map>)

      The targets for the pull request, including the source of the code to be reviewed (the source branch), and the destination where the creator of the pull request intends the code to be merged after the pull request is closed (the destination branch).

      • repositoryNamerequired — (String)

        The name of the repository that contains the pull request.

      • sourceReferencerequired — (String)

        The branch of the repository that contains the changes for the pull request. Also known as the source branch.

      • destinationReference — (String)

        The branch of the repository where the pull request changes will be merged into. Also known as the destination branch.

    • clientRequestToken — (String)

      A unique, client-generated idempotency token that when provided in a request, ensures the request cannot be repeated with a changed parameter. If a request is received with the same parameters and a token is included, the request will return information about the initial request that used that token.

      Note: The AWS SDKs prepopulate client request tokens. If using an AWS SDK, you do not have to generate an idempotency token, as this will be done for you.
      If a token is not provided, the SDK will use a version 4 UUID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • pullRequest — (map)

        Information about the newly created pull request.

        • pullRequestId — (String)

          The system-generated ID of the pull request.

        • title — (String)

          The user-defined title of the pull request. This title is displayed in the list of pull requests to other users of the repository.

        • description — (String)

          The user-defined description of the pull request. This description can be used to clarify what should be reviewed and other details of the request.

        • lastActivityDate — (Date)

          The day and time of the last user or system activity on the pull request, in timestamp format.

        • creationDate — (Date)

          The date and time the pull request was originally created, in timestamp format.

        • pullRequestStatus — (String)

          The status of the pull request. Pull request status can only change from OPEN to CLOSED.

          Possible values include:
          • "OPEN"
          • "CLOSED"
        • authorArn — (String)

          The Amazon Resource Name (ARN) of the user who created the pull request.

        • pullRequestTargets — (Array<map>)

          The targets of the pull request, including the source branch and destination branch for the pull request.

          • repositoryName — (String)

            The name of the repository that contains the pull request source and destination branches.

          • sourceReference — (String)

            The branch of the repository that contains the changes for the pull request. Also known as the source branch.

          • destinationReference — (String)

            The branch of the repository where the pull request changes will be merged into. Also known as the destination branch.

          • destinationCommit — (String)

            The full commit ID that is the tip of the destination branch. This is the commit where the pull request was or will be merged.

          • sourceCommit — (String)

            The full commit ID of the tip of the source branch used to create the pull request. If the pull request branch is updated by a push while the pull request is open, the commit ID will change to reflect the new tip of the branch.

          • mergeBase — (String)

            The commit ID of the most recent commit that the source branch and the destination branch have in common.

          • mergeMetadata — (map)

            Returns metadata about the state of the merge, including whether the merge has been made.

            • isMerged — (Boolean)

              A Boolean value indicating whether the merge has been made.

            • mergedBy — (String)

              The Amazon Resource Name (ARN) of the user who merged the branches.

        • clientRequestToken — (String)

          A unique, client-generated idempotency token that when provided in a request, ensures the request cannot be repeated with a changed parameter. If a request is received with the same parameters and a token is included, the request will return information about the initial request that used that token.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createRepository(params = {}, callback) ⇒ AWS.Request

Creates a new, empty repository.

Service Reference:

Examples:

Calling the createRepository operation

var params = {
  repositoryName: 'STRING_VALUE', /* required */
  repositoryDescription: 'STRING_VALUE'
};
codecommit.createRepository(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • repositoryName — (String)

      The name of the new repository to be created.

      Note: The repository name must be unique across the calling AWS account. In addition, repository names are limited to 100 alphanumeric, dash, and underscore characters, and cannot include certain characters. For a full description of the limits on repository names, see Limits in the AWS CodeCommit User Guide. The suffix ".git" is prohibited.
    • repositoryDescription — (String)

      A comment or description about the new repository.

      Note: The description field for a repository accepts all HTML characters and all valid Unicode characters. Applications that do not HTML-encode the description and display it in a web page could expose users to potentially malicious code. Make sure that you HTML-encode the description field in any application that uses this API to display the repository description on a web page.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • repositoryMetadata — (map)

        Information about the newly created repository.

        • accountId — (String)

          The ID of the AWS account associated with the repository.

        • repositoryId — (String)

          The ID of the repository.

        • repositoryName — (String)

          The repository's name.

        • repositoryDescription — (String)

          A comment or description about the repository.

        • defaultBranch — (String)

          The repository's default branch name.

        • lastModifiedDate — (Date)

          The date and time the repository was last modified, in timestamp format.

        • creationDate — (Date)

          The date and time the repository was created, in timestamp format.

        • cloneUrlHttp — (String)

          The URL to use for cloning the repository over HTTPS.

        • cloneUrlSsh — (String)

          The URL to use for cloning the repository over SSH.

        • Arn — (String)

          The Amazon Resource Name (ARN) of the repository.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteBranch(params = {}, callback) ⇒ AWS.Request

Deletes a branch from a repository, unless that branch is the default branch for the repository.

Service Reference:

Examples:

Calling the deleteBranch operation

var params = {
  branchName: 'STRING_VALUE', /* required */
  repositoryName: 'STRING_VALUE' /* required */
};
codecommit.deleteBranch(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • repositoryName — (String)

      The name of the repository that contains the branch to be deleted.

    • branchName — (String)

      The name of the branch to delete.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • deletedBranch — (map)

        Information about the branch deleted by the operation, including the branch name and the commit ID that was the tip of the branch.

        • branchName — (String)

          The name of the branch.

        • commitId — (String)

          The ID of the last commit made to the branch.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteCommentContent(params = {}, callback) ⇒ AWS.Request

Deletes the content of a comment made on a change, file, or commit in a repository.

Service Reference:

Examples:

Calling the deleteCommentContent operation

var params = {
  commentId: 'STRING_VALUE' /* required */
};
codecommit.deleteCommentContent(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • comment — (map)

        Information about the comment you just deleted.

        • commentId — (String)

          The system-generated comment ID.

        • content — (String)

          The content of the comment.

        • inReplyTo — (String)

          The ID of the comment for which this comment is a reply, if any.

        • creationDate — (Date)

          The date and time the comment was created, in timestamp format.

        • lastModifiedDate — (Date)

          The date and time the comment was most recently modified, in timestamp format.

        • authorArn — (String)

          The Amazon Resource Name (ARN) of the person who posted the comment.

        • deleted — (Boolean)

          A Boolean value indicating whether the comment has been deleted.

        • clientRequestToken — (String)

          A unique, client-generated idempotency token that when provided in a request, ensures the request cannot be repeated with a changed parameter. If a request is received with the same parameters and a token is included, the request will return information about the initial request that used that token.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteFile(params = {}, callback) ⇒ AWS.Request

Deletes a specified file from a specified branch. A commit is created on the branch that contains the revision. The file will still exist in the commits prior to the commit that contains the deletion.

Service Reference:

Examples:

Calling the deleteFile operation

var params = {
  branchName: 'STRING_VALUE', /* required */
  filePath: 'STRING_VALUE', /* required */
  parentCommitId: 'STRING_VALUE', /* required */
  repositoryName: 'STRING_VALUE', /* required */
  commitMessage: 'STRING_VALUE',
  email: 'STRING_VALUE',
  keepEmptyFolders: true || false,
  name: 'STRING_VALUE'
};
codecommit.deleteFile(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • repositoryName — (String)

      The name of the repository that contains the file to delete.

    • branchName — (String)

      The name of the branch where the commit will be made deleting the file.

    • filePath — (String)

      The fully-qualified path to the file that will be deleted, including the full name and extension of that file. For example, /examples/file.md is a fully qualified path to a file named file.md in a folder named examples.

    • parentCommitId — (String)

      The ID of the commit that is the tip of the branch where you want to create the commit that will delete the file. This must be the HEAD commit for the branch. The commit that deletes the file will be created from this commit ID.

    • keepEmptyFolders — (Boolean)

      Specifies whether to delete the folder or directory that contains the file you want to delete if that file is the only object in the folder or directory. By default, empty folders will be deleted. This includes empty folders that are part of the directory structure. For example, if the path to a file is dir1/dir2/dir3/dir4, and dir2 and dir3 are empty, deleting the last file in dir4 will also delete the empty folders dir4, dir3, and dir2.

    • commitMessage — (String)

      The commit message you want to include as part of deleting the file. Commit messages are limited to 256 KB. If no message is specified, a default message will be used.

    • name — (String)

      The name of the author of the commit that deletes the file. If no name is specified, the user's ARN will be used as the author name and committer name.

    • email — (String)

      The email address for the commit that deletes the file. If no email address is specified, the email address will be left blank.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • commitId — (String)

        The full commit ID of the commit that contains the change that deletes the file.

      • blobId — (String)

        The blob ID removed from the tree as part of deleting the file.

      • treeId — (String)

        The full SHA-1 pointer of the tree information for the commit that contains the delete file change.

      • filePath — (String)

        The fully-qualified path to the file that will be deleted, including the full name and extension of that file.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteRepository(params = {}, callback) ⇒ AWS.Request

Deletes a repository. If a specified repository was already deleted, a null repository ID will be returned.

Deleting a repository also deletes all associated objects and metadata. After a repository is deleted, all future push calls to the deleted repository will fail.

Service Reference:

Examples:

Calling the deleteRepository operation

var params = {
  repositoryName: 'STRING_VALUE' /* required */
};
codecommit.deleteRepository(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • repositoryName — (String)

      The name of the repository to delete.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • repositoryId — (String)

        The ID of the repository that was deleted.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describePullRequestEvents(params = {}, callback) ⇒ AWS.Request

Returns information about one or more pull request events.

Service Reference:

Examples:

Calling the describePullRequestEvents operation

var params = {
  pullRequestId: 'STRING_VALUE', /* required */
  actorArn: 'STRING_VALUE',
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  pullRequestEventType: PULL_REQUEST_CREATED | PULL_REQUEST_STATUS_CHANGED | PULL_REQUEST_SOURCE_REFERENCE_UPDATED | PULL_REQUEST_MERGE_STATE_CHANGED
};
codecommit.describePullRequestEvents(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • pullRequestId — (String)

      The system-generated ID of the pull request. To get this ID, use ListPullRequests.

    • pullRequestEventType — (String)

      Optional. The pull request event type about which you want to return information.

      Possible values include:
      • "PULL_REQUEST_CREATED"
      • "PULL_REQUEST_STATUS_CHANGED"
      • "PULL_REQUEST_SOURCE_REFERENCE_UPDATED"
      • "PULL_REQUEST_MERGE_STATE_CHANGED"
    • actorArn — (String)

      The Amazon Resource Name (ARN) of the user whose actions resulted in the event. Examples include updating the pull request with additional commits or changing the status of a pull request.

    • nextToken — (String)

      An enumeration token that when provided in a request, returns the next batch of the results.

    • maxResults — (Integer)

      A non-negative integer used to limit the number of returned results. The default is 100 events, which is also the maximum number of events that can be returned in a result.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • pullRequestEvents — (Array<map>)

        Information about the pull request events.

        • pullRequestId — (String)

          The system-generated ID of the pull request.

        • eventDate — (Date)

          The day and time of the pull request event, in timestamp format.

        • pullRequestEventType — (String)

          The type of the pull request event, for example a status change event (PULL_REQUEST_STATUS_CHANGED) or update event (PULL_REQUEST_SOURCE_REFERENCE_UPDATED).

          Possible values include:
          • "PULL_REQUEST_CREATED"
          • "PULL_REQUEST_STATUS_CHANGED"
          • "PULL_REQUEST_SOURCE_REFERENCE_UPDATED"
          • "PULL_REQUEST_MERGE_STATE_CHANGED"
        • actorArn — (String)

          The Amazon Resource Name (ARN) of the user whose actions resulted in the event. Examples include updating the pull request with additional commits or changing the status of a pull request.

        • pullRequestCreatedEventMetadata — (map)

          Information about the source and destination branches for the pull request.

          • repositoryName — (String)

            The name of the repository where the pull request was created.

          • sourceCommitId — (String)

            The commit ID on the source branch used when the pull request was created.

          • destinationCommitId — (String)

            The commit ID of the tip of the branch specified as the destination branch when the pull request was created.

          • mergeBase — (String)

            The commit ID of the most recent commit that the source branch and the destination branch have in common.

        • pullRequestStatusChangedEventMetadata — (map)

          Information about the change in status for the pull request event.

          • pullRequestStatus — (String)

            The changed status of the pull request.

            Possible values include:
            • "OPEN"
            • "CLOSED"
        • pullRequestSourceReferenceUpdatedEventMetadata — (map)

          Information about the updated source branch for the pull request event.

          • repositoryName — (String)

            The name of the repository where the pull request was updated.

          • beforeCommitId — (String)

            The full commit ID of the commit in the destination branch that was the tip of the branch at the time the pull request was updated.

          • afterCommitId — (String)

            The full commit ID of the commit in the source branch that was the tip of the branch at the time the pull request was updated.

          • mergeBase — (String)

            The commit ID of the most recent commit that the source branch and the destination branch have in common.

        • pullRequestMergedStateChangedEventMetadata — (map)

          Information about the change in mergability state for the pull request event.

          • repositoryName — (String)

            The name of the repository where the pull request was created.

          • destinationReference — (String)

            The name of the branch that the pull request will be merged into.

          • mergeMetadata — (map)

            Information about the merge state change event.

            • isMerged — (Boolean)

              A Boolean value indicating whether the merge has been made.

            • mergedBy — (String)

              The Amazon Resource Name (ARN) of the user who merged the branches.

      • nextToken — (String)

        An enumeration token that can be used in a request to return the next batch of the results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getBlob(params = {}, callback) ⇒ AWS.Request

Returns the base-64 encoded content of an individual blob within a repository.

Service Reference:

Examples:

Calling the getBlob operation

var params = {
  blobId: 'STRING_VALUE', /* required */
  repositoryName: 'STRING_VALUE' /* required */
};
codecommit.getBlob(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • repositoryName — (String)

      The name of the repository that contains the blob.

    • blobId — (String)

      The ID of the blob, which is its SHA-1 pointer.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • content — (Buffer(Node.js), Typed Array(Browser))

        The content of the blob, usually a file.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getBranch(params = {}, callback) ⇒ AWS.Request

Returns information about a repository branch, including its name and the last commit ID.

Service Reference:

Examples:

Calling the getBranch operation

var params = {
  branchName: 'STRING_VALUE',
  repositoryName: 'STRING_VALUE'
};
codecommit.getBranch(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • repositoryName — (String)

      The name of the repository that contains the branch for which you want to retrieve information.

    • branchName — (String)

      The name of the branch for which you want to retrieve information.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • branch — (map)

        The name of the branch.

        • branchName — (String)

          The name of the branch.

        • commitId — (String)

          The ID of the last commit made to the branch.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getComment(params = {}, callback) ⇒ AWS.Request

Returns the content of a comment made on a change, file, or commit in a repository.

Service Reference:

Examples:

Calling the getComment operation

var params = {
  commentId: 'STRING_VALUE' /* required */
};
codecommit.getComment(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • comment — (map)

        The contents of the comment.

        • commentId — (String)

          The system-generated comment ID.

        • content — (String)

          The content of the comment.

        • inReplyTo — (String)

          The ID of the comment for which this comment is a reply, if any.

        • creationDate — (Date)

          The date and time the comment was created, in timestamp format.

        • lastModifiedDate — (Date)

          The date and time the comment was most recently modified, in timestamp format.

        • authorArn — (String)

          The Amazon Resource Name (ARN) of the person who posted the comment.

        • deleted — (Boolean)

          A Boolean value indicating whether the comment has been deleted.

        • clientRequestToken — (String)

          A unique, client-generated idempotency token that when provided in a request, ensures the request cannot be repeated with a changed parameter. If a request is received with the same parameters and a token is included, the request will return information about the initial request that used that token.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getCommentsForComparedCommit(params = {}, callback) ⇒ AWS.Request

Returns information about comments made on the comparison between two commits.

Service Reference:

Examples:

Calling the getCommentsForComparedCommit operation

var params = {
  afterCommitId: 'STRING_VALUE', /* required */
  repositoryName: 'STRING_VALUE', /* required */
  beforeCommitId: 'STRING_VALUE',
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
codecommit.getCommentsForComparedCommit(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • repositoryName — (String)

      The name of the repository where you want to compare commits.

    • beforeCommitId — (String)

      To establish the directionality of the comparison, the full commit ID of the 'before' commit.

    • afterCommitId — (String)

      To establish the directionality of the comparison, the full commit ID of the 'after' commit.

    • nextToken — (String)

      An enumeration token that when provided in a request, returns the next batch of the results.

    • maxResults — (Integer)

      A non-negative integer used to limit the number of returned results. The default is 100 comments, and is configurable up to 500.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • commentsForComparedCommitData — (Array<map>)

        A list of comment objects on the compared commit.

        • repositoryName — (String)

          The name of the repository that contains the compared commits.

        • beforeCommitId — (String)

          The full commit ID of the commit used to establish the 'before' of the comparison.

        • afterCommitId — (String)

          The full commit ID of the commit used to establish the 'after' of the comparison.

        • beforeBlobId — (String)

          The full blob ID of the commit used to establish the 'before' of the comparison.

        • afterBlobId — (String)

          The full blob ID of the commit used to establish the 'after' of the comparison.

        • location — (map)

          Location information about the comment on the comparison, including the file name, line number, and whether the version of the file where the comment was made is 'BEFORE' or 'AFTER'.

          • filePath — (String)

            The name of the file being compared, including its extension and subdirectory, if any.

          • filePosition — (Integer)

            The position of a change within a compared file, in line number format.

          • relativeFileVersion — (String)

            In a comparison of commits or a pull request, whether the change is in the 'before' or 'after' of that comparison.

            Possible values include:
            • "BEFORE"
            • "AFTER"
        • comments — (Array<map>)

          An array of comment objects. Each comment object contains information about a comment on the comparison between commits.

          • commentId — (String)

            The system-generated comment ID.

          • content — (String)

            The content of the comment.

          • inReplyTo — (String)

            The ID of the comment for which this comment is a reply, if any.

          • creationDate — (Date)

            The date and time the comment was created, in timestamp format.

          • lastModifiedDate — (Date)

            The date and time the comment was most recently modified, in timestamp format.

          • authorArn — (String)

            The Amazon Resource Name (ARN) of the person who posted the comment.

          • deleted — (Boolean)

            A Boolean value indicating whether the comment has been deleted.

          • clientRequestToken — (String)

            A unique, client-generated idempotency token that when provided in a request, ensures the request cannot be repeated with a changed parameter. If a request is received with the same parameters and a token is included, the request will return information about the initial request that used that token.

      • nextToken — (String)

        An enumeration token that can be used in a request to return the next batch of the results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getCommentsForPullRequest(params = {}, callback) ⇒ AWS.Request

Returns comments made on a pull request.

Service Reference:

Examples:

Calling the getCommentsForPullRequest operation

var params = {
  pullRequestId: 'STRING_VALUE', /* required */
  afterCommitId: 'STRING_VALUE',
  beforeCommitId: 'STRING_VALUE',
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  repositoryName: 'STRING_VALUE'
};
codecommit.getCommentsForPullRequest(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • pullRequestId — (String)

      The system-generated ID of the pull request. To get this ID, use ListPullRequests.

    • repositoryName — (String)

      The name of the repository that contains the pull request.

    • beforeCommitId — (String)

      The full commit ID of the commit in the destination branch that was the tip of the branch at the time the pull request was created.

    • afterCommitId — (String)

      The full commit ID of the commit in the source branch that was the tip of the branch at the time the comment was made.

    • nextToken — (String)

      An enumeration token that when provided in a request, returns the next batch of the results.

    • maxResults — (Integer)

      A non-negative integer used to limit the number of returned results. The default is 100 comments. You can return up to 500 comments with a single request.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • commentsForPullRequestData — (Array<map>)

        An array of comment objects on the pull request.

        • pullRequestId — (String)

          The system-generated ID of the pull request.

        • repositoryName — (String)

          The name of the repository that contains the pull request.

        • beforeCommitId — (String)

          The full commit ID of the commit that was the tip of the destination branch when the pull request was created. This commit will be superceded by the after commit in the source branch when and if you merge the source branch into the destination branch.

        • afterCommitId — (String)

          he full commit ID of the commit that was the tip of the source branch at the time the comment was made.

        • beforeBlobId — (String)

          The full blob ID of the file on which you want to comment on the destination commit.

        • afterBlobId — (String)

          The full blob ID of the file on which you want to comment on the source commit.

        • location — (map)

          Location information about the comment on the pull request, including the file name, line number, and whether the version of the file where the comment was made is 'BEFORE' (destination branch) or 'AFTER' (source branch).

          • filePath — (String)

            The name of the file being compared, including its extension and subdirectory, if any.

          • filePosition — (Integer)

            The position of a change within a compared file, in line number format.

          • relativeFileVersion — (String)

            In a comparison of commits or a pull request, whether the change is in the 'before' or 'after' of that comparison.

            Possible values include:
            • "BEFORE"
            • "AFTER"
        • comments — (Array<map>)

          An array of comment objects. Each comment object contains information about a comment on the pull request.

          • commentId — (String)

            The system-generated comment ID.

          • content — (String)

            The content of the comment.

          • inReplyTo — (String)

            The ID of the comment for which this comment is a reply, if any.

          • creationDate — (Date)

            The date and time the comment was created, in timestamp format.

          • lastModifiedDate — (Date)

            The date and time the comment was most recently modified, in timestamp format.

          • authorArn — (String)

            The Amazon Resource Name (ARN) of the person who posted the comment.

          • deleted — (Boolean)

            A Boolean value indicating whether the comment has been deleted.

          • clientRequestToken — (String)

            A unique, client-generated idempotency token that when provided in a request, ensures the request cannot be repeated with a changed parameter. If a request is received with the same parameters and a token is included, the request will return information about the initial request that used that token.

      • nextToken — (String)

        An enumeration token that can be used in a request to return the next batch of the results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getCommit(params = {}, callback) ⇒ AWS.Request

Returns information about a commit, including commit message and committer information.

Service Reference:

Examples:

Calling the getCommit operation

var params = {
  commitId: 'STRING_VALUE', /* required */
  repositoryName: 'STRING_VALUE' /* required */
};
codecommit.getCommit(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • repositoryName — (String)

      The name of the repository to which the commit was made.

    • commitId — (String)

      The commit ID. Commit IDs are the full SHA of the commit.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • commit — (map)

        A commit data type object that contains information about the specified commit.

        • commitId — (String)

          The full SHA of the specified commit.

        • treeId — (String)

          Tree information for the specified commit.

        • parents — (Array<String>)

          A list of parent commits for the specified commit. Each parent commit ID is the full commit ID.

        • message — (String)

          The commit message associated with the specified commit.

        • author — (map)

          Information about the author of the specified commit. Information includes the date in timestamp format with GMT offset, the name of the author, and the email address for the author, as configured in Git.

          • name — (String)

            The name of the user who made the specified commit.

          • email — (String)

            The email address associated with the user who made the commit, if any.

          • date — (String)

            The date when the specified commit was commited, in timestamp format with GMT offset.

        • committer — (map)

          Information about the person who committed the specified commit, also known as the committer. Information includes the date in timestamp format with GMT offset, the name of the committer, and the email address for the committer, as configured in Git.

          For more information about the difference between an author and a committer in Git, see Viewing the Commit History in Pro Git by Scott Chacon and Ben Straub.

          • name — (String)

            The name of the user who made the specified commit.

          • email — (String)

            The email address associated with the user who made the commit, if any.

          • date — (String)

            The date when the specified commit was commited, in timestamp format with GMT offset.

        • additionalData — (String)

          Any additional data associated with the specified commit.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getDifferences(params = {}, callback) ⇒ AWS.Request

Returns information about the differences in a valid commit specifier (such as a branch, tag, HEAD, commit ID or other fully qualified reference). Results can be limited to a specified path.

Service Reference:

Examples:

Calling the getDifferences operation

var params = {
  afterCommitSpecifier: 'STRING_VALUE', /* required */
  repositoryName: 'STRING_VALUE', /* required */
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  afterPath: 'STRING_VALUE',
  beforeCommitSpecifier: 'STRING_VALUE',
  beforePath: 'STRING_VALUE'
};
codecommit.getDifferences(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • repositoryName — (String)

      The name of the repository where you want to get differences.

    • beforeCommitSpecifier — (String)

      The branch, tag, HEAD, or other fully qualified reference used to identify a commit. For example, the full commit ID. Optional. If not specified, all changes prior to the afterCommitSpecifier value will be shown. If you do not use beforeCommitSpecifier in your request, consider limiting the results with maxResults.

    • afterCommitSpecifier — (String)

      The branch, tag, HEAD, or other fully qualified reference used to identify a commit.

    • beforePath — (String)

      The file path in which to check for differences. Limits the results to this path. Can also be used to specify the previous name of a directory or folder. If beforePath and afterPath are not specified, differences will be shown for all paths.

    • afterPath — (String)

      The file path in which to check differences. Limits the results to this path. Can also be used to specify the changed name of a directory or folder, if it has changed. If not specified, differences will be shown for all paths.

    • MaxResults — (Integer)

      A non-negative integer used to limit the number of returned results.

    • NextToken — (String)

      An enumeration token that when provided in a request, returns the next batch of the results.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • differences — (Array<map>)

        A differences data type object that contains information about the differences, including whether the difference is added, modified, or deleted (A, D, M).

        • beforeBlob — (map)

          Information about a beforeBlob data type object, including the ID, the file mode permission code, and the path.

          • blobId — (String)

            The full ID of the blob.

          • path — (String)

            The path to the blob and any associated file name, if any.

          • mode — (String)

            The file mode permissions of the blob. File mode permission codes include:

            • 100644 indicates read/write

            • 100755 indicates read/write/execute

            • 160000 indicates a submodule

            • 120000 indicates a symlink

        • afterBlob — (map)

          Information about an afterBlob data type object, including the ID, the file mode permission code, and the path.

          • blobId — (String)

            The full ID of the blob.

          • path — (String)

            The path to the blob and any associated file name, if any.

          • mode — (String)

            The file mode permissions of the blob. File mode permission codes include:

            • 100644 indicates read/write

            • 100755 indicates read/write/execute

            • 160000 indicates a submodule

            • 120000 indicates a symlink

        • changeType — (String)

          Whether the change type of the difference is an addition (A), deletion (D), or modification (M).

          Possible values include:
          • "A"
          • "M"
          • "D"
      • NextToken — (String)

        An enumeration token that can be used in a request to return the next batch of the results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getFile(params = {}, callback) ⇒ AWS.Request

Returns the base-64 encoded contents of a specified file and its metadata.

Service Reference:

Examples:

Calling the getFile operation

var params = {
  filePath: 'STRING_VALUE', /* required */
  repositoryName: 'STRING_VALUE', /* required */
  commitSpecifier: 'STRING_VALUE'
};
codecommit.getFile(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • repositoryName — (String)

      The name of the repository that contains the file.

    • commitSpecifier — (String)

      The fully-quaified reference that identifies the commit that contains the file. For example, you could specify a full commit ID, a tag, a branch name, or a reference such as refs/heads/master. If none is provided, then the head commit will be used.

    • filePath — (String)

      The fully-qualified path to the file, including the full name and extension of the file. For example, /examples/file.md is the fully-qualified path to a file named file.md in a folder named examples.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • commitId — (String)

        The full commit ID of the commit that contains the content returned by GetFile.

      • blobId — (String)

        The blob ID of the object that represents the file content.

      • filePath — (String)

        The fully qualified path to the specified file. This returns the name and extension of the file.

      • fileMode — (String)

        The extrapolated file mode permissions of the blob. Valid values include strings such as EXECUTABLE and not numeric values.

        Note: The file mode permissions returned by this API are not the standard file mode permission values, such as 100644, but rather extrapolated values. See below for a full list of supported return values.
        Possible values include:
        • "EXECUTABLE"
        • "NORMAL"
        • "SYMLINK"
      • fileSize — (Integer)

        The size of the contents of the file, in bytes.

      • fileContent — (Buffer(Node.js), Typed Array(Browser))

        The base-64 encoded binary data object that represents the content of the file.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getFolder(params = {}, callback) ⇒ AWS.Request

Returns the contents of a specified folder in a repository.

Service Reference:

Examples:

Calling the getFolder operation

var params = {
  folderPath: 'STRING_VALUE', /* required */
  repositoryName: 'STRING_VALUE', /* required */
  commitSpecifier: 'STRING_VALUE'
};
codecommit.getFolder(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • repositoryName — (String)

      The name of the repository.

    • commitSpecifier — (String)

      A fully-qualified reference used to identify a commit that contains the version of the folder's content to return. A fully-qualified reference can be a commit ID, branch name, tag, or reference such as HEAD. If no specifier is provided, the folder content will be returned as it exists in the HEAD commit.

    • folderPath — (String)

      The fully-qualified path to the folder whose contents will be returned, including the folder name. For example, /examples is a fully-qualified path to a folder named examples that was created off of the root directory (/) of a repository.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • commitId — (String)

        The full commit ID used as a reference for which version of the folder content is returned.

      • folderPath — (String)

        The fully-qualified path of the folder whose contents are returned.

      • treeId — (String)

        The full SHA-1 pointer of the tree information for the commit that contains the folder.

      • subFolders — (Array<map>)

        The list of folders that exist beneath the specified folder, if any.

        • treeId — (String)

          The full SHA-1 pointer of the tree information for the commit that contains the folder.

        • absolutePath — (String)

          The fully-qualified path of the folder in the repository.

        • relativePath — (String)

          The relative path of the specified folder from the folder where the query originated.

      • files — (Array<map>)

        The list of files that exist in the specified folder, if any.

        • blobId — (String)

          The blob ID that contains the file information.

        • absolutePath — (String)

          The fully-qualified path to the file in the repository.

        • relativePath — (String)

          The relative path of the file from the folder where the query originated.

        • fileMode — (String)

          The extrapolated file mode permissions for the file. Valid values include EXECUTABLE and NORMAL.

          Possible values include:
          • "EXECUTABLE"
          • "NORMAL"
          • "SYMLINK"
      • symbolicLinks — (Array<map>)

        The list of symbolic links to other files and folders that exist in the specified folder, if any.

        • blobId — (String)

          The blob ID that contains the information about the symbolic link.

        • absolutePath — (String)

          The fully-qualified path to the folder that contains the symbolic link.

        • relativePath — (String)

          The relative path of the symbolic link from the folder where the query originated.

        • fileMode — (String)

          The file mode permissions of the blob that cotains information about the symbolic link.

          Possible values include:
          • "EXECUTABLE"
          • "NORMAL"
          • "SYMLINK"
      • subModules — (Array<map>)

        The list of submodules that exist in the specified folder, if any.

        • commitId — (String)

          The commit ID that contains the reference to the submodule.

        • absolutePath — (String)

          The fully qualified path to the folder that contains the reference to the submodule.

        • relativePath — (String)

          The relative path of the submodule from the folder where the query originated.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getMergeConflicts(params = {}, callback) ⇒ AWS.Request

Returns information about merge conflicts between the before and after commit IDs for a pull request in a repository.

Service Reference:

Examples:

Calling the getMergeConflicts operation

var params = {
  destinationCommitSpecifier: 'STRING_VALUE', /* required */
  mergeOption: FAST_FORWARD_MERGE, /* required */
  repositoryName: 'STRING_VALUE', /* required */
  sourceCommitSpecifier: 'STRING_VALUE' /* required */
};
codecommit.getMergeConflicts(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • repositoryName — (String)

      The name of the repository where the pull request was created.

    • destinationCommitSpecifier — (String)

      The branch, tag, HEAD, or other fully qualified reference used to identify a commit. For example, a branch name or a full commit ID.

    • sourceCommitSpecifier — (String)

      The branch, tag, HEAD, or other fully qualified reference used to identify a commit. For example, a branch name or a full commit ID.

    • mergeOption — (String)

      The merge option or strategy you want to use to merge the code. The only valid value is FAST_FORWARD_MERGE.

      Possible values include:
      • "FAST_FORWARD_MERGE"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • mergeable — (Boolean)

        A Boolean value that indicates whether the code is mergable by the specified merge option.

      • destinationCommitId — (String)

        The commit ID of the destination commit specifier that was used in the merge evaluation.

      • sourceCommitId — (String)

        The commit ID of the source commit specifier that was used in the merge evaluation.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getPullRequest(params = {}, callback) ⇒ AWS.Request

Gets information about a pull request in a specified repository.

Service Reference:

Examples:

Calling the getPullRequest operation

var params = {
  pullRequestId: 'STRING_VALUE' /* required */
};
codecommit.getPullRequest(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • pullRequestId — (String)

      The system-generated ID of the pull request. To get this ID, use ListPullRequests.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • pullRequest — (map)

        Information about the specified pull request.

        • pullRequestId — (String)

          The system-generated ID of the pull request.

        • title — (String)

          The user-defined title of the pull request. This title is displayed in the list of pull requests to other users of the repository.

        • description — (String)

          The user-defined description of the pull request. This description can be used to clarify what should be reviewed and other details of the request.

        • lastActivityDate — (Date)

          The day and time of the last user or system activity on the pull request, in timestamp format.

        • creationDate — (Date)

          The date and time the pull request was originally created, in timestamp format.

        • pullRequestStatus — (String)

          The status of the pull request. Pull request status can only change from OPEN to CLOSED.

          Possible values include:
          • "OPEN"
          • "CLOSED"
        • authorArn — (String)

          The Amazon Resource Name (ARN) of the user who created the pull request.

        • pullRequestTargets — (Array<map>)

          The targets of the pull request, including the source branch and destination branch for the pull request.

          • repositoryName — (String)

            The name of the repository that contains the pull request source and destination branches.

          • sourceReference — (String)

            The branch of the repository that contains the changes for the pull request. Also known as the source branch.

          • destinationReference — (String)

            The branch of the repository where the pull request changes will be merged into. Also known as the destination branch.

          • destinationCommit — (String)

            The full commit ID that is the tip of the destination branch. This is the commit where the pull request was or will be merged.

          • sourceCommit — (String)

            The full commit ID of the tip of the source branch used to create the pull request. If the pull request branch is updated by a push while the pull request is open, the commit ID will change to reflect the new tip of the branch.

          • mergeBase — (String)

            The commit ID of the most recent commit that the source branch and the destination branch have in common.

          • mergeMetadata — (map)

            Returns metadata about the state of the merge, including whether the merge has been made.

            • isMerged — (Boolean)

              A Boolean value indicating whether the merge has been made.

            • mergedBy — (String)

              The Amazon Resource Name (ARN) of the user who merged the branches.

        • clientRequestToken — (String)

          A unique, client-generated idempotency token that when provided in a request, ensures the request cannot be repeated with a changed parameter. If a request is received with the same parameters and a token is included, the request will return information about the initial request that used that token.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getRepository(params = {}, callback) ⇒ AWS.Request

Returns information about a repository.

Note: The description field for a repository accepts all HTML characters and all valid Unicode characters. Applications that do not HTML-encode the description and display it in a web page could expose users to potentially malicious code. Make sure that you HTML-encode the description field in any application that uses this API to display the repository description on a web page.

Service Reference:

Examples:

Calling the getRepository operation

var params = {
  repositoryName: 'STRING_VALUE' /* required */
};
codecommit.getRepository(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • repositoryName — (String)

      The name of the repository to get information about.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • repositoryMetadata — (map)

        Information about the repository.

        • accountId — (String)

          The ID of the AWS account associated with the repository.

        • repositoryId — (String)

          The ID of the repository.

        • repositoryName — (String)

          The repository's name.

        • repositoryDescription — (String)

          A comment or description about the repository.

        • defaultBranch — (String)

          The repository's default branch name.

        • lastModifiedDate — (Date)

          The date and time the repository was last modified, in timestamp format.

        • creationDate — (Date)

          The date and time the repository was created, in timestamp format.

        • cloneUrlHttp — (String)

          The URL to use for cloning the repository over HTTPS.

        • cloneUrlSsh — (String)

          The URL to use for cloning the repository over SSH.

        • Arn — (String)

          The Amazon Resource Name (ARN) of the repository.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getRepositoryTriggers(params = {}, callback) ⇒ AWS.Request

Gets information about triggers configured for a repository.

Service Reference:

Examples:

Calling the getRepositoryTriggers operation

var params = {
  repositoryName: 'STRING_VALUE' /* required */
};
codecommit.getRepositoryTriggers(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • repositoryName — (String)

      The name of the repository for which the trigger is configured.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • configurationId — (String)

        The system-generated unique ID for the trigger.

      • triggers — (Array<map>)

        The JSON block of configuration information for each trigger.

        • namerequired — (String)

          The name of the trigger.

        • destinationArnrequired — (String)

          The ARN of the resource that is the target for a trigger. For example, the ARN of a topic in Amazon Simple Notification Service (SNS).

        • customData — (String)

          Any custom data associated with the trigger that will be included in the information sent to the target of the trigger.

        • branches — (Array<String>)

          The branches that will be included in the trigger configuration. If you specify an empty array, the trigger will apply to all branches.

          Note: While no content is required in the array, you must include the array itself.
        • eventsrequired — (Array<String>)

          The repository events that will cause the trigger to run actions in another service, such as sending a notification through Amazon Simple Notification Service (SNS).

          Note: The valid value "all" cannot be used with any other values.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listBranches(params = {}, callback) ⇒ AWS.Request

Gets information about one or more branches in a repository.

Service Reference:

Examples:

Calling the listBranches operation

var params = {
  repositoryName: 'STRING_VALUE', /* required */
  nextToken: 'STRING_VALUE'
};
codecommit.listBranches(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • repositoryName — (String)

      The name of the repository that contains the branches.

    • nextToken — (String)

      An enumeration token that allows the operation to batch the results.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • branches — (Array<String>)

        The list of branch names.

      • nextToken — (String)

        An enumeration token that returns the batch of the results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listPullRequests(params = {}, callback) ⇒ AWS.Request

Returns a list of pull requests for a specified repository. The return list can be refined by pull request status or pull request author ARN.

Service Reference:

Examples:

Calling the listPullRequests operation

var params = {
  repositoryName: 'STRING_VALUE', /* required */
  authorArn: 'STRING_VALUE',
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  pullRequestStatus: OPEN | CLOSED
};
codecommit.listPullRequests(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • repositoryName — (String)

      The name of the repository for which you want to list pull requests.

    • authorArn — (String)

      Optional. The Amazon Resource Name (ARN) of the user who created the pull request. If used, this filters the results to pull requests created by that user.

    • pullRequestStatus — (String)

      Optional. The status of the pull request. If used, this refines the results to the pull requests that match the specified status.

      Possible values include:
      • "OPEN"
      • "CLOSED"
    • nextToken — (String)

      An enumeration token that when provided in a request, returns the next batch of the results.

    • maxResults — (Integer)

      A non-negative integer used to limit the number of returned results.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • pullRequestIds — (Array<String>)

        The system-generated IDs of the pull requests.

      • nextToken — (String)

        An enumeration token that when provided in a request, returns the next batch of the results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listRepositories(params = {}, callback) ⇒ AWS.Request

Gets information about one or more repositories.

Service Reference:

Examples:

Calling the listRepositories operation

var params = {
  nextToken: 'STRING_VALUE',
  order: ascending | descending,
  sortBy: repositoryName | lastModifiedDate
};
codecommit.listRepositories(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • nextToken — (String)

      An enumeration token that allows the operation to batch the results of the operation. Batch sizes are 1,000 for list repository operations. When the client sends the token back to AWS CodeCommit, another page of 1,000 records is retrieved.

    • sortBy — (String)

      The criteria used to sort the results of a list repositories operation.

      Possible values include:
      • "repositoryName"
      • "lastModifiedDate"
    • order — (String)

      The order in which to sort the results of a list repositories operation.

      Possible values include:
      • "ascending"
      • "descending"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • repositories — (Array<map>)

        Lists the repositories called by the list repositories operation.

        • repositoryName — (String)

          The name associated with the repository.

        • repositoryId — (String)

          The ID associated with the repository.

      • nextToken — (String)

        An enumeration token that allows the operation to batch the results of the operation. Batch sizes are 1,000 for list repository operations. When the client sends the token back to AWS CodeCommit, another page of 1,000 records is retrieved.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

mergePullRequestByFastForward(params = {}, callback) ⇒ AWS.Request

Closes a pull request and attempts to merge the source commit of a pull request into the specified destination branch for that pull request at the specified commit using the fast-forward merge option.

Service Reference:

Examples:

Calling the mergePullRequestByFastForward operation

var params = {
  pullRequestId: 'STRING_VALUE', /* required */
  repositoryName: 'STRING_VALUE', /* required */
  sourceCommitId: 'STRING_VALUE'
};
codecommit.mergePullRequestByFastForward(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • pullRequestId — (String)

      The system-generated ID of the pull request. To get this ID, use ListPullRequests.

    • repositoryName — (String)

      The name of the repository where the pull request was created.

    • sourceCommitId — (String)

      The full commit ID of the original or updated commit in the pull request source branch. Pass this value if you want an exception thrown if the current commit ID of the tip of the source branch does not match this commit ID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • pullRequest — (map)

        Information about the specified pull request, including information about the merge.

        • pullRequestId — (String)

          The system-generated ID of the pull request.

        • title — (String)

          The user-defined title of the pull request. This title is displayed in the list of pull requests to other users of the repository.

        • description — (String)

          The user-defined description of the pull request. This description can be used to clarify what should be reviewed and other details of the request.

        • lastActivityDate — (Date)

          The day and time of the last user or system activity on the pull request, in timestamp format.

        • creationDate — (Date)

          The date and time the pull request was originally created, in timestamp format.

        • pullRequestStatus — (String)

          The status of the pull request. Pull request status can only change from OPEN to CLOSED.

          Possible values include:
          • "OPEN"
          • "CLOSED"
        • authorArn — (String)

          The Amazon Resource Name (ARN) of the user who created the pull request.

        • pullRequestTargets — (Array<map>)

          The targets of the pull request, including the source branch and destination branch for the pull request.

          • repositoryName — (String)

            The name of the repository that contains the pull request source and destination branches.

          • sourceReference — (String)

            The branch of the repository that contains the changes for the pull request. Also known as the source branch.

          • destinationReference — (String)

            The branch of the repository where the pull request changes will be merged into. Also known as the destination branch.

          • destinationCommit — (String)

            The full commit ID that is the tip of the destination branch. This is the commit where the pull request was or will be merged.

          • sourceCommit — (String)

            The full commit ID of the tip of the source branch used to create the pull request. If the pull request branch is updated by a push while the pull request is open, the commit ID will change to reflect the new tip of the branch.

          • mergeBase — (String)

            The commit ID of the most recent commit that the source branch and the destination branch have in common.

          • mergeMetadata — (map)

            Returns metadata about the state of the merge, including whether the merge has been made.

            • isMerged — (Boolean)

              A Boolean value indicating whether the merge has been made.

            • mergedBy — (String)

              The Amazon Resource Name (ARN) of the user who merged the branches.

        • clientRequestToken — (String)

          A unique, client-generated idempotency token that when provided in a request, ensures the request cannot be repeated with a changed parameter. If a request is received with the same parameters and a token is included, the request will return information about the initial request that used that token.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

postCommentForComparedCommit(params = {}, callback) ⇒ AWS.Request

Posts a comment on the comparison between two commits.

Service Reference:

Examples:

Calling the postCommentForComparedCommit operation

var params = {
  afterCommitId: 'STRING_VALUE', /* required */
  content: 'STRING_VALUE', /* required */
  repositoryName: 'STRING_VALUE', /* required */
  beforeCommitId: 'STRING_VALUE',
  clientRequestToken: 'STRING_VALUE',
  location: {
    filePath: 'STRING_VALUE',
    filePosition: 'NUMBER_VALUE',
    relativeFileVersion: BEFORE | AFTER
  }
};
codecommit.postCommentForComparedCommit(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • repositoryName — (String)

      The name of the repository where you want to post a comment on the comparison between commits.

    • beforeCommitId — (String)

      To establish the directionality of the comparison, the full commit ID of the 'before' commit.

    • afterCommitId — (String)

      To establish the directionality of the comparison, the full commit ID of the 'after' commit.

    • location — (map)

      The location of the comparison where you want to comment.

      • filePath — (String)

        The name of the file being compared, including its extension and subdirectory, if any.

      • filePosition — (Integer)

        The position of a change within a compared file, in line number format.

      • relativeFileVersion — (String)

        In a comparison of commits or a pull request, whether the change is in the 'before' or 'after' of that comparison.

        Possible values include:
        • "BEFORE"
        • "AFTER"
    • content — (String)

      The content of the comment you want to make.

    • clientRequestToken — (String)

      A unique, client-generated idempotency token that when provided in a request, ensures the request cannot be repeated with a changed parameter. If a request is received with the same parameters and a token is included, the request will return information about the initial request that used that token.

      If a token is not provided, the SDK will use a version 4 UUID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • repositoryName — (String)

        The name of the repository where you posted a comment on the comparison between commits.

      • beforeCommitId — (String)

        In the directionality you established, the full commit ID of the 'before' commit.

      • afterCommitId — (String)

        In the directionality you established, the full commit ID of the 'after' commit.

      • beforeBlobId — (String)

        In the directionality you established, the blob ID of the 'before' blob.

      • afterBlobId — (String)

        In the directionality you established, the blob ID of the 'after' blob.

      • location — (map)

        The location of the comment in the comparison between the two commits.

        • filePath — (String)

          The name of the file being compared, including its extension and subdirectory, if any.

        • filePosition — (Integer)

          The position of a change within a compared file, in line number format.

        • relativeFileVersion — (String)

          In a comparison of commits or a pull request, whether the change is in the 'before' or 'after' of that comparison.

          Possible values include:
          • "BEFORE"
          • "AFTER"
      • comment — (map)

        The content of the comment you posted.

        • commentId — (String)

          The system-generated comment ID.

        • content — (String)

          The content of the comment.

        • inReplyTo — (String)

          The ID of the comment for which this comment is a reply, if any.

        • creationDate — (Date)

          The date and time the comment was created, in timestamp format.

        • lastModifiedDate — (Date)

          The date and time the comment was most recently modified, in timestamp format.

        • authorArn — (String)

          The Amazon Resource Name (ARN) of the person who posted the comment.

        • deleted — (Boolean)

          A Boolean value indicating whether the comment has been deleted.

        • clientRequestToken — (String)

          A unique, client-generated idempotency token that when provided in a request, ensures the request cannot be repeated with a changed parameter. If a request is received with the same parameters and a token is included, the request will return information about the initial request that used that token.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

postCommentForPullRequest(params = {}, callback) ⇒ AWS.Request

Posts a comment on a pull request.

Service Reference:

Examples:

Calling the postCommentForPullRequest operation

var params = {
  afterCommitId: 'STRING_VALUE', /* required */
  beforeCommitId: 'STRING_VALUE', /* required */
  content: 'STRING_VALUE', /* required */
  pullRequestId: 'STRING_VALUE', /* required */
  repositoryName: 'STRING_VALUE', /* required */
  clientRequestToken: 'STRING_VALUE',
  location: {
    filePath: 'STRING_VALUE',
    filePosition: 'NUMBER_VALUE',
    relativeFileVersion: BEFORE | AFTER
  }
};
codecommit.postCommentForPullRequest(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • pullRequestId — (String)

      The system-generated ID of the pull request. To get this ID, use ListPullRequests.

    • repositoryName — (String)

      The name of the repository where you want to post a comment on a pull request.

    • beforeCommitId — (String)

      The full commit ID of the commit in the destination branch that was the tip of the branch at the time the pull request was created.

    • afterCommitId — (String)

      The full commit ID of the commit in the source branch that is the current tip of the branch for the pull request when you post the comment.

    • location — (map)

      The location of the change where you want to post your comment. If no location is provided, the comment will be posted as a general comment on the pull request difference between the before commit ID and the after commit ID.

      • filePath — (String)

        The name of the file being compared, including its extension and subdirectory, if any.

      • filePosition — (Integer)

        The position of a change within a compared file, in line number format.

      • relativeFileVersion — (String)

        In a comparison of commits or a pull request, whether the change is in the 'before' or 'after' of that comparison.

        Possible values include:
        • "BEFORE"
        • "AFTER"
    • content — (String)

      The content of your comment on the change.

    • clientRequestToken — (String)

      A unique, client-generated idempotency token that when provided in a request, ensures the request cannot be repeated with a changed parameter. If a request is received with the same parameters and a token is included, the request will return information about the initial request that used that token.

      If a token is not provided, the SDK will use a version 4 UUID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • repositoryName — (String)

        The name of the repository where you posted a comment on a pull request.

      • pullRequestId — (String)

        The system-generated ID of the pull request.

      • beforeCommitId — (String)

        The full commit ID of the commit in the source branch used to create the pull request, or in the case of an updated pull request, the full commit ID of the commit used to update the pull request.

      • afterCommitId — (String)

        The full commit ID of the commit in the destination branch where the pull request will be merged.

      • beforeBlobId — (String)

        In the directionality of the pull request, the blob ID of the 'before' blob.

      • afterBlobId — (String)

        In the directionality of the pull request, the blob ID of the 'after' blob.

      • location — (map)

        The location of the change where you posted your comment.

        • filePath — (String)

          The name of the file being compared, including its extension and subdirectory, if any.

        • filePosition — (Integer)

          The position of a change within a compared file, in line number format.

        • relativeFileVersion — (String)

          In a comparison of commits or a pull request, whether the change is in the 'before' or 'after' of that comparison.

          Possible values include:
          • "BEFORE"
          • "AFTER"
      • comment — (map)

        The content of the comment you posted.

        • commentId — (String)

          The system-generated comment ID.

        • content — (String)

          The content of the comment.

        • inReplyTo — (String)

          The ID of the comment for which this comment is a reply, if any.

        • creationDate — (Date)

          The date and time the comment was created, in timestamp format.

        • lastModifiedDate — (Date)

          The date and time the comment was most recently modified, in timestamp format.

        • authorArn — (String)

          The Amazon Resource Name (ARN) of the person who posted the comment.

        • deleted — (Boolean)

          A Boolean value indicating whether the comment has been deleted.

        • clientRequestToken — (String)

          A unique, client-generated idempotency token that when provided in a request, ensures the request cannot be repeated with a changed parameter. If a request is received with the same parameters and a token is included, the request will return information about the initial request that used that token.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

postCommentReply(params = {}, callback) ⇒ AWS.Request

Posts a comment in reply to an existing comment on a comparison between commits or a pull request.

Service Reference:

Examples:

Calling the postCommentReply operation

var params = {
  content: 'STRING_VALUE', /* required */
  inReplyTo: 'STRING_VALUE', /* required */
  clientRequestToken: 'STRING_VALUE'
};
codecommit.postCommentReply(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • inReplyTo — (String)

      The system-generated ID of the comment to which you want to reply. To get this ID, use GetCommentsForComparedCommit or GetCommentsForPullRequest.

    • clientRequestToken — (String)

      A unique, client-generated idempotency token that when provided in a request, ensures the request cannot be repeated with a changed parameter. If a request is received with the same parameters and a token is included, the request will return information about the initial request that used that token.

      If a token is not provided, the SDK will use a version 4 UUID.
    • content — (String)

      The contents of your reply to a comment.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • comment — (map)

        Information about the reply to a comment.

        • commentId — (String)

          The system-generated comment ID.

        • content — (String)

          The content of the comment.

        • inReplyTo — (String)

          The ID of the comment for which this comment is a reply, if any.

        • creationDate — (Date)

          The date and time the comment was created, in timestamp format.

        • lastModifiedDate — (Date)

          The date and time the comment was most recently modified, in timestamp format.

        • authorArn — (String)

          The Amazon Resource Name (ARN) of the person who posted the comment.

        • deleted — (Boolean)

          A Boolean value indicating whether the comment has been deleted.

        • clientRequestToken — (String)

          A unique, client-generated idempotency token that when provided in a request, ensures the request cannot be repeated with a changed parameter. If a request is received with the same parameters and a token is included, the request will return information about the initial request that used that token.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

putFile(params = {}, callback) ⇒ AWS.Request

Adds or updates a file in a branch in an AWS CodeCommit repository, and generates a commit for the addition in the specified branch.

Service Reference:

Examples:

Calling the putFile operation

var params = {
  branchName: 'STRING_VALUE', /* required */
  fileContent: new Buffer('...') || 'STRING_VALUE' /* Strings will be Base-64 encoded on your behalf */, /* required */
  filePath: 'STRING_VALUE', /* required */
  repositoryName: 'STRING_VALUE', /* required */
  commitMessage: 'STRING_VALUE',
  email: 'STRING_VALUE',
  fileMode: EXECUTABLE | NORMAL | SYMLINK,
  name: 'STRING_VALUE',
  parentCommitId: 'STRING_VALUE'
};
codecommit.putFile(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • repositoryName — (String)

      The name of the repository where you want to add or update the file.

    • branchName — (String)

      The name of the branch where you want to add or update the file. If this is an empty repository, this branch will be created.

    • fileContent — (Buffer, Typed Array, Blob, String)

      The content of the file, in binary object format.

    • filePath — (String)

      The name of the file you want to add or update, including the relative path to the file in the repository.

      Note: If the path does not currently exist in the repository, the path will be created as part of adding the file.
    • fileMode — (String)

      The file mode permissions of the blob. Valid file mode permissions are listed below.

      Possible values include:
      • "EXECUTABLE"
      • "NORMAL"
      • "SYMLINK"
    • parentCommitId — (String)

      The full commit ID of the head commit in the branch where you want to add or update the file. If this is an empty repository, no commit ID is required. If this is not an empty repository, a commit ID is required.

      The commit ID must match the ID of the head commit at the time of the operation, or an error will occur, and the file will not be added or updated.

    • commitMessage — (String)

      A message about why this file was added or updated. While optional, adding a message is strongly encouraged in order to provide a more useful commit history for your repository.

    • name — (String)

      The name of the person adding or updating the file. While optional, adding a name is strongly encouraged in order to provide a more useful commit history for your repository.

    • email — (String)

      An email address for the person adding or updating the file.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • commitId — (String)

        The full SHA of the commit that contains this file change.

      • blobId — (String)

        The ID of the blob, which is its SHA-1 pointer.

      • treeId — (String)

        The full SHA-1 pointer of the tree information for the commit that contains this file change.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

putRepositoryTriggers(params = {}, callback) ⇒ AWS.Request

Replaces all triggers for a repository. This can be used to create or delete triggers.

Service Reference:

Examples:

Calling the putRepositoryTriggers operation

var params = {
  repositoryName: 'STRING_VALUE', /* required */
  triggers: [ /* required */
    {
      destinationArn: 'STRING_VALUE', /* required */
      events: [ /* required */
        all | updateReference | createReference | deleteReference,
        /* more items */
      ],
      name: 'STRING_VALUE', /* required */
      branches: [
        'STRING_VALUE',
        /* more items */
      ],
      customData: 'STRING_VALUE'
    },
    /* more items */
  ]
};
codecommit.putRepositoryTriggers(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • repositoryName — (String)

      The name of the repository where you want to create or update the trigger.

    • triggers — (Array<map>)

      The JSON block of configuration information for each trigger.

      • namerequired — (String)

        The name of the trigger.

      • destinationArnrequired — (String)

        The ARN of the resource that is the target for a trigger. For example, the ARN of a topic in Amazon Simple Notification Service (SNS).

      • customData — (String)

        Any custom data associated with the trigger that will be included in the information sent to the target of the trigger.

      • branches — (Array<String>)

        The branches that will be included in the trigger configuration. If you specify an empty array, the trigger will apply to all branches.

        Note: While no content is required in the array, you must include the array itself.
      • eventsrequired — (Array<String>)

        The repository events that will cause the trigger to run actions in another service, such as sending a notification through Amazon Simple Notification Service (SNS).

        Note: The valid value "all" cannot be used with any other values.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • configurationId — (String)

        The system-generated unique ID for the create or update operation.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

testRepositoryTriggers(params = {}, callback) ⇒ AWS.Request

Tests the functionality of repository triggers by sending information to the trigger target. If real data is available in the repository, the test will send data from the last commit. If no data is available, sample data will be generated.

Service Reference:

Examples:

Calling the testRepositoryTriggers operation

var params = {
  repositoryName: 'STRING_VALUE', /* required */
  triggers: [ /* required */
    {
      destinationArn: 'STRING_VALUE', /* required */
      events: [ /* required */
        all | updateReference | createReference | deleteReference,
        /* more items */
      ],
      name: 'STRING_VALUE', /* required */
      branches: [
        'STRING_VALUE',
        /* more items */
      ],
      customData: 'STRING_VALUE'
    },
    /* more items */
  ]
};
codecommit.testRepositoryTriggers(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • repositoryName — (String)

      The name of the repository in which to test the triggers.

    • triggers — (Array<map>)

      The list of triggers to test.

      • namerequired — (String)

        The name of the trigger.

      • destinationArnrequired — (String)

        The ARN of the resource that is the target for a trigger. For example, the ARN of a topic in Amazon Simple Notification Service (SNS).

      • customData — (String)

        Any custom data associated with the trigger that will be included in the information sent to the target of the trigger.

      • branches — (Array<String>)

        The branches that will be included in the trigger configuration. If you specify an empty array, the trigger will apply to all branches.

        Note: While no content is required in the array, you must include the array itself.
      • eventsrequired — (Array<String>)

        The repository events that will cause the trigger to run actions in another service, such as sending a notification through Amazon Simple Notification Service (SNS).

        Note: The valid value "all" cannot be used with any other values.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • successfulExecutions — (Array<String>)

        The list of triggers that were successfully tested. This list provides the names of the triggers that were successfully tested, separated by commas.

      • failedExecutions — (Array<map>)

        The list of triggers that were not able to be tested. This list provides the names of the triggers that could not be tested, separated by commas.

        • trigger — (String)

          The name of the trigger that did not run.

        • failureMessage — (String)

          Additional message information about the trigger that did not run.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateComment(params = {}, callback) ⇒ AWS.Request

Replaces the contents of a comment.

Service Reference:

Examples:

Calling the updateComment operation

var params = {
  commentId: 'STRING_VALUE', /* required */
  content: 'STRING_VALUE' /* required */
};
codecommit.updateComment(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • commentId — (String)

      The system-generated ID of the comment you want to update. To get this ID, use GetCommentsForComparedCommit or GetCommentsForPullRequest.

    • content — (String)

      The updated content with which you want to replace the existing content of the comment.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • comment — (map)

        Information about the updated comment.

        • commentId — (String)

          The system-generated comment ID.

        • content — (String)

          The content of the comment.

        • inReplyTo — (String)

          The ID of the comment for which this comment is a reply, if any.

        • creationDate — (Date)

          The date and time the comment was created, in timestamp format.

        • lastModifiedDate — (Date)

          The date and time the comment was most recently modified, in timestamp format.

        • authorArn — (String)

          The Amazon Resource Name (ARN) of the person who posted the comment.

        • deleted — (Boolean)

          A Boolean value indicating whether the comment has been deleted.

        • clientRequestToken — (String)

          A unique, client-generated idempotency token that when provided in a request, ensures the request cannot be repeated with a changed parameter. If a request is received with the same parameters and a token is included, the request will return information about the initial request that used that token.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateDefaultBranch(params = {}, callback) ⇒ AWS.Request

Sets or changes the default branch name for the specified repository.

Note: If you use this operation to change the default branch name to the current default branch name, a success message is returned even though the default branch did not change.

Service Reference:

Examples:

Calling the updateDefaultBranch operation

var params = {
  defaultBranchName: 'STRING_VALUE', /* required */
  repositoryName: 'STRING_VALUE' /* required */
};
codecommit.updateDefaultBranch(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • repositoryName — (String)

      The name of the repository to set or change the default branch for.

    • defaultBranchName — (String)

      The name of the branch to set as the default.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updatePullRequestDescription(params = {}, callback) ⇒ AWS.Request

Replaces the contents of the description of a pull request.

Service Reference:

Examples:

Calling the updatePullRequestDescription operation

var params = {
  description: 'STRING_VALUE', /* required */
  pullRequestId: 'STRING_VALUE' /* required */
};
codecommit.updatePullRequestDescription(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • pullRequestId — (String)

      The system-generated ID of the pull request. To get this ID, use ListPullRequests.

    • description — (String)

      The updated content of the description for the pull request. This content will replace the existing description.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • pullRequest — (map)

        Information about the updated pull request.

        • pullRequestId — (String)

          The system-generated ID of the pull request.

        • title — (String)

          The user-defined title of the pull request. This title is displayed in the list of pull requests to other users of the repository.

        • description — (String)

          The user-defined description of the pull request. This description can be used to clarify what should be reviewed and other details of the request.

        • lastActivityDate — (Date)

          The day and time of the last user or system activity on the pull request, in timestamp format.

        • creationDate — (Date)

          The date and time the pull request was originally created, in timestamp format.

        • pullRequestStatus — (String)

          The status of the pull request. Pull request status can only change from OPEN to CLOSED.

          Possible values include:
          • "OPEN"
          • "CLOSED"
        • authorArn — (String)

          The Amazon Resource Name (ARN) of the user who created the pull request.

        • pullRequestTargets — (Array<map>)

          The targets of the pull request, including the source branch and destination branch for the pull request.

          • repositoryName — (String)

            The name of the repository that contains the pull request source and destination branches.

          • sourceReference — (String)

            The branch of the repository that contains the changes for the pull request. Also known as the source branch.

          • destinationReference — (String)

            The branch of the repository where the pull request changes will be merged into. Also known as the destination branch.

          • destinationCommit — (String)

            The full commit ID that is the tip of the destination branch. This is the commit where the pull request was or will be merged.

          • sourceCommit — (String)

            The full commit ID of the tip of the source branch used to create the pull request. If the pull request branch is updated by a push while the pull request is open, the commit ID will change to reflect the new tip of the branch.

          • mergeBase — (String)

            The commit ID of the most recent commit that the source branch and the destination branch have in common.

          • mergeMetadata — (map)

            Returns metadata about the state of the merge, including whether the merge has been made.

            • isMerged — (Boolean)

              A Boolean value indicating whether the merge has been made.

            • mergedBy — (String)

              The Amazon Resource Name (ARN) of the user who merged the branches.

        • clientRequestToken — (String)

          A unique, client-generated idempotency token that when provided in a request, ensures the request cannot be repeated with a changed parameter. If a request is received with the same parameters and a token is included, the request will return information about the initial request that used that token.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updatePullRequestStatus(params = {}, callback) ⇒ AWS.Request

Updates the status of a pull request.

Service Reference:

Examples:

Calling the updatePullRequestStatus operation

var params = {
  pullRequestId: 'STRING_VALUE', /* required */
  pullRequestStatus: OPEN | CLOSED /* required */
};
codecommit.updatePullRequestStatus(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • pullRequestId — (String)

      The system-generated ID of the pull request. To get this ID, use ListPullRequests.

    • pullRequestStatus — (String)

      The status of the pull request. The only valid operations are to update the status from OPEN to OPEN, OPEN to CLOSED or from from CLOSED to CLOSED.

      Possible values include:
      • "OPEN"
      • "CLOSED"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • pullRequest — (map)

        Information about the pull request.

        • pullRequestId — (String)

          The system-generated ID of the pull request.

        • title — (String)

          The user-defined title of the pull request. This title is displayed in the list of pull requests to other users of the repository.

        • description — (String)

          The user-defined description of the pull request. This description can be used to clarify what should be reviewed and other details of the request.

        • lastActivityDate — (Date)

          The day and time of the last user or system activity on the pull request, in timestamp format.

        • creationDate — (Date)

          The date and time the pull request was originally created, in timestamp format.

        • pullRequestStatus — (String)

          The status of the pull request. Pull request status can only change from OPEN to CLOSED.

          Possible values include:
          • "OPEN"
          • "CLOSED"
        • authorArn — (String)

          The Amazon Resource Name (ARN) of the user who created the pull request.

        • pullRequestTargets — (Array<map>)

          The targets of the pull request, including the source branch and destination branch for the pull request.

          • repositoryName — (String)

            The name of the repository that contains the pull request source and destination branches.

          • sourceReference — (String)

            The branch of the repository that contains the changes for the pull request. Also known as the source branch.

          • destinationReference — (String)

            The branch of the repository where the pull request changes will be merged into. Also known as the destination branch.

          • destinationCommit — (String)

            The full commit ID that is the tip of the destination branch. This is the commit where the pull request was or will be merged.

          • sourceCommit — (String)

            The full commit ID of the tip of the source branch used to create the pull request. If the pull request branch is updated by a push while the pull request is open, the commit ID will change to reflect the new tip of the branch.

          • mergeBase — (String)

            The commit ID of the most recent commit that the source branch and the destination branch have in common.

          • mergeMetadata — (map)

            Returns metadata about the state of the merge, including whether the merge has been made.

            • isMerged — (Boolean)

              A Boolean value indicating whether the merge has been made.

            • mergedBy — (String)

              The Amazon Resource Name (ARN) of the user who merged the branches.

        • clientRequestToken — (String)

          A unique, client-generated idempotency token that when provided in a request, ensures the request cannot be repeated with a changed parameter. If a request is received with the same parameters and a token is included, the request will return information about the initial request that used that token.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updatePullRequestTitle(params = {}, callback) ⇒ AWS.Request

Replaces the title of a pull request.

Service Reference:

Examples:

Calling the updatePullRequestTitle operation

var params = {
  pullRequestId: 'STRING_VALUE', /* required */
  title: 'STRING_VALUE' /* required */
};
codecommit.updatePullRequestTitle(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • pullRequestId — (String)

      The system-generated ID of the pull request. To get this ID, use ListPullRequests.

    • title — (String)

      The updated title of the pull request. This will replace the existing title.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • pullRequest — (map)

        Information about the updated pull request.

        • pullRequestId — (String)

          The system-generated ID of the pull request.

        • title — (String)

          The user-defined title of the pull request. This title is displayed in the list of pull requests to other users of the repository.

        • description — (String)

          The user-defined description of the pull request. This description can be used to clarify what should be reviewed and other details of the request.

        • lastActivityDate — (Date)

          The day and time of the last user or system activity on the pull request, in timestamp format.

        • creationDate — (Date)

          The date and time the pull request was originally created, in timestamp format.

        • pullRequestStatus — (String)

          The status of the pull request. Pull request status can only change from OPEN to CLOSED.

          Possible values include:
          • "OPEN"
          • "CLOSED"
        • authorArn — (String)

          The Amazon Resource Name (ARN) of the user who created the pull request.

        • pullRequestTargets — (Array<map>)

          The targets of the pull request, including the source branch and destination branch for the pull request.

          • repositoryName — (String)

            The name of the repository that contains the pull request source and destination branches.

          • sourceReference — (String)

            The branch of the repository that contains the changes for the pull request. Also known as the source branch.

          • destinationReference — (String)

            The branch of the repository where the pull request changes will be merged into. Also known as the destination branch.

          • destinationCommit — (String)

            The full commit ID that is the tip of the destination branch. This is the commit where the pull request was or will be merged.

          • sourceCommit — (String)

            The full commit ID of the tip of the source branch used to create the pull request. If the pull request branch is updated by a push while the pull request is open, the commit ID will change to reflect the new tip of the branch.

          • mergeBase — (String)

            The commit ID of the most recent commit that the source branch and the destination branch have in common.

          • mergeMetadata — (map)

            Returns metadata about the state of the merge, including whether the merge has been made.

            • isMerged — (Boolean)

              A Boolean value indicating whether the merge has been made.

            • mergedBy — (String)

              The Amazon Resource Name (ARN) of the user who merged the branches.

        • clientRequestToken — (String)

          A unique, client-generated idempotency token that when provided in a request, ensures the request cannot be repeated with a changed parameter. If a request is received with the same parameters and a token is included, the request will return information about the initial request that used that token.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateRepositoryDescription(params = {}, callback) ⇒ AWS.Request

Sets or changes the comment or description for a repository.

Note: The description field for a repository accepts all HTML characters and all valid Unicode characters. Applications that do not HTML-encode the description and display it in a web page could expose users to potentially malicious code. Make sure that you HTML-encode the description field in any application that uses this API to display the repository description on a web page.

Service Reference:

Examples:

Calling the updateRepositoryDescription operation

var params = {
  repositoryName: 'STRING_VALUE', /* required */
  repositoryDescription: 'STRING_VALUE'
};
codecommit.updateRepositoryDescription(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • repositoryName — (String)

      The name of the repository to set or change the comment or description for.

    • repositoryDescription — (String)

      The new comment or description for the specified repository. Repository descriptions are limited to 1,000 characters.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateRepositoryName(params = {}, callback) ⇒ AWS.Request

Renames a repository. The repository name must be unique across the calling AWS account. In addition, repository names are limited to 100 alphanumeric, dash, and underscore characters, and cannot include certain characters. The suffix ".git" is prohibited. For a full description of the limits on repository names, see Limits in the AWS CodeCommit User Guide.

Service Reference:

Examples:

Calling the updateRepositoryName operation

var params = {
  newName: 'STRING_VALUE', /* required */
  oldName: 'STRING_VALUE' /* required */
};
codecommit.updateRepositoryName(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • oldName — (String)

      The existing name of the repository.

    • newName — (String)

      The new name for the repository.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.