Class: AwsAssumeRole::Cli::Actions::AbstractAction
- Inherits:
-
Object
- Object
- AwsAssumeRole::Cli::Actions::AbstractAction
- Includes:
- AwsAssumeRole, Logging, Types, Ui
- Defined in:
- lib/aws_assume_role/cli/actions/abstract_action.rb
Direct Known Subclasses
ConfigureProfile, ConfigureRoleAssumption, Console, DeleteProfile, ListProfiles, MigrateProfile, ResetEnvironment, Run, SetEnvironment, Test
Constant Summary collapse
- CommandSchema =
proc { raise "CommandSchema Not implemented" }
Constants included from AwsAssumeRole
AwsAssumeRole::Config, DefaultProvider, VERSION
Constants included from Types
Types::ACCESS_KEY_REGEX, Types::ACCESS_KEY_VALIDATOR, Types::ARN_REGEX, Types::Credentials, Types::Dry, Types::EXTERNAL_ID_REGEX, Types::MFA_REGEX, Types::MfaSerial, Types::REGION_REGEX, Types::REGION_VALIDATOR, Types::ROLE_REGEX, Types::ROLE_SESSION_NAME_REGEX, Types::Region, Types::SECRET_ACCESS_KEY_REGEX, Types::SECRET_ACCESS_KEY_VALIDATOR
Instance Method Summary collapse
-
#initialize(global_options, options, args) ⇒ AbstractAction
constructor
A new instance of AbstractAction.
Methods included from Logging
Methods included from Ui
ask_with_validation, error, input, out, pastel, show_validation_errors, t, validation_errors_to_s
Methods included from AwsAssumeRole
Constructor Details
#initialize(global_options, options, args) ⇒ AbstractAction
Returns a new instance of AbstractAction.
13 14 15 16 17 18 19 |
# File 'lib/aws_assume_role/cli/actions/abstract_action.rb', line 13 def initialize(, , args) config = ProfileConfiguration.new_from_cli(, , args) logger.debug "Config initialized with #{config.to_hash}" result = (config.to_hash) logger.debug "Config validated as #{result.to_hash}" result.success? ? act_on(config) : Ui.show_validation_errors(result) end |