{
  "version": "1.0",
  "examples": {
    "AssociateToConfiguration": [
      {
        "input": {
          "ChatConfiguration": "arn:aws:chatbot::1234567890:chat-configuration/slack-channel/my-channel",
          "Resource": "arn:aws:chatbot::1234567890:custom-action/my-custom-action"
        },
        "output": {
        },
        "description": "Associate a custom action to a channel configuration, allowing it to be used in that channel",
        "id": "example-1",
        "title": "Associate a custom action to a configuration"
      }
    ],
    "CreateCustomAction": [
      {
        "input": {
          "ActionName": "my-custom-action",
          "AliasName": "invoke",
          "Definition": {
            "CommandText": "lambda invoke $functionName"
          }
        },
        "output": {
          "CustomActionArn": "arn:aws:chatbot::1234567890:custom-action/my-custom-action"
        },
        "description": "Creates an alias that invokes a Lambda function from chat channels. You can use this alias by entering 'run invoke', after which you're prompted for the function name.",
        "id": "example-1",
        "title": "Create an alias that invokes a Lambda function"
      },
      {
        "input": {
          "ActionName": "describe-alarms",
          "Attachments": [
            {
              "ButtonText": "List alarms",
              "NotificationType": "CloudWatch"
            }
          ],
          "Definition": {
            "CommandText": "cloudwatch describe-alarms --state-value ALARM"
          }
        },
        "output": {
          "CustomActionArn": "arn:aws:chatbot::1234567890:custom-action/describe-alarms"
        },
        "description": "Creates a button on all Cloudwatch notifications that lists alarms in the ‘ALARM’ state.",
        "id": "example-2",
        "title": "Create a custom action to list alarms"
      }
    ],
    "DeleteCustomAction": [
      {
        "input": {
          "CustomActionArn": "arn:aws:chatbot::1234567890:custom-action/my-custom-action"
        },
        "output": {
        },
        "id": "example-1",
        "title": "Delete a custom action"
      }
    ],
    "DisassociateFromConfiguration": [
      {
        "input": {
          "ChatConfiguration": "arn:aws:chatbot::1234567890:chat-configuration/slack-channel/my-channel",
          "Resource": "arn:aws:chatbot::1234567890:custom-action/my-custom-action"
        },
        "output": {
        },
        "id": "example-1",
        "title": "Disassociate a custom action from a configuration"
      }
    ],
    "GetCustomAction": [
      {
        "input": {
          "CustomActionArn": "arn:aws:chatbot::1234567890:custom-action/my-custom-action"
        },
        "output": {
          "CustomAction": {
            "ActionName": "my-custom-action",
            "CustomActionArn": "arn:aws:chatbot::1234567890:custom-action/my-custom-action",
            "Definition": {
              "CommandText": "lambda invoke $functionName"
            }
          }
        },
        "id": "example-1",
        "title": "Get a custom action"
      }
    ],
    "ListAssociations": [
      {
        "input": {
          "ChatConfiguration": "arn:aws:chatbot::1234567890:chat-configuration/slack-channel/my-channel"
        },
        "output": {
          "Associations": [
            {
              "Resource": "arn:aws:chatbot::1234567890:custom-action/my-custom-action"
            }
          ]
        },
        "id": "example-1",
        "title": "List custom actions associated with a configuration"
      }
    ],
    "ListCustomActions": [
      {
        "input": {
        },
        "output": {
          "CustomActions": [
            "arn:aws:chatbot::1234567890:custom-action/my-custom-action"
          ]
        },
        "id": "example-1",
        "title": "List custom actions"
      }
    ],
    "UpdateCustomAction": [
      {
        "input": {
          "CustomActionArn": "arn:aws:chatbot::1234567890:custom-action/my-custom-action",
          "Definition": {
            "CommandText": "lambda invoke MyNewFunction"
          }
        },
        "output": {
          "CustomActionArn": "arn:aws:chatbot::1234567890:custom-action/my-custom-action"
        },
        "description": "Updates the command text of a custom action without altering the existing alias name or attachment criteria",
        "id": "example-1",
        "title": "Update the command definition of an existing action"
      }
    ]
  }
}
