cfdsl.cloudfront.property.ViewerCertificate Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cfdsl Show documentation
Show all versions of cfdsl Show documentation
Java DSL for Amazon CloudFormation templates
The newest version!
package cfdsl.cloudfront.property;
import cfdsl.EmbeddedProperty;
public final class ViewerCertificate extends EmbeddedProperty {
private ViewerCertificate(Builder b) {
super(b);
}
public static ViewerCertificate useDefault() {
return new Builder().cloudFrontDefaultCertificate(Boolean.TRUE.toString()).build();
}
public static ViewerCertificate forIAMCertificate(
String iamCertificate, String sslSupportMethod) {
return new Builder()
.iamCertificateId(iamCertificate)
.sslSupportMethod(sslSupportMethod)
.build();
}
public static final class Builder extends EmbeddedProperty.Builder {
public Builder cloudFrontDefaultCertificate(String certificate) {
addProperty("CloudFrontDefaultCertificate", certificate);
return this;
}
public Builder iamCertificateId(String iamCertificateId) {
addProperty("IamCertificateId", iamCertificateId);
return this;
}
public Builder sslSupportMethod(String sslSupportMethod) {
addProperty("SslSupportMethod", sslSupportMethod);
return this;
}
@Override
public ViewerCertificate build() {
return new ViewerCertificate(this);
}
}
}