How to use the crhelper.utils._send_response function in crhelper

To help you get started, we’ve selected a few crhelper examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aws-cloudformation / custom-resource-helper / crhelper / resource_helper.py View on Github external
    def _send(self, status=None, reason="", send_response=_send_response):
        if len(str(str(self.Reason))) > 256:
            self.Reason = "ERROR: (truncated) " + str(self.Reason)[len(str(self.Reason)) - 240:]
        if len(str(reason)) > 256:
            reason = "ERROR: (truncated) " + str(reason)[len(str(reason)) - 240:]
        response_body = {
            'Status': self.Status,
            'PhysicalResourceId': str(self.PhysicalResourceId),
            'StackId': self.StackId,
            'RequestId': self.RequestId,
            'LogicalResourceId': self.LogicalResourceId,
            'Reason': str(self.Reason),
            'Data': self.Data,
        }
        if status:
            response_body.update({'Status': status, 'Reason': reason})
        send_response(self._response_url, response_body)
github aws-quickstart / quickstart-cloud9-ide / functions / source / c9DiskResize / crhelper / resource_helper.py View on Github external
    def _send(self, status=None, reason="", send_response=_send_response):
        if len(str(str(self.Reason))) > 256:
            self.Reason = "ERROR: (truncated) " + str(self.Reason)[len(str(self.Reason)) - 240:]
        if len(str(reason)) > 256:
            reason = "ERROR: (truncated) " + str(reason)[len(str(reason)) - 240:]
        response_body = {
            'Status': self.Status,
            'PhysicalResourceId': str(self.PhysicalResourceId),
            'StackId': self.StackId,
            'RequestId': self.RequestId,
            'LogicalResourceId': self.LogicalResourceId,
            'Reason': str(self.Reason),
            'Data': self.Data,
        }
        if status:
            response_body.update({'Status': status, 'Reason': reason})
        send_response(self._response_url, response_body)
github aws-quickstart / quickstart-amazon-eks / functions / source / crhelperLayer / python / crhelper / resource_helper.py View on Github external
    def _send(self, status=None, reason="", send_response=_send_response):
        if len(str(str(self.Reason))) > 256:
            self.Reason = "ERROR: (truncated) " + str(self.Reason)[len(str(self.Reason)) - 240:]
        if len(str(reason)) > 256:
            reason = "ERROR: (truncated) " + str(reason)[len(str(reason)) - 240:]
        response_body = {
            'Status': self.Status,
            'PhysicalResourceId': str(self.PhysicalResourceId),
            'StackId': self.StackId,
            'RequestId': self.RequestId,
            'LogicalResourceId': self.LogicalResourceId,
            'Reason': str(self.Reason),
            'Data': self.Data,
        }
        if status:
            response_body.update({'Status': status, 'Reason': reason})
        send_response(self._response_url, response_body)

crhelper

crhelper simplifies authoring CloudFormation Custom Resources

Apache-2.0
Latest version published 1 month ago

Package Health Score

85 / 100
Full package analysis

Similar packages