@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:37.328Z") @Stability(value=Stable) public class CfnSourceCredential extends CfnResource implements IInspectable
Information about the credentials for a GitHub, GitHub Enterprise, or Bitbucket repository. We strongly recommend that you use AWS Secrets Manager to store your credentials. If you use Secrets Manager , you must have secrets in your secrets manager. For more information, see Using Dynamic References to Specify Template Values .
For security purposes, do not use plain text in your AWS CloudFormation template to store your credentials.
Example:
// 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.*;
CfnSourceCredential cfnSourceCredential = CfnSourceCredential.Builder.create(this, "MyCfnSourceCredential")
.authType("authType")
.serverType("serverType")
.token("token")
// the properties below are optional
.username("username")
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
CfnSourceCredential.Builder
A fluent builder for
CfnSourceCredential. |
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnSourceCredential(software.constructs.Construct scope,
String id,
CfnSourceCredentialProps props)
Create a new `AWS::CodeBuild::SourceCredential`.
|
protected |
CfnSourceCredential(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnSourceCredential(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
String |
getAuthType()
The type of authentication used by the credentials.
|
protected Map<String,Object> |
getCfnProperties() |
String |
getServerType()
The type of source provider.
|
String |
getToken()
For GitHub or GitHub Enterprise, this is the personal access token.
|
String |
getUsername()
The Bitbucket username when the `authType` is BASIC_AUTH.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setAuthType(String value)
The type of authentication used by the credentials.
|
void |
setServerType(String value)
The type of source provider.
|
void |
setToken(String value)
For GitHub or GitHub Enterprise, this is the personal access token.
|
void |
setUsername(String value)
The Bitbucket username when the `authType` is BASIC_AUTH.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnSourceCredential(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnSourceCredential(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnSourceCredential(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
CfnSourceCredentialProps props)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.props - - resource properties. This parameter is required.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public String getAuthType()
Valid options are OAUTH, BASIC_AUTH, or PERSONAL_ACCESS_TOKEN.
@Stability(value=Stable)
public void setAuthType(@NotNull
String value)
Valid options are OAUTH, BASIC_AUTH, or PERSONAL_ACCESS_TOKEN.
@Stability(value=Stable) @NotNull public String getServerType()
The valid options are GITHUB, GITHUB_ENTERPRISE, or BITBUCKET.
@Stability(value=Stable)
public void setServerType(@NotNull
String value)
The valid options are GITHUB, GITHUB_ENTERPRISE, or BITBUCKET.
@Stability(value=Stable) @NotNull public String getToken()
For Bitbucket, this is the app password.
@Stability(value=Stable)
public void setToken(@NotNull
String value)
For Bitbucket, this is the app password.
@Stability(value=Stable) @Nullable public String getUsername()
This parameter is not valid for other types of source providers or connections.
@Stability(value=Stable)
public void setUsername(@Nullable
String value)
This parameter is not valid for other types of source providers or connections.
Copyright © 2022. All rights reserved.