Search in sources :

Example 11 with AwsCredentialParameters

use of com.sequenceiq.environment.api.v1.credential.model.parameters.aws.AwsCredentialParameters in project cloudbreak by hortonworks.

the class AwsCloudProvider method credential.

@Override
public CredentialTestDto credential(CredentialTestDto credential) {
    String credentialType = awsProperties.getCredential().getType();
    AwsCredentialParameters parameters;
    if (KEY_BASED_CREDENTIAL.equalsIgnoreCase(credentialType)) {
        parameters = awsCredentialDetailsKey();
    } else {
        parameters = awsCredentialDetailsArn();
    }
    return credential.withDescription(commonCloudProperties().getDefaultCredentialDescription()).withCloudPlatform(CloudPlatform.AWS.name()).withAwsParameters(parameters);
}
Also used : AwsCredentialParameters(com.sequenceiq.environment.api.v1.credential.model.parameters.aws.AwsCredentialParameters)

Aggregations

AwsCredentialParameters (com.sequenceiq.environment.api.v1.credential.model.parameters.aws.AwsCredentialParameters)11 KeyBasedParameters (com.sequenceiq.environment.api.v1.credential.model.parameters.aws.KeyBasedParameters)4 ValidationResult (com.sequenceiq.cloudbreak.validation.ValidationResult)3 RoleBasedParameters (com.sequenceiq.environment.api.v1.credential.model.parameters.aws.RoleBasedParameters)3 CredentialRequest (com.sequenceiq.environment.api.v1.credential.model.request.CredentialRequest)3 Test (org.junit.jupiter.api.Test)3 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)3 ValidationResultBuilder (com.sequenceiq.cloudbreak.validation.ValidationResult.ValidationResultBuilder)1