awscdkawscodestaralpha

package module
v2.0.0-rc.24 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

README

AWS::CodeStar Construct Library


All classes with the Cfn prefix in this module (CFN Resources) are always stable and safe to use.

The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the Semantic Versioning model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.


GitHub Repository

To create a new GitHub Repository and commit the assets from S3 bucket into the repository after it is created:

import * as codestar from '@aws-cdk/aws-codestar';
import * as s3 from '@aws-cdk/aws-s3'

new codestar.GitHubRepository(stack, 'GitHubRepo', {
  owner: 'aws',
  repositoryName: 'aws-cdk',
  accessToken: cdk.SecretValue.secretsManager('my-github-token', {
    jsonField: 'token',
  }),
  contentsBucket: s3.Bucket.fromBucketName(stack, 'Bucket', 'bucket-name'),
  contentsKey: 'import.zip',
});

Update or Delete the GitHubRepository

At this moment, updates to the GitHubRepository are not supported and the repository will not be deleted upon the deletion of the CloudFormation stack. You will need to update or delete the GitHub repository manually.

Documentation

Overview

The CDK Construct Library for AWS::CodeStar

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GitHubRepository_IsConstruct

func GitHubRepository_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead

func GitHubRepository_IsResource

func GitHubRepository_IsResource(construct constructs.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func NewGitHubRepository_Override

func NewGitHubRepository_Override(g GitHubRepository, scope constructs.Construct, id *string, props *GitHubRepositoryProps)

Experimental.

Types

type GitHubRepository

type GitHubRepository interface {
	awscdk.Resource
	IGitHubRepository
	Env() *awscdk.ResourceEnvironment
	Node() constructs.Node
	Owner() *string
	PhysicalName() *string
	Repo() *string
	Stack() awscdk.Stack
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	GeneratePhysicalName() *string
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	GetResourceNameAttribute(nameAttr *string) *string
	ToString() *string
}

The GitHubRepository resource. Experimental.

func NewGitHubRepository

func NewGitHubRepository(scope constructs.Construct, id *string, props *GitHubRepositoryProps) GitHubRepository

Experimental.

type GitHubRepositoryProps

type GitHubRepositoryProps struct {
	// The GitHub user's personal access token for the GitHub repository.
	// Experimental.
	AccessToken awscdk.SecretValue `json:"accessToken"`
	// The name of the Amazon S3 bucket that contains the ZIP file with the content to be committed to the new repository.
	// Experimental.
	ContentsBucket awss3.IBucket `json:"contentsBucket"`
	// The S3 object key or file name for the ZIP file.
	// Experimental.
	ContentsKey *string `json:"contentsKey"`
	// 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
	// Experimental.
	Owner *string `json:"owner"`
	// The name of the repository you want to create in GitHub with AWS CloudFormation stack creation.
	// Experimental.
	RepositoryName *string `json:"repositoryName"`
	// The object version of the ZIP file, if versioning is enabled for the Amazon S3 bucket.
	// Experimental.
	ContentsS3Version *string `json:"contentsS3Version"`
	// A comment or description about the new repository.
	//
	// This description is displayed in GitHub after the repository
	// is created.
	// Experimental.
	Description *string `json:"description"`
	// Indicates whether to enable issues for the GitHub repository.
	//
	// You can use GitHub issues to track information
	// and bugs for your repository.
	// Experimental.
	EnableIssues *bool `json:"enableIssues"`
	// Indicates whether the GitHub repository is a private repository.
	//
	// If so, you choose who can see and commit to
	// this repository.
	// Experimental.
	Visibility RepositoryVisibility `json:"visibility"`
}

Construction properties of {@link GitHubRepository}. Experimental.

type IGitHubRepository

type IGitHubRepository interface {
	awscdk.IResource
	// the repository owner.
	// Experimental.
	Owner() *string
	// the repository name.
	// Experimental.
	Repo() *string
}

GitHubRepository resource interface. Experimental.

type RepositoryVisibility

type RepositoryVisibility string

Visibility of the GitHubRepository. Experimental.

const (
	RepositoryVisibility_PRIVATE RepositoryVisibility = "PRIVATE"
	RepositoryVisibility_PUBLIC  RepositoryVisibility = "PUBLIC"
)

Directories

Path Synopsis
Package jsii contains the functionaility needed for jsii packages to initialize their dependencies and themselves.
Package jsii contains the functionaility needed for jsii packages to initialize their dependencies and themselves.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL