ui_def#

AWS Resource UI class declaration modules.

aws_resource_search.ui_def.handler(query: str, ui: UI, skip_ui: bool = False) List[Union[ShowAwsInfoItem, SetAwsProfileItem, AwsResourceTypeItem, AwsResourceItem, DetailItem, ExceptionItem, FileItem, InfoItem, UrlItem]][source]#

Main query handler. It parses the query and route the query to the corresponding sub handler.

  • select_resource_type_handler()

  • search_resource_handler()

The query can be in one of these formats:

todo …

Parameters:

skip_ui – if True, skip the UI related logic, just return the items. this argument is used for third party integration.

class aws_resource_search.ui_def.UI(ars: ARS, **kwargs)[source]#

Extend the zelfred.UI class to add custom key bindings.

classmethod new(ars: ARS)[source]#

A factory method to create a new UI instance.

process_ctrl_b()[source]#

If you are searching an AWS resource, it will remove the query but keep the resource type, so you can enter a new query. For example (| is the cursor):

Now:

(Query) s3-bucket: my-bucket|

After Ctrl + B:

(Query) s3-bucket: |

If you are searching a sub resource, it will remove the query of the sub resource, so you can enter a new query. For example:

Now:

(Query) sfn-execution: my-statemachine@a1b2c3|

After Ctrl + B:

(Query) sfn-execution: my-statemachine@|