시퀀스 액션 생성
    • PDF

    시퀀스 액션 생성

    • PDF

    Article Summary

    Classic/VPC 환경에서 이용 가능합니다 .

    시퀀스 액션에 대한 이해와 활용에 도움을 줄 수 있는 몇 가지 예제를 소개합니다. 예제 코드는 다음과 같습니다.

    • 예제 1
      def main(user_parameter):
          # Process your business logic
          allow_users_id = {1, 2, 3}
          is_allowed = False
          if 'userId' in user_parameter and user_parameter['userId'] in allow_users_id:
              is_allowed = True
      
          # Result JSON
          result = dict()
      
          # Success
          if is_allowed:
              result['resCode'] = 0
      
          # Failure
          else:
              result['resCode'] = -1
              result['errMessage'] = 'Error'
      
          # Return result JSON
          return result
      
      
    • 예제 2
      def main(pre_action_result):
          if 'resCode' in pre_action_result and pre_action_result['resCode'] == 0:
              on_success(pre_action_result)
          else:
              on_failure(pre_action_result)
      
      
      def on_success(pre_action_result):
          print('Success')
      
      
      def on_failure(pre_action_result):
          print('Failure')
          print(pre_action_result['errMessage'])
      

    이 문서가 도움이 되었습니까?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.