AWS::CodeBuild::SourceCredentialInformation 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 { CfnSourceCredential } from 'aws-cdk-lib/aws-codebuild';Or use the module namespace:
import * as codebuild from 'aws-cdk-lib/aws-codebuild';
// codebuild.CfnSourceCredentialConfiguration passed to the constructor as CfnSourceCredentialProps.
authTypeRequiredstringThe type of authentication used by the credentials. Valid options are OAUTH, BASIC_AUTH, PERSONAL_ACCESS_TOKEN, CODECONNECTIONS, or SECRETS_MANAGER.
serverTypeRequiredstringThe type of source provider. The valid options are GITHUB, GITHUB_ENTERPRISE, GITLAB, GITLAB_SELF_MANAGED, or BITBUCKET.
tokenRequiredstringFor 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` .
usernameOptionalstringThe Bitbucket username when the `authType` is BASIC_AUTH. This parameter is not valid for other types of source providers or connections.
This L1 construct maps directly to the following CloudFormation resource type.
Everything you need to know about AWS CodeBuild on one page. HD quality, print-friendly.
Download Free Infographicaws-codebuildAWS::CodeBuild::SourceCredential