package resource import ( "errors" "github.com/aws-cloudformation/cloudformation-cli-go-plugin/cfn/handler" ) {% for method in ("Create", "Read", "Update", "Delete", "List") %} // {{ method }} handles the {{ method }} event from the Cloudformation service. func {{ method }}(req handler.Request, prevModel *Model, currentModel *Model) (handler.ProgressEvent, error) { // Add your code here: // * Make API calls (use req.Session) // * Mutate the model // * Check/set any callback context (req.CallbackContext / response.CallbackContext) // * Access the resource's configuration with the Configuration function. (c, err := Configuration(req)) /* // Construct a new handler.ProgressEvent and return it response := handler.ProgressEvent{ OperationStatus: handler.Success, Message: "{{ method }} complete", ResourceModel: currentModel, } return response, nil */ // Not implemented, return an empty handler.ProgressEvent // and an error return handler.ProgressEvent{}, errors.New("Not implemented: {{ method }}") } {% endfor %}