com.pulumi.aws.elasticache.outputs.UserAuthenticationMode Maven / Gradle / Ivy
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.aws.elasticache.outputs;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class UserAuthenticationMode {
private @Nullable Integer passwordCount;
/**
* @return Specifies the passwords to use for authentication if `type` is set to `password`.
*
*/
private @Nullable List passwords;
/**
* @return Specifies the authentication type. Possible options are: `password`, `no-password-required` or `iam`.
*
*/
private String type;
private UserAuthenticationMode() {}
public Optional passwordCount() {
return Optional.ofNullable(this.passwordCount);
}
/**
* @return Specifies the passwords to use for authentication if `type` is set to `password`.
*
*/
public List passwords() {
return this.passwords == null ? List.of() : this.passwords;
}
/**
* @return Specifies the authentication type. Possible options are: `password`, `no-password-required` or `iam`.
*
*/
public String type() {
return this.type;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(UserAuthenticationMode defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable Integer passwordCount;
private @Nullable List passwords;
private String type;
public Builder() {}
public Builder(UserAuthenticationMode defaults) {
Objects.requireNonNull(defaults);
this.passwordCount = defaults.passwordCount;
this.passwords = defaults.passwords;
this.type = defaults.type;
}
@CustomType.Setter
public Builder passwordCount(@Nullable Integer passwordCount) {
this.passwordCount = passwordCount;
return this;
}
@CustomType.Setter
public Builder passwords(@Nullable List passwords) {
this.passwords = passwords;
return this;
}
public Builder passwords(String... passwords) {
return passwords(List.of(passwords));
}
@CustomType.Setter
public Builder type(String type) {
if (type == null) {
throw new MissingRequiredPropertyException("UserAuthenticationMode", "type");
}
this.type = type;
return this;
}
public UserAuthenticationMode build() {
final var _resultValue = new UserAuthenticationMode();
_resultValue.passwordCount = passwordCount;
_resultValue.passwords = passwords;
_resultValue.type = type;
return _resultValue;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy