Sha256: c13fafcf9765dcae0fea04c44e8875c9275fd51fe18b5b737282755bbf4bfcec

Contents?: true

Size: 695 Bytes

Versions: 43

Compression:

Stored size: 695 Bytes

Contents

# frozen_string_literal: true

require_relative "includes"

class AwsAssumeRole::Cli::Actions::MigrateProfile < AwsAssumeRole::Cli::Actions::AbstractAction
    CommandSchema = proc do
        required(:profile).value(:filled?)
    end

    def act_on(config)
        AwsAssumeRole.shared_config.migrate_profile config.profile
        out format(t("commands.configure.saved"), config[:profile], AwsAssumeRole.shared_config.config_path)
    rescue KeyError, Aws::Errors::NoSuchProfileError
        error format(t("errors.NoSuchProfileError"), config.profile)
        raise
    rescue Aws::Errors::MissingCredentialsError
        error t("errors.MissingCredentialsError")
        raise
    end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
aws_assume_role-1.2.0-universal-openbsd lib/aws_assume_role/cli/actions/migrate_profile.rb
aws_assume_role-1.2.0-universal-darwin lib/aws_assume_role/cli/actions/migrate_profile.rb
aws_assume_role-1.2.0-universal-freebsd lib/aws_assume_role/cli/actions/migrate_profile.rb
aws_assume_role-1.2.0-universal-linux lib/aws_assume_role/cli/actions/migrate_profile.rb
aws_assume_role-1.1.1 lib/aws_assume_role/cli/actions/migrate_profile.rb
aws_assume_role-1.1.1-linux lib/aws_assume_role/cli/actions/migrate_profile.rb
aws_assume_role-1.1.1-universal-openbsd lib/aws_assume_role/cli/actions/migrate_profile.rb
aws_assume_role-1.1.1-universal-darwin lib/aws_assume_role/cli/actions/migrate_profile.rb
aws_assume_role-1.1.1-universal-freebsd lib/aws_assume_role/cli/actions/migrate_profile.rb
aws_assume_role-1.1.1-universal-linux lib/aws_assume_role/cli/actions/migrate_profile.rb
aws_assume_role-1.1.0-universal-openbsd lib/aws_assume_role/cli/actions/migrate_profile.rb
aws_assume_role-1.1.0-universal-darwin lib/aws_assume_role/cli/actions/migrate_profile.rb
aws_assume_role-1.1.0-universal-freebsd lib/aws_assume_role/cli/actions/migrate_profile.rb
aws_assume_role-1.1.0-universal-linux lib/aws_assume_role/cli/actions/migrate_profile.rb
aws_assume_role-1.0.6-linux lib/aws_assume_role/cli/actions/migrate_profile.rb
aws_assume_role-1.1.0-linux lib/aws_assume_role/cli/actions/migrate_profile.rb
aws_assume_role-1.0.6 lib/aws_assume_role/cli/actions/migrate_profile.rb
aws_assume_role-1.0.5 lib/aws_assume_role/cli/actions/migrate_profile.rb
aws_assume_role-1.0.4 lib/aws_assume_role/cli/actions/migrate_profile.rb
aws_assume_role-1.0.3 lib/aws_assume_role/cli/actions/migrate_profile.rb