AWS CodeCommit

2016/03/08 - AWS CodeCommit - 4 new api methods

GetRepositoryTriggers (new) Link ¶

Gets information about triggers configured for a repository.

Request Syntax

client.get_repository_triggers(
    repositoryName='string'
)
type repositoryName

string

param repositoryName

The name of the repository for which the trigger is configured.

rtype

dict

returns

Response Syntax

{
    'configurationId': 'string',
    'triggers': [
        {
            'name': 'string',
            'destinationArn': 'string',
            'customData': 'string',
            'branches': [
                'string',
            ],
            'events': [
                'all'|'updateReference'|'createReference'|'deleteReference',
            ]
        },
    ]
}

Response Structure

  • (dict) --

    Represents the output of a get repository triggers operation.

    • configurationId (string) --

      The system-generated unique ID for the trigger.

    • triggers (list) --

      The JSON block of configuration information for each trigger.

      • (dict) --

        Information about a trigger for a repository.

        • name (string) --

          The name of the trigger.

        • destinationArn (string) --

          The ARN of the resource that is the target for a trigger. For example, the ARN of a topic in Amazon Simple Notification Service (SNS).

        • customData (string) --

          Any custom data associated with the trigger that will be included in the information sent to the target of the trigger.

        • branches (list) --

          The branches that will be included in the trigger configuration. If no branches are specified, the trigger will apply to all branches.

          • (string) --

        • events (list) --

          The repository events that will cause the trigger to run actions in another service, such as sending a notification through Amazon Simple Notification Service (SNS). If no events are specified, the trigger will run for all repository events.

          • (string) --

PutRepositoryTriggers (new) Link ¶

Replaces all triggers for a repository. This can be used to create or delete triggers.

Request Syntax

client.put_repository_triggers(
    repositoryName='string',
    triggers=[
        {
            'name': 'string',
            'destinationArn': 'string',
            'customData': 'string',
            'branches': [
                'string',
            ],
            'events': [
                'all'|'updateReference'|'createReference'|'deleteReference',
            ]
        },
    ]
)
type repositoryName

string

param repositoryName

The name of the repository where you want to create or update the trigger.

type triggers

list

param triggers

The JSON block of configuration information for each trigger.

  • (dict) --

    Information about a trigger for a repository.

    • name (string) --

      The name of the trigger.

    • destinationArn (string) --

      The ARN of the resource that is the target for a trigger. For example, the ARN of a topic in Amazon Simple Notification Service (SNS).

    • customData (string) --

      Any custom data associated with the trigger that will be included in the information sent to the target of the trigger.

    • branches (list) --

      The branches that will be included in the trigger configuration. If no branches are specified, the trigger will apply to all branches.

      • (string) --

    • events (list) --

      The repository events that will cause the trigger to run actions in another service, such as sending a notification through Amazon Simple Notification Service (SNS). If no events are specified, the trigger will run for all repository events.

      • (string) --

rtype

dict

returns

Response Syntax

{
    'configurationId': 'string'
}

Response Structure

  • (dict) --

    Represents the output of a put repository triggers operation.

    • configurationId (string) --

      The system-generated unique ID for the create or update operation.

TestRepositoryTriggers (new) Link ¶

Tests the functionality of repository triggers by sending information to the trigger target. If real data is available in the repository, the test will send data from the last commit. If no data is available, sample data will be generated.

Request Syntax

client.test_repository_triggers(
    repositoryName='string',
    triggers=[
        {
            'name': 'string',
            'destinationArn': 'string',
            'customData': 'string',
            'branches': [
                'string',
            ],
            'events': [
                'all'|'updateReference'|'createReference'|'deleteReference',
            ]
        },
    ]
)
type repositoryName

string

param repositoryName

The name of the repository in which to test the triggers.

type triggers

list

param triggers

The list of triggers to test.

  • (dict) --

    Information about a trigger for a repository.

    • name (string) --

      The name of the trigger.

    • destinationArn (string) --

      The ARN of the resource that is the target for a trigger. For example, the ARN of a topic in Amazon Simple Notification Service (SNS).

    • customData (string) --

      Any custom data associated with the trigger that will be included in the information sent to the target of the trigger.

    • branches (list) --

      The branches that will be included in the trigger configuration. If no branches are specified, the trigger will apply to all branches.

      • (string) --

    • events (list) --

      The repository events that will cause the trigger to run actions in another service, such as sending a notification through Amazon Simple Notification Service (SNS). If no events are specified, the trigger will run for all repository events.

      • (string) --

rtype

dict

returns

Response Syntax

{
    'successfulExecutions': [
        'string',
    ],
    'failedExecutions': [
        {
            'trigger': 'string',
            'failureMessage': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    Represents the output of a test repository triggers operation.

    • successfulExecutions (list) --

      The list of triggers that were successfully tested. This list provides the names of the triggers that were successfully tested, separated by commas.

      • (string) --

    • failedExecutions (list) --

      The list of triggers that were not able to be tested. This list provides the names of the triggers that could not be tested, separated by commas.

      • (dict) --

        A trigger failed to run.

        • trigger (string) --

          The name of the trigger that did not run.

        • failureMessage (string) --

          Additional message information about the trigger that did not run.

GetCommit (new) Link ¶

Returns information about a commit, including commit message and committer information.

Request Syntax

client.get_commit(
    repositoryName='string',
    commitId='string'
)
type repositoryName

string

param repositoryName

[REQUIRED]

The name of the repository to which the commit was made.

type commitId

string

param commitId

[REQUIRED]

The commit ID.

rtype

dict

returns

Response Syntax

{
    'commit': {
        'treeId': 'string',
        'parents': [
            'string',
        ],
        'message': 'string',
        'author': {
            'name': 'string',
            'email': 'string',
            'date': 'string'
        },
        'committer': {
            'name': 'string',
            'email': 'string',
            'date': 'string'
        },
        'additionalData': 'string'
    }
}

Response Structure

  • (dict) --

    Represents the output of a get commit operation.

    • commit (dict) --

      Information about the specified commit.

      • treeId (string) --

        Tree information for the specified commit.

      • parents (list) --

        The parent list for the specified commit.

        • (string) --

      • message (string) --

        The message associated with the specified commit.

      • author (dict) --

        Information about the author of the specified commit.

        • name (string) --

          The name of the user who made the specified commit.

        • email (string) --

          The email address associated with the user who made the commit, if any.

        • date (string) --

          The date when the specified commit was pushed to the repository.

      • committer (dict) --

        Information about the person who committed the specified commit, also known as the committer. For more information about the difference between an author and a committer in Git, see Viewing the Commit History in Pro Git by Scott Chacon and Ben Straub.

        • name (string) --

          The name of the user who made the specified commit.

        • email (string) --

          The email address associated with the user who made the commit, if any.

        • date (string) --

          The date when the specified commit was pushed to the repository.

      • additionalData (string) --

        Any additional data associated with the specified commit.