Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Excerpt

This parameters template demonstrates the Put EventBridge/CloudWatch Events action:

Insert excerpt
_JSONEscapingRequirements
_JSONEscapingRequirements
nopaneltrue

Info

Event Patterns in CloudWatch Events

This is an opinionated example that works well for ingesting custom events from Atlassian products – refer to Event Patterns in CloudWatch Events for details on these and other available fields.

Put EventBridge/CloudWatch Events parameters example - Bamboo Deployment Task Execution (escaped manually)

Code Block
languagejs
{
  "Entries": [
    {
      "Time": "$event.timestamp",
      "Source": "net.utoolity.atlassian.bamboo.automation-with-aws-bamboo",
      "DetailType": "Bamboo Deployment Task Execution",
      "Detail": "{ \"agentId\": \"${bamboo.agentId}\", \"buildResultKey\": \"${bamboo.buildResultKey}\", \"resultsUrl\": \"${bamboo.resultsUrl}\", \"deploymentProject\": \"${bamboo.deploy.project}\", \"deploymentEnvironment\": \"${bamboo.deploy.environment}\" }"
    }
  ]
}

Put EventBridge/CloudWatch Events parameters example - Bamboo Deployment Task Execution (escaped with utility function)

Code Block
languagejs
{
  "Entries": [
    {
      "Time": "$event.timestamp",
      "Source": "net.utoolity.atlassian.bamboo.automation-with-aws-bamboo",
      "DetailType": "Bamboo Deployment Task Execution",
      "Detail": "$util.escapeJson('{
        "agentId": "${bamboo.agentId}",
        "buildResultKey": "${bamboo.buildResultKey}",
        "resultsUrl": "${bamboo.resultsUrl}",
        "deploymentProject": "${bamboo.deploy.project}",
        "deploymentEnvironment": "${bamboo.deploy.environment}"
      }')"
    }
  ]
}