Class CfnSourceCredential.Builder

java.lang.Object
software.amazon.awscdk.services.codebuild.CfnSourceCredential.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<CfnSourceCredential>
Enclosing class:
CfnSourceCredential

@Stability(Stable) public static final class CfnSourceCredential.Builder extends Object implements software.amazon.jsii.Builder<CfnSourceCredential>
A fluent builder for CfnSourceCredential.
  • Method Details

    • create

      @Stability(Stable) public static CfnSourceCredential.Builder create(Construct scope, String id)
      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      Returns:
      a new instance of CfnSourceCredential.Builder.
    • authType

      @Stability(Stable) public CfnSourceCredential.Builder authType(String authType)
      The type of authentication used by the credentials.

      Valid options are OAUTH, BASIC_AUTH, or PERSONAL_ACCESS_TOKEN.

      Parameters:
      authType - The type of authentication used by the credentials. This parameter is required.
      Returns:
      this
    • serverType

      @Stability(Stable) public CfnSourceCredential.Builder serverType(String serverType)
      The type of source provider.

      The valid options are GITHUB, GITHUB_ENTERPRISE, or BITBUCKET.

      Parameters:
      serverType - The type of source provider. This parameter is required.
      Returns:
      this
    • token

      @Stability(Stable) public CfnSourceCredential.Builder token(String token)
      For GitHub or GitHub Enterprise, this is the personal access token.

      For Bitbucket, this is the app password.

      Parameters:
      token - For GitHub or GitHub Enterprise, this is the personal access token. This parameter is required.
      Returns:
      this
    • username

      @Stability(Stable) public CfnSourceCredential.Builder username(String username)
      The Bitbucket username when the authType is BASIC_AUTH.

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

      Parameters:
      username - The Bitbucket username when the authType is BASIC_AUTH. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public CfnSourceCredential build()
      Specified by:
      build in interface software.amazon.jsii.Builder<CfnSourceCredential>
      Returns:
      a newly built instance of CfnSourceCredential.