Class CfnSourceCredentialProps.Builder
java.lang.Object
software.amazon.awscdk.services.codebuild.CfnSourceCredentialProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnSourceCredentialProps>
- Enclosing interface:
CfnSourceCredentialProps
@Stability(Stable)
public static final class CfnSourceCredentialProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnSourceCredentialProps>
A builder for
CfnSourceCredentialProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionSets the value ofCfnSourceCredentialProps.getAuthType()
build()
Builds the configured instance.serverType
(String serverType) Sets the value ofCfnSourceCredentialProps.getServerType()
Sets the value ofCfnSourceCredentialProps.getToken()
Sets the value ofCfnSourceCredentialProps.getUsername()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
authType
Sets the value ofCfnSourceCredentialProps.getAuthType()
- Parameters:
authType
- The type of authentication used by the credentials. This parameter is required. Valid options are OAUTH, BASIC_AUTH, PERSONAL_ACCESS_TOKEN, or CODECONNECTIONS.- Returns:
this
-
serverType
Sets the value ofCfnSourceCredentialProps.getServerType()
- Parameters:
serverType
- The type of source provider. This parameter is required. The valid options are GITHUB, GITHUB_ENTERPRISE, GITLAB, GITLAB_SELF_MANAGED, or BITBUCKET.- Returns:
this
-
token
Sets the value ofCfnSourceCredentialProps.getToken()
- Parameters:
token
- For GitHub or GitHub Enterprise, this is the personal access token. This parameter is required. For Bitbucket, this is either the access token or the app password.- Returns:
this
-
username
Sets the value ofCfnSourceCredentialProps.getUsername()
- Parameters:
username
- The Bitbucket username when theauthType
is BASIC_AUTH. This parameter is not valid for other types of source providers or connections.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnSourceCredentialProps>
- Returns:
- a new instance of
CfnSourceCredentialProps
- Throws:
NullPointerException
- if any required attribute was not provided
-