A single operation of a service. This class represents a single operation for a service, for example ``ec2.DescribeInstances``.
| 787 | |
| 788 | |
| 789 | class ServiceOperation: |
| 790 | """A single operation of a service. |
| 791 | |
| 792 | This class represents a single operation for a service, for |
| 793 | example ``ec2.DescribeInstances``. |
| 794 | |
| 795 | """ |
| 796 | |
| 797 | ARG_TYPES = { |
| 798 | 'list': ListArgument, |
| 799 | 'boolean': BooleanArgument, |
| 800 | } |
| 801 | DEFAULT_ARG_CLASS = CLIArgument |
| 802 | |
| 803 | def __init__( |
| 804 | self, name, parent_name, operation_caller, operation_model, session |
| 805 | ): |
| 806 | """ |
| 807 | |
| 808 | :type name: str |
| 809 | :param name: The name of the operation/subcommand. |
| 810 | |
| 811 | :type parent_name: str |
| 812 | :param parent_name: The name of the parent command. |
| 813 | |
| 814 | :type operation_model: ``botocore.model.OperationModel`` |
| 815 | :param operation_object: The operation model |
| 816 | associated with this subcommand. |
| 817 | |
| 818 | :type operation_caller: ``CLIOperationCaller`` |
| 819 | :param operation_caller: An object that can properly call the |
| 820 | operation. |
| 821 | |
| 822 | :type session: ``botocore.session.Session`` |
| 823 | :param session: The session object. |
| 824 | |
| 825 | """ |
| 826 | self._arg_table = None |
| 827 | self._name = name |
| 828 | # These is used so we can figure out what the proper event |
| 829 | # name should be <parent name>.<name>. |
| 830 | self._parent_name = parent_name |
| 831 | self._operation_caller = operation_caller |
| 832 | self._lineage = [self] |
| 833 | self._operation_model = operation_model |
| 834 | self._session = session |
| 835 | self._subcommand_table = None |
| 836 | if operation_model.deprecated: |
| 837 | self._UNDOCUMENTED = True |
| 838 | |
| 839 | @property |
| 840 | def name(self): |
| 841 | return self._name |
| 842 | |
| 843 | @name.setter |
| 844 | def name(self, value): |
| 845 | self._name = value |
| 846 |
no outgoing calls