@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:37.378Z") @Stability(value=Stable) public class Repository extends Resource implements IRepository
Example:
// Example automatically generated from non-compiling source. May contain errors.
PipelineProject project;
Repository repository = Repository.Builder.create(this, "MyRepository")
.repositoryName("MyRepository")
.build();
PipelineProject project = new PipelineProject(this, "MyProject");
Artifact sourceOutput = new Artifact();
CodeCommitSourceAction sourceAction = CodeCommitSourceAction.Builder.create()
.actionName("CodeCommit")
.repository(repository)
.output(sourceOutput)
.build();
CodeBuildAction buildAction = CodeBuildAction.Builder.create()
.actionName("CodeBuild")
.project(project)
.input(sourceOutput)
.outputs(List.of(new Artifact())) // optional
.executeBatchBuild(true) // optional, defaults to false
.combineBatchBuildArtifacts(true)
.build();
Pipeline.Builder.create(this, "MyPipeline")
.stages(List.of(StageProps.builder()
.stageName("Source")
.actions(List.of(sourceAction))
.build(), StageProps.builder()
.stageName("Build")
.actions(List.of(buildAction))
.build()))
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
Repository.Builder
A fluent builder for
Repository. |
software.amazon.jsii.JsiiObject.InitializationModeIRepository.Jsii$Default, IRepository.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
|
Repository(software.constructs.Construct scope,
String id,
RepositoryProps props) |
protected |
Repository(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
Repository(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
NotificationRuleSourceConfig |
bindAsNotificationRuleSource(software.constructs.Construct _scope)
Returns a source configuration for notification rule.
|
static IRepository |
fromRepositoryArn(software.constructs.Construct scope,
String id,
String repositoryArn)
Imports a codecommit repository.
|
static IRepository |
fromRepositoryName(software.constructs.Construct scope,
String id,
String repositoryName) |
String |
getRepositoryArn()
The ARN of this Repository.
|
String |
getRepositoryCloneUrlGrc()
The HTTPS (GRC) clone URL.
|
String |
getRepositoryCloneUrlHttp()
The HTTP clone URL.
|
String |
getRepositoryCloneUrlSsh()
The SSH clone URL.
|
String |
getRepositoryName()
The human-visible name of this Repository.
|
Grant |
grant(IGrantable grantee,
String... actions)
Grant the given principal identity permissions to perform the actions on this repository.
|
Grant |
grantPull(IGrantable grantee)
Grant the given identity permissions to pull this repository.
|
Grant |
grantPullPush(IGrantable grantee)
Grant the given identity permissions to pull and push this repository.
|
Grant |
grantRead(IGrantable grantee)
Grant the given identity permissions to read this repository.
|
INotificationRule |
notifiyOnPullRequestMerged(String id,
INotificationRuleTarget target)
Defines a CodeStar Notification rule which triggers when a pull request is merged.
|
INotificationRule |
notifiyOnPullRequestMerged(String id,
INotificationRuleTarget target,
NotificationRuleOptions options)
Defines a CodeStar Notification rule which triggers when a pull request is merged.
|
Repository |
notify(String arn)
Create a trigger to notify another service to run actions on repository events.
|
Repository |
notify(String arn,
RepositoryTriggerOptions options)
Create a trigger to notify another service to run actions on repository events.
|
INotificationRule |
notifyOn(String id,
INotificationRuleTarget target,
RepositoryNotifyOnOptions options)
Defines a CodeStar Notification rule triggered when the project events specified by you are emitted.
|
INotificationRule |
notifyOnApprovalRuleOverridden(String id,
INotificationRuleTarget target)
Defines a CodeStar Notification rule which triggers when an approval rule is overridden.
|
INotificationRule |
notifyOnApprovalRuleOverridden(String id,
INotificationRuleTarget target,
NotificationRuleOptions options)
Defines a CodeStar Notification rule which triggers when an approval rule is overridden.
|
INotificationRule |
notifyOnApprovalStatusChanged(String id,
INotificationRuleTarget target)
Defines a CodeStar Notification rule which triggers when an approval status is changed.
|
INotificationRule |
notifyOnApprovalStatusChanged(String id,
INotificationRuleTarget target,
NotificationRuleOptions options)
Defines a CodeStar Notification rule which triggers when an approval status is changed.
|
INotificationRule |
notifyOnBranchOrTagCreated(String id,
INotificationRuleTarget target)
Defines a CodeStar Notification rule which triggers when a new branch or tag is created.
|
INotificationRule |
notifyOnBranchOrTagCreated(String id,
INotificationRuleTarget target,
NotificationRuleOptions options)
Defines a CodeStar Notification rule which triggers when a new branch or tag is created.
|
INotificationRule |
notifyOnBranchOrTagDeleted(String id,
INotificationRuleTarget target)
Defines a CodeStar Notification rule which triggers when a branch or tag is deleted.
|
INotificationRule |
notifyOnBranchOrTagDeleted(String id,
INotificationRuleTarget target,
NotificationRuleOptions options)
Defines a CodeStar Notification rule which triggers when a branch or tag is deleted.
|
INotificationRule |
notifyOnPullRequestComment(String id,
INotificationRuleTarget target)
Defines a CodeStar Notification rule which triggers when a comment is made on a pull request.
|
INotificationRule |
notifyOnPullRequestComment(String id,
INotificationRuleTarget target,
NotificationRuleOptions options)
Defines a CodeStar Notification rule which triggers when a comment is made on a pull request.
|
INotificationRule |
notifyOnPullRequestCreated(String id,
INotificationRuleTarget target)
Defines a CodeStar Notification rule which triggers when a pull request is created.
|
INotificationRule |
notifyOnPullRequestCreated(String id,
INotificationRuleTarget target,
NotificationRuleOptions options)
Defines a CodeStar Notification rule which triggers when a pull request is created.
|
INotificationRule |
notifyOnPullRequestMerged(String id,
INotificationRuleTarget target)
Defines a CodeStar Notification rule which triggers when a pull request is merged.
|
INotificationRule |
notifyOnPullRequestMerged(String id,
INotificationRuleTarget target,
NotificationRuleOptions options)
Defines a CodeStar Notification rule which triggers when a pull request is merged.
|
Rule |
onCommentOnCommit(String id)
Defines a CloudWatch event rule which triggers when a comment is made on a commit.
|
Rule |
onCommentOnCommit(String id,
OnEventOptions options)
Defines a CloudWatch event rule which triggers when a comment is made on a commit.
|
Rule |
onCommentOnPullRequest(String id)
Defines a CloudWatch event rule which triggers when a comment is made on a pull request.
|
Rule |
onCommentOnPullRequest(String id,
OnEventOptions options)
Defines a CloudWatch event rule which triggers when a comment is made on a pull request.
|
Rule |
onCommit(String id)
Defines a CloudWatch event rule which triggers when a commit is pushed to a branch.
|
Rule |
onCommit(String id,
OnCommitOptions options)
Defines a CloudWatch event rule which triggers when a commit is pushed to a branch.
|
Rule |
onEvent(String id)
Defines a CloudWatch event rule which triggers for repository events.
|
Rule |
onEvent(String id,
OnEventOptions options)
Defines a CloudWatch event rule which triggers for repository events.
|
Rule |
onPullRequestStateChange(String id)
Defines a CloudWatch event rule which triggers when a pull request state is changed.
|
Rule |
onPullRequestStateChange(String id,
OnEventOptions options)
Defines a CloudWatch event rule which triggers when a pull request state is changed.
|
Rule |
onReferenceCreated(String id)
Defines a CloudWatch event rule which triggers when a reference is created (i.e.
|
Rule |
onReferenceCreated(String id,
OnEventOptions options)
Defines a CloudWatch event rule which triggers when a reference is created (i.e.
|
Rule |
onReferenceDeleted(String id)
Defines a CloudWatch event rule which triggers when a reference is delete (i.e.
|
Rule |
onReferenceDeleted(String id,
OnEventOptions options)
Defines a CloudWatch event rule which triggers when a reference is delete (i.e.
|
Rule |
onReferenceUpdated(String id)
Defines a CloudWatch event rule which triggers when a reference is updated (i.e.
|
Rule |
onReferenceUpdated(String id,
OnEventOptions options)
Defines a CloudWatch event rule which triggers when a reference is updated (i.e.
|
Rule |
onStateChange(String id)
Defines a CloudWatch event rule which triggers when a "CodeCommit Repository State Change" event occurs.
|
Rule |
onStateChange(String id,
OnEventOptions options)
Defines a CloudWatch event rule which triggers when a "CodeCommit Repository State Change" event occurs.
|
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourcejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitapplyRemovalPolicy, getEnv, getStackprotected Repository(software.amazon.jsii.JsiiObjectRef objRef)
protected Repository(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public Repository(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
RepositoryProps props)
scope - This parameter is required.id - This parameter is required.props - This parameter is required.@Stability(value=Stable) @NotNull public static IRepository fromRepositoryArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String repositoryArn)
scope - This parameter is required.id - This parameter is required.repositoryArn - (e.g. `arn:aws:codecommit:us-east-1:123456789012:MyDemoRepo`). This parameter is required.@Stability(value=Stable) @NotNull public static IRepository fromRepositoryName(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String repositoryName)
scope - This parameter is required.id - This parameter is required.repositoryName - This parameter is required.@Stability(value=Stable) @NotNull public NotificationRuleSourceConfig bindAsNotificationRuleSource(@NotNull software.constructs.Construct _scope)
bindAsNotificationRuleSource in interface INotificationRuleSource_scope - This parameter is required.@Stability(value=Stable) @NotNull public Grant grant(@NotNull IGrantable grantee, @NotNull String... actions)
grant in interface IRepositorygrantee - This parameter is required.actions - This parameter is required.@Stability(value=Stable) @NotNull public Grant grantPull(@NotNull IGrantable grantee)
grantPull in interface IRepositorygrantee - This parameter is required.@Stability(value=Stable) @NotNull public Grant grantPullPush(@NotNull IGrantable grantee)
grantPullPush in interface IRepositorygrantee - This parameter is required.@Stability(value=Stable) @NotNull public Grant grantRead(@NotNull IGrantable grantee)
grantRead in interface IRepositorygrantee - This parameter is required.@Stability(value=Stable) @NotNull public INotificationRule notifiyOnPullRequestMerged(@NotNull String id, @NotNull INotificationRuleTarget target, @Nullable NotificationRuleOptions options)
id - This parameter is required.target - This parameter is required.options - @Stability(value=Stable) @NotNull public INotificationRule notifiyOnPullRequestMerged(@NotNull String id, @NotNull INotificationRuleTarget target)
id - This parameter is required.target - This parameter is required.@Stability(value=Stable) @NotNull public Repository notify(@NotNull String arn, @Nullable RepositoryTriggerOptions options)
arn - Arn of the resource that repository events will notify. This parameter is required.options - Trigger options to run actions.@Stability(value=Stable) @NotNull public Repository notify(@NotNull String arn)
arn - Arn of the resource that repository events will notify. This parameter is required.@Stability(value=Stable) @NotNull public INotificationRule notifyOn(@NotNull String id, @NotNull INotificationRuleTarget target, @NotNull RepositoryNotifyOnOptions options)
You can also use the methods to define rules for the specific event emitted.
eg: notifyOnPullRequstCreated.
notifyOn in interface IRepositoryid - This parameter is required.target - This parameter is required.options - This parameter is required.@Stability(value=Stable) @NotNull public INotificationRule notifyOnApprovalRuleOverridden(@NotNull String id, @NotNull INotificationRuleTarget target, @Nullable NotificationRuleOptions options)
notifyOnApprovalRuleOverridden in interface IRepositoryid - This parameter is required.target - This parameter is required.options - @Stability(value=Stable) @NotNull public INotificationRule notifyOnApprovalRuleOverridden(@NotNull String id, @NotNull INotificationRuleTarget target)
notifyOnApprovalRuleOverridden in interface IRepositoryid - This parameter is required.target - This parameter is required.@Stability(value=Stable) @NotNull public INotificationRule notifyOnApprovalStatusChanged(@NotNull String id, @NotNull INotificationRuleTarget target, @Nullable NotificationRuleOptions options)
notifyOnApprovalStatusChanged in interface IRepositoryid - This parameter is required.target - This parameter is required.options - @Stability(value=Stable) @NotNull public INotificationRule notifyOnApprovalStatusChanged(@NotNull String id, @NotNull INotificationRuleTarget target)
notifyOnApprovalStatusChanged in interface IRepositoryid - This parameter is required.target - This parameter is required.@Stability(value=Stable) @NotNull public INotificationRule notifyOnBranchOrTagCreated(@NotNull String id, @NotNull INotificationRuleTarget target, @Nullable NotificationRuleOptions options)
notifyOnBranchOrTagCreated in interface IRepositoryid - This parameter is required.target - This parameter is required.options - @Stability(value=Stable) @NotNull public INotificationRule notifyOnBranchOrTagCreated(@NotNull String id, @NotNull INotificationRuleTarget target)
notifyOnBranchOrTagCreated in interface IRepositoryid - This parameter is required.target - This parameter is required.@Stability(value=Stable) @NotNull public INotificationRule notifyOnBranchOrTagDeleted(@NotNull String id, @NotNull INotificationRuleTarget target, @Nullable NotificationRuleOptions options)
notifyOnBranchOrTagDeleted in interface IRepositoryid - This parameter is required.target - This parameter is required.options - @Stability(value=Stable) @NotNull public INotificationRule notifyOnBranchOrTagDeleted(@NotNull String id, @NotNull INotificationRuleTarget target)
notifyOnBranchOrTagDeleted in interface IRepositoryid - This parameter is required.target - This parameter is required.@Stability(value=Stable) @NotNull public INotificationRule notifyOnPullRequestComment(@NotNull String id, @NotNull INotificationRuleTarget target, @Nullable NotificationRuleOptions options)
notifyOnPullRequestComment in interface IRepositoryid - This parameter is required.target - This parameter is required.options - @Stability(value=Stable) @NotNull public INotificationRule notifyOnPullRequestComment(@NotNull String id, @NotNull INotificationRuleTarget target)
notifyOnPullRequestComment in interface IRepositoryid - This parameter is required.target - This parameter is required.@Stability(value=Stable) @NotNull public INotificationRule notifyOnPullRequestCreated(@NotNull String id, @NotNull INotificationRuleTarget target, @Nullable NotificationRuleOptions options)
notifyOnPullRequestCreated in interface IRepositoryid - This parameter is required.target - This parameter is required.options - @Stability(value=Stable) @NotNull public INotificationRule notifyOnPullRequestCreated(@NotNull String id, @NotNull INotificationRuleTarget target)
notifyOnPullRequestCreated in interface IRepositoryid - This parameter is required.target - This parameter is required.@Stability(value=Stable) @NotNull public INotificationRule notifyOnPullRequestMerged(@NotNull String id, @NotNull INotificationRuleTarget target, @Nullable NotificationRuleOptions options)
notifyOnPullRequestMerged in interface IRepositoryid - This parameter is required.target - This parameter is required.options - @Stability(value=Stable) @NotNull public INotificationRule notifyOnPullRequestMerged(@NotNull String id, @NotNull INotificationRuleTarget target)
notifyOnPullRequestMerged in interface IRepositoryid - This parameter is required.target - This parameter is required.@Stability(value=Stable) @NotNull public Rule onCommentOnCommit(@NotNull String id, @Nullable OnEventOptions options)
onCommentOnCommit in interface IRepositoryid - This parameter is required.options - @Stability(value=Stable) @NotNull public Rule onCommentOnCommit(@NotNull String id)
onCommentOnCommit in interface IRepositoryid - This parameter is required.@Stability(value=Stable) @NotNull public Rule onCommentOnPullRequest(@NotNull String id, @Nullable OnEventOptions options)
onCommentOnPullRequest in interface IRepositoryid - This parameter is required.options - @Stability(value=Stable) @NotNull public Rule onCommentOnPullRequest(@NotNull String id)
onCommentOnPullRequest in interface IRepositoryid - This parameter is required.@Stability(value=Stable) @NotNull public Rule onCommit(@NotNull String id, @Nullable OnCommitOptions options)
onCommit in interface IRepositoryid - This parameter is required.options - @Stability(value=Stable) @NotNull public Rule onCommit(@NotNull String id)
onCommit in interface IRepositoryid - This parameter is required.@Stability(value=Stable) @NotNull public Rule onEvent(@NotNull String id, @Nullable OnEventOptions options)
Use
rule.addEventPattern(pattern) to specify a filter.
onEvent in interface IRepositoryid - This parameter is required.options - @Stability(value=Stable) @NotNull public Rule onEvent(@NotNull String id)
Use
rule.addEventPattern(pattern) to specify a filter.
onEvent in interface IRepositoryid - This parameter is required.@Stability(value=Stable) @NotNull public Rule onPullRequestStateChange(@NotNull String id, @Nullable OnEventOptions options)
onPullRequestStateChange in interface IRepositoryid - This parameter is required.options - @Stability(value=Stable) @NotNull public Rule onPullRequestStateChange(@NotNull String id)
onPullRequestStateChange in interface IRepositoryid - This parameter is required.@Stability(value=Stable) @NotNull public Rule onReferenceCreated(@NotNull String id, @Nullable OnEventOptions options)
onReferenceCreated in interface IRepositoryid - This parameter is required.options - @Stability(value=Stable) @NotNull public Rule onReferenceCreated(@NotNull String id)
onReferenceCreated in interface IRepositoryid - This parameter is required.@Stability(value=Stable) @NotNull public Rule onReferenceDeleted(@NotNull String id, @Nullable OnEventOptions options)
onReferenceDeleted in interface IRepositoryid - This parameter is required.options - @Stability(value=Stable) @NotNull public Rule onReferenceDeleted(@NotNull String id)
onReferenceDeleted in interface IRepositoryid - This parameter is required.@Stability(value=Stable) @NotNull public Rule onReferenceUpdated(@NotNull String id, @Nullable OnEventOptions options)
onReferenceUpdated in interface IRepositoryid - This parameter is required.options - @Stability(value=Stable) @NotNull public Rule onReferenceUpdated(@NotNull String id)
onReferenceUpdated in interface IRepositoryid - This parameter is required.@Stability(value=Stable) @NotNull public Rule onStateChange(@NotNull String id, @Nullable OnEventOptions options)
onStateChange in interface IRepositoryid - This parameter is required.options - @Stability(value=Stable) @NotNull public Rule onStateChange(@NotNull String id)
onStateChange in interface IRepositoryid - This parameter is required.@Stability(value=Stable) @NotNull public String getRepositoryArn()
getRepositoryArn in interface IRepository@Stability(value=Stable) @NotNull public String getRepositoryCloneUrlGrc()
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.
getRepositoryCloneUrlGrc in interface IRepository@Stability(value=Stable) @NotNull public String getRepositoryCloneUrlHttp()
getRepositoryCloneUrlHttp in interface IRepository@Stability(value=Stable) @NotNull public String getRepositoryCloneUrlSsh()
getRepositoryCloneUrlSsh in interface IRepository@Stability(value=Stable) @NotNull public String getRepositoryName()
getRepositoryName in interface IRepositoryCopyright © 2022. All rights reserved.