AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::CodeBuild::SourceCredential

CfnSourceCredential

Information about the credentials for a GitHub, GitHub Enterprise, or Bitbucket repository. We strongly recommend that you use AWS Secrets Manager to store your credentials. If you use Secrets Manager , you must have secrets in your secrets manager. For more information, see [Using Dynamic References to Specify Template Values](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html#dynamic-references-secretsmanager) . > For security purposes, do not use plain text in your CloudFormation template to store your credentials.

Import

import { CfnSourceCredential } from 'aws-cdk-lib/aws-codebuild';

Or use the module namespace:

import * as codebuild from 'aws-cdk-lib/aws-codebuild';
// codebuild.CfnSourceCredential

Properties

Configuration passed to the constructor as CfnSourceCredentialProps.

authTypeRequired
string

The type of authentication used by the credentials. Valid options are OAUTH, BASIC_AUTH, PERSONAL_ACCESS_TOKEN, CODECONNECTIONS, or SECRETS_MANAGER.

serverTypeRequired
string

The type of source provider. The valid options are GITHUB, GITHUB_ENTERPRISE, GITLAB, GITLAB_SELF_MANAGED, or BITBUCKET.

tokenRequired
string

For GitHub or GitHub Enterprise, this is the personal access token. For Bitbucket, this is either the access token or the app password. For the `authType` CODECONNECTIONS, this is the `connectionArn` . For the `authType` SECRETS_MANAGER, this is the `secretArn` .

usernameOptional
string

The Bitbucket username when the `authType` is BASIC_AUTH. This parameter is not valid for other types of source providers or connections.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Get the AWS CodeBuild Cheat Sheet

Everything you need to know about AWS CodeBuild on one page. HD quality, print-friendly.

Download Free Infographic