Certificate

class Certificate : KotlinCustomResource

Manages an IotHub Certificate.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.iot.IoTHub;
import com.pulumi.azure.iot.IoTHubArgs;
import com.pulumi.azure.iot.inputs.IoTHubSkuArgs;
import com.pulumi.azure.iot.Certificate;
import com.pulumi.azure.iot.CertificateArgs;
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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleIoTHub = new IoTHub("exampleIoTHub", IoTHubArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.sku(IoTHubSkuArgs.builder()
.name("B1")
.capacity("1")
.build())
.build());
var exampleCertificate = new Certificate("exampleCertificate", CertificateArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.iothubName(exampleIoTHub.name())
.isVerified(true)
.certificateContent(Base64.getEncoder().encodeToString(Files.readAllBytes(Paths.get("example.cer"))))
.build());
}
}

Import

IoTHub Certificates can be imported using the resource id, e.g.

$ pulumi import azure:iot/certificate:Certificate example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Devices/iotHubs/example/certificates/example

Properties

Link copied to clipboard

The Base-64 representation of the X509 leaf certificate .cer file or just a .pem file content.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val iothubName: Output<String>

The name of the IoTHub that this certificate will be attached to. Changing this forces a new resource to be created.

Link copied to clipboard
val isVerified: Output<Boolean>?

Is the certificate verified? Defaults to false.

Link copied to clipboard
val name: Output<String>

Specifies the name of the IotHub Certificate resource. Changing this forces a new resource to be created.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The name of the resource group under which the IotHub Certificate resource has to be created. Changing this forces a new resource to be created.

Link copied to clipboard
val urn: Output<String>