Class CfnGitHubRepository

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

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-06T23:25:06.258Z") @Stability(Stable) public class CfnGitHubRepository extends CfnResource implements IInspectable
The AWS::CodeStar::GitHubRepository resource creates a GitHub repository where users can store source code for use with AWS workflows.

You must provide a location for the source code ZIP file in the AWS CloudFormation template, so the code can be uploaded to the created repository. You must have created a personal access token in GitHub to provide in the AWS CloudFormation template. AWS uses this token to connect to GitHub on your behalf.

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.codestar.*;
 CfnGitHubRepository cfnGitHubRepository = CfnGitHubRepository.Builder.create(this, "MyCfnGitHubRepository")
         .repositoryName("repositoryName")
         .repositoryOwner("repositoryOwner")
         // the properties below are optional
         .code(CodeProperty.builder()
                 .s3(S3Property.builder()
                         .bucket("bucket")
                         .key("key")
                         // the properties below are optional
                         .objectVersion("objectVersion")
                         .build())
                 .build())
         .connectionArn("connectionArn")
         .enableIssues(false)
         .isPrivate(false)
         .repositoryAccessToken("repositoryAccessToken")
         .repositoryDescription("repositoryDescription")
         .build();
 

See Also:
  • 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

    • CfnGitHubRepository

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

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

      @Stability(Stable) public CfnGitHubRepository(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnGitHubRepositoryProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). 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.
    • getAttrId

      @Stability(Stable) @NotNull public String getAttrId()
    • getCfnProperties

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

      @Stability(Stable) @NotNull public String getRepositoryName()
      The name of the repository you want to create in GitHub with AWS CloudFormation stack creation.
    • setRepositoryName

      @Stability(Stable) public void setRepositoryName(@NotNull String value)
      The name of the repository you want to create in GitHub with AWS CloudFormation stack creation.
    • getRepositoryOwner

      @Stability(Stable) @NotNull public String getRepositoryOwner()
      The GitHub user name for the owner of the GitHub repository to be created.
    • setRepositoryOwner

      @Stability(Stable) public void setRepositoryOwner(@NotNull String value)
      The GitHub user name for the owner of the GitHub repository to be created.
    • getCode

      @Stability(Stable) @Nullable public Object getCode()
      Information about code to be committed to a repository after it is created in an AWS CloudFormation stack.
    • setCode

      @Stability(Stable) public void setCode(@Nullable IResolvable value)
      Information about code to be committed to a repository after it is created in an AWS CloudFormation stack.
    • setCode

      @Stability(Stable) public void setCode(@Nullable CfnGitHubRepository.CodeProperty value)
      Information about code to be committed to a repository after it is created in an AWS CloudFormation stack.
    • getConnectionArn

      @Stability(Stable) @Nullable public String getConnectionArn()
    • setConnectionArn

      @Stability(Stable) public void setConnectionArn(@Nullable String value)
    • getEnableIssues

      @Stability(Stable) @Nullable public Object getEnableIssues()
      Indicates whether to enable issues for the GitHub repository.
    • setEnableIssues

      @Stability(Stable) public void setEnableIssues(@Nullable Boolean value)
      Indicates whether to enable issues for the GitHub repository.
    • setEnableIssues

      @Stability(Stable) public void setEnableIssues(@Nullable IResolvable value)
      Indicates whether to enable issues for the GitHub repository.
    • getIsPrivate

      @Stability(Stable) @Nullable public Object getIsPrivate()
      Indicates whether the GitHub repository is a private repository.
    • setIsPrivate

      @Stability(Stable) public void setIsPrivate(@Nullable Boolean value)
      Indicates whether the GitHub repository is a private repository.
    • setIsPrivate

      @Stability(Stable) public void setIsPrivate(@Nullable IResolvable value)
      Indicates whether the GitHub repository is a private repository.
    • getRepositoryAccessToken

      @Stability(Stable) @Nullable public String getRepositoryAccessToken()
      The GitHub user's personal access token for the GitHub repository.
    • setRepositoryAccessToken

      @Stability(Stable) public void setRepositoryAccessToken(@Nullable String value)
      The GitHub user's personal access token for the GitHub repository.
    • getRepositoryDescription

      @Stability(Stable) @Nullable public String getRepositoryDescription()
      A comment or description about the new repository.
    • setRepositoryDescription

      @Stability(Stable) public void setRepositoryDescription(@Nullable String value)
      A comment or description about the new repository.