interface IRepository
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.CodeCommit.IRepository |
![]() | software.amazon.awscdk.services.codecommit.IRepository |
![]() | aws_cdk.aws_codecommit.IRepository |
![]() | @aws-cdk/aws-codecommit » IRepository |
Implemented by
Repository
Obtainable from
Repository
.fromRepositoryArn()
, Repository
.fromRepositoryName()
Properties
Name | Type | Description |
---|---|---|
env | Resource | The environment this resource belongs to. |
node | Construct | The construct tree node for this construct. |
repository | string | The ARN of this Repository. |
repository | string | The HTTPS (GRC) clone URL. |
repository | string | The HTTP clone URL. |
repository | string | The SSH clone URL. |
repository | string | The human-visible name of this Repository. |
stack | Stack | The stack in which this resource is defined. |
env
Type:
Resource
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
node
Type:
Construct
The construct tree node for this construct.
repositoryArn
Type:
string
The ARN of this Repository.
repositoryCloneUrlGrc
Type:
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.
repositoryCloneUrlHttp
Type:
string
The HTTP clone URL.
repositoryCloneUrlSsh
Type:
string
The SSH clone URL.
repositoryName
Type:
string
The human-visible name of this Repository.
stack
Type:
Stack
The stack in which this resource is defined.
Methods
Name | Description |
---|---|
apply | Apply the given removal policy to this resource. |
bind | Returns a source configuration for notification rule. |
grant(grantee, ...actions) | Grant the given principal identity permissions to perform the actions on this repository. |
grant | Grant the given identity permissions to pull this repository. |
grant | Grant the given identity permissions to pull and push this repository. |
grant | Grant the given identity permissions to read this repository. |
notifiy | Defines a CodeStar Notification rule which triggers when a pull request is merged. |
notify | Defines a CodeStar Notification rule triggered when the project events specified by you are emitted. Similar to onEvent API. |
notify | Defines a CodeStar Notification rule which triggers when an approval rule is overridden. |
notify | Defines a CodeStar Notification rule which triggers when an approval status is changed. |
notify | Defines a CodeStar Notification rule which triggers when a new branch or tag is created. |
notify | Defines a CodeStar Notification rule which triggers when a branch or tag is deleted. |
notify | Defines a CodeStar Notification rule which triggers when a comment is made on a pull request. |
notify | Defines a CodeStar Notification rule which triggers when a pull request is created. |
notify | Defines a CodeStar Notification rule which triggers when a pull request is merged. |
on | Defines a CloudWatch event rule which triggers when a comment is made on a commit. |
on | Defines a CloudWatch event rule which triggers when a comment is made on a pull request. |
on | Defines a CloudWatch event rule which triggers when a commit is pushed to a branch. |
on | Defines a CloudWatch event rule which triggers for repository events. |
on | Defines a CloudWatch event rule which triggers when a pull request state is changed. |
on | Defines a CloudWatch event rule which triggers when a reference is created (i.e. a new branch/tag is created) to the repository. |
on | Defines a CloudWatch event rule which triggers when a reference is delete (i.e. a branch/tag is deleted) from the repository. |
on | 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. |
on | Defines a CloudWatch event rule which triggers when a "CodeCommit Repository State Change" event occurs. |
applyRemovalPolicy(policy)
public applyRemovalPolicy(policy: RemovalPolicy): void
Parameters
- policy
Removal
Policy
Apply the given removal policy to this resource.
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)
public bindAsNotificationRuleSource(scope: Construct): NotificationRuleSourceConfig
Parameters
- scope
Construct
Returns
Returns a source configuration for notification rule.
grant(grantee, ...actions)
public grant(grantee: IGrantable, ...actions: string[]): Grant
Parameters
- grantee
IGrantable
- actions
string
Returns
Grant the given principal identity permissions to perform the actions on this repository.
grantPull(grantee)
public grantPull(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
Returns
Grant the given identity permissions to pull this repository.
grantPullPush(grantee)
public grantPullPush(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
Returns
Grant the given identity permissions to pull and push this repository.
grantRead(grantee)
public grantRead(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
Returns
Grant the given identity permissions to read this repository.
notifiyOnPullRequestMerged(id, target, options?)
public notifiyOnPullRequestMerged(id: string, target: INotificationRuleTarget, options?: NotificationRuleOptions): INotificationRule
⚠️ Deprecated: this method has a typo in its name, use notifyOnPullRequestMerged instead
Parameters
- id
string
- target
INotification
Rule Target - options
Notification
Rule Options
Returns
Defines a CodeStar Notification rule which triggers when a pull request is merged.
notifyOn(id, target, options)
public notifyOn(id: string, target: INotificationRuleTarget, options: RepositoryNotifyOnOptions): INotificationRule
Parameters
- id
string
- target
INotification
Rule Target - options
Repository
Notify On Options
Returns
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.
eg: notifyOnPullRequstCreated
.
notifyOnApprovalRuleOverridden(id, target, options?)
public notifyOnApprovalRuleOverridden(id: string, target: INotificationRuleTarget, options?: NotificationRuleOptions): INotificationRule
Parameters
- id
string
- target
INotification
Rule Target - options
Notification
Rule Options
Returns
Defines a CodeStar Notification rule which triggers when an approval rule is overridden.
notifyOnApprovalStatusChanged(id, target, options?)
public notifyOnApprovalStatusChanged(id: string, target: INotificationRuleTarget, options?: NotificationRuleOptions): INotificationRule
Parameters
- id
string
- target
INotification
Rule Target - options
Notification
Rule Options
Returns
Defines a CodeStar Notification rule which triggers when an approval status is changed.
notifyOnBranchOrTagCreated(id, target, options?)
public notifyOnBranchOrTagCreated(id: string, target: INotificationRuleTarget, options?: NotificationRuleOptions): INotificationRule
Parameters
- id
string
- target
INotification
Rule Target - options
Notification
Rule Options
Returns
Defines a CodeStar Notification rule which triggers when a new branch or tag is created.
notifyOnBranchOrTagDeleted(id, target, options?)
public notifyOnBranchOrTagDeleted(id: string, target: INotificationRuleTarget, options?: NotificationRuleOptions): INotificationRule
Parameters
- id
string
- target
INotification
Rule Target - options
Notification
Rule Options
Returns
Defines a CodeStar Notification rule which triggers when a branch or tag is deleted.
notifyOnPullRequestComment(id, target, options?)
public notifyOnPullRequestComment(id: string, target: INotificationRuleTarget, options?: NotificationRuleOptions): INotificationRule
Parameters
- id
string
- target
INotification
Rule Target - options
Notification
Rule Options
Returns
Defines a CodeStar Notification rule which triggers when a comment is made on a pull request.
notifyOnPullRequestCreated(id, target, options?)
public notifyOnPullRequestCreated(id: string, target: INotificationRuleTarget, options?: NotificationRuleOptions): INotificationRule
Parameters
- id
string
- target
INotification
Rule Target - options
Notification
Rule Options
Returns
Defines a CodeStar Notification rule which triggers when a pull request is created.
notifyOnPullRequestMerged(id, target, options?)
public notifyOnPullRequestMerged(id: string, target: INotificationRuleTarget, options?: NotificationRuleOptions): INotificationRule
Parameters
- id
string
- target
INotification
Rule Target - options
Notification
Rule Options
Returns
Defines a CodeStar Notification rule which triggers when a pull request is merged.
onCommentOnCommit(id, options?)
public onCommentOnCommit(id: string, options?: OnEventOptions): Rule
Parameters
- id
string
- options
On
Event Options
Returns
Defines a CloudWatch event rule which triggers when a comment is made on a commit.
onCommentOnPullRequest(id, options?)
public onCommentOnPullRequest(id: string, options?: OnEventOptions): Rule
Parameters
- id
string
- options
On
Event Options
Returns
Defines a CloudWatch event rule which triggers when a comment is made on a pull request.
onCommit(id, options?)
public onCommit(id: string, options?: OnCommitOptions): Rule
Parameters
- id
string
- options
On
Commit Options
Returns
Defines a CloudWatch event rule which triggers when a commit is pushed to a branch.
onEvent(id, options?)
public onEvent(id: string, options?: OnEventOptions): Rule
Parameters
- id
string
- options
On
Event Options
Returns
Defines a CloudWatch event rule which triggers for repository events.
Use
rule.addEventPattern(pattern)
to specify a filter.
onPullRequestStateChange(id, options?)
public onPullRequestStateChange(id: string, options?: OnEventOptions): Rule
Parameters
- id
string
- options
On
Event Options
Returns
Defines a CloudWatch event rule which triggers when a pull request state is changed.
onReferenceCreated(id, options?)
public onReferenceCreated(id: string, options?: OnEventOptions): Rule
Parameters
- id
string
- options
On
Event Options
Returns
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, options?)
public onReferenceDeleted(id: string, options?: OnEventOptions): Rule
Parameters
- id
string
- options
On
Event Options
Returns
Defines a CloudWatch event rule which triggers when a reference is delete (i.e. a branch/tag is deleted) from the repository.
onReferenceUpdated(id, options?)
public onReferenceUpdated(id: string, options?: OnEventOptions): Rule
Parameters
- id
string
- options
On
Event Options
Returns
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, options?)
public onStateChange(id: string, options?: OnEventOptions): Rule
Parameters
- id
string
- options
On
Event Options
Returns
Defines a CloudWatch event rule which triggers when a "CodeCommit Repository State Change" event occurs.