CfnSourceCredentialProps

class aws_cdk.aws_codebuild.CfnSourceCredentialProps(*, auth_type, server_type, token, username=None)

Bases: object

Properties for defining a CfnSourceCredential.

Parameters
  • auth_type (str) – The type of authentication used by the credentials. Valid options are OAUTH, BASIC_AUTH, or PERSONAL_ACCESS_TOKEN.

  • server_type (str) – The type of source provider. The valid options are GITHUB, GITHUB_ENTERPRISE, or BITBUCKET.

  • token (str) – For GitHub or GitHub Enterprise, this is the personal access token. For Bitbucket, this is the app password.

  • username (Optional[str]) – The Bitbucket username when the authType is BASIC_AUTH. This parameter is not valid for other types of source providers or connections.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-sourcecredential.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.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"
)

Attributes

auth_type

The type of authentication used by the credentials.

Valid options are OAUTH, BASIC_AUTH, or PERSONAL_ACCESS_TOKEN.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-sourcecredential.html#cfn-codebuild-sourcecredential-authtype

Return type

str

server_type

The type of source provider.

The valid options are GITHUB, GITHUB_ENTERPRISE, or BITBUCKET.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-sourcecredential.html#cfn-codebuild-sourcecredential-servertype

Return type

str

token

For GitHub or GitHub Enterprise, this is the personal access token.

For Bitbucket, this is the app password.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-sourcecredential.html#cfn-codebuild-sourcecredential-token

Return type

str

username

The Bitbucket username when the authType is BASIC_AUTH.

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

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-sourcecredential.html#cfn-codebuild-sourcecredential-username

Return type

Optional[str]