com.pulumi.cloudflare.CertificatePack 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.cloudflare;
import com.pulumi.cloudflare.CertificatePackArgs;
import com.pulumi.cloudflare.Utilities;
import com.pulumi.cloudflare.inputs.CertificatePackState;
import com.pulumi.cloudflare.outputs.CertificatePackValidationError;
import com.pulumi.cloudflare.outputs.CertificatePackValidationRecord;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* ## Example Usage
* ```java
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.cloudflare.CertificatePack;
* import com.pulumi.cloudflare.CertificatePackArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
*
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
*
* public static void stack(Context ctx) {
* var example = new CertificatePack("example", CertificatePackArgs.builder()
* .certificateAuthority("lets_encrypt")
* .cloudflareBranding(false)
* .hosts(
* "example.com",
* "*.example.com")
* .type("advanced")
* .validationMethod("http")
* .validityDays(90)
* .waitForActiveStatus(true)
* .zoneId("0da42c8d2132a9ddaf714f9e7c920711")
* .build());
*
* }
* }
* ```
*
* ## Import
*
* ```sh
* $ pulumi import cloudflare:index/certificatePack:CertificatePack example 1d5fdc9e88c8a8c4518b068cd94331fe/8fda82e2-6af9-4eb2-992a-5ab65b792ef1
* ```
*
* While supported, importing isn't recommended and it is advised to replace the certificate entirely instead.
*
*/
@ResourceType(type="cloudflare:index/certificatePack:CertificatePack")
public class CertificatePack extends com.pulumi.resources.CustomResource {
/**
* Which certificate authority to issue the certificate pack. Available values: `digicert`, `lets_encrypt`, `google`. **Modifying this attribute will force creation of a new resource.**
*
*/
@Export(name="certificateAuthority", type=String.class, parameters={})
private Output certificateAuthority;
/**
* @return Which certificate authority to issue the certificate pack. Available values: `digicert`, `lets_encrypt`, `google`. **Modifying this attribute will force creation of a new resource.**
*
*/
public Output certificateAuthority() {
return this.certificateAuthority;
}
/**
* Whether or not to include Cloudflare branding. This will add `sni.cloudflaressl.com` as the Common Name if set to `true`. **Modifying this attribute will force creation of a new resource.**
*
*/
@Export(name="cloudflareBranding", type=Boolean.class, parameters={})
private Output* @Nullable */ Boolean> cloudflareBranding;
/**
* @return Whether or not to include Cloudflare branding. This will add `sni.cloudflaressl.com` as the Common Name if set to `true`. **Modifying this attribute will force creation of a new resource.**
*
*/
public Output> cloudflareBranding() {
return Codegen.optional(this.cloudflareBranding);
}
/**
* List of hostnames to provision the certificate pack for. The zone name must be included as a host. Note: If using Let's Encrypt, you cannot use individual subdomains and only a wildcard for subdomain is available. **Modifying this attribute will force creation of a new resource.**
*
*/
@Export(name="hosts", type=List.class, parameters={String.class})
private Output> hosts;
/**
* @return List of hostnames to provision the certificate pack for. The zone name must be included as a host. Note: If using Let's Encrypt, you cannot use individual subdomains and only a wildcard for subdomain is available. **Modifying this attribute will force creation of a new resource.**
*
*/
public Output> hosts() {
return this.hosts;
}
/**
* Certificate pack configuration type. Available values: `advanced`. **Modifying this attribute will force creation of a new resource.**
*
*/
@Export(name="type", type=String.class, parameters={})
private Output type;
/**
* @return Certificate pack configuration type. Available values: `advanced`. **Modifying this attribute will force creation of a new resource.**
*
*/
public Output type() {
return this.type;
}
@Export(name="validationErrors", type=List.class, parameters={CertificatePackValidationError.class})
private Output> validationErrors;
public Output> validationErrors() {
return this.validationErrors;
}
/**
* Which validation method to use in order to prove domain ownership. Available values: `txt`, `http`, `email`. **Modifying this attribute will force creation of a new resource.**
*
*/
@Export(name="validationMethod", type=String.class, parameters={})
private Output validationMethod;
/**
* @return Which validation method to use in order to prove domain ownership. Available values: `txt`, `http`, `email`. **Modifying this attribute will force creation of a new resource.**
*
*/
public Output validationMethod() {
return this.validationMethod;
}
@Export(name="validationRecords", type=List.class, parameters={CertificatePackValidationRecord.class})
private Output> validationRecords;
public Output> validationRecords() {
return this.validationRecords;
}
/**
* How long the certificate is valid for. Note: If using Let's Encrypt, this value can only be 90 days. Available values: `14`, `30`, `90`, `365`. **Modifying this attribute will force creation of a new resource.**
*
*/
@Export(name="validityDays", type=Integer.class, parameters={})
private Output validityDays;
/**
* @return How long the certificate is valid for. Note: If using Let's Encrypt, this value can only be 90 days. Available values: `14`, `30`, `90`, `365`. **Modifying this attribute will force creation of a new resource.**
*
*/
public Output validityDays() {
return this.validityDays;
}
/**
* Whether or not to wait for a certificate pack to reach status `active` during creation. Defaults to `false`. **Modifying this attribute will force creation of a new resource.**
*
*/
@Export(name="waitForActiveStatus", type=Boolean.class, parameters={})
private Output* @Nullable */ Boolean> waitForActiveStatus;
/**
* @return Whether or not to wait for a certificate pack to reach status `active` during creation. Defaults to `false`. **Modifying this attribute will force creation of a new resource.**
*
*/
public Output> waitForActiveStatus() {
return Codegen.optional(this.waitForActiveStatus);
}
/**
* The zone identifier to target for the resource. **Modifying this attribute will force creation of a new resource.**
*
*/
@Export(name="zoneId", type=String.class, parameters={})
private Output zoneId;
/**
* @return The zone identifier to target for the resource. **Modifying this attribute will force creation of a new resource.**
*
*/
public Output zoneId() {
return this.zoneId;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public CertificatePack(String name) {
this(name, CertificatePackArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public CertificatePack(String name, CertificatePackArgs args) {
this(name, args, null);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
* @param options A bag of options that control this resource's behavior.
*/
public CertificatePack(String name, CertificatePackArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("cloudflare:index/certificatePack:CertificatePack", name, args == null ? CertificatePackArgs.Empty : args, makeResourceOptions(options, Codegen.empty()));
}
private CertificatePack(String name, Output id, @Nullable CertificatePackState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("cloudflare:index/certificatePack:CertificatePack", name, state, makeResourceOptions(options, id));
}
private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) {
var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
.version(Utilities.getVersion())
.build();
return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
}
/**
* Get an existing Host resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state
* @param options Optional settings to control the behavior of the CustomResource.
*/
public static CertificatePack get(String name, Output id, @Nullable CertificatePackState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new CertificatePack(name, id, state, options);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy