Class CfnSourceCredential
A CloudFormation AWS::CodeBuild::SourceCredential
.
Inherited Members
Namespace: Amazon.CDK.AWS.CodeBuild
Assembly: Amazon.CDK.AWS.CodeBuild.dll
Syntax (csharp)
public class CfnSourceCredential : CfnResource, IConstruct, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnSourceCredential
Inherits CfnResource
Implements IConstruct, IConstruct, IDependable, IInspectable
Remarks
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.
CloudformationResource: AWS::CodeBuild::SourceCredential
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.CodeBuild;
CfnSourceCredential cfnSourceCredential = new CfnSourceCredential(this, "MyCfnSourceCredential", new CfnSourceCredentialProps {
AuthType = "authType",
ServerType = "serverType",
Token = "token",
// the properties below are optional
Username = "username"
});
Synopsis
Constructors
CfnSourceCredential(Construct, String, ICfnSourceCredentialProps) | Create a new |
CfnSourceCredential(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnSourceCredential(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
AuthType | The type of authentication used by the credentials. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
ServerType | The type of source provider. |
Token | For GitHub or GitHub Enterprise, this is the personal access token. |
Username | The Bitbucket username when the |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnSourceCredential(Construct, String, ICfnSourceCredentialProps)
Create a new AWS::CodeBuild::SourceCredential
.
public CfnSourceCredential(Construct scope, string id, ICfnSourceCredentialProps props)
Parameters
- scope Construct
- scope in which this resource is defined.
- id System.String
- scoped id of the resource.
- props ICfnSourceCredentialProps
- resource properties.
CfnSourceCredential(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnSourceCredential(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnSourceCredential(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnSourceCredential(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
AuthType
The type of authentication used by the credentials.
public virtual string AuthType { get; set; }
Property Value
System.String
Remarks
Valid options are OAUTH, BASIC_AUTH, or PERSONAL_ACCESS_TOKEN.
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
ServerType
The type of source provider.
public virtual string ServerType { get; set; }
Property Value
System.String
Remarks
The valid options are GITHUB, GITHUB_ENTERPRISE, or BITBUCKET.
Token
For GitHub or GitHub Enterprise, this is the personal access token.
public virtual string Token { get; set; }
Property Value
System.String
Remarks
For Bitbucket, this is the app password.
Username
The Bitbucket username when the authType
is BASIC_AUTH.
public virtual string Username { get; set; }
Property Value
System.String
Remarks
This parameter is not valid for other types of source providers or connections.
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
- tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>