Class CfnGitHubRepository

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:37.969Z") @Stability(Stable) public class CfnGitHubRepository extends CfnResource implements IInspectable
A CloudFormation AWS::CodeStar::GitHubRepository.

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. For more information about using a GitHub source repository with AWS CodeStar projects, see AWS CodeStar Project Files and Resources .

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();
 
  • 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 Construct scope, @NotNull String id, @NotNull CfnGitHubRepositoryProps props)
      Create a new AWS::CodeStar::GitHubRepository.

      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
    • 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.

      If this repository should be owned by a GitHub organization, provide its name.

    • setRepositoryOwner

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

      If this repository should be owned by a GitHub organization, provide its name.

    • 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 CfnGitHubRepository.CodeProperty 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 IResolvable 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()
      AWS::CodeStar::GitHubRepository.ConnectionArn.
    • setConnectionArn

      @Stability(Stable) public void setConnectionArn(@Nullable String value)
      AWS::CodeStar::GitHubRepository.ConnectionArn.
    • getEnableIssues

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

      You can use GitHub issues to track information and bugs for your repository.

    • setEnableIssues

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

      You can use GitHub issues to track information and bugs for your repository.

    • setEnableIssues

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

      You can use GitHub issues to track information and bugs for your repository.

    • getIsPrivate

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

      If so, you choose who can see and commit to this repository.

    • setIsPrivate

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

      If so, you choose who can see and commit to this repository.

    • setIsPrivate

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

      If so, you choose who can see and commit to this 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.

      This description is displayed in GitHub after the repository is created.

    • setRepositoryDescription

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

      This description is displayed in GitHub after the repository is created.