IRepository

class aws_cdk.aws_codecommit.IRepository(*args, **kwargs)

Bases: aws_cdk.core.IResource, typing_extensions.Protocol

__init__(*args, **kwargs)

Methods

on_comment_on_commit(id, *, description=None, event_pattern=None, rule_name=None, target=None)

Defines a CloudWatch event rule which triggers when a comment is made on a commit.

Parameters
  • id (str) –

  • description (Optional[str]) – A description of the rule’s purpose. Default: - No description

  • event_pattern (Optional[EventPattern]) – Additional restrictions for the event to route to the specified target. The method that generates the rule probably imposes some type of event filtering. The filtering implied by what you pass here is added on top of that filtering. Default: - No additional filtering based on an event pattern.

  • rule_name (Optional[str]) – A name for the rule. Default: AWS CloudFormation generates a unique physical ID.

  • target (Optional[IRuleTarget]) – The target to register for the event. Default: - No target is added to the rule. Use addTarget() to add a target.

Return type

Rule

on_comment_on_pull_request(id, *, description=None, event_pattern=None, rule_name=None, target=None)

Defines a CloudWatch event rule which triggers when a comment is made on a pull request.

Parameters
  • id (str) –

  • description (Optional[str]) – A description of the rule’s purpose. Default: - No description

  • event_pattern (Optional[EventPattern]) – Additional restrictions for the event to route to the specified target. The method that generates the rule probably imposes some type of event filtering. The filtering implied by what you pass here is added on top of that filtering. Default: - No additional filtering based on an event pattern.

  • rule_name (Optional[str]) – A name for the rule. Default: AWS CloudFormation generates a unique physical ID.

  • target (Optional[IRuleTarget]) – The target to register for the event. Default: - No target is added to the rule. Use addTarget() to add a target.

Return type

Rule

on_commit(id, *, branches=None, description=None, event_pattern=None, rule_name=None, target=None)

Defines a CloudWatch event rule which triggers when a commit is pushed to a branch.

Parameters
  • id (str) –

  • branches (Optional[List[str]]) – The branch to monitor. Default: - All branches

  • description (Optional[str]) – A description of the rule’s purpose. Default: - No description

  • event_pattern (Optional[EventPattern]) – Additional restrictions for the event to route to the specified target. The method that generates the rule probably imposes some type of event filtering. The filtering implied by what you pass here is added on top of that filtering. Default: - No additional filtering based on an event pattern.

  • rule_name (Optional[str]) – A name for the rule. Default: AWS CloudFormation generates a unique physical ID.

  • target (Optional[IRuleTarget]) – The target to register for the event. Default: - No target is added to the rule. Use addTarget() to add a target.

Return type

Rule

on_event(id, *, description=None, event_pattern=None, rule_name=None, target=None)

Defines a CloudWatch event rule which triggers for repository events.

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

Parameters
  • id (str) –

  • description (Optional[str]) – A description of the rule’s purpose. Default: - No description

  • event_pattern (Optional[EventPattern]) – Additional restrictions for the event to route to the specified target. The method that generates the rule probably imposes some type of event filtering. The filtering implied by what you pass here is added on top of that filtering. Default: - No additional filtering based on an event pattern.

  • rule_name (Optional[str]) – A name for the rule. Default: AWS CloudFormation generates a unique physical ID.

  • target (Optional[IRuleTarget]) – The target to register for the event. Default: - No target is added to the rule. Use addTarget() to add a target.

Return type

Rule

on_pull_request_state_change(id, *, description=None, event_pattern=None, rule_name=None, target=None)

Defines a CloudWatch event rule which triggers when a pull request state is changed.

Parameters
  • id (str) –

  • description (Optional[str]) – A description of the rule’s purpose. Default: - No description

  • event_pattern (Optional[EventPattern]) – Additional restrictions for the event to route to the specified target. The method that generates the rule probably imposes some type of event filtering. The filtering implied by what you pass here is added on top of that filtering. Default: - No additional filtering based on an event pattern.

  • rule_name (Optional[str]) – A name for the rule. Default: AWS CloudFormation generates a unique physical ID.

  • target (Optional[IRuleTarget]) – The target to register for the event. Default: - No target is added to the rule. Use addTarget() to add a target.

Return type

Rule

on_reference_created(id, *, description=None, event_pattern=None, rule_name=None, target=None)

Defines a CloudWatch event rule which triggers when a reference is created (i.e. a new branch/tag is created) to the repository.

Parameters
  • id (str) –

  • description (Optional[str]) – A description of the rule’s purpose. Default: - No description

  • event_pattern (Optional[EventPattern]) – Additional restrictions for the event to route to the specified target. The method that generates the rule probably imposes some type of event filtering. The filtering implied by what you pass here is added on top of that filtering. Default: - No additional filtering based on an event pattern.

  • rule_name (Optional[str]) – A name for the rule. Default: AWS CloudFormation generates a unique physical ID.

  • target (Optional[IRuleTarget]) – The target to register for the event. Default: - No target is added to the rule. Use addTarget() to add a target.

Return type

Rule

on_reference_deleted(id, *, description=None, event_pattern=None, rule_name=None, target=None)

Defines a CloudWatch event rule which triggers when a reference is delete (i.e. a branch/tag is deleted) from the repository.

Parameters
  • id (str) –

  • description (Optional[str]) – A description of the rule’s purpose. Default: - No description

  • event_pattern (Optional[EventPattern]) – Additional restrictions for the event to route to the specified target. The method that generates the rule probably imposes some type of event filtering. The filtering implied by what you pass here is added on top of that filtering. Default: - No additional filtering based on an event pattern.

  • rule_name (Optional[str]) – A name for the rule. Default: AWS CloudFormation generates a unique physical ID.

  • target (Optional[IRuleTarget]) – The target to register for the event. Default: - No target is added to the rule. Use addTarget() to add a target.

Return type

Rule

on_reference_updated(id, *, description=None, event_pattern=None, rule_name=None, target=None)

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.

Parameters
  • id (str) –

  • description (Optional[str]) – A description of the rule’s purpose. Default: - No description

  • event_pattern (Optional[EventPattern]) – Additional restrictions for the event to route to the specified target. The method that generates the rule probably imposes some type of event filtering. The filtering implied by what you pass here is added on top of that filtering. Default: - No additional filtering based on an event pattern.

  • rule_name (Optional[str]) – A name for the rule. Default: AWS CloudFormation generates a unique physical ID.

  • target (Optional[IRuleTarget]) – The target to register for the event. Default: - No target is added to the rule. Use addTarget() to add a target.

Return type

Rule

on_state_change(id, *, description=None, event_pattern=None, rule_name=None, target=None)

Defines a CloudWatch event rule which triggers when a “CodeCommit Repository State Change” event occurs.

Parameters
  • id (str) –

  • description (Optional[str]) – A description of the rule’s purpose. Default: - No description

  • event_pattern (Optional[EventPattern]) – Additional restrictions for the event to route to the specified target. The method that generates the rule probably imposes some type of event filtering. The filtering implied by what you pass here is added on top of that filtering. Default: - No additional filtering based on an event pattern.

  • rule_name (Optional[str]) – A name for the rule. Default: AWS CloudFormation generates a unique physical ID.

  • target (Optional[IRuleTarget]) – The target to register for the event. Default: - No target is added to the rule. Use addTarget() to add a target.

Return type

Rule

Attributes

node

The construct node in the tree.

Return type

ConstructNode

repository_arn

The ARN of this Repository.

attribute: :attribute:: true

Return type

str

repository_clone_url_http

The HTTP clone URL.

attribute: :attribute:: true

Return type

str

repository_clone_url_ssh

The SSH clone URL.

attribute: :attribute:: true

Return type

str

repository_name

The human-visible name of this Repository.

attribute: :attribute:: true

Return type

str

stack

The stack in which this resource is defined.

Return type

Stack