Class CfnSourceCredential

java.lang.Object
software.amazon.jsii.JsiiObject
All Implemented Interfaces:
IConstruct, IDependable, IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:41.765Z") @Stability(Stable) public class CfnSourceCredential extends CfnResource implements IInspectable
A CloudFormation AWS::CodeBuild::SourceCredential.

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();
 
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnSourceCredential

      protected CfnSourceCredential(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnSourceCredential

      protected CfnSourceCredential(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnSourceCredential

      @Stability(Stable) public CfnSourceCredential(@NotNull Construct scope, @NotNull String id, @NotNull CfnSourceCredentialProps props)
      Create a new AWS::CodeBuild::SourceCredential.

      Parameters:
      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.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector -
      • tree inspector to collect and process attributes.
      This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getAuthType

      @Stability(Stable) @NotNull public String getAuthType()
      The type of authentication used by the credentials.

      Valid options are OAUTH, BASIC_AUTH, or PERSONAL_ACCESS_TOKEN.

    • setAuthType

      @Stability(Stable) public void setAuthType(@NotNull String value)
      The type of authentication used by the credentials.

      Valid options are OAUTH, BASIC_AUTH, or PERSONAL_ACCESS_TOKEN.

    • getServerType

      @Stability(Stable) @NotNull public String getServerType()
      The type of source provider.

      The valid options are GITHUB, GITHUB_ENTERPRISE, or BITBUCKET.

    • setServerType

      @Stability(Stable) public void setServerType(@NotNull String value)
      The type of source provider.

      The valid options are GITHUB, GITHUB_ENTERPRISE, or BITBUCKET.

    • getToken

      @Stability(Stable) @NotNull public String getToken()
      For GitHub or GitHub Enterprise, this is the personal access token.

      For Bitbucket, this is the app password.

    • setToken

      @Stability(Stable) public void setToken(@NotNull String value)
      For GitHub or GitHub Enterprise, this is the personal access token.

      For Bitbucket, this is the app password.

    • getUsername

      @Stability(Stable) @Nullable public String getUsername()
      The Bitbucket username when the authType is BASIC_AUTH.

      This parameter is not valid for other types of source providers or connections.

    • setUsername

      @Stability(Stable) public void setUsername(@Nullable String value)
      The Bitbucket username when the authType is BASIC_AUTH.

      This parameter is not valid for other types of source providers or connections.