Method: Aws::CodeCommit::Client#test_repository_triggers

Defined in:
lib/aws-sdk-codecommit/client.rb

#test_repository_triggers(params = {}) ⇒ Types::TestRepositoryTriggersOutput

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

Examples:

Request syntax with placeholder values


resp = client.test_repository_triggers({
  repository_name: "RepositoryName", # required
  triggers: [ # required
    {
      name: "RepositoryTriggerName", # required
      destination_arn: "Arn", # required
      custom_data: "RepositoryTriggerCustomData",
      branches: ["BranchName"],
      events: ["all"], # required, accepts all, updateReference, createReference, deleteReference
    },
  ],
})

Response structure


resp.successful_executions #=> Array
resp.successful_executions[0] #=> String
resp.failed_executions #=> Array
resp.failed_executions[0].trigger #=> String
resp.failed_executions[0].failure_message #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :repository_name (required, String)

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

  • :triggers (required, Array<Types::RepositoryTrigger>)

    The list of triggers to test.

Returns:

See Also:



4480
4481
4482
4483
# File 'lib/aws-sdk-codecommit/client.rb', line 4480

def test_repository_triggers(params = {}, options = {})
  req = build_request(:test_repository_triggers, params)
  req.send_request(options)
end