saws package

Submodules

saws.commands module

class saws.commands.AwsCommands

Bases: object

Encapsulates AWS commands.

All commands are listed in the periodically updated data/SOURCES.txt file.

Attributes:
  • AWS_COMMAND: A string representing the ‘aws’ command.

  • AWS_CONFIGURE: A string representing the ‘configure’ command.

  • AWS_HELP: A string representing the ‘help’ command.

  • AWS_DOCS: A string representing the ‘docs’ command.

  • DATA_DIR: A string representing the directory containing

    data/SOURCES.txt.

  • DATA_PATH: A string representing the full file path of

    data/SOURCES.txt.

  • data_util: An instance of DataUtil().

  • headers: A list denoting the start of each set of command types.

  • header_to_type_map: A dictionary mapping between headers and

    CommandType.

  • all_commands: A list of all commands, sub_commands, options, etc

    from data/SOURCES.txt.

AWS_COMMAND = 'aws'
AWS_CONFIGURE = 'configure'
AWS_DOCS = 'docs'
AWS_HELP = 'help'
class CommandType

Bases: enum.Enum

Enum specifying the command type.

Attributes:
  • COMMANDS: An int representing commands.
  • SUB_COMMANDS: An int representing subcommands.
  • GLOBAL_OPTIONS: An int representing global options.
  • RESOURCE_OPTIONS: An int representing resource options.
  • NUM_TYPES: An int representing the number of command types.
AwsCommands.DATA_DIR = '/Users/donnemartin/Dev/github/sources/saws/saws'
AwsCommands.DATA_PATH = '/Users/donnemartin/Dev/github/sources/saws/saws/data/SOURCES.txt'
AwsCommands.__init__()

saws.completer module

class saws.completer.AwsCompleter(aws_completer, all_commands, config, config_obj, log_exception, fuzzy_match=False, shortcut_match=False)

Bases: prompt_toolkit.completion.Completer

Completer for AWS commands, subcommands, options, and parameters.

Attributes:
  • aws_completer: An instance of the official awscli Completer.

  • aws_completions: A set of completions to show the user.

  • all_commands: A list of all commands, sub_commands, options, etc

    from data/SOURCES.txt.

  • config: An instance of Config.

  • config_obj: An instance of ConfigObj, reads from ~/.sawsrc.

  • log_exception: A callable log_exception from SawsLogger.

  • text_utils: An instance of TextUtils.

  • fuzzy_match: A boolean that determines whether to use fuzzy matching.

  • shortcut_match: A boolean that determines whether to match shortcuts.

  • BASE_COMMAND: A string representing the ‘aws’ command.

  • shortcuts: An OrderedDict containing shortcuts commands as keys

    and their corresponding full commands as values.

  • resources: An instance of AwsResources.

  • options: An instance of AwsOptions

__init__(aws_completer, all_commands, config, config_obj, log_exception, fuzzy_match=False, shortcut_match=False)

Initializes AwsCompleter.

Args:
  • aws_completer: The official aws cli completer module.

  • all_commands: A list of all commands, sub_commands, options, etc

    from data/SOURCES.txt.

  • config: An instance of Config.

  • config_obj: An instance of ConfigObj, reads from ~/.sawsrc.

  • log_exception: A callable log_exception from SawsLogger.

  • fuzzy_match: A boolean that determines whether to use

    fuzzy matching.

  • shortcut_match: A boolean that determines whether to

    match shortcuts.

Returns:
None.
get_completions(document, _)

Get completions for the current scope.

Args:
  • document: An instance of prompt_toolkit’s Document.
  • _: An instance of prompt_toolkit’s CompleteEvent (not used).
Returns:
A generator of prompt_toolkit’s Completion objects, containing matched completions.
refresh_resources_and_options(force_refresh=False)

Convenience function to refresh resources for completion.

Args:
  • force_refresh: A boolean determines whether to force a cache

    refresh. This value is set to True when the user presses F5.

Returns:
None.
replace_shortcut(text)

Replaces matched shortcut commands with their full command.

Currently, only one shortcut is replaced before shortcut replacement terminates, although this function could potentially be extended to replace mutliple shortcuts.

Args:
  • text: A string representing the input command text to replace.
Returns:
A string representing input command text with a shortcut
replaced, if one has been found.
replace_substitution(text)

Replaces a %s with the word immediately following it.

Currently, only one substitution is done before replacement terminates, although this function could potentially be extended to do multiple substitutions.

Args:
  • text: A string representing the input command text to replace.
Returns:
A string representing input command text with a substitution, if one has been found.

saws.config module

class saws.config.Config

Bases: object

Reads and writes the config file sawsrc.

Attributes:
  • SHORTCUTS: A string that represents the start of shortcuts in

    the config file ~/.sawsrc.

  • MAIN: A string that represents the main set of configs in

    ~/.sawsrc.

  • THEME: A string that represents the config theme.

  • LOG_FILE: A string that represents the config log file location.

  • LOG_LEVEL: A string that represents the config default log

    file level.

  • COLOR: A string that represents the config color output mode.

  • FUZZY: A string that represents the config fuzzy matching mode.

  • SHORTCUT: A string that represents the config shortcut matching

    mode.

COLOR = 'color_output'
FUZZY = 'fuzzy_match'
LOG_FILE = 'log_file'
LOG_LEVEL = 'log_level'
MAIN = 'main'
SHORTCUT = 'shortcut_match'
SHORTCUTS = 'shortcuts'
THEME = 'theme'
get_shortcuts(config_obj)

Gets the shortcuts from the specified config.

Args:
  • config_obj: An instance of ConfigObj.
Returns:
An OrderedDict containing the shortcut commands as the keys and their corresponding full commands as the values.
read_configuration(config_template=None, config_path=None)

Reads the config file if it exists, else reads the default config.

Args:
  • config_template: A string representing the template file name.
  • config_path: A string representing the template file path.
Returns:
An instance of a ConfigObj.

saws.keys module

class saws.keys.KeyManager(set_color, get_color, set_fuzzy_match, get_fuzzy_match, set_shortcut_match, get_shortcut_match, refresh_resources_and_options, handle_docs)

Bases: object

Creates a Key Manager.

Attributes:
  • manager: An instance of a prompt_toolkit’s KeyBindingManager.
__init__(set_color, get_color, set_fuzzy_match, get_fuzzy_match, set_shortcut_match, get_shortcut_match, refresh_resources_and_options, handle_docs)

Initializes KeyManager.

Args:
  • set_color: A function setting the color output config.
  • get_color: A function getting the color output config.
  • set_fuzzy_match: A function setting the fuzzy match config.
  • get_fuzzy_match: A function getting the fuzzy match config.
  • set_shortcut_match: A function setting the shortcut match config.
  • get_shortcut_match: A function getting the shortcut match config.
Returns:
None.

saws.lexer module

class saws.lexer.CommandLexer(**options)

Bases: pygments.lexer.RegexLexer

Provides highlighting for commands.

Attributes:
  • config: An instance of Config.

  • config_obj: An instance of ConfigObj.

  • shortcuts: An OrderedDict containing the shortcut commands as the

    keys and their corresponding full commands as the values.

  • shortcut_tokens: A list containing words for each shortcut key:

    key: ‘aws ec2 ls’ -> shortcut_tokens: [‘aws’, ‘ec2’, ‘ls’].

  • aws_commands: An instance of AwsCommands.

  • commands: A tuple, where each tuple element is a list of:
    • commands
    • sub_commands
    • global_options
    • resource_options
  • tokens: A dictionary of pygments tokens.

aws_commands = <saws.commands.AwsCommands object>
commands = [['acm', 'apigateway', 'autoscaling', 'cloudformation', 'cloudfront', 'cloudhsm', 'cloudsearch', 'cloudsearchdomain', 'cloudtrail', 'cloudwatch', 'codecommit', 'codepipeline', 'cognito-identity', 'cognito-sync', 'configservice', 'configure', 'datapipeline', 'deploy', 'devicefarm', 'directconnect', 'dms', 'ds', 'dynamodb', 'dynamodbstreams', 'ec2', 'ecr', 'ecs', 'efs', 'elasticache', 'elasticbeanstalk', 'elastictranscoder', 'elb', 'emr', 'es', 'events', 'firehose', 'gamelift', 'glacier', 'iam', 'importexport', 'inspector', 'iot', 'iot-data', 'kinesis', 'kms', 'lambda', 'logs', 'machinelearning', 'marketplacecommerceanalytics', 'meteringmarketplace', 'opsworks', 'rds', 'redshift', 'route53', 'route53domains', 's3', 's3api', 'sdb', 'ses', 'sns', 'sqs', 'ssm', 'storagegateway', 'sts', 'support', 'swf', 'waf', 'workspaces'], ['abort-environment-update', 'abort-multipart-upload', 'abort-vault-lock', 'accept-certificate-transfer', 'accept-vpc-peering-connection', 'acknowledge-job', 'acknowledge-third-party-job', 'activate-gateway', 'activate-pipeline', 'add-attachments-to-set', 'add-attributes-to-findings', 'add-cache', 'add-client-id-to-open-id-connect-provider', 'add-communication-to-case', 'add-instance-groups', 'add-model', 'add-option-to-option-group', 'add-permission', 'add-role-to-instance-profile', 'add-source-identifier-to-subscription', 'add-steps', 'add-tags', 'add-tags-to-certificate', 'add-tags-to-on-premises-instances', 'add-tags-to-resource', 'add-tags-to-stream', 'add-tags-to-vault', 'add-upload-buffer', 'add-user-to-group', 'add-working-storage', 'allocate-address', 'allocate-connection-on-interconnect', 'allocate-hosts', 'allocate-private-virtual-interface', 'allocate-public-virtual-interface', 'apply-environment-managed-action', 'apply-pending-maintenance-action', 'apply-security-groups-to-load-balancer', 'assign-instance', 'assign-private-ip-addresses', 'assign-volume', 'associate-address', 'associate-dhcp-options', 'associate-elastic-ip', 'associate-route-table', 'associate-vpc-with-hosted-zone', 'assume-role', 'assume-role-with-saml', 'assume-role-with-web-identity', 'attach-classic-link-vpc', 'attach-elastic-load-balancer', 'attach-group-policy', 'attach-instances', 'attach-internet-gateway', 'attach-load-balancer-to-subnets', 'attach-load-balancers', 'attach-network-interface', 'attach-principal-policy', 'attach-role-policy', 'attach-thing-principal', 'attach-user-policy', 'attach-volume', 'attach-vpn-gateway', 'authorize-cache-security-group-ingress', 'authorize-cluster-security-group-ingress', 'authorize-db-security-group-ingress', 'authorize-security-group-egress', 'authorize-security-group-ingress', 'authorize-snapshot-access', 'batch-check-layer-availability', 'batch-delete-attributes', 'batch-delete-image', 'batch-get-application-revisions', 'batch-get-applications', 'batch-get-deployment-groups', 'batch-get-deployment-instances', 'batch-get-deployments', 'batch-get-image', 'batch-get-item', 'batch-get-on-premises-instances', 'batch-get-repositories', 'batch-put-attributes', 'batch-write-item', 'build-suggesters', 'bulk-publish', 'bundle-instance', 'cancel-archival', 'cancel-bundle-task', 'cancel-certificate-transfer', 'cancel-command', 'cancel-conversion-task', 'cancel-export-task', 'cancel-import-task', 'cancel-job', 'cancel-key-deletion', 'cancel-reserved-instances-listing', 'cancel-retrieval', 'cancel-spot-fleet-requests', 'cancel-spot-instance-requests', 'cancel-update-stack', 'change-message-visibility', 'change-message-visibility-batch', 'change-password', 'change-resource-record-sets', 'change-tags-for-resource', 'check-dns-availability', 'check-domain-availability', 'clone-receipt-rule-set', 'clone-stack', 'complete-layer-upload', 'complete-lifecycle-action', 'complete-multipart-upload', 'complete-vault-lock', 'compose-environments', 'configure-health-check', 'confirm-connection', 'confirm-private-virtual-interface', 'confirm-product-instance', 'confirm-public-virtual-interface', 'confirm-subscription', 'connect-directory', 'continue-update-rollback', 'copy-cluster-snapshot', 'copy-db-cluster-snapshot', 'copy-db-parameter-group', 'copy-db-snapshot', 'copy-image', 'copy-object', 'copy-option-group', 'copy-snapshot', 'count-closed-workflow-executions', 'count-open-workflow-executions', 'count-pending-activity-tasks', 'count-pending-decision-tasks', 'cp', 'create-access-key', 'create-account-alias', 'create-alias', 'create-api-key', 'create-app', 'create-app-cookie-stickiness-policy', 'create-application', 'create-application-version', 'create-assessment-target', 'create-assessment-template', 'create-association', 'create-association-batch', 'create-authorizer', 'create-auto-scaling-group', 'create-base-path-mapping', 'create-batch-prediction', 'create-branch', 'create-bucket', 'create-build', 'create-byte-match-set', 'create-cache-cluster', 'create-cache-parameter-group', 'create-cache-security-group', 'create-cache-subnet-group', 'create-cached-iscsi-volume', 'create-case', 'create-certificate-from-csr', 'create-change-set', 'create-cloud-front-origin-access-identity', 'create-cluster', 'create-cluster-parameter-group', 'create-cluster-security-group', 'create-cluster-snapshot', 'create-cluster-subnet-group', 'create-computer', 'create-conditional-forwarder', 'create-configuration-template', 'create-connection', 'create-custom-action-type', 'create-customer-gateway', 'create-data-source-from-rds', 'create-data-source-from-redshift', 'create-data-source-from-s3', 'create-db-cluster', 'create-db-cluster-parameter-group', 'create-db-cluster-snapshot', 'create-db-instance', 'create-db-instance-read-replica', 'create-db-parameter-group', 'create-db-security-group', 'create-db-snapshot', 'create-db-subnet-group', 'create-default-roles', 'create-delivery-stream', 'create-deployment', 'create-deployment-config', 'create-deployment-group', 'create-device-pool', 'create-dhcp-options', 'create-directory', 'create-distribution', 'create-document', 'create-domain', 'create-domain-name', 'create-elasticsearch-domain', 'create-endpoint', 'create-environment', 'create-evaluation', 'create-event-source-mapping', 'create-event-subscription', 'create-export-task', 'create-file-system', 'create-fleet', 'create-flow-logs', 'create-function', 'create-game-session', 'create-grant', 'create-group', 'create-hapg', 'create-hbase-backup', 'create-health-check', 'create-hosted-zone', 'create-hsm', 'create-hsm-client-certificate', 'create-hsm-configuration', 'create-identity-pool', 'create-image', 'create-instance', 'create-instance-export-task', 'create-instance-profile', 'create-interconnect', 'create-internet-gateway', 'create-invalidation', 'create-ip-set', 'create-job', 'create-key', 'create-key-pair', 'create-keys-and-certificate', 'create-launch-configuration', 'create-layer', 'create-lb-cookie-stickiness-policy', 'create-load-balancer', 'create-load-balancer-listeners', 'create-load-balancer-policy', 'create-log-group', 'create-log-stream', 'create-login-profile', 'create-luna-client', 'create-microsoft-ad', 'create-ml-model', 'create-model', 'create-mount-target', 'create-multipart-upload', 'create-nat-gateway', 'create-network-acl', 'create-network-acl-entry', 'create-network-interface', 'create-open-id-connect-provider', 'create-option-group', 'create-or-update-tags', 'create-pipeline', 'create-placement-group', 'create-platform-application', 'create-platform-endpoint', 'create-player-session', 'create-player-sessions', 'create-policy', 'create-policy-version', 'create-preset', 'create-private-virtual-interface', 'create-project', 'create-public-virtual-interface', 'create-queue', 'create-realtime-endpoint', 'create-receipt-filter', 'create-receipt-rule', 'create-receipt-rule-set', 'create-replication-group', 'create-replication-instance', 'create-replication-subnet-group', 'create-replication-task', 'create-repository', 'create-reserved-instances-listing', 'create-resource', 'create-resource-group', 'create-rest-api', 'create-reusable-delegation-set', 'create-role', 'create-route', 'create-route-table', 'create-rule', 'create-saml-provider', 'create-security-group', 'create-service', 'create-size-constraint-set', 'create-snapshot', 'create-snapshot-copy-grant', 'create-snapshot-from-volume-recovery-point', 'create-spot-datafeed-subscription', 'create-sql-injection-match-set', 'create-stack', 'create-stage', 'create-storage-location', 'create-stored-iscsi-volume', 'create-stream', 'create-streaming-distribution', 'create-subnet', 'create-subscription', 'create-table', 'create-tags', 'create-tape-with-barcode', 'create-tapes', 'create-thing', 'create-topic', 'create-topic-rule', 'create-traffic-policy', 'create-traffic-policy-instance', 'create-traffic-policy-version', 'create-trail', 'create-trust', 'create-upload', 'create-user', 'create-user-profile', 'create-vault', 'create-virtual-mfa-device', 'create-volume', 'create-vpc', 'create-vpc-endpoint', 'create-vpc-peering-connection', 'create-vpn-connection', 'create-vpn-connection-route', 'create-vpn-gateway', 'create-web-acl', 'create-workspaces', 'create-xss-match-set', 'credential-helper', 'deactivate-mfa-device', 'deactivate-pipeline', 'decode-authorization-message', 'decrease-stream-retention-period', 'decrypt', 'define-analysis-scheme', 'define-expression', 'define-index-field', 'define-suggester', 'delete-access-key', 'delete-account-alias', 'delete-account-password-policy', 'delete-alarms', 'delete-alias', 'delete-analysis-scheme', 'delete-api-key', 'delete-app', 'delete-application', 'delete-application-version', 'delete-archive', 'delete-assessment-run', 'delete-assessment-target', 'delete-assessment-template', 'delete-association', 'delete-attributes', 'delete-authorizer', 'delete-auto-scaling-group', 'delete-bandwidth-rate-limit', 'delete-base-path-mapping', 'delete-batch-prediction', 'delete-bucket', 'delete-bucket-cors', 'delete-bucket-lifecycle', 'delete-bucket-policy', 'delete-bucket-replication', 'delete-bucket-tagging', 'delete-bucket-website', 'delete-build', 'delete-byte-match-set', 'delete-ca-certificate', 'delete-cache-cluster', 'delete-cache-parameter-group', 'delete-cache-security-group', 'delete-cache-subnet-group', 'delete-certificate', 'delete-change-set', 'delete-chap-credentials', 'delete-client-certificate', 'delete-cloud-front-origin-access-identity', 'delete-cluster', 'delete-cluster-parameter-group', 'delete-cluster-security-group', 'delete-cluster-snapshot', 'delete-cluster-subnet-group', 'delete-conditional-forwarder', 'delete-config-rule', 'delete-configuration-template', 'delete-connection', 'delete-custom-action-type', 'delete-customer-gateway', 'delete-data-source', 'delete-dataset', 'delete-db-cluster', 'delete-db-cluster-parameter-group', 'delete-db-cluster-snapshot', 'delete-db-instance', 'delete-db-parameter-group', 'delete-db-security-group', 'delete-db-snapshot', 'delete-db-subnet-group', 'delete-delivery-channel', 'delete-delivery-stream', 'delete-deployment', 'delete-deployment-config', 'delete-deployment-group', 'delete-destination', 'delete-device-pool', 'delete-dhcp-options', 'delete-directory', 'delete-distribution', 'delete-document', 'delete-domain', 'delete-domain-name', 'delete-elasticsearch-domain', 'delete-endpoint', 'delete-environment-configuration', 'delete-evaluation', 'delete-event-source-mapping', 'delete-event-subscription', 'delete-expression', 'delete-file-system', 'delete-fleet', 'delete-flow-logs', 'delete-function', 'delete-gateway', 'delete-group', 'delete-group-policy', 'delete-hapg', 'delete-health-check', 'delete-hosted-zone', 'delete-hsm', 'delete-hsm-client-certificate', 'delete-hsm-configuration', 'delete-identities', 'delete-identity', 'delete-identity-policy', 'delete-identity-pool', 'delete-index-field', 'delete-instance', 'delete-instance-profile', 'delete-integration', 'delete-integration-response', 'delete-interconnect', 'delete-internet-gateway', 'delete-ip-set', 'delete-item', 'delete-key-pair', 'delete-launch-configuration', 'delete-layer', 'delete-lifecycle-hook', 'delete-load-balancer', 'delete-load-balancer-listeners', 'delete-load-balancer-policy', 'delete-log-group', 'delete-log-stream', 'delete-login-profile', 'delete-luna-client', 'delete-message', 'delete-message-batch', 'delete-method', 'delete-method-response', 'delete-metric-filter', 'delete-ml-model', 'delete-model', 'delete-mount-target', 'delete-nat-gateway', 'delete-network-acl', 'delete-network-acl-entry', 'delete-network-interface', 'delete-notification-configuration', 'delete-object', 'delete-objects', 'delete-open-id-connect-provider', 'delete-option-group', 'delete-pipeline', 'delete-placement-group', 'delete-platform-application', 'delete-policy', 'delete-policy-version', 'delete-preset', 'delete-project', 'delete-queue', 'delete-realtime-endpoint', 'delete-receipt-filter', 'delete-receipt-rule', 'delete-receipt-rule-set', 'delete-registration-code', 'delete-replication-group', 'delete-replication-instance', 'delete-replication-subnet-group', 'delete-replication-task', 'delete-repository', 'delete-repository-policy', 'delete-resource', 'delete-rest-api', 'delete-retention-policy', 'delete-reusable-delegation-set', 'delete-role', 'delete-role-policy', 'delete-route', 'delete-route-table', 'delete-rule', 'delete-run', 'delete-saml-provider', 'delete-scaling-policy', 'delete-scheduled-action', 'delete-security-group', 'delete-server-certificate', 'delete-service', 'delete-signing-certificate', 'delete-size-constraint-set', 'delete-snapshot', 'delete-snapshot-copy-grant', 'delete-snapshot-schedule', 'delete-spot-datafeed-subscription', 'delete-sql-injection-match-set', 'delete-ssh-public-key', 'delete-stack', 'delete-stage', 'delete-stream', 'delete-streaming-distribution', 'delete-subnet', 'delete-subscription-filter', 'delete-suggester', 'delete-table', 'delete-tags', 'delete-tags-for-domain', 'delete-tape', 'delete-tape-archive', 'delete-thing', 'delete-thing-shadow', 'delete-topic', 'delete-topic-rule', 'delete-traffic-policy', 'delete-traffic-policy-instance', 'delete-trail', 'delete-trust', 'delete-upload', 'delete-user', 'delete-user-policy', 'delete-user-profile', 'delete-vault', 'delete-vault-access-policy', 'delete-vault-notifications', 'delete-virtual-interface', 'delete-virtual-mfa-device', 'delete-volume', 'delete-vpc', 'delete-vpc-endpoints', 'delete-vpc-peering-connection', 'delete-vpn-connection', 'delete-vpn-connection-route', 'delete-vpn-gateway', 'delete-web-acl', 'delete-xss-match-set', 'deliver-config-snapshot', 'deprecate-activity-type', 'deprecate-domain', 'deprecate-workflow-type', 'deregister', 'deregister-container-instance', 'deregister-ecs-cluster', 'deregister-elastic-ip', 'deregister-event-topic', 'deregister-image', 'deregister-instance', 'deregister-instances-from-load-balancer', 'deregister-on-premises-instance', 'deregister-rds-db-instance', 'deregister-task-definition', 'deregister-volume', 'describe-account-attributes', 'describe-account-limits', 'describe-active-receipt-rule-set', 'describe-activity-type', 'describe-addresses', 'describe-adjustment-types', 'describe-agent-versions', 'describe-alarm-history', 'describe-alarms', 'describe-alarms-for-metric', 'describe-alias', 'describe-analysis-schemes', 'describe-application-versions', 'describe-applications', 'describe-apps', 'describe-assessment-runs', 'describe-assessment-targets', 'describe-assessment-templates', 'describe-association', 'describe-attachment', 'describe-auto-scaling-groups', 'describe-auto-scaling-instances', 'describe-auto-scaling-notification-types', 'describe-availability-options', 'describe-availability-zones', 'describe-bandwidth-rate-limit', 'describe-batch-predictions', 'describe-build', 'describe-bundle-tasks', 'describe-ca-certificate', 'describe-cache', 'describe-cache-clusters', 'describe-cache-engine-versions', 'describe-cache-parameter-groups', 'describe-cache-parameters', 'describe-cache-security-groups', 'describe-cache-subnet-groups', 'describe-cached-iscsi-volumes', 'describe-cases', 'describe-certificate', 'describe-certificates', 'describe-change-set', 'describe-chap-credentials', 'describe-classic-link-instances', 'describe-cluster', 'describe-cluster-parameter-groups', 'describe-cluster-parameters', 'describe-cluster-security-groups', 'describe-cluster-snapshots', 'describe-cluster-subnet-groups', 'describe-cluster-versions', 'describe-clusters', 'describe-commands', 'describe-communications', 'describe-compliance-by-config-rule', 'describe-compliance-by-resource', 'describe-conditional-forwarders', 'describe-config-rule-evaluation-status', 'describe-config-rules', 'describe-configuration-options', 'describe-configuration-recorder-status', 'describe-configuration-recorders', 'describe-configuration-settings', 'describe-connections', 'describe-connections-on-interconnect', 'describe-container-instances', 'describe-conversion-tasks', 'describe-cross-account-access-role', 'describe-customer-gateways', 'describe-data-sources', 'describe-dataset', 'describe-db-cluster-parameter-groups', 'describe-db-cluster-parameters', 'describe-db-cluster-snapshot-attributes', 'describe-db-cluster-snapshots', 'describe-db-clusters', 'describe-db-engine-versions', 'describe-db-instances', 'describe-db-log-files', 'describe-db-parameter-groups', 'describe-db-parameters', 'describe-db-security-groups', 'describe-db-snapshot-attributes', 'describe-db-snapshots', 'describe-db-subnet-groups', 'describe-default-cluster-parameters', 'describe-delivery-channel-status', 'describe-delivery-channels', 'describe-delivery-stream', 'describe-deployments', 'describe-destinations', 'describe-dhcp-options', 'describe-directories', 'describe-document', 'describe-document-permission', 'describe-domain', 'describe-domains', 'describe-ec2-instance-limits', 'describe-ecs-clusters', 'describe-elastic-ips', 'describe-elastic-load-balancers', 'describe-elasticsearch-domain', 'describe-elasticsearch-domain-config', 'describe-elasticsearch-domains', 'describe-endpoint', 'describe-endpoint-types', 'describe-endpoints', 'describe-engine-default-cluster-parameters', 'describe-engine-default-parameters', 'describe-environment-health', 'describe-environment-managed-action-history', 'describe-environment-managed-actions', 'describe-environment-resources', 'describe-environments', 'describe-evaluations', 'describe-event-categories', 'describe-event-subscriptions', 'describe-event-topics', 'describe-events', 'describe-export-tasks', 'describe-expressions', 'describe-file-systems', 'describe-findings', 'describe-fleet-attributes', 'describe-fleet-capacity', 'describe-fleet-events', 'describe-fleet-port-settings', 'describe-fleet-utilization', 'describe-flow-logs', 'describe-game-session-details', 'describe-game-sessions', 'describe-gateway-information', 'describe-hapg', 'describe-hosts', 'describe-hsm', 'describe-hsm-client-certificates', 'describe-hsm-configurations', 'describe-id-format', 'describe-identity', 'describe-identity-pool', 'describe-identity-pool-usage', 'describe-identity-usage', 'describe-image-attribute', 'describe-images', 'describe-import-image-tasks', 'describe-import-snapshot-tasks', 'describe-index-fields', 'describe-instance-attribute', 'describe-instance-health', 'describe-instance-information', 'describe-instance-status', 'describe-instances', 'describe-instances-health', 'describe-interconnects', 'describe-internet-gateways', 'describe-job', 'describe-key', 'describe-key-pairs', 'describe-launch-configurations', 'describe-layers', 'describe-lifecycle-hook-types', 'describe-lifecycle-hooks', 'describe-limits', 'describe-load-balancer-attributes', 'describe-load-balancer-policies', 'describe-load-balancer-policy-types', 'describe-load-balancers', 'describe-load-based-auto-scaling', 'describe-locations', 'describe-log-groups', 'describe-log-streams', 'describe-logging-status', 'describe-luna-client', 'describe-maintenance-start-time', 'describe-metric-collection-types', 'describe-metric-filters', 'describe-ml-models', 'describe-mount-target-security-groups', 'describe-mount-targets', 'describe-moving-addresses', 'describe-my-user-profile', 'describe-nat-gateways', 'describe-network-acls', 'describe-network-interface-attribute', 'describe-network-interfaces', 'describe-notification-configurations', 'describe-objects', 'describe-option-group-options', 'describe-option-groups', 'describe-orderable-cluster-options', 'describe-orderable-db-instance-options', 'describe-orderable-replication-instances', 'describe-pending-maintenance-actions', 'describe-permissions', 'describe-pipelines', 'describe-placement-groups', 'describe-player-sessions', 'describe-policies', 'describe-prefix-lists', 'describe-raid-arrays', 'describe-rds-db-instances', 'describe-receipt-rule', 'describe-receipt-rule-set', 'describe-refresh-schemas-status', 'describe-regions', 'describe-replication-groups', 'describe-replication-instances', 'describe-replication-subnet-groups', 'describe-replication-tasks', 'describe-repositories', 'describe-reserved-cache-nodes', 'describe-reserved-cache-nodes-offerings', 'describe-reserved-db-instances', 'describe-reserved-db-instances-offerings', 'describe-reserved-instances', 'describe-reserved-instances-listings', 'describe-reserved-instances-modifications', 'describe-reserved-instances-offerings', 'describe-reserved-node-offerings', 'describe-reserved-nodes', 'describe-resize', 'describe-resource-groups', 'describe-route-tables', 'describe-rule', 'describe-rules-packages', 'describe-scaling-activities', 'describe-scaling-parameters', 'describe-scaling-policies', 'describe-scaling-process-types', 'describe-scheduled-actions', 'describe-scheduled-instance-availability', 'describe-scheduled-instances', 'describe-schemas', 'describe-security-group-references', 'describe-security-groups', 'describe-service-access-policies', 'describe-service-errors', 'describe-services', 'describe-severity-levels', 'describe-snapshot-attribute', 'describe-snapshot-copy-grants', 'describe-snapshot-schedule', 'describe-snapshots', 'describe-spot-datafeed-subscription', 'describe-spot-fleet-instances', 'describe-spot-fleet-request-history', 'describe-spot-fleet-requests', 'describe-spot-instance-requests', 'describe-spot-price-history', 'describe-stack-events', 'describe-stack-provisioning-parameters', 'describe-stack-resource', 'describe-stack-resources', 'describe-stack-summary', 'describe-stacks', 'describe-stale-security-groups', 'describe-step', 'describe-stored-iscsi-volumes', 'describe-stream', 'describe-subnets', 'describe-subscription-filters', 'describe-suggesters', 'describe-table', 'describe-table-restore-status', 'describe-table-statistics', 'describe-tags', 'describe-tape-archives', 'describe-tape-recovery-points', 'describe-tapes', 'describe-task-definition', 'describe-tasks', 'describe-termination-policy-types', 'describe-thing', 'describe-time-based-auto-scaling', 'describe-trails', 'describe-trusted-advisor-check-refresh-statuses', 'describe-trusted-advisor-check-result', 'describe-trusted-advisor-check-summaries', 'describe-trusted-advisor-checks', 'describe-trusts', 'describe-upload-buffer', 'describe-user-profiles', 'describe-vault', 'describe-virtual-gateways', 'describe-virtual-interfaces', 'describe-volume-attribute', 'describe-volume-status', 'describe-volumes', 'describe-vpc-attribute', 'describe-vpc-classic-link', 'describe-vpc-classic-link-dns-support', 'describe-vpc-endpoint-services', 'describe-vpc-endpoints', 'describe-vpc-peering-connections', 'describe-vpcs', 'describe-vpn-connections', 'describe-vpn-gateways', 'describe-vtl-devices', 'describe-workflow-execution', 'describe-workflow-type', 'describe-working-storage', 'describe-workspace-bundles', 'describe-workspace-directories', 'describe-workspaces', 'detach-classic-link-vpc', 'detach-elastic-load-balancer', 'detach-group-policy', 'detach-instances', 'detach-internet-gateway', 'detach-load-balancer-from-subnets', 'detach-load-balancers', 'detach-network-interface', 'detach-principal-policy', 'detach-role-policy', 'detach-thing-principal', 'detach-user-policy', 'detach-volume', 'detach-vpn-gateway', 'disable-alarm-actions', 'disable-availability-zones-for-load-balancer', 'disable-domain-auto-renew', 'disable-domain-transfer-lock', 'disable-enhanced-monitoring', 'disable-gateway', 'disable-hbase-backups', 'disable-key', 'disable-key-rotation', 'disable-logging', 'disable-metrics-collection', 'disable-radius', 'disable-rule', 'disable-snapshot-copy', 'disable-sso', 'disable-stage-transition', 'disable-topic-rule', 'disable-vgw-route-propagation', 'disable-vpc-classic-link', 'disable-vpc-classic-link-dns-support', 'disassociate-address', 'disassociate-elastic-ip', 'disassociate-route-table', 'disassociate-vpc-from-hosted-zone', 'discover-poll-endpoint', 'domain-metadata', 'download-db-log-file-portion', 'enable-alarm-actions', 'enable-availability-zones-for-load-balancer', 'enable-domain-auto-renew', 'enable-domain-transfer-lock', 'enable-enhanced-monitoring', 'enable-key', 'enable-key-rotation', 'enable-logging', 'enable-metrics-collection', 'enable-mfa-device', 'enable-radius', 'enable-rule', 'enable-snapshot-copy', 'enable-sso', 'enable-stage-transition', 'enable-topic-rule', 'enable-vgw-route-propagation', 'enable-volume-io', 'enable-vpc-classic-link', 'enable-vpc-classic-link-dns-support', 'encrypt', 'enter-standby', 'estimate-template-cost', 'evaluate-expression', 'execute-change-set', 'execute-policy', 'exit-standby', 'failover-db-cluster', 'filter-log-events', 'flush-stage-authorizers-cache', 'flush-stage-cache', 'generate-client-certificate', 'generate-credential-report', 'generate-data-key', 'generate-data-key-without-plaintext', 'generate-data-set', 'generate-random', 'get', 'get-access-key-last-used', 'get-account', 'get-account-authorization-details', 'get-account-password-policy', 'get-account-settings', 'get-account-summary', 'get-alias', 'get-api-key', 'get-api-keys', 'get-application', 'get-application-revision', 'get-attributes', 'get-authorization-token', 'get-authorizer', 'get-authorizers', 'get-base-path-mapping', 'get-base-path-mappings', 'get-batch-prediction', 'get-branch', 'get-bucket-accelerate-configuration', 'get-bucket-acl', 'get-bucket-cors', 'get-bucket-lifecycle', 'get-bucket-lifecycle-configuration', 'get-bucket-location', 'get-bucket-logging', 'get-bucket-notification', 'get-bucket-notification-configuration', 'get-bucket-policy', 'get-bucket-replication', 'get-bucket-request-payment', 'get-bucket-tagging', 'get-bucket-versioning', 'get-bucket-website', 'get-bulk-publish-details', 'get-byte-match-set', 'get-caller-identity', 'get-certificate', 'get-change', 'get-change-details', 'get-change-token', 'get-change-token-status', 'get-checker-ip-ranges', 'get-client-certificate', 'get-client-certificates', 'get-cloud-front-origin-access-identity', 'get-cloud-front-origin-access-identity-config', 'get-cognito-events', 'get-commit', 'get-compliance-details-by-config-rule', 'get-compliance-details-by-resource', 'get-compliance-summary-by-config-rule', 'get-compliance-summary-by-resource-type', 'get-config', 'get-console-output', 'get-console-screenshot', 'get-contact-reachability-status', 'get-context-keys-for-custom-policy', 'get-context-keys-for-principal-policy', 'get-credential-report', 'get-credentials-for-identity', 'get-data-retrieval-policy', 'get-data-source', 'get-deployment', 'get-deployment-config', 'get-deployment-group', 'get-deployment-instance', 'get-deployments', 'get-device', 'get-device-pool', 'get-device-pool-compatibility', 'get-directory-limits', 'get-distribution', 'get-distribution-config', 'get-document', 'get-domain-detail', 'get-domain-name', 'get-domain-names', 'get-download-url-for-layer', 'get-endpoint-attributes', 'get-evaluation', 'get-event-source-mapping', 'get-export', 'get-federation-token', 'get-function', 'get-function-configuration', 'get-game-session-log', 'get-game-session-log-url', 'get-geo-location', 'get-group', 'get-group-policy', 'get-health-check', 'get-health-check-count', 'get-health-check-last-failure-reason', 'get-health-check-status', 'get-hosted-zone', 'get-hosted-zone-count', 'get-hostname-suggestion', 'get-id', 'get-identity-dkim-attributes', 'get-identity-mail-from-domain-attributes', 'get-identity-notification-attributes', 'get-identity-policies', 'get-identity-pool-configuration', 'get-identity-pool-roles', 'get-identity-verification-attributes', 'get-instance-profile', 'get-integration', 'get-integration-response', 'get-invalidation', 'get-ip-set', 'get-item', 'get-job', 'get-job-details', 'get-job-output', 'get-key-policy', 'get-key-rotation-status', 'get-log-events', 'get-logging-options', 'get-login', 'get-login-profile', 'get-method', 'get-method-response', 'get-metric-statistics', 'get-ml-model', 'get-model', 'get-model-template', 'get-models', 'get-object', 'get-object-acl', 'get-object-torrent', 'get-offering-status', 'get-on-premises-instance', 'get-open-id-connect-provider', 'get-open-id-token', 'get-open-id-token-for-developer-identity', 'get-operation-detail', 'get-password-data', 'get-pipeline', 'get-pipeline-definition', 'get-pipeline-state', 'get-platform-application-attributes', 'get-policy', 'get-policy-version', 'get-project', 'get-queue-attributes', 'get-queue-url', 'get-records', 'get-registration-code', 'get-repository', 'get-repository-policy', 'get-repository-triggers', 'get-resource', 'get-resource-config-history', 'get-resources', 'get-rest-api', 'get-rest-apis', 'get-reusable-delegation-set', 'get-role', 'get-role-policy', 'get-rule', 'get-run', 'get-saml-provider', 'get-sampled-requests', 'get-sdk', 'get-send-quota', 'get-send-statistics', 'get-server-certificate', 'get-session-token', 'get-shard-iterator', 'get-shipping-label', 'get-size-constraint-set', 'get-snapshot-limits', 'get-sql-injection-match-set', 'get-ssh-public-key', 'get-stack-policy', 'get-stage', 'get-stages', 'get-status', 'get-streaming-distribution', 'get-streaming-distribution-config', 'get-subscription-attributes', 'get-suite', 'get-telemetry-metadata', 'get-template', 'get-template-summary', 'get-test', 'get-thing-shadow', 'get-third-party-job-details', 'get-topic-attributes', 'get-topic-rule', 'get-traffic-policy', 'get-traffic-policy-instance', 'get-traffic-policy-instance-count', 'get-trail-status', 'get-upload', 'get-user', 'get-user-policy', 'get-vault-access-policy', 'get-vault-lock', 'get-vault-notifications', 'get-web-acl', 'get-workflow-execution-history', 'get-xss-match-set', 'grant-access', 'head-bucket', 'head-object', 'import-image', 'import-key-pair', 'import-rest-api', 'import-snapshot', 'increase-stream-retention-period', 'index-documents', 'initiate-job', 'initiate-layer-upload', 'initiate-multipart-upload', 'initiate-vault-lock', 'install', 'install-applications', 'invoke', 'invoke-async', 'list', 'list-access-keys', 'list-account-aliases', 'list-action-types', 'list-activity-types', 'list-aliases', 'list-allowed-node-type-modifications', 'list-application-revisions', 'list-applications', 'list-artifacts', 'list-assessment-run-agents', 'list-assessment-runs', 'list-assessment-targets', 'list-assessment-templates', 'list-associations', 'list-attached-group-policies', 'list-attached-role-policies', 'list-attached-user-policies', 'list-available-solution-stacks', 'list-available-zones', 'list-branches', 'list-buckets', 'list-builds', 'list-byte-match-sets', 'list-ca-certificates', 'list-certificates', 'list-certificates-by-ca', 'list-change-batches-by-hosted-zone', 'list-change-batches-by-rr-set', 'list-change-sets', 'list-closed-workflow-executions', 'list-cloud-front-origin-access-identities', 'list-clusters', 'list-command-invocations', 'list-commands', 'list-container-instances', 'list-datasets', 'list-dead-letter-source-queues', 'list-delivery-streams', 'list-deployment-configs', 'list-deployment-groups', 'list-deployment-instances', 'list-deployments', 'list-device-pools', 'list-devices', 'list-discovered-resources', 'list-distributions', 'list-distributions-by-web-acl-id', 'list-documents', 'list-domain-names', 'list-domains', 'list-endpoints-by-platform-application', 'list-entities-for-policy', 'list-event-source-mappings', 'list-event-subscriptions', 'list-findings', 'list-fleets', 'list-functions', 'list-gateways', 'list-geo-locations', 'list-grants', 'list-group-policies', 'list-groups', 'list-groups-for-user', 'list-hapgs', 'list-health-checks', 'list-hosted-zones', 'list-hosted-zones-by-name', 'list-hsms', 'list-identities', 'list-identity-policies', 'list-identity-pool-usage', 'list-identity-pools', 'list-images', 'list-instance-profiles', 'list-instance-profiles-for-role', 'list-instances', 'list-invalidations', 'list-ip-sets', 'list-jobs', 'list-jobs-by-pipeline', 'list-jobs-by-status', 'list-key-policies', 'list-keys', 'list-local-disks', 'list-luna-clients', 'list-metrics', 'list-mfa-devices', 'list-multipart-uploads', 'list-object-versions', 'list-objects', 'list-objects-v2', 'list-offering-transactions', 'list-offerings', 'list-on-premises-instances', 'list-open-id-connect-providers', 'list-open-workflow-executions', 'list-operations', 'list-parts', 'list-pipelines', 'list-platform-applications', 'list-policies', 'list-policy-versions', 'list-presets', 'list-principal-policies', 'list-principal-things', 'list-projects', 'list-public-keys', 'list-queues', 'list-receipt-filters', 'list-receipt-rule-sets', 'list-records', 'list-repositories', 'list-resource-record-sets', 'list-retirable-grants', 'list-reusable-delegation-sets', 'list-role-policies', 'list-roles', 'list-rule-names-by-target', 'list-rules', 'list-rules-packages', 'list-runs', 'list-saml-providers', 'list-samples', 'list-server-certificates', 'list-services', 'list-signing-certificates', 'list-size-constraint-sets', 'list-sql-injection-match-sets', 'list-ssh-public-keys', 'list-stack-resources', 'list-stacks', 'list-steps', 'list-streaming-distributions', 'list-streams', 'list-subscriptions', 'list-subscriptions-by-topic', 'list-suites', 'list-tables', 'list-tags', 'list-tags-for-certificate', 'list-tags-for-domain', 'list-tags-for-resource', 'list-tags-for-resources', 'list-tags-for-stream', 'list-tags-for-vault', 'list-tapes', 'list-targets-by-rule', 'list-task-definition-families', 'list-task-definitions', 'list-tasks', 'list-tests', 'list-thing-principals', 'list-things', 'list-topic-rules', 'list-topics', 'list-traffic-policies', 'list-traffic-policy-instances', 'list-traffic-policy-instances-by-hosted-zone', 'list-traffic-policy-instances-by-policy', 'list-traffic-policy-versions', 'list-unique-problems', 'list-uploads', 'list-user-policies', 'list-users', 'list-vaults', 'list-versions-by-function', 'list-virtual-mfa-devices', 'list-volume-initiators', 'list-volume-recovery-points', 'list-volumes', 'list-web-acls', 'list-workflow-types', 'list-xss-match-sets', 'lookup-developer-identity', 'lookup-events', 'ls', 'mb', 'merge-developer-identities', 'merge-shards', 'meter-usage', 'modify-cache-cluster', 'modify-cache-parameter-group', 'modify-cache-subnet-group', 'modify-cluster', 'modify-cluster-attributes', 'modify-cluster-iam-roles', 'modify-cluster-parameter-group', 'modify-cluster-subnet-group', 'modify-db-cluster', 'modify-db-cluster-parameter-group', 'modify-db-cluster-snapshot-attribute', 'modify-db-instance', 'modify-db-parameter-group', 'modify-db-snapshot-attribute', 'modify-db-subnet-group', 'modify-document-permission', 'modify-endpoint', 'modify-event-subscription', 'modify-hapg', 'modify-hosts', 'modify-hsm', 'modify-id-format', 'modify-image-attribute', 'modify-instance-attribute', 'modify-instance-groups', 'modify-instance-placement', 'modify-load-balancer-attributes', 'modify-luna-client', 'modify-mount-target-security-groups', 'modify-network-interface-attribute', 'modify-replication-group', 'modify-replication-instance', 'modify-replication-subnet-group', 'modify-reserved-instances', 'modify-snapshot-attribute', 'modify-snapshot-copy-retention-period', 'modify-spot-fleet-request', 'modify-subnet-attribute', 'modify-volume-attribute', 'modify-vpc-attribute', 'modify-vpc-endpoint', 'modify-vpc-peering-connection-options', 'monitor-instances', 'move-address-to-vpc', 'mv', 'poll-for-activity-task', 'poll-for-decision-task', 'poll-for-jobs', 'poll-for-task', 'poll-for-third-party-jobs', 'predict', 'preview-agents', 'promote-read-replica', 'publish', 'publish-version', 'purchase-offering', 'purchase-reserved-cache-nodes-offering', 'purchase-reserved-db-instances-offering', 'purchase-reserved-instances-offering', 'purchase-reserved-node-offering', 'purchase-scheduled-instances', 'purge-queue', 'push', 'put', 'put-action-revision', 'put-attributes', 'put-bucket-accelerate-configuration', 'put-bucket-acl', 'put-bucket-cors', 'put-bucket-lifecycle', 'put-bucket-lifecycle-configuration', 'put-bucket-logging', 'put-bucket-notification', 'put-bucket-notification-configuration', 'put-bucket-policy', 'put-bucket-replication', 'put-bucket-request-payment', 'put-bucket-tagging', 'put-bucket-versioning', 'put-bucket-website', 'put-config-rule', 'put-configuration-recorder', 'put-delivery-channel', 'put-destination', 'put-destination-policy', 'put-evaluations', 'put-events', 'put-group-policy', 'put-identity-policy', 'put-image', 'put-integration', 'put-integration-response', 'put-item', 'put-job-failure-result', 'put-job-success-result', 'put-key-policy', 'put-lifecycle-hook', 'put-log-events', 'put-method', 'put-method-response', 'put-metric-alarm', 'put-metric-data', 'put-metric-filter', 'put-notification-configuration', 'put-object', 'put-object-acl', 'put-pipeline-definition', 'put-record', 'put-record-batch', 'put-records', 'put-repository-triggers', 'put-rest-api', 'put-retention-policy', 'put-role-policy', 'put-rule', 'put-scaling-policy', 'put-scheduled-update-group-action', 'put-subscription-filter', 'put-targets', 'put-third-party-job-failure-result', 'put-third-party-job-success-result', 'put-user-policy', 'query', 'query-objects', 'rb', 're-encrypt', 'read-job', 'read-pipeline', 'read-preset', 'reboot-cache-cluster', 'reboot-cluster', 'reboot-db-instance', 'reboot-instance', 'reboot-instances', 'reboot-workspaces', 'rebuild-environment', 'rebuild-workspaces', 'receive-message', 'record-activity-task-heartbeat', 'record-lifecycle-action-heartbeat', 'refresh-schemas', 'refresh-trusted-advisor-check', 'register', 'register-activity-type', 'register-application-revision', 'register-ca-certificate', 'register-certificate', 'register-container-instance', 'register-cross-account-access-role', 'register-device', 'register-domain', 'register-ecs-cluster', 'register-elastic-ip', 'register-event-topic', 'register-image', 'register-instance', 'register-instances-with-load-balancer', 'register-on-premises-instance', 'register-rds-db-instance', 'register-task-definition', 'register-volume', 'register-workflow-type', 'reject-certificate-transfer', 'reject-vpc-peering-connection', 'release-address', 'release-hosts', 'remove-attributes-from-findings', 'remove-client-id-from-open-id-connect-provider', 'remove-option-from-option-group', 'remove-permission', 'remove-role-from-instance-profile', 'remove-source-identifier-from-subscription', 'remove-tags', 'remove-tags-from-certificate', 'remove-tags-from-on-premises-instances', 'remove-tags-from-resource', 'remove-tags-from-stream', 'remove-tags-from-vault', 'remove-targets', 'remove-user-from-group', 'renew-offering', 'reorder-receipt-rule-set', 'replace-network-acl-association', 'replace-network-acl-entry', 'replace-route', 'replace-route-table-association', 'replace-topic-rule', 'report-instance-status', 'report-task-progress', 'report-task-runner-heartbeat', 'request-cancel-workflow-execution', 'request-certificate', 'request-environment-info', 'request-spot-fleet', 'request-spot-instances', 'request-upload-credentials', 'resend-contact-reachability-email', 'resend-validation-email', 'reset-cache', 'reset-cache-parameter-group', 'reset-cluster-parameter-group', 'reset-db-cluster-parameter-group', 'reset-db-parameter-group', 'reset-image-attribute', 'reset-instance-attribute', 'reset-network-interface-attribute', 'reset-snapshot-attribute', 'resolve-alias', 'resolve-case', 'respond-activity-task-canceled', 'respond-activity-task-completed', 'respond-activity-task-failed', 'respond-decision-task-completed', 'restart-app-server', 'restore-address-to-classic', 'restore-db-cluster-from-snapshot', 'restore-db-cluster-to-point-in-time', 'restore-db-instance-from-db-snapshot', 'restore-db-instance-to-point-in-time', 'restore-from-cluster-snapshot', 'restore-from-hbase-backup', 'restore-from-snapshot', 'restore-object', 'restore-table-from-cluster-snapshot', 'resume-processes', 'resync-mfa-device', 'retire-grant', 'retrieve-domain-auth-code', 'retrieve-environment-info', 'retrieve-tape-archive', 'retrieve-tape-recovery-point', 'revoke-cache-security-group-ingress', 'revoke-cluster-security-group-ingress', 'revoke-db-security-group-ingress', 'revoke-grant', 'revoke-security-group-egress', 'revoke-security-group-ingress', 'revoke-snapshot-access', 'rm', 'rotate-encryption-key', 'run-instances', 'run-scheduled-instances', 'run-task', 'scan', 'schedule-hbase-backup', 'schedule-key-deletion', 'schedule-run', 'search', 'select', 'send-bounce', 'send-command', 'send-email', 'send-message', 'send-message-batch', 'send-raw-email', 'set', 'set-active-receipt-rule-set', 'set-alarm-state', 'set-cognito-events', 'set-data-retrieval-policy', 'set-default-policy-version', 'set-desired-capacity', 'set-endpoint-attributes', 'set-identity-dkim-enabled', 'set-identity-feedback-forwarding-enabled', 'set-identity-mail-from-domain', 'set-identity-notification-topic', 'set-identity-pool-configuration', 'set-identity-pool-roles', 'set-instance-health', 'set-instance-protection', 'set-load-balancer-listener-ssl-certificate', 'set-load-balancer-policies-for-backend-server', 'set-load-balancer-policies-of-listener', 'set-load-based-auto-scaling', 'set-local-console-password', 'set-logging-options', 'set-permission', 'set-platform-application-attributes', 'set-queue-attributes', 'set-receipt-rule-position', 'set-repository-policy', 'set-stack-policy', 'set-status', 'set-subscription-attributes', 'set-tags-for-resource', 'set-task-status', 'set-time-based-auto-scaling', 'set-topic-attributes', 'set-vault-access-policy', 'set-vault-notifications', 'shutdown-gateway', 'sign', 'signal-resource', 'signal-workflow-execution', 'simulate-custom-policy', 'simulate-principal-policy', 'socks', 'split-shard', 'ssh', 'start-assessment-run', 'start-configuration-recorder', 'start-gateway', 'start-instance', 'start-instances', 'start-logging', 'start-pipeline-execution', 'start-replication-task', 'start-stack', 'start-task', 'start-workflow-execution', 'stop-assessment-run', 'stop-configuration-recorder', 'stop-deployment', 'stop-instance', 'stop-instances', 'stop-logging', 'stop-replication-task', 'stop-run', 'stop-stack', 'stop-task', 'submit-container-state-change', 'submit-task-state-change', 'subscribe', 'subscribe-to-dataset', 'subscribe-to-event', 'suggest', 'suspend-processes', 'swap-environment-cnames', 'sync', 'terminate-clusters', 'terminate-environment', 'terminate-instance-in-auto-scaling-group', 'terminate-instances', 'terminate-workflow-execution', 'terminate-workspaces', 'test-connection', 'test-event-pattern', 'test-invoke-authorizer', 'test-invoke-method', 'test-metric-filter', 'test-repository-triggers', 'test-role', 'transfer-certificate', 'transfer-domain', 'unassign-instance', 'unassign-private-ip-addresses', 'unassign-volume', 'uninstall', 'unlink-developer-identity', 'unlink-identity', 'unmonitor-instances', 'unsubscribe', 'unsubscribe-from-dataset', 'unsubscribe-from-event', 'update-access-key', 'update-account', 'update-account-password-policy', 'update-alias', 'update-api-key', 'update-app', 'update-application', 'update-application-version', 'update-assessment-target', 'update-association-status', 'update-assume-role-policy', 'update-authorizer', 'update-auto-scaling-group', 'update-availability-options', 'update-bandwidth-rate-limit', 'update-base-path-mapping', 'update-batch-prediction', 'update-build', 'update-byte-match-set', 'update-ca-certificate', 'update-certificate', 'update-chap-credentials', 'update-client-certificate', 'update-cloud-front-origin-access-identity', 'update-conditional-forwarder', 'update-configuration-template', 'update-container-agent', 'update-data-source', 'update-default-branch', 'update-deployment', 'update-deployment-group', 'update-destination', 'update-device-pool', 'update-distribution', 'update-domain-contact', 'update-domain-contact-privacy', 'update-domain-name', 'update-domain-nameservers', 'update-elastic-ip', 'update-elasticsearch-domain-config', 'update-environment', 'update-evaluation', 'update-event-source-mapping', 'update-fleet-attributes', 'update-fleet-capacity', 'update-fleet-port-settings', 'update-function-code', 'update-function-configuration', 'update-game-session', 'update-gateway-information', 'update-gateway-software-now', 'update-group', 'update-health-check', 'update-hosted-zone-comment', 'update-identity-pool', 'update-instance', 'update-integration', 'update-integration-response', 'update-ip-set', 'update-item', 'update-job', 'update-key-description', 'update-layer', 'update-login-profile', 'update-maintenance-start-time', 'update-method', 'update-method-response', 'update-ml-model', 'update-model', 'update-my-user-profile', 'update-open-id-connect-provider-thumbprint', 'update-pipeline', 'update-pipeline-notifications', 'update-pipeline-status', 'update-project', 'update-radius', 'update-rds-db-instance', 'update-receipt-rule', 'update-records', 'update-repository-description', 'update-repository-name', 'update-resource', 'update-rest-api', 'update-rule', 'update-saml-provider', 'update-scaling-parameters', 'update-server-certificate', 'update-service', 'update-service-access-policies', 'update-signing-certificate', 'update-size-constraint-set', 'update-snapshot-schedule', 'update-sql-injection-match-set', 'update-ssh-public-key', 'update-stack', 'update-stage', 'update-streaming-distribution', 'update-subscription', 'update-table', 'update-tags-for-domain', 'update-thing', 'update-thing-shadow', 'update-traffic-policy-comment', 'update-traffic-policy-instance', 'update-trail', 'update-user', 'update-user-profile', 'update-volume', 'update-vtl-device-type', 'update-web-acl', 'update-xss-match-set', 'upload-archive', 'upload-build', 'upload-documents', 'upload-layer-part', 'upload-multipart-part', 'upload-part', 'upload-part-copy', 'upload-server-certificate', 'upload-signing-certificate', 'upload-ssh-public-key', 'validate-configuration-settings', 'validate-logs', 'validate-pipeline-definition', 'validate-template', 'verify-domain-dkim', 'verify-domain-identity', 'verify-email-identity', 'verify-trust', 'wait', 'website'], ['--color', '--debug', '--endpoint-url', '--no-paginate', '--no-sign-request', '--no-verify-ssl', '--output', '--profile', '--query', '--region', '--version'], ['--bucket', '--cluster-states', '--instance-ids']]
config = <saws.config.Config object>
config_obj = ConfigObj({'main': {'theme': 'vim', 'color_output': 'False', 'fuzzy_match': 'True', 'shortcut_match': 'True', 'log_file': '~/.saws.log', 'log_level': 'INFO', 'refresh_instance_ids': 'True', 'refresh_instance_tags': 'True', 'refresh_bucket_names': 'True'}, 'shortcuts': {'ec2 ls --instance-ids': 'ec2 describe-instances --instance-ids', 'ec2 start-instances --instance-ids': 'ec2 start-instances --instance-ids', 'ec2 stop-instances --instance-ids': 'ec2 stop-instances --instance-ids', 'ec2 ls --ec2-tag-key': 'ec2 describe-instances --filters "Name=tag-key,Values=%s"', 'ec2 ls --ec2-tag-value': 'ec2 describe-instances --filters "Name=tag-value,Values=%s"', 'ec2 ls --ec2-state': 'ec2 describe-instances --filters "Name=instance-state-name,Values=%s"', 'ec2 ls': 'ec2 describe-instances', 'emr ls': 'emr list-clusters', 'elb ls': 'elb describe-load-balancers', 'dynamodb ls': 'dynamodb list-tables', 'emr ls --cluster-states': 'emr list-clusters --cluster-states'}})
shortcut = 'dynamodb ls'
shortcut_tokens = ['ec2', 'ls', '--instance-ids', 'emr', 'ls', '--cluster-states', 'ec2', 'start-instances', '--instance-ids', 'ec2', 'stop-instances', '--instance-ids', 'ec2', 'ls', '--ec2-tag-key', 'ec2', 'ls', '--ec2-tag-value', 'ec2', 'ls', '--ec2-state', 'ec2', 'ls', 'emr', 'ls', 'elb', 'ls', 'dynamodb', 'ls']
shortcuts = OrderedDict([('ec2 ls --instance-ids', 'ec2 describe-instances --instance-ids'), ('emr ls --cluster-states', 'emr list-clusters --cluster-states'), ('ec2 start-instances --instance-ids', 'ec2 start-instances --instance-ids'), ('ec2 stop-instances --instance-ids', 'ec2 stop-instances --instance-ids'), ('ec2 ls --ec2-tag-key', 'ec2 describe-instances --filters "Name=tag-key,Values=%s"'), ('ec2 ls --ec2-tag-value', 'ec2 describe-instances --filters "Name=tag-value,Values=%s"'), ('ec2 ls --ec2-state', 'ec2 describe-instances --filters "Name=instance-state-name,Values=%s"'), ('ec2 ls', 'ec2 describe-instances'), ('emr ls', 'emr list-clusters'), ('elb ls', 'elb describe-load-balancers'), ('dynamodb ls', 'dynamodb list-tables')])
token = 'ls'
tokens = {'root': [(<pygments.lexer.words object at 0x104261a58>, Token.Literal.String), (<pygments.lexer.words object at 0x104261ba8>, Token.Literal.Number), (<pygments.lexer.words object at 0x104261470>, Token.Name.Class), (<pygments.lexer.words object at 0x104257f28>, Token.Keyword.Declaration), (<pygments.lexer.words object at 0x104257198>, Token.Generic.Output), (<pygments.lexer.words object at 0x104257080>, Token.Operator.Word), (<pygments.lexer.words object at 0x104257e80>, Token.Name.Exception)]}

saws.logger module

class saws.logger.SawsLogger(name, log_file, log_level)

Bases: object

Handles Saws logging.

Attributes:
  • logger: An instance of Logger.
__init__(name, log_file, log_level)

Initializes a Logger for Saws.

Args:
  • name: A string that represents the logger’s name.
  • log_file: A string that represents the log file name.
  • log_level: A string that represents the logging level.
Returns:
None.

saws.main module

saws.resources module

class saws.resources.AwsResources(log_exception)

Bases: object

Encapsulates AWS resources such as ec2 tags and buckets.

Attributes:
  • resources_path: A string representing the full file path of

    data/RESOURCES.txt.

  • log_exception: A callable log_exception from SawsLogger.

  • resource_lists: A list where each element is a list of completions

    for each resource.

  • resources_headers_map: A dict mapping resource headers to

    resources to complete. Headers denote the start of each set of resources in the RESOURCES.txt file.

  • resources_options_map: A dict mapping resource options to

    resources to complete.

  • resource_headers: A list of headers that denote the start of each

    set of resources in the RESOURCES.txt file.

  • data_util: An instance of DataUtil().

  • header_to_type_map: A dict mapping headers as they appear in the

    RESOURCES.txt file to their corresponding ResourceType.

class ResourceType

Bases: enum.Enum

Enum specifying the resource type.

Append new resource class instances here and increment NUM_TYPES. Note: Order is important, new resources should be added to the end.

Attributes:
  • INSTANCE_IDS: An int representing instance ids.
  • INSTANCE_TAG_KEYS: An int representing instance tag keys.
  • INSTANCE_TAG_VALUES: An int representing instance tag values.
  • BUCKET_NAMES: An int representing bucket names.
  • BUCKET_URIS: An int representing bucket uris.
  • NUM_TYPES: An int representing the number of resource types.
AwsResources.__init__(log_exception)

Initializes AwsResources.

Args:
  • log_exception: A callable log_exception from SawsLogger.
Returns:
None.
AwsResources.clear_resources()

Clears all resources.

Args:
  • None.
Returns:
None.
AwsResources.refresh(force_refresh=False)

Refreshes the AWS resources and caches them to a file.

This function is called on startup. If no cache exists, it queries AWS to build the resource lists. Pressing the F5 key will set force_refresh to True, which proceeds to refresh the list regardless of whether a cache exists. Before returning, it saves the resource lists to cache.

Args:
  • force_refresh: A boolean determines whether to force a cache

    refresh. This value is set to True when the user presses F5.

Returns:
None.

saws.saws module

class saws.saws.Saws(refresh_resources=True)

Bases: object

Encapsulates the Saws CLI.

Attributes:
  • aws_cli: An instance of prompt_toolkit’s CommandLineInterface.

  • key_manager: An instance of KeyManager.

  • config: An instance of Config.

  • config_obj: An instance of ConfigObj, reads from ~/.sawsrc.

  • theme: A string representing the lexer theme.

  • logger: An instance of SawsLogger.

  • all_commands: A list of all commands, sub_commands, options, etc

    from data/SOURCES.txt.

  • commands: A list of commands from data/SOURCES.txt.

  • sub_commands: A list of sub_commands from data/SOURCES.txt.

  • completer: An instance of AwsCompleter.

PYGMENTS_CMD = ' | pygmentize -l json'
__init__(refresh_resources=True)

Inits Saws.

Args:
  • refresh_resources: A boolean that determines whether to

    refresh resources.

Returns:
None.
get_color()

Getter for color output mode.

Used by prompt_toolkit’s KeyBindingManager. KeyBindingManager expects this function to be callable so we can’t use @property and @attrib.setter.

Args:
  • None.
Returns:
A boolean that represents the color flag.
get_fuzzy_match()

Getter for fuzzy matching mode

Used by prompt_toolkit’s KeyBindingManager. KeyBindingManager expects this function to be callable so we can’t use @property and @attrib.setter.

Args:
  • None.
Returns:
A boolean that represents the fuzzy flag.
get_shortcut_match()

Getter for shortcut matching mode

Used by prompt_toolkit’s KeyBindingManager. KeyBindingManager expects this function to be callable so we can’t use @property and @attrib.setter.

Args:
  • None.
Returns:
A boolean that represents the shortcut flag.
handle_docs(text=None, from_fkey=False)

Displays contextual web docs for F9 or the docs command.

Displays the web docs specific to the currently entered:

  • (optional) command
  • (optional) subcommand

If no command or subcommand is present, the docs index page is shown.

Docs are only displayed if:

  • from_fkey is True
  • from_fkey is False and docs is found in text
Args:
  • text: A string representing the input command text.

  • from_fkey: A boolean representing whether this function is

    being executed from an F9 key press.

Returns:
A boolean representing whether the web docs were shown.
log_exception(e, traceback, echo=False)

Logs the exception and traceback to the log file ~/.saws.log.

Args:
  • e: A Exception that specifies the exception.

  • traceback: A Traceback that specifies the traceback.

  • echo: A boolean that specifies whether to echo the exception

    to the console using click.

Returns:
None.
refresh_resources_and_options()

Convenience function to refresh resources and options for completion.

Used by prompt_toolkit’s KeyBindingManager.

Args:
  • None.
Returns:
None.
run_cli()

Runs the main loop.

Args:
  • None.
Returns:
None.
set_color(color)

Setter for color output mode.

Used by prompt_toolkit’s KeyBindingManager. KeyBindingManager expects this function to be callable so we can’t use @property and @attrib.setter.

Args:
  • color: A boolean that represents the color flag.
Returns:
None.
set_fuzzy_match(fuzzy)

Setter for fuzzy matching mode

Used by prompt_toolkit’s KeyBindingManager. KeyBindingManager expects this function to be callable so we can’t use @property and @attrib.setter.

Args:
  • color: A boolean that represents the fuzzy flag.
Returns:
None.
set_shortcut_match(shortcut)

Setter for shortcut matching mode

Used by prompt_toolkit’s KeyBindingManager. KeyBindingManager expects this function to be callable so we can’t use @property and @attrib.setter.

Args:
  • color: A boolean that represents the shortcut flag.
Returns:
None.

saws.style module

class saws.style.StyleFactory(name)

Bases: object

Creates a custom saws style.

Provides styles for the completions menu and toolbar.

Attributes:
  • style: An instance of a Pygments Style.
__init__(name)

Initializes StyleFactory.

Args:
  • name: A string representing the pygments style.
Returns:
An instance of CliStyle.
style_factory(name)

Retrieves the specified pygments style.

If the specified style is not found, the native style is returned.

Args:
  • name: A string representing the pygments style.
Returns:
An instance of CliStyle.

saws.toolbar module

class saws.toolbar.Toolbar(color_cfg, fuzzy_cfg, shortcuts_cfg)

Bases: object

Encapsulates the bottom toolbar.

Attributes:
  • handler: A callable get_toolbar_items.
__init__(color_cfg, fuzzy_cfg, shortcuts_cfg)

Initializes ToolBar.

Args:
  • color_cfg: A boolean that spedifies whether to color the output.

  • fuzzy_cfg: A boolean that spedifies whether to do fuzzy matching.

  • shortcuts_cfg: A boolean that spedifies whether to match

    shortcuts.

Returns:
None

saws.utils module

class saws.utils.TextUtils

Bases: object

Utilities for parsing and matching text.

Attributes:
  • None.
find_matches(word, collection, fuzzy)

Finds all matches in collection for word.

Args:
  • word: A string representing the word before

    the cursor.

  • collection: A collection of words to match.

  • fuzzy: A boolean that specifies whether to use fuzzy matching.

Yields:
A generator of prompt_toolkit’s Completions.
get_token_index(text, collection)

Given a text return the index in the collection.

Args:
  • text: A string to find and obtain the index.
  • collection: A collection of words to match.
Returns:
An integer representing the index in the collection where the text was found.
get_tokens(text)

Parses out all tokens.

Args:
  • text: A string to split into tokens.
Returns:
A list of strings for each word in the text.

Module contents