Module: AWSCDK::Codecommit::IRepository
- Includes:
- AWSCDK::CodeStarNotifications::INotificationRuleSource, IResource, Interfaces::AWSCodecommit::IRepositoryRef
- Included in:
- Repository
- Defined in:
- codecommit/i_repository.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#apply_removal_policy(policy) ⇒ void
Apply the given removal policy to this resource.
-
#bind_as_notification_rule_source(scope) ⇒ AWSCDK::CodeStarNotifications::NotificationRuleSourceConfig
Returns a source configuration for notification rule.
-
#env ⇒ AWSCDK::Interfaces::ResourceEnvironment
The environment this resource belongs to.
-
#grant(grantee, *actions) ⇒ AWSCDK::IAM::Grant
Grant the given principal identity permissions to perform the actions on this repository.
-
#grant_pull(grantee) ⇒ AWSCDK::IAM::Grant
Grant the given identity permissions to pull this repository.
-
#grant_pull_push(grantee) ⇒ AWSCDK::IAM::Grant
Grant the given identity permissions to pull and push this repository.
-
#grant_read(grantee) ⇒ AWSCDK::IAM::Grant
Grant the given identity permissions to read this repository.
-
#node ⇒ Constructs::Node
The tree node.
-
#notify_on(id, target, options) ⇒ AWSCDK::CodeStarNotifications::INotificationRule
Defines a CodeStar Notification rule triggered when the project events specified by you are emitted.
-
#notify_on_approval_rule_overridden(id, target, options = nil) ⇒ AWSCDK::CodeStarNotifications::INotificationRule
Defines a CodeStar Notification rule which triggers when an approval rule is overridden.
-
#notify_on_approval_status_changed(id, target, options = nil) ⇒ AWSCDK::CodeStarNotifications::INotificationRule
Defines a CodeStar Notification rule which triggers when an approval status is changed.
-
#notify_on_branch_or_tag_created(id, target, options = nil) ⇒ AWSCDK::CodeStarNotifications::INotificationRule
Defines a CodeStar Notification rule which triggers when a new branch or tag is created.
-
#notify_on_branch_or_tag_deleted(id, target, options = nil) ⇒ AWSCDK::CodeStarNotifications::INotificationRule
Defines a CodeStar Notification rule which triggers when a branch or tag is deleted.
-
#notify_on_pull_request_comment(id, target, options = nil) ⇒ AWSCDK::CodeStarNotifications::INotificationRule
Defines a CodeStar Notification rule which triggers when a comment is made on a pull request.
-
#notify_on_pull_request_created(id, target, options = nil) ⇒ AWSCDK::CodeStarNotifications::INotificationRule
Defines a CodeStar Notification rule which triggers when a pull request is created.
-
#notify_on_pull_request_merged(id, target, options = nil) ⇒ AWSCDK::CodeStarNotifications::INotificationRule
Defines a CodeStar Notification rule which triggers when a pull request is merged.
-
#on_comment_on_commit(id, options = nil) ⇒ AWSCDK::Events::Rule
Defines a CloudWatch event rule which triggers when a comment is made on a commit.
-
#on_comment_on_pull_request(id, options = nil) ⇒ AWSCDK::Events::Rule
Defines a CloudWatch event rule which triggers when a comment is made on a pull request.
-
#on_commit(id, options = nil) ⇒ AWSCDK::Events::Rule
Defines a CloudWatch event rule which triggers when a commit is pushed to a branch.
-
#on_event(id, options = nil) ⇒ AWSCDK::Events::Rule
Defines a CloudWatch event rule which triggers for repository events.
-
#on_pull_request_state_change(id, options = nil) ⇒ AWSCDK::Events::Rule
Defines a CloudWatch event rule which triggers when a pull request state is changed.
-
#on_reference_created(id, options = nil) ⇒ AWSCDK::Events::Rule
Defines a CloudWatch event rule which triggers when a reference is created (i.e. a new branch/tag is created) to the repository.
-
#on_reference_deleted(id, options = nil) ⇒ AWSCDK::Events::Rule
Defines a CloudWatch event rule which triggers when a reference is delete (i.e. a branch/tag is deleted) from the repository.
-
#on_reference_updated(id, options = nil) ⇒ AWSCDK::Events::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.
-
#on_state_change(id, options = nil) ⇒ AWSCDK::Events::Rule
Defines a CloudWatch event rule which triggers when a "CodeCommit Repository State Change" event occurs.
-
#repository_arn ⇒ String
The ARN of this Repository.
-
#repository_clone_url_grc ⇒ String
The HTTPS (GRC) clone URL.
-
#repository_clone_url_http ⇒ String
The HTTP clone URL.
-
#repository_clone_url_ssh ⇒ String
The SSH clone URL.
-
#repository_name ⇒ String
The human-visible name of this Repository.
-
#repository_ref ⇒ AWSCDK::Interfaces::AWSCodecommit::RepositoryReference
A reference to a Repository resource.
-
#stack ⇒ AWSCDK::Stack
The stack in which this resource is defined.
-
#with(*mixins) ⇒ Constructs::IConstruct
Applies one or more mixins to this construct.
Class Method Details
.jsii_overridable_methods ⇒ Object
392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 |
# File 'codecommit/i_repository.rb', line 392 def self.jsii_overridable_methods { :node => { kind: :property, name: "node", is_optional: false }, :env => { kind: :property, name: "env", is_optional: false }, :stack => { kind: :property, name: "stack", is_optional: false }, :repository_ref => { kind: :property, name: "repositoryRef", is_optional: false }, :repository_arn => { kind: :property, name: "repositoryArn", is_optional: false }, :repository_clone_url_grc => { kind: :property, name: "repositoryCloneUrlGrc", is_optional: false }, :repository_clone_url_http => { kind: :property, name: "repositoryCloneUrlHttp", is_optional: false }, :repository_clone_url_ssh => { kind: :property, name: "repositoryCloneUrlSsh", is_optional: false }, :repository_name => { kind: :property, name: "repositoryName", is_optional: false }, :with => { kind: :method, name: "with", is_optional: false }, :apply_removal_policy => { kind: :method, name: "applyRemovalPolicy", is_optional: false }, :bind_as_notification_rule_source => { kind: :method, name: "bindAsNotificationRuleSource", is_optional: false }, :grant => { kind: :method, name: "grant", is_optional: false }, :grant_pull => { kind: :method, name: "grantPull", is_optional: false }, :grant_pull_push => { kind: :method, name: "grantPullPush", is_optional: false }, :grant_read => { kind: :method, name: "grantRead", is_optional: false }, :notify_on => { kind: :method, name: "notifyOn", is_optional: false }, :notify_on_approval_rule_overridden => { kind: :method, name: "notifyOnApprovalRuleOverridden", is_optional: false }, :notify_on_approval_status_changed => { kind: :method, name: "notifyOnApprovalStatusChanged", is_optional: false }, :notify_on_branch_or_tag_created => { kind: :method, name: "notifyOnBranchOrTagCreated", is_optional: false }, :notify_on_branch_or_tag_deleted => { kind: :method, name: "notifyOnBranchOrTagDeleted", is_optional: false }, :notify_on_pull_request_comment => { kind: :method, name: "notifyOnPullRequestComment", is_optional: false }, :notify_on_pull_request_created => { kind: :method, name: "notifyOnPullRequestCreated", is_optional: false }, :notify_on_pull_request_merged => { kind: :method, name: "notifyOnPullRequestMerged", is_optional: false }, :on_comment_on_commit => { kind: :method, name: "onCommentOnCommit", is_optional: false }, :on_comment_on_pull_request => { kind: :method, name: "onCommentOnPullRequest", is_optional: false }, :on_commit => { kind: :method, name: "onCommit", is_optional: false }, :on_event => { kind: :method, name: "onEvent", is_optional: false }, :on_pull_request_state_change => { kind: :method, name: "onPullRequestStateChange", is_optional: false }, :on_reference_created => { kind: :method, name: "onReferenceCreated", is_optional: false }, :on_reference_deleted => { kind: :method, name: "onReferenceDeleted", is_optional: false }, :on_reference_updated => { kind: :method, name: "onReferenceUpdated", is_optional: false }, :on_state_change => { kind: :method, name: "onStateChange", is_optional: false }, } end |
Instance Method Details
#apply_removal_policy(policy) ⇒ void
This method returns an undefined value.
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).
112 113 114 115 |
# File 'codecommit/i_repository.rb', line 112 def apply_removal_policy(policy) Jsii::Type.check_type(policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "policy") jsii_call_method("applyRemovalPolicy", [policy]) end |
#bind_as_notification_rule_source(scope) ⇒ AWSCDK::CodeStarNotifications::NotificationRuleSourceConfig
Returns a source configuration for notification rule.
121 122 123 124 |
# File 'codecommit/i_repository.rb', line 121 def bind_as_notification_rule_source(scope) Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope") jsii_call_method("bindAsNotificationRuleSource", [scope]) end |
#env ⇒ AWSCDK::Interfaces::ResourceEnvironment
The environment this resource belongs to.
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.
27 28 29 |
# File 'codecommit/i_repository.rb', line 27 def env() jsii_get_property("env") end |
#grant(grantee, *actions) ⇒ AWSCDK::IAM::Grant
Grant the given principal identity permissions to perform the actions on this repository.
131 132 133 134 135 136 137 |
# File 'codecommit/i_repository.rb', line 131 def grant(grantee, *actions) Jsii::Type.check_type(grantee, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklHcmFudGFibGUifQ==")), "grantee") actions.each_with_index do |item, index| Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "actions[#{index}]") end jsii_call_method("grant", [grantee, *actions]) end |
#grant_pull(grantee) ⇒ AWSCDK::IAM::Grant
Grant the given identity permissions to pull this repository.
143 144 145 146 |
# File 'codecommit/i_repository.rb', line 143 def grant_pull(grantee) Jsii::Type.check_type(grantee, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklHcmFudGFibGUifQ==")), "grantee") jsii_call_method("grantPull", [grantee]) end |
#grant_pull_push(grantee) ⇒ AWSCDK::IAM::Grant
Grant the given identity permissions to pull and push this repository.
152 153 154 155 |
# File 'codecommit/i_repository.rb', line 152 def grant_pull_push(grantee) Jsii::Type.check_type(grantee, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklHcmFudGFibGUifQ==")), "grantee") jsii_call_method("grantPullPush", [grantee]) end |
#grant_read(grantee) ⇒ AWSCDK::IAM::Grant
Grant the given identity permissions to read this repository.
161 162 163 164 |
# File 'codecommit/i_repository.rb', line 161 def grant_read(grantee) Jsii::Type.check_type(grantee, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklHcmFudGFibGUifQ==")), "grantee") jsii_call_method("grantRead", [grantee]) end |
#node ⇒ Constructs::Node
The tree node.
12 13 14 |
# File 'codecommit/i_repository.rb', line 12 def node() jsii_get_property("node") end |
#notify_on(id, target, options) ⇒ AWSCDK::CodeStarNotifications::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. notify_on_pull_request_created.
175 176 177 178 179 180 181 |
# File 'codecommit/i_repository.rb', line 175 def notify_on(id, target, ) Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") Jsii::Type.check_type(target, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXN0YXJub3RpZmljYXRpb25zLklOb3RpZmljYXRpb25SdWxlVGFyZ2V0In0=")), "target") = .is_a?(Hash) ? ::AWSCDK::Codecommit::RepositoryNotifyOnOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZWNvbW1pdC5SZXBvc2l0b3J5Tm90aWZ5T25PcHRpb25zIn0=")), "options") jsii_call_method("notifyOn", [id, target, ]) end |
#notify_on_approval_rule_overridden(id, target, options = nil) ⇒ AWSCDK::CodeStarNotifications::INotificationRule
Defines a CodeStar Notification rule which triggers when an approval rule is overridden.
189 190 191 192 193 194 195 |
# File 'codecommit/i_repository.rb', line 189 def notify_on_approval_rule_overridden(id, target, = nil) Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") Jsii::Type.check_type(target, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXN0YXJub3RpZmljYXRpb25zLklOb3RpZmljYXRpb25SdWxlVGFyZ2V0In0=")), "target") = .is_a?(Hash) ? ::AWSCDK::CodeStarNotifications::NotificationRuleOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXN0YXJub3RpZmljYXRpb25zLk5vdGlmaWNhdGlvblJ1bGVPcHRpb25zIn0=")), "options") unless .nil? jsii_call_method("notifyOnApprovalRuleOverridden", [id, target, ]) end |
#notify_on_approval_status_changed(id, target, options = nil) ⇒ AWSCDK::CodeStarNotifications::INotificationRule
Defines a CodeStar Notification rule which triggers when an approval status is changed.
203 204 205 206 207 208 209 |
# File 'codecommit/i_repository.rb', line 203 def notify_on_approval_status_changed(id, target, = nil) Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") Jsii::Type.check_type(target, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXN0YXJub3RpZmljYXRpb25zLklOb3RpZmljYXRpb25SdWxlVGFyZ2V0In0=")), "target") = .is_a?(Hash) ? ::AWSCDK::CodeStarNotifications::NotificationRuleOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXN0YXJub3RpZmljYXRpb25zLk5vdGlmaWNhdGlvblJ1bGVPcHRpb25zIn0=")), "options") unless .nil? jsii_call_method("notifyOnApprovalStatusChanged", [id, target, ]) end |
#notify_on_branch_or_tag_created(id, target, options = nil) ⇒ AWSCDK::CodeStarNotifications::INotificationRule
Defines a CodeStar Notification rule which triggers when a new branch or tag is created.
217 218 219 220 221 222 223 |
# File 'codecommit/i_repository.rb', line 217 def notify_on_branch_or_tag_created(id, target, = nil) Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") Jsii::Type.check_type(target, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXN0YXJub3RpZmljYXRpb25zLklOb3RpZmljYXRpb25SdWxlVGFyZ2V0In0=")), "target") = .is_a?(Hash) ? ::AWSCDK::CodeStarNotifications::NotificationRuleOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXN0YXJub3RpZmljYXRpb25zLk5vdGlmaWNhdGlvblJ1bGVPcHRpb25zIn0=")), "options") unless .nil? jsii_call_method("notifyOnBranchOrTagCreated", [id, target, ]) end |
#notify_on_branch_or_tag_deleted(id, target, options = nil) ⇒ AWSCDK::CodeStarNotifications::INotificationRule
Defines a CodeStar Notification rule which triggers when a branch or tag is deleted.
231 232 233 234 235 236 237 |
# File 'codecommit/i_repository.rb', line 231 def notify_on_branch_or_tag_deleted(id, target, = nil) Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") Jsii::Type.check_type(target, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXN0YXJub3RpZmljYXRpb25zLklOb3RpZmljYXRpb25SdWxlVGFyZ2V0In0=")), "target") = .is_a?(Hash) ? ::AWSCDK::CodeStarNotifications::NotificationRuleOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXN0YXJub3RpZmljYXRpb25zLk5vdGlmaWNhdGlvblJ1bGVPcHRpb25zIn0=")), "options") unless .nil? jsii_call_method("notifyOnBranchOrTagDeleted", [id, target, ]) end |
#notify_on_pull_request_comment(id, target, options = nil) ⇒ AWSCDK::CodeStarNotifications::INotificationRule
Defines a CodeStar Notification rule which triggers when a comment is made on a pull request.
245 246 247 248 249 250 251 |
# File 'codecommit/i_repository.rb', line 245 def notify_on_pull_request_comment(id, target, = nil) Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") Jsii::Type.check_type(target, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXN0YXJub3RpZmljYXRpb25zLklOb3RpZmljYXRpb25SdWxlVGFyZ2V0In0=")), "target") = .is_a?(Hash) ? ::AWSCDK::CodeStarNotifications::NotificationRuleOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXN0YXJub3RpZmljYXRpb25zLk5vdGlmaWNhdGlvblJ1bGVPcHRpb25zIn0=")), "options") unless .nil? jsii_call_method("notifyOnPullRequestComment", [id, target, ]) end |
#notify_on_pull_request_created(id, target, options = nil) ⇒ AWSCDK::CodeStarNotifications::INotificationRule
Defines a CodeStar Notification rule which triggers when a pull request is created.
259 260 261 262 263 264 265 |
# File 'codecommit/i_repository.rb', line 259 def notify_on_pull_request_created(id, target, = nil) Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") Jsii::Type.check_type(target, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXN0YXJub3RpZmljYXRpb25zLklOb3RpZmljYXRpb25SdWxlVGFyZ2V0In0=")), "target") = .is_a?(Hash) ? ::AWSCDK::CodeStarNotifications::NotificationRuleOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXN0YXJub3RpZmljYXRpb25zLk5vdGlmaWNhdGlvblJ1bGVPcHRpb25zIn0=")), "options") unless .nil? jsii_call_method("notifyOnPullRequestCreated", [id, target, ]) end |
#notify_on_pull_request_merged(id, target, options = nil) ⇒ AWSCDK::CodeStarNotifications::INotificationRule
Defines a CodeStar Notification rule which triggers when a pull request is merged.
273 274 275 276 277 278 279 |
# File 'codecommit/i_repository.rb', line 273 def notify_on_pull_request_merged(id, target, = nil) Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") Jsii::Type.check_type(target, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXN0YXJub3RpZmljYXRpb25zLklOb3RpZmljYXRpb25SdWxlVGFyZ2V0In0=")), "target") = .is_a?(Hash) ? ::AWSCDK::CodeStarNotifications::NotificationRuleOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXN0YXJub3RpZmljYXRpb25zLk5vdGlmaWNhdGlvblJ1bGVPcHRpb25zIn0=")), "options") unless .nil? jsii_call_method("notifyOnPullRequestMerged", [id, target, ]) end |
#on_comment_on_commit(id, options = nil) ⇒ AWSCDK::Events::Rule
Defines a CloudWatch event rule which triggers when a comment is made on a commit.
286 287 288 289 290 291 |
# File 'codecommit/i_repository.rb', line 286 def on_comment_on_commit(id, = nil) Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") = .is_a?(Hash) ? ::AWSCDK::Events::OnEventOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZXZlbnRzLk9uRXZlbnRPcHRpb25zIn0=")), "options") unless .nil? jsii_call_method("onCommentOnCommit", [id, ]) end |
#on_comment_on_pull_request(id, options = nil) ⇒ AWSCDK::Events::Rule
Defines a CloudWatch event rule which triggers when a comment is made on a pull request.
298 299 300 301 302 303 |
# File 'codecommit/i_repository.rb', line 298 def on_comment_on_pull_request(id, = nil) Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") = .is_a?(Hash) ? ::AWSCDK::Events::OnEventOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZXZlbnRzLk9uRXZlbnRPcHRpb25zIn0=")), "options") unless .nil? jsii_call_method("onCommentOnPullRequest", [id, ]) end |
#on_commit(id, options = nil) ⇒ AWSCDK::Events::Rule
Defines a CloudWatch event rule which triggers when a commit is pushed to a branch.
310 311 312 313 314 315 |
# File 'codecommit/i_repository.rb', line 310 def on_commit(id, = nil) Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") = .is_a?(Hash) ? ::AWSCDK::Codecommit::OnCommitOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZWNvbW1pdC5PbkNvbW1pdE9wdGlvbnMifQ==")), "options") unless .nil? jsii_call_method("onCommit", [id, ]) end |
#on_event(id, options = nil) ⇒ AWSCDK::Events::Rule
Defines a CloudWatch event rule which triggers for repository events.
Use
rule.addEventPattern(pattern) to specify a filter.
325 326 327 328 329 330 |
# File 'codecommit/i_repository.rb', line 325 def on_event(id, = nil) Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") = .is_a?(Hash) ? ::AWSCDK::Events::OnEventOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZXZlbnRzLk9uRXZlbnRPcHRpb25zIn0=")), "options") unless .nil? jsii_call_method("onEvent", [id, ]) end |
#on_pull_request_state_change(id, options = nil) ⇒ AWSCDK::Events::Rule
Defines a CloudWatch event rule which triggers when a pull request state is changed.
337 338 339 340 341 342 |
# File 'codecommit/i_repository.rb', line 337 def on_pull_request_state_change(id, = nil) Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") = .is_a?(Hash) ? ::AWSCDK::Events::OnEventOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZXZlbnRzLk9uRXZlbnRPcHRpb25zIn0=")), "options") unless .nil? jsii_call_method("onPullRequestStateChange", [id, ]) end |
#on_reference_created(id, options = nil) ⇒ AWSCDK::Events::Rule
Defines a CloudWatch event rule which triggers when a reference is created (i.e. a new branch/tag is created) to the repository.
349 350 351 352 353 354 |
# File 'codecommit/i_repository.rb', line 349 def on_reference_created(id, = nil) Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") = .is_a?(Hash) ? ::AWSCDK::Events::OnEventOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZXZlbnRzLk9uRXZlbnRPcHRpb25zIn0=")), "options") unless .nil? jsii_call_method("onReferenceCreated", [id, ]) end |
#on_reference_deleted(id, options = nil) ⇒ AWSCDK::Events::Rule
Defines a CloudWatch event rule which triggers when a reference is delete (i.e. a branch/tag is deleted) from the repository.
361 362 363 364 365 366 |
# File 'codecommit/i_repository.rb', line 361 def on_reference_deleted(id, = nil) Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") = .is_a?(Hash) ? ::AWSCDK::Events::OnEventOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZXZlbnRzLk9uRXZlbnRPcHRpb25zIn0=")), "options") unless .nil? jsii_call_method("onReferenceDeleted", [id, ]) end |
#on_reference_updated(id, options = nil) ⇒ AWSCDK::Events::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.
373 374 375 376 377 378 |
# File 'codecommit/i_repository.rb', line 373 def on_reference_updated(id, = nil) Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") = .is_a?(Hash) ? ::AWSCDK::Events::OnEventOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZXZlbnRzLk9uRXZlbnRPcHRpb25zIn0=")), "options") unless .nil? jsii_call_method("onReferenceUpdated", [id, ]) end |
#on_state_change(id, options = nil) ⇒ AWSCDK::Events::Rule
Defines a CloudWatch event rule which triggers when a "CodeCommit Repository State Change" event occurs.
385 386 387 388 389 390 |
# File 'codecommit/i_repository.rb', line 385 def on_state_change(id, = nil) Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") = .is_a?(Hash) ? ::AWSCDK::Events::OnEventOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZXZlbnRzLk9uRXZlbnRPcHRpb25zIn0=")), "options") unless .nil? jsii_call_method("onStateChange", [id, ]) end |
#repository_arn ⇒ String
The ARN of this Repository.
48 49 50 |
# File 'codecommit/i_repository.rb', line 48 def repository_arn() jsii_get_property("repositoryArn") end |
#repository_clone_url_grc ⇒ 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.
61 62 63 |
# File 'codecommit/i_repository.rb', line 61 def repository_clone_url_grc() jsii_get_property("repositoryCloneUrlGrc") end |
#repository_clone_url_http ⇒ String
The HTTP clone URL.
68 69 70 |
# File 'codecommit/i_repository.rb', line 68 def repository_clone_url_http() jsii_get_property("repositoryCloneUrlHttp") end |
#repository_clone_url_ssh ⇒ String
The SSH clone URL.
75 76 77 |
# File 'codecommit/i_repository.rb', line 75 def repository_clone_url_ssh() jsii_get_property("repositoryCloneUrlSsh") end |
#repository_name ⇒ String
The human-visible name of this Repository.
82 83 84 |
# File 'codecommit/i_repository.rb', line 82 def repository_name() jsii_get_property("repositoryName") end |
#repository_ref ⇒ AWSCDK::Interfaces::AWSCodecommit::RepositoryReference
A reference to a Repository resource.
41 42 43 |
# File 'codecommit/i_repository.rb', line 41 def repository_ref() jsii_get_property("repositoryRef") end |
#stack ⇒ AWSCDK::Stack
The stack in which this resource is defined.
34 35 36 |
# File 'codecommit/i_repository.rb', line 34 def stack() jsii_get_property("stack") end |
#with(*mixins) ⇒ Constructs::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.
93 94 95 96 97 98 |
# File 'codecommit/i_repository.rb', line 93 def with(*mixins) mixins.each_with_index do |item, index| Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLklNaXhpbiJ9")), "mixins[#{index}]") end jsii_call_method("with", [*mixins]) end |