IotHubCertificateArgs

data class IotHubCertificateArgs(val certificateContent: Output<String>? = null, val iotDpsName: Output<String>? = null, val isVerified: Output<Boolean>? = null, val name: Output<String>? = null, val resourceGroupName: Output<String>? = null) : ConvertibleToJava<IotHubCertificateArgs>

Manages an IotHub Device Provisioning Service 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.IotHubDps;
import com.pulumi.azure.iot.IotHubDpsArgs;
import com.pulumi.azure.iot.inputs.IotHubDpsSkuArgs;
import com.pulumi.azure.iot.IotHubCertificate;
import com.pulumi.azure.iot.IotHubCertificateArgs;
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 exampleIotHubDps = new IotHubDps("exampleIotHubDps", IotHubDpsArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.sku(IotHubDpsSkuArgs.builder()
.name("S1")
.capacity("1")
.build())
.build());
var exampleIotHubCertificate = new IotHubCertificate("exampleIotHubCertificate", IotHubCertificateArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.iotDpsName(exampleIotHubDps.name())
.certificateContent(Base64.getEncoder().encodeToString(Files.readAllBytes(Paths.get("example.cer"))))
.build());
}
}

Import

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

$ pulumi import azure:iot/iotHubCertificate:IotHubCertificate example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Devices/provisioningServices/example/certificates/example

Constructors

Link copied to clipboard
fun IotHubCertificateArgs(certificateContent: Output<String>? = null, iotDpsName: Output<String>? = null, isVerified: Output<Boolean>? = null, name: Output<String>? = null, resourceGroupName: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): IotHubCertificateArgs

Properties

Link copied to clipboard
val certificateContent: Output<String>? = null

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

Link copied to clipboard
val iotDpsName: Output<String>? = null

The name of the IoT Device Provisioning Service that this certificate will be attached to. Changing this forces a new resource to be created.

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

Specifies if the certificate is created in verified state. Defaults to false. Changing this forces a new resource to be created.

Link copied to clipboard
val name: Output<String>? = null

Specifies the name of the Iot Device Provisioning Service Certificate resource. Changing this forces a new resource to be created.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the resource group under which the Iot Device Provisioning Service Certificate resource has to be created. Changing this forces a new resource to be created.