@Generated(value="jsii-pacmak/1.58.0 (build f8ba112)", date="2022-05-20T22:20:01.130Z") 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 . |
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnSourceCredential(Construct scope,
java.lang.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 |
---|---|
java.lang.String |
getAuthType()
The type of authentication used by the credentials.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getServerType()
The type of source provider.
|
java.lang.String |
getToken()
For GitHub or GitHub Enterprise, this is the personal access token.
|
java.lang.String |
getUsername()
The Bitbucket username when the `authType` is BASIC_AUTH.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setAuthType(java.lang.String value)
The type of authentication used by the credentials.
|
void |
setServerType(java.lang.String value)
The type of source provider.
|
void |
setToken(java.lang.String value)
For GitHub or GitHub Enterprise, this is the personal access token.
|
void |
setUsername(java.lang.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, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnSourceCredential(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnSourceCredential(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnSourceCredential(Construct scope, java.lang.String id, 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.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public java.lang.String getAuthType()
Valid options are OAUTH, BASIC_AUTH, or PERSONAL_ACCESS_TOKEN.
public void setAuthType(java.lang.String value)
Valid options are OAUTH, BASIC_AUTH, or PERSONAL_ACCESS_TOKEN.
public java.lang.String getServerType()
The valid options are GITHUB, GITHUB_ENTERPRISE, or BITBUCKET.
public void setServerType(java.lang.String value)
The valid options are GITHUB, GITHUB_ENTERPRISE, or BITBUCKET.
public java.lang.String getToken()
For Bitbucket, this is the app password.
public void setToken(java.lang.String value)
For Bitbucket, this is the app password.
public java.lang.String getUsername()
This parameter is not valid for other types of source providers or connections.
public void setUsername(java.lang.String value)
This parameter is not valid for other types of source providers or connections.