
com.pulumi.aws.iot.CaCertificate Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws Show documentation
Show all versions of aws Show documentation
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
// *** 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.iot;
import com.pulumi.aws.Utilities;
import com.pulumi.aws.iot.CaCertificateArgs;
import com.pulumi.aws.iot.inputs.CaCertificateState;
import com.pulumi.aws.iot.outputs.CaCertificateRegistrationConfig;
import com.pulumi.aws.iot.outputs.CaCertificateValidity;
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.Map;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Creates and manages an AWS IoT CA Certificate.
*
* ## Example Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.tls.PrivateKey;
* import com.pulumi.tls.PrivateKeyArgs;
* import com.pulumi.tls.SelfSignedCert;
* import com.pulumi.tls.SelfSignedCertArgs;
* import com.pulumi.tls.inputs.SelfSignedCertSubjectArgs;
* import com.pulumi.aws.iot.IotFunctions;
* import com.pulumi.tls.CertRequest;
* import com.pulumi.tls.CertRequestArgs;
* import com.pulumi.tls.inputs.CertRequestSubjectArgs;
* import com.pulumi.tls.LocallySignedCert;
* import com.pulumi.tls.LocallySignedCertArgs;
* import com.pulumi.aws.iot.CaCertificate;
* import com.pulumi.aws.iot.CaCertificateArgs;
* 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 caPrivateKey = new PrivateKey("caPrivateKey", PrivateKeyArgs.builder()
* .algorithm("RSA")
* .build());
*
* var ca = new SelfSignedCert("ca", SelfSignedCertArgs.builder()
* .privateKeyPem(caPrivateKey.privateKeyPem())
* .subject(SelfSignedCertSubjectArgs.builder()
* .commonName("example.com")
* .organization("ACME Examples, Inc")
* .build())
* .validityPeriodHours(12)
* .allowedUses(
* "key_encipherment",
* "digital_signature",
* "server_auth")
* .isCaCertificate(true)
* .build());
*
* var verificationPrivateKey = new PrivateKey("verificationPrivateKey", PrivateKeyArgs.builder()
* .algorithm("RSA")
* .build());
*
* final var example = IotFunctions.getRegistrationCode();
*
* var verification = new CertRequest("verification", CertRequestArgs.builder()
* .privateKeyPem(verificationPrivateKey.privateKeyPem())
* .subject(CertRequestSubjectArgs.builder()
* .commonName(example.applyValue(getRegistrationCodeResult -> getRegistrationCodeResult.registrationCode()))
* .build())
* .build());
*
* var verificationLocallySignedCert = new LocallySignedCert("verificationLocallySignedCert", LocallySignedCertArgs.builder()
* .certRequestPem(verification.certRequestPem())
* .caPrivateKeyPem(caPrivateKey.privateKeyPem())
* .caCertPem(ca.certPem())
* .validityPeriodHours(12)
* .allowedUses(
* "key_encipherment",
* "digital_signature",
* "server_auth")
* .build());
*
* var exampleCaCertificate = new CaCertificate("exampleCaCertificate", CaCertificateArgs.builder()
* .active(true)
* .caCertificatePem(ca.certPem())
* .verificationCertificatePem(verificationLocallySignedCert.certPem())
* .allowAutoRegistration(true)
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
*/
@ResourceType(type="aws:iot/caCertificate:CaCertificate")
public class CaCertificate extends com.pulumi.resources.CustomResource {
/**
* Boolean flag to indicate if the certificate should be active for device authentication.
*
*/
@Export(name="active", refs={Boolean.class}, tree="[0]")
private Output active;
/**
* @return Boolean flag to indicate if the certificate should be active for device authentication.
*
*/
public Output active() {
return this.active;
}
/**
* Boolean flag to indicate if the certificate should be active for device regisration.
*
*/
@Export(name="allowAutoRegistration", refs={Boolean.class}, tree="[0]")
private Output allowAutoRegistration;
/**
* @return Boolean flag to indicate if the certificate should be active for device regisration.
*
*/
public Output allowAutoRegistration() {
return this.allowAutoRegistration;
}
/**
* The ARN of the created CA certificate.
*
*/
@Export(name="arn", refs={String.class}, tree="[0]")
private Output arn;
/**
* @return The ARN of the created CA certificate.
*
*/
public Output arn() {
return this.arn;
}
/**
* PEM encoded CA certificate.
*
*/
@Export(name="caCertificatePem", refs={String.class}, tree="[0]")
private Output caCertificatePem;
/**
* @return PEM encoded CA certificate.
*
*/
public Output caCertificatePem() {
return this.caCertificatePem;
}
/**
* The certificate mode in which the CA will be registered. Valida values: `DEFAULT` and `SNI_ONLY`. Default: `DEFAULT`.
*
*/
@Export(name="certificateMode", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> certificateMode;
/**
* @return The certificate mode in which the CA will be registered. Valida values: `DEFAULT` and `SNI_ONLY`. Default: `DEFAULT`.
*
*/
public Output> certificateMode() {
return Codegen.optional(this.certificateMode);
}
/**
* The customer version of the CA certificate.
*
*/
@Export(name="customerVersion", refs={Integer.class}, tree="[0]")
private Output customerVersion;
/**
* @return The customer version of the CA certificate.
*
*/
public Output customerVersion() {
return this.customerVersion;
}
/**
* The generation ID of the CA certificate.
*
*/
@Export(name="generationId", refs={String.class}, tree="[0]")
private Output generationId;
/**
* @return The generation ID of the CA certificate.
*
*/
public Output generationId() {
return this.generationId;
}
/**
* Information about the registration configuration. See below.
*
*/
@Export(name="registrationConfig", refs={CaCertificateRegistrationConfig.class}, tree="[0]")
private Output* @Nullable */ CaCertificateRegistrationConfig> registrationConfig;
/**
* @return Information about the registration configuration. See below.
*
*/
public Output> registrationConfig() {
return Codegen.optional(this.registrationConfig);
}
/**
* A map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*
*/
@Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]")
private Output* @Nullable */ Map> tags;
/**
* @return A map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*
*/
public Output>> tags() {
return Codegen.optional(this.tags);
}
/**
* A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
*
* @deprecated
* Please use `tags` instead.
*
*/
@Deprecated /* Please use `tags` instead. */
@Export(name="tagsAll", refs={Map.class,String.class}, tree="[0,1,1]")
private Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy