Check if an operation can be paginated. :type operation_name: string :param operation_name: The operation name. This is the same name as the method name on the client. For example, if the method name is ``create_foo``, and you'd normally invoke the
(self, operation_name)
| 1115 | return paginator |
| 1116 | |
| 1117 | def can_paginate(self, operation_name): |
| 1118 | """Check if an operation can be paginated. |
| 1119 | |
| 1120 | :type operation_name: string |
| 1121 | :param operation_name: The operation name. This is the same name |
| 1122 | as the method name on the client. For example, if the |
| 1123 | method name is ``create_foo``, and you'd normally invoke the |
| 1124 | operation as ``client.create_foo(**kwargs)``, if the |
| 1125 | ``create_foo`` operation can be paginated, you can use the |
| 1126 | call ``client.get_paginator("create_foo")``. |
| 1127 | |
| 1128 | :return: ``True`` if the operation can be paginated, |
| 1129 | ``False`` otherwise. |
| 1130 | |
| 1131 | """ |
| 1132 | if 'page_config' not in self._cache: |
| 1133 | try: |
| 1134 | page_config = self._loader.load_service_model( |
| 1135 | self._service_model.service_name, 'paginators-1' |
| 1136 | )['pagination'] |
| 1137 | self._cache['page_config'] = page_config |
| 1138 | except DataNotFoundError: |
| 1139 | self._cache['page_config'] = {} |
| 1140 | actual_operation_name = self._PY_TO_OP_NAME[operation_name] |
| 1141 | return actual_operation_name in self._cache['page_config'] |
| 1142 | |
| 1143 | def _get_waiter_config(self): |
| 1144 | if 'waiter_config' not in self._cache: |