Search in sources :

Example 1 with AwsAccount

use of com.netflix.spinnaker.halyard.config.model.v1.providers.aws.AwsAccount in project halyard by spinnaker.

the class AwsAddAccountCommand method buildAccount.

@Override
protected Account buildAccount(String accountName) {
    AwsAccount account = (AwsAccount) new AwsAccount().setName(accountName);
    account.setDefaultKeyPair(defaultKeyPair).setEdda(edda).setDiscovery(discovery).setAccountId(accountId).setRegions(regions.stream().map(r -> new AwsProvider.AwsRegion().setName(r)).collect(Collectors.toList())).setAssumeRole(assumeRole);
    return account;
}
Also used : Parameters(com.beust.jcommander.Parameters) AbstractAddAccountCommand(com.netflix.spinnaker.halyard.cli.command.v1.config.providers.account.AbstractAddAccountCommand) List(java.util.List) Parameter(com.beust.jcommander.Parameter) Account(com.netflix.spinnaker.halyard.config.model.v1.node.Account) AwsAccount(com.netflix.spinnaker.halyard.config.model.v1.providers.aws.AwsAccount) AwsProvider(com.netflix.spinnaker.halyard.config.model.v1.providers.aws.AwsProvider) Collectors(java.util.stream.Collectors) ArrayList(java.util.ArrayList) AwsAccount(com.netflix.spinnaker.halyard.config.model.v1.providers.aws.AwsAccount) AwsProvider(com.netflix.spinnaker.halyard.config.model.v1.providers.aws.AwsProvider)

Aggregations

Parameter (com.beust.jcommander.Parameter)1 Parameters (com.beust.jcommander.Parameters)1 AbstractAddAccountCommand (com.netflix.spinnaker.halyard.cli.command.v1.config.providers.account.AbstractAddAccountCommand)1 Account (com.netflix.spinnaker.halyard.config.model.v1.node.Account)1 AwsAccount (com.netflix.spinnaker.halyard.config.model.v1.providers.aws.AwsAccount)1 AwsProvider (com.netflix.spinnaker.halyard.config.model.v1.providers.aws.AwsProvider)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1 Collectors (java.util.stream.Collectors)1