Skip to content
v2.277.0

CfnSourceCredentialProps Struct ​

Properties for defining a CfnSourceCredential.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_codebuild as codebuild } from 'aws-cdk-lib';
const cfnSourceCredentialProps: codebuild.CfnSourceCredentialProps = {
  authType: 'authType',
  serverType: 'serverType',
  token: 'token',

  // the properties below are optional
  username: 'username',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_codebuild as codebuild

cfn_source_credential_props = codebuild.CfnSourceCredentialProps(
    auth_type="authType",
    server_type="serverType",
    token="token",

    # the properties below are optional
    username="username"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.codebuild.*;

CfnSourceCredentialProps cfnSourceCredentialProps = CfnSourceCredentialProps.builder()
        .authType("authType")
        .serverType("serverType")
        .token("token")

        // the properties below are optional
        .username("username")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.CodeBuild;

var cfnSourceCredentialProps = new CfnSourceCredentialProps {
    AuthType = "authType",
    ServerType = "serverType",
    Token = "token",

    // the properties below are optional
    Username = "username"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnSourceCredentialProps := &CfnSourceCredentialProps{
	AuthType: jsii.String("authType"),
	ServerType: jsii.String("serverType"),
	Token: jsii.String("token"),

	// the properties below are optional
	Username: jsii.String("username"),
}

Properties ​

authTypestringauth_typestrauthTypeStringAuthTypestringAuthType*stringrequired#
The type of authentication used by the credentials.

Valid options are OAUTH, BASIC_AUTH, PERSONAL_ACCESS_TOKEN, CODECONNECTIONS, or SECRETS_MANAGER.

serverTypestringserver_typestrserverTypeStringServerTypestringServerType*stringrequired#
The type of source provider.

The valid options are GITHUB, GITHUB_ENTERPRISE, GITLAB, GITLAB_SELF_MANAGED, or BITBUCKET.

tokenstringtokenstrtokenStringTokenstringToken*stringrequired#
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 .

usernameoptionalstringusernameoptionalstrusernameoptionalStringUsernameoptionalstringUsernameoptional*string#
The Bitbucket username when the `authType` is BASIC_AUTH.

This parameter is not valid for other types of source providers or connections.