All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azurenative.devices.kotlin.CertificateArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.devices.kotlin

import com.pulumi.azurenative.devices.CertificateArgs.builder
import com.pulumi.azurenative.devices.kotlin.inputs.CertificatePropertiesArgs
import com.pulumi.azurenative.devices.kotlin.inputs.CertificatePropertiesArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 * The X509 Certificate.
 * Azure REST API version: 2022-04-30-preview. Prior API version in Azure Native 1.x: 2020-08-31.
 * Other available API versions: 2020-04-01, 2022-11-15-preview, 2023-06-30, 2023-06-30-preview.
 * ## Example Usage
 * ### Certificates_CreateOrUpdate
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var certificate = new AzureNative.Devices.Certificate("certificate", new()
 *     {
 *         CertificateName = "cert",
 *         Properties = new AzureNative.Devices.Inputs.CertificatePropertiesArgs
 *         {
 *             Certificate = "############################################",
 *         },
 *         ResourceGroupName = "myResourceGroup",
 *         ResourceName = "iothub",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	devices "github.com/pulumi/pulumi-azure-native-sdk/devices/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := devices.NewCertificate(ctx, "certificate", &devices.CertificateArgs{
 * 			CertificateName: pulumi.String("cert"),
 * 			Properties: &devices.CertificatePropertiesArgs{
 * 				Certificate: pulumi.String("############################################"),
 * 			},
 * 			ResourceGroupName: pulumi.String("myResourceGroup"),
 * 			ResourceName:      pulumi.String("iothub"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.devices.Certificate;
 * import com.pulumi.azurenative.devices.CertificateArgs;
 * import com.pulumi.azurenative.devices.inputs.CertificatePropertiesArgs;
 * 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 certificate = new Certificate("certificate", CertificateArgs.builder()
 *             .certificateName("cert")
 *             .properties(CertificatePropertiesArgs.builder()
 *                 .certificate("############################################")
 *                 .build())
 *             .resourceGroupName("myResourceGroup")
 *             .resourceName("iothub")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:devices:Certificate cert /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates/{certificateName}
 * ```
 * @property certificateName The name of the certificate
 * @property properties The description of an X509 CA Certificate.
 * @property resourceGroupName The name of the resource group that contains the IoT hub.
 * @property resourceName The name of the IoT hub.
 */
public data class CertificateArgs(
    public val certificateName: Output? = null,
    public val properties: Output? = null,
    public val resourceGroupName: Output? = null,
    public val resourceName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.devices.CertificateArgs =
        com.pulumi.azurenative.devices.CertificateArgs.builder()
            .certificateName(certificateName?.applyValue({ args0 -> args0 }))
            .properties(properties?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .resourceName(resourceName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [CertificateArgs].
 */
@PulumiTagMarker
public class CertificateArgsBuilder internal constructor() {
    private var certificateName: Output? = null

    private var properties: Output? = null

    private var resourceGroupName: Output? = null

    private var resourceName: Output? = null

    /**
     * @param value The name of the certificate
     */
    @JvmName("yfcscgwnloomrdod")
    public suspend fun certificateName(`value`: Output) {
        this.certificateName = value
    }

    /**
     * @param value The description of an X509 CA Certificate.
     */
    @JvmName("rcndinbqldomhdpx")
    public suspend fun properties(`value`: Output) {
        this.properties = value
    }

    /**
     * @param value The name of the resource group that contains the IoT hub.
     */
    @JvmName("nochslqlovpqtmyb")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value The name of the IoT hub.
     */
    @JvmName("uywqiddusjesduhd")
    public suspend fun resourceName(`value`: Output) {
        this.resourceName = value
    }

    /**
     * @param value The name of the certificate
     */
    @JvmName("nvteeidbhunmybho")
    public suspend fun certificateName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.certificateName = mapped
    }

    /**
     * @param value The description of an X509 CA Certificate.
     */
    @JvmName("joownqdnraqdsfst")
    public suspend fun properties(`value`: CertificatePropertiesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.properties = mapped
    }

    /**
     * @param argument The description of an X509 CA Certificate.
     */
    @JvmName("ieddpogevybafqfp")
    public suspend fun properties(argument: suspend CertificatePropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = CertificatePropertiesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.properties = mapped
    }

    /**
     * @param value The name of the resource group that contains the IoT hub.
     */
    @JvmName("fmbdtcqqnfvadmyh")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value The name of the IoT hub.
     */
    @JvmName("dhvdsmunioajsioi")
    public suspend fun resourceName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceName = mapped
    }

    internal fun build(): CertificateArgs = CertificateArgs(
        certificateName = certificateName,
        properties = properties,
        resourceGroupName = resourceGroupName,
        resourceName = resourceName,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy