Skip to content
v2.275.0

IRepository Interface ​

Properties ​

The environment this resource belongs to.
notes

For resources that are created and managed in a Stack (those created by creating new class instances like new Role(), new Bucket(), etc.), this is always the same as the environment of the stack they belong to.

For referenced resources (those obtained from referencing methods like Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be different than the stack they were imported into.

nodeNodenodeNodenodeNodeNodeNodeNodeNode#
The tree node.
repositoryArnstringrepository_arnstrrepositoryArnStringRepositoryArnstringRepositoryArn*string#
The ARN of this Repository.
repositoryCloneUrlGrcstringrepository_clone_url_grcstrrepositoryCloneUrlGrcStringRepositoryCloneUrlGrcstringRepositoryCloneUrlGrc*string#
The HTTPS (GRC) clone URL.

HTTPS (GRC) is the protocol to use with git-remote-codecommit (GRC).

It is the recommended method for supporting connections made with federated access, identity providers, and temporary credentials.

repositoryCloneUrlHttpstringrepository_clone_url_httpstrrepositoryCloneUrlHttpStringRepositoryCloneUrlHttpstringRepositoryCloneUrlHttp*string#
The HTTP clone URL.
repositoryCloneUrlSshstringrepository_clone_url_sshstrrepositoryCloneUrlSshStringRepositoryCloneUrlSshstringRepositoryCloneUrlSsh*string#
The SSH clone URL.
repositoryNamestringrepository_namestrrepositoryNameStringRepositoryNamestringRepositoryName*string#
The human-visible name of this Repository.
repositoryRefRepositoryReferencerepository_refRepositoryReferencerepositoryRefRepositoryReferenceRepositoryRefRepositoryReferenceRepositoryRefRepositoryReference#
A reference to a Repository resource.
stackStackstackStackstackStackStackStackStackStack#
The stack in which this resource is defined.

Methods ​

applyRemovalPolicy(policy: RemovalPolicy): voiddef apply_removal_policy(self, policy: RemovalPolicy) -> Nonepublic void applyRemovalPolicy(RemovalPolicy policy)public void ApplyRemovalPolicy(RemovalPolicy policy)func ApplyRemovalPolicy(Policy RemovalPolicy)#
Apply the given removal policy to this resource.
notes

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).

bindAsNotificationRuleSource(scope: Construct): NotificationRuleSourceConfigdef bind_as_notification_rule_source(self, scope: Construct) -> NotificationRuleSourceConfigpublic NotificationRuleSourceConfig bindAsNotificationRuleSource(Construct scope)public NotificationRuleSourceConfig BindAsNotificationRuleSource(Construct scope)func BindAsNotificationRuleSource(Scope Construct) NotificationRuleSourceConfig#
Returns a source configuration for notification rule.
grant(grantee: IGrantable, ...actions: string[]): Grantdef grant(self, grantee: IGrantable, actions: str) -> Grantpublic Grant grant(IGrantable grantee, String actions)public Grant Grant(IGrantable grantee, string actions)func Grant(Grantee IGrantable, Actions *string) Grant#
Grant the given principal identity permissions to perform the actions on this repository.
grantPull(grantee: IGrantable): Grantdef grant_pull(self, grantee: IGrantable) -> Grantpublic Grant grantPull(IGrantable grantee)public Grant GrantPull(IGrantable grantee)func GrantPull(Grantee IGrantable) Grant#
Grant the given identity permissions to pull this repository.
grantPullPush(grantee: IGrantable): Grantdef grant_pull_push(self, grantee: IGrantable) -> Grantpublic Grant grantPullPush(IGrantable grantee)public Grant GrantPullPush(IGrantable grantee)func GrantPullPush(Grantee IGrantable) Grant#
Grant the given identity permissions to pull and push this repository.
grantRead(grantee: IGrantable): Grantdef grant_read(self, grantee: IGrantable) -> Grantpublic Grant grantRead(IGrantable grantee)public Grant GrantRead(IGrantable grantee)func GrantRead(Grantee IGrantable) Grant#
Grant the given identity permissions to read this repository.
notifyOn(id: string, target: INotificationRuleTarget, options: RepositoryNotifyOnOptions): INotificationRuledef notify_on(self, id: str, target: INotificationRuleTarget, options: RepositoryNotifyOnOptions) -> INotificationRulepublic INotificationRule notifyOn(String id, INotificationRuleTarget target, RepositoryNotifyOnOptions options)public INotificationRule NotifyOn(string id, INotificationRuleTarget target, RepositoryNotifyOnOptions options)func NotifyOn(Id *string, Target INotificationRuleTarget, Options RepositoryNotifyOnOptions) INotificationRule#
Defines a CodeStar Notification rule triggered when the project events specified by you are emitted. Similar to `onEvent` API.

You can also use the methods to define rules for the specific event emitted. e.g. notifyOnPullRequestCreated.

returns

Returns: CodeStar Notifications rule associated with this repository.

notifyOnApprovalRuleOverridden(id: string, target: INotificationRuleTarget, options?: NotificationRuleOptions): INotificationRuledef notify_on_approval_rule_overridden(self, id: str, target: INotificationRuleTarget, options: typing.Optional[NotificationRuleOptions] = None) -> INotificationRulepublic INotificationRule notifyOnApprovalRuleOverridden(String id, INotificationRuleTarget target, NotificationRuleOptions options)public INotificationRule NotifyOnApprovalRuleOverridden(string id, INotificationRuleTarget target, NotificationRuleOptions? options = null)func NotifyOnApprovalRuleOverridden(Id *string, Target INotificationRuleTarget, Options NotificationRuleOptions) INotificationRule#
Defines a CodeStar Notification rule which triggers when an approval rule is overridden.
notifyOnApprovalStatusChanged(id: string, target: INotificationRuleTarget, options?: NotificationRuleOptions): INotificationRuledef notify_on_approval_status_changed(self, id: str, target: INotificationRuleTarget, options: typing.Optional[NotificationRuleOptions] = None) -> INotificationRulepublic INotificationRule notifyOnApprovalStatusChanged(String id, INotificationRuleTarget target, NotificationRuleOptions options)public INotificationRule NotifyOnApprovalStatusChanged(string id, INotificationRuleTarget target, NotificationRuleOptions? options = null)func NotifyOnApprovalStatusChanged(Id *string, Target INotificationRuleTarget, Options NotificationRuleOptions) INotificationRule#
Defines a CodeStar Notification rule which triggers when an approval status is changed.
notifyOnBranchOrTagCreated(id: string, target: INotificationRuleTarget, options?: NotificationRuleOptions): INotificationRuledef notify_on_branch_or_tag_created(self, id: str, target: INotificationRuleTarget, options: typing.Optional[NotificationRuleOptions] = None) -> INotificationRulepublic INotificationRule notifyOnBranchOrTagCreated(String id, INotificationRuleTarget target, NotificationRuleOptions options)public INotificationRule NotifyOnBranchOrTagCreated(string id, INotificationRuleTarget target, NotificationRuleOptions? options = null)func NotifyOnBranchOrTagCreated(Id *string, Target INotificationRuleTarget, Options NotificationRuleOptions) INotificationRule#
Defines a CodeStar Notification rule which triggers when a new branch or tag is created.
notifyOnBranchOrTagDeleted(id: string, target: INotificationRuleTarget, options?: NotificationRuleOptions): INotificationRuledef notify_on_branch_or_tag_deleted(self, id: str, target: INotificationRuleTarget, options: typing.Optional[NotificationRuleOptions] = None) -> INotificationRulepublic INotificationRule notifyOnBranchOrTagDeleted(String id, INotificationRuleTarget target, NotificationRuleOptions options)public INotificationRule NotifyOnBranchOrTagDeleted(string id, INotificationRuleTarget target, NotificationRuleOptions? options = null)func NotifyOnBranchOrTagDeleted(Id *string, Target INotificationRuleTarget, Options NotificationRuleOptions) INotificationRule#
Defines a CodeStar Notification rule which triggers when a branch or tag is deleted.
notifyOnPullRequestComment(id: string, target: INotificationRuleTarget, options?: NotificationRuleOptions): INotificationRuledef notify_on_pull_request_comment(self, id: str, target: INotificationRuleTarget, options: typing.Optional[NotificationRuleOptions] = None) -> INotificationRulepublic INotificationRule notifyOnPullRequestComment(String id, INotificationRuleTarget target, NotificationRuleOptions options)public INotificationRule NotifyOnPullRequestComment(string id, INotificationRuleTarget target, NotificationRuleOptions? options = null)func NotifyOnPullRequestComment(Id *string, Target INotificationRuleTarget, Options NotificationRuleOptions) INotificationRule#
Defines a CodeStar Notification rule which triggers when a comment is made on a pull request.
notifyOnPullRequestCreated(id: string, target: INotificationRuleTarget, options?: NotificationRuleOptions): INotificationRuledef notify_on_pull_request_created(self, id: str, target: INotificationRuleTarget, options: typing.Optional[NotificationRuleOptions] = None) -> INotificationRulepublic INotificationRule notifyOnPullRequestCreated(String id, INotificationRuleTarget target, NotificationRuleOptions options)public INotificationRule NotifyOnPullRequestCreated(string id, INotificationRuleTarget target, NotificationRuleOptions? options = null)func NotifyOnPullRequestCreated(Id *string, Target INotificationRuleTarget, Options NotificationRuleOptions) INotificationRule#
Defines a CodeStar Notification rule which triggers when a pull request is created.
notifyOnPullRequestMerged(id: string, target: INotificationRuleTarget, options?: NotificationRuleOptions): INotificationRuledef notify_on_pull_request_merged(self, id: str, target: INotificationRuleTarget, options: typing.Optional[NotificationRuleOptions] = None) -> INotificationRulepublic INotificationRule notifyOnPullRequestMerged(String id, INotificationRuleTarget target, NotificationRuleOptions options)public INotificationRule NotifyOnPullRequestMerged(string id, INotificationRuleTarget target, NotificationRuleOptions? options = null)func NotifyOnPullRequestMerged(Id *string, Target INotificationRuleTarget, Options NotificationRuleOptions) INotificationRule#
Defines a CodeStar Notification rule which triggers when a pull request is merged.
onCommentOnCommit(id: string, options?: OnEventOptions): Ruledef on_comment_on_commit(self, id: str, options: typing.Optional[OnEventOptions] = None) -> Rulepublic Rule onCommentOnCommit(String id, OnEventOptions options)public Rule OnCommentOnCommit(string id, OnEventOptions? options = null)func OnCommentOnCommit(Id *string, Options OnEventOptions) Rule#
Defines a CloudWatch event rule which triggers when a comment is made on a commit.
onCommentOnPullRequest(id: string, options?: OnEventOptions): Ruledef on_comment_on_pull_request(self, id: str, options: typing.Optional[OnEventOptions] = None) -> Rulepublic Rule onCommentOnPullRequest(String id, OnEventOptions options)public Rule OnCommentOnPullRequest(string id, OnEventOptions? options = null)func OnCommentOnPullRequest(Id *string, Options OnEventOptions) Rule#
Defines a CloudWatch event rule which triggers when a comment is made on a pull request.
onCommit(id: string, options?: OnCommitOptions): Ruledef on_commit(self, id: str, options: typing.Optional[OnCommitOptions] = None) -> Rulepublic Rule onCommit(String id, OnCommitOptions options)public Rule OnCommit(string id, OnCommitOptions? options = null)func OnCommit(Id *string, Options OnCommitOptions) Rule#
Defines a CloudWatch event rule which triggers when a commit is pushed to a branch.
onEvent(id: string, options?: OnEventOptions): Ruledef on_event(self, id: str, options: typing.Optional[OnEventOptions] = None) -> Rulepublic Rule onEvent(String id, OnEventOptions options)public Rule OnEvent(string id, OnEventOptions? options = null)func OnEvent(Id *string, Options OnEventOptions) Rule#
Defines a CloudWatch event rule which triggers for repository events.

Use rule.addEventPattern(pattern) to specify a filter.

onPullRequestStateChange(id: string, options?: OnEventOptions): Ruledef on_pull_request_state_change(self, id: str, options: typing.Optional[OnEventOptions] = None) -> Rulepublic Rule onPullRequestStateChange(String id, OnEventOptions options)public Rule OnPullRequestStateChange(string id, OnEventOptions? options = null)func OnPullRequestStateChange(Id *string, Options OnEventOptions) Rule#
Defines a CloudWatch event rule which triggers when a pull request state is changed.
onReferenceCreated(id: string, options?: OnEventOptions): Ruledef on_reference_created(self, id: str, options: typing.Optional[OnEventOptions] = None) -> Rulepublic Rule onReferenceCreated(String id, OnEventOptions options)public Rule OnReferenceCreated(string id, OnEventOptions? options = null)func OnReferenceCreated(Id *string, Options OnEventOptions) Rule#
Defines a CloudWatch event rule which triggers when a reference is created (i.e. a new branch/tag is created) to the repository.
onReferenceDeleted(id: string, options?: OnEventOptions): Ruledef on_reference_deleted(self, id: str, options: typing.Optional[OnEventOptions] = None) -> Rulepublic Rule onReferenceDeleted(String id, OnEventOptions options)public Rule OnReferenceDeleted(string id, OnEventOptions? options = null)func OnReferenceDeleted(Id *string, Options OnEventOptions) Rule#
Defines a CloudWatch event rule which triggers when a reference is delete (i.e. a branch/tag is deleted) from the repository.
onReferenceUpdated(id: string, options?: OnEventOptions): Ruledef on_reference_updated(self, id: str, options: typing.Optional[OnEventOptions] = None) -> Rulepublic Rule onReferenceUpdated(String id, OnEventOptions options)public Rule OnReferenceUpdated(string id, OnEventOptions? options = null)func OnReferenceUpdated(Id *string, Options OnEventOptions) Rule#
Defines a CloudWatch event rule which triggers when a reference is updated (i.e. a commit is pushed to an existing or new branch) from the repository.
onStateChange(id: string, options?: OnEventOptions): Ruledef on_state_change(self, id: str, options: typing.Optional[OnEventOptions] = None) -> Rulepublic Rule onStateChange(String id, OnEventOptions options)public Rule OnStateChange(string id, OnEventOptions? options = null)func OnStateChange(Id *string, Options OnEventOptions) Rule#
Defines a CloudWatch event rule which triggers when a "CodeCommit Repository State Change" event occurs.
with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func With(Mixins IMixin) IConstruct#
Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited.

1 parameter · returns

Parameters

  • mixinsmixinsmixinsmixinsMixins — The mixins to apply.

Returns: This construct for chaining