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 Summary
Modifier and TypeMethodDescriptionThe type of authentication used by the credentials.build()
static CfnSourceCredential.Builder
serverType
(String serverType) The type of source provider.For GitHub or GitHub Enterprise, this is the personal access token.The Bitbucket username when theauthType
is BASIC_AUTH.
-
Method Details
-
create
- Parameters:
scope
-- scope in which this resource is defined.
id
-- scoped id of the resource.
- Returns:
- a new instance of
CfnSourceCredential.Builder
.
-
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
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
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
The Bitbucket username when theauthType
is BASIC_AUTH.This parameter is not valid for other types of source providers or connections.
- Parameters:
username
- The Bitbucket username when theauthType
is BASIC_AUTH. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnSourceCredential>
- Returns:
- a newly built instance of
CfnSourceCredential
.
-