@Generated(value="jsii-pacmak/1.73.0 (build 6faeda3)", date="2023-01-31T18:36:52.226Z") @Stability(value=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. 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();
| Modifier and Type | Class and Description |
|---|---|
static class |
CfnGitHubRepository.Builder
A fluent builder for
CfnGitHubRepository. |
static interface |
CfnGitHubRepository.CodeProperty
The `Code` property type specifies information about code to be committed.
|
static interface |
CfnGitHubRepository.S3Property
The `S3` property type specifies information about the Amazon S3 bucket that contains the code to be committed to the new repository.
|
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$ProxyIConstruct.Jsii$Default| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnGitHubRepository(Construct scope,
String id,
CfnGitHubRepositoryProps props)
Create a new `AWS::CodeStar::GitHubRepository`.
|
protected |
CfnGitHubRepository(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnGitHubRepository(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
protected Map<String,Object> |
getCfnProperties() |
Object |
getCode()
Information about code to be committed to a repository after it is created in an AWS CloudFormation stack.
|
String |
getConnectionArn()
`AWS::CodeStar::GitHubRepository.ConnectionArn`.
|
Object |
getEnableIssues()
Indicates whether to enable issues for the GitHub repository.
|
Object |
getIsPrivate()
Indicates whether the GitHub repository is a private repository.
|
String |
getRepositoryAccessToken()
The GitHub user's personal access token for the GitHub repository.
|
String |
getRepositoryDescription()
A comment or description about the new repository.
|
String |
getRepositoryName()
The name of the repository you want to create in GitHub with AWS CloudFormation stack creation.
|
String |
getRepositoryOwner()
The GitHub user name for the owner of the GitHub repository to be created.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setCode(CfnGitHubRepository.CodeProperty value)
Information about code to be committed to a repository after it is created in an AWS CloudFormation stack.
|
void |
setCode(IResolvable value)
Information about code to be committed to a repository after it is created in an AWS CloudFormation stack.
|
void |
setConnectionArn(String value)
`AWS::CodeStar::GitHubRepository.ConnectionArn`.
|
void |
setEnableIssues(Boolean value)
Indicates whether to enable issues for the GitHub repository.
|
void |
setEnableIssues(IResolvable value)
Indicates whether to enable issues for the GitHub repository.
|
void |
setIsPrivate(Boolean value)
Indicates whether the GitHub repository is a private repository.
|
void |
setIsPrivate(IResolvable value)
Indicates whether the GitHub repository is a private repository.
|
void |
setRepositoryAccessToken(String value)
The GitHub user's personal access token for the GitHub repository.
|
void |
setRepositoryDescription(String value)
A comment or description about the new repository.
|
void |
setRepositoryName(String value)
The name of the repository you want to create in GitHub with AWS CloudFormation stack creation.
|
void |
setRepositoryOwner(String value)
The GitHub user name for the owner of the GitHub repository to be created.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdgetNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validatejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnGitHubRepository(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnGitHubRepository(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnGitHubRepository(@NotNull
Construct scope,
@NotNull
String id,
@NotNull
CfnGitHubRepositoryProps props)
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.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public String getRepositoryName()
@Stability(value=Stable)
public void setRepositoryName(@NotNull
String value)
@Stability(value=Stable) @NotNull public String getRepositoryOwner()
If this repository should be owned by a GitHub organization, provide its name.
@Stability(value=Stable)
public void setRepositoryOwner(@NotNull
String value)
If this repository should be owned by a GitHub organization, provide its name.
@Stability(value=Stable) @Nullable public Object getCode()
@Stability(value=Stable)
public void setCode(@Nullable
CfnGitHubRepository.CodeProperty value)
@Stability(value=Stable)
public void setCode(@Nullable
IResolvable value)
@Stability(value=Stable) @Nullable public String getConnectionArn()
@Stability(value=Stable)
public void setConnectionArn(@Nullable
String value)
@Stability(value=Stable) @Nullable public Object getEnableIssues()
You can use GitHub issues to track information and bugs for your repository.
@Stability(value=Stable)
public void setEnableIssues(@Nullable
Boolean value)
You can use GitHub issues to track information and bugs for your repository.
@Stability(value=Stable)
public void setEnableIssues(@Nullable
IResolvable value)
You can use GitHub issues to track information and bugs for your repository.
@Stability(value=Stable) @Nullable public Object getIsPrivate()
If so, you choose who can see and commit to this repository.
@Stability(value=Stable)
public void setIsPrivate(@Nullable
Boolean value)
If so, you choose who can see and commit to this repository.
@Stability(value=Stable)
public void setIsPrivate(@Nullable
IResolvable value)
If so, you choose who can see and commit to this repository.
@Stability(value=Stable) @Nullable public String getRepositoryAccessToken()
@Stability(value=Stable)
public void setRepositoryAccessToken(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getRepositoryDescription()
This description is displayed in GitHub after the repository is created.
@Stability(value=Stable)
public void setRepositoryDescription(@Nullable
String value)
This description is displayed in GitHub after the repository is created.
Copyright © 2023. All rights reserved.