def _inject_websocket_integrations()

in chalice/deploy/planner.py [0:0]


    def _inject_websocket_integrations(self, configs):
        # type: (Dict[str, Any]) -> Sequence[InstructionMsg]
        instructions = []  # type: List[InstructionMsg]
        for key, config in configs.items():
            instructions.append(
                models.StoreValue(
                    name='websocket-%s-integration-lambda-path' % key,
                    value=StringFormat(
                        'arn:{partition}:apigateway:{region_name}:lambda:path/'
                        '2015-03-31/functions/arn:{partition}'
                        ':lambda:{region_name}:{account_id}:function'
                        ':%s/invocations' % config['name'],
                        ['partition', 'region_name', 'account_id'],
                    ),
                ),
            )
            instructions.append(
                models.APICall(
                    method_name='create_websocket_integration',
                    params={
                        'api_id': Variable('websocket_api_id'),
                        'lambda_function': Variable(
                            'websocket-%s-integration-lambda-path' % key),
                        'handler_type': key,
                    },
                    output_var='%s-integration-id' % key,
                ),
            )
        return instructions