Skip to content

Create Repository

codecommit_create_repository R Documentation

Creates a new, empty repository

Description

Creates a new, empty repository.

Usage

codecommit_create_repository(repositoryName, repositoryDescription,
  tags, kmsKeyId)

Arguments

repositoryName

[required] The name of the new repository to be created.

The repository name must be unique across the calling Amazon Web Services account. Repository names are limited to 100 alphanumeric, dash, and underscore characters, and cannot include certain characters. For more information about the limits on repository names, see Quotas in the CodeCommit User Guide. The suffix .git is prohibited.

repositoryDescription

A comment or description about the new repository.

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 webpage can 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 webpage.

tags

One or more tag key-value pairs to use when tagging this repository.

kmsKeyId

The ID of the encryption key. You can view the ID of an encryption key in the KMS console, or use the KMS APIs to programmatically retrieve a key ID. For more information about acceptable values for kmsKeyID, see KeyId in the Decrypt API description in the Key Management Service API Reference.

If no key is specified, the default aws/codecommit Amazon Web Services managed key is used.

Value

A list with the following syntax:

list(
  repositoryMetadata = list(
    accountId = "string",
    repositoryId = "string",
    repositoryName = "string",
    repositoryDescription = "string",
    defaultBranch = "string",
    lastModifiedDate = as.POSIXct(
      "2015-01-01"
    ),
    creationDate = as.POSIXct(
      "2015-01-01"
    ),
    cloneUrlHttp = "string",
    cloneUrlSsh = "string",
    Arn = "string",
    kmsKeyId = "string"
  )
)

Request syntax

svc$create_repository(
  repositoryName = "string",
  repositoryDescription = "string",
  tags = list(
    "string"
  ),
  kmsKeyId = "string"
)