set_aws_profile_item#

See SetAwsProfileItem.

aws_resource_search.items.set_aws_profile_item.set_profile_in_bsm(profile: str, ars: ARS)[source]#

Update the singleton bsm object by reset its cache and use a new AWS profile. Also update all of related cached objects in ars.

class aws_resource_search.items.set_aws_profile_item.SetAwsProfileItem(title: str, subtitle: ~typing.Optional[str] = None, uid: str = <factory>, arg: ~typing.Optional[str] = None, autocomplete: ~typing.Optional[str] = None, variables: ~typing.Dict[str, ~typing.Any] = <factory>)[source]#

Represent an item in the aws profile search result.

enter_handler(ui: UI)[source]#

This is the abstract method that will perform user defined action when user hits Enter on this item. Develop should inherit this class and override this method to perform user defined action.

Parameters:

ui – the UI object.

post_enter_handler(ui: UI)[source]#

When exiting the switch profile session, recover the original query input.

classmethod from_profile_region(profile: str, region: str, autocomplete: str)[source]#

Factory method for SetAwsProfileItem.

Parameters:
  • profile – aws profile name

  • region – aws region

  • autocomplete – the existing query input before “!@” to recover to.

classmethod from_many_profile_region_pairs(pairs: List[Tuple[str, str]], autocomplete: str)[source]#

Another factory method to create many SetAwsProfileItem at once.