Class CfnGitHubRepository
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.codestar.CfnGitHubRepository
- All Implemented Interfaces:
IEnvironmentAware,IInspectable,IGitHubRepositoryRef,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.118.0 (build 02eec31)",
date="2025-11-10T13:40:01.081Z")
@Stability(Stable)
public class CfnGitHubRepository
extends CfnResource
implements IInspectable, IGitHubRepositoryRef
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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnGitHubRepository.static interfaceTheCodeproperty type specifies information about code to be committed.static interfaceTheS3property type specifies information about the Amazon S3 bucket that contains the code to be committed to the new repository.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.codestar.IGitHubRepositoryRef
IGitHubRepositoryRef.Jsii$Default, IGitHubRepositoryRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnGitHubRepository(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnGitHubRepository(software.amazon.jsii.JsiiObjectRef objRef) CfnGitHubRepository(software.constructs.Construct scope, String id, CfnGitHubRepositoryProps props) -
Method Summary
Modifier and TypeMethodDescriptionThe repository ID.getCode()Information about code to be committed to a repository after it is created in an AWS CloudFormation stack.Indicates whether to enable issues for the GitHub repository.A reference to a GitHubRepository resource.Indicates whether the GitHub repository is a private repository.The GitHub user's personal access token for the GitHub repository.A comment or description about the new repository.The name of the repository you want to create in GitHub with AWS CloudFormation stack creation.The GitHub user name for the owner of the GitHub repository to be created.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetCode(IResolvable value) Information about code to be committed to a repository after it is created in an AWS CloudFormation stack.voidInformation about code to be committed to a repository after it is created in an AWS CloudFormation stack.voidsetConnectionArn(String value) voidsetEnableIssues(Boolean value) Indicates whether to enable issues for the GitHub repository.voidsetEnableIssues(IResolvable value) Indicates whether to enable issues for the GitHub repository.voidsetIsPrivate(Boolean value) Indicates whether the GitHub repository is a private repository.voidsetIsPrivate(IResolvable value) Indicates whether the GitHub repository is a private repository.voidsetRepositoryAccessToken(String value) The GitHub user's personal access token for the GitHub repository.voidsetRepositoryDescription(String value) A comment or description about the new repository.voidsetRepositoryName(String value) The name of the repository you want to create in GitHub with AWS CloudFormation stack creation.voidsetRepositoryOwner(String value) The GitHub user name for the owner of the GitHub repository to be created.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
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
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- 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:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrId
The repository ID. -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getGitHubRepositoryRef
A reference to a GitHubRepository resource.- Specified by:
getGitHubRepositoryRefin interfaceIGitHubRepositoryRef
-
getRepositoryName
The name of the repository you want to create in GitHub with AWS CloudFormation stack creation. -
setRepositoryName
The name of the repository you want to create in GitHub with AWS CloudFormation stack creation. -
getRepositoryOwner
The GitHub user name for the owner of the GitHub repository to be created. -
setRepositoryOwner
The GitHub user name for the owner of the GitHub repository to be created. -
getCode
Information about code to be committed to a repository after it is created in an AWS CloudFormation stack.Returns union: either
IResolvableorCfnGitHubRepository.CodeProperty -
setCode
Information about code to be committed to a repository after it is created in an AWS CloudFormation stack. -
setCode
Information about code to be committed to a repository after it is created in an AWS CloudFormation stack. -
getConnectionArn
-
setConnectionArn
-
getEnableIssues
Indicates whether to enable issues for the GitHub repository.Returns union: either
BooleanorIResolvable -
setEnableIssues
Indicates whether to enable issues for the GitHub repository. -
setEnableIssues
Indicates whether to enable issues for the GitHub repository. -
getIsPrivate
Indicates whether the GitHub repository is a private repository.Returns union: either
BooleanorIResolvable -
setIsPrivate
Indicates whether the GitHub repository is a private repository. -
setIsPrivate
Indicates whether the GitHub repository is a private repository. -
getRepositoryAccessToken
The GitHub user's personal access token for the GitHub repository. -
setRepositoryAccessToken
The GitHub user's personal access token for the GitHub repository. -
getRepositoryDescription
A comment or description about the new repository. -
setRepositoryDescription
A comment or description about the new repository.
-