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

com.pulumi.cloudflare.kotlin.AuthenticatedOriginPullsCertificateArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 5.40.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.cloudflare.kotlin

import com.pulumi.cloudflare.AuthenticatedOriginPullsCertificateArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * Provides a Cloudflare Authenticated Origin Pulls certificate
 * resource. An uploaded client certificate is required to use Per-Zone
 *  or Per-Hostname Authenticated Origin Pulls.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as cloudflare from "@pulumi/cloudflare";
 * // Per-Zone Authenticated Origin Pulls certificate
 * const myPerZoneAopCert = new cloudflare.AuthenticatedOriginPullsCertificate("my_per_zone_aop_cert", {
 *     zoneId: "0da42c8d2132a9ddaf714f9e7c920711",
 *     certificate: "-----INSERT CERTIFICATE-----",
 *     privateKey: "-----INSERT PRIVATE KEY-----",
 *     type: "per-zone",
 * });
 * // Per-Hostname Authenticated Origin Pulls certificate
 * const myPerHostnameAopCert = new cloudflare.AuthenticatedOriginPullsCertificate("my_per_hostname_aop_cert", {
 *     zoneId: "0da42c8d2132a9ddaf714f9e7c920711",
 *     certificate: "-----INSERT CERTIFICATE-----",
 *     privateKey: "-----INSERT PRIVATE KEY-----",
 *     type: "per-hostname",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_cloudflare as cloudflare
 * # Per-Zone Authenticated Origin Pulls certificate
 * my_per_zone_aop_cert = cloudflare.AuthenticatedOriginPullsCertificate("my_per_zone_aop_cert",
 *     zone_id="0da42c8d2132a9ddaf714f9e7c920711",
 *     certificate="-----INSERT CERTIFICATE-----",
 *     private_key="-----INSERT PRIVATE KEY-----",
 *     type="per-zone")
 * # Per-Hostname Authenticated Origin Pulls certificate
 * my_per_hostname_aop_cert = cloudflare.AuthenticatedOriginPullsCertificate("my_per_hostname_aop_cert",
 *     zone_id="0da42c8d2132a9ddaf714f9e7c920711",
 *     certificate="-----INSERT CERTIFICATE-----",
 *     private_key="-----INSERT PRIVATE KEY-----",
 *     type="per-hostname")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Cloudflare = Pulumi.Cloudflare;
 * return await Deployment.RunAsync(() =>
 * {
 *     // Per-Zone Authenticated Origin Pulls certificate
 *     var myPerZoneAopCert = new Cloudflare.AuthenticatedOriginPullsCertificate("my_per_zone_aop_cert", new()
 *     {
 *         ZoneId = "0da42c8d2132a9ddaf714f9e7c920711",
 *         Certificate = "-----INSERT CERTIFICATE-----",
 *         PrivateKey = "-----INSERT PRIVATE KEY-----",
 *         Type = "per-zone",
 *     });
 *     // Per-Hostname Authenticated Origin Pulls certificate
 *     var myPerHostnameAopCert = new Cloudflare.AuthenticatedOriginPullsCertificate("my_per_hostname_aop_cert", new()
 *     {
 *         ZoneId = "0da42c8d2132a9ddaf714f9e7c920711",
 *         Certificate = "-----INSERT CERTIFICATE-----",
 *         PrivateKey = "-----INSERT PRIVATE KEY-----",
 *         Type = "per-hostname",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		// Per-Zone Authenticated Origin Pulls certificate
 * 		_, err := cloudflare.NewAuthenticatedOriginPullsCertificate(ctx, "my_per_zone_aop_cert", &cloudflare.AuthenticatedOriginPullsCertificateArgs{
 * 			ZoneId:      pulumi.String("0da42c8d2132a9ddaf714f9e7c920711"),
 * 			Certificate: pulumi.String("-----INSERT CERTIFICATE-----"),
 * 			PrivateKey:  pulumi.String("-----INSERT PRIVATE KEY-----"),
 * 			Type:        pulumi.String("per-zone"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		// Per-Hostname Authenticated Origin Pulls certificate
 * 		_, err = cloudflare.NewAuthenticatedOriginPullsCertificate(ctx, "my_per_hostname_aop_cert", &cloudflare.AuthenticatedOriginPullsCertificateArgs{
 * 			ZoneId:      pulumi.String("0da42c8d2132a9ddaf714f9e7c920711"),
 * 			Certificate: pulumi.String("-----INSERT CERTIFICATE-----"),
 * 			PrivateKey:  pulumi.String("-----INSERT PRIVATE KEY-----"),
 * 			Type:        pulumi.String("per-hostname"),
 * 		})
 * 		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.cloudflare.AuthenticatedOriginPullsCertificate;
 * import com.pulumi.cloudflare.AuthenticatedOriginPullsCertificateArgs;
 * 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) {
 *         // Per-Zone Authenticated Origin Pulls certificate
 *         var myPerZoneAopCert = new AuthenticatedOriginPullsCertificate("myPerZoneAopCert", AuthenticatedOriginPullsCertificateArgs.builder()
 *             .zoneId("0da42c8d2132a9ddaf714f9e7c920711")
 *             .certificate("-----INSERT CERTIFICATE-----")
 *             .privateKey("-----INSERT PRIVATE KEY-----")
 *             .type("per-zone")
 *             .build());
 *         // Per-Hostname Authenticated Origin Pulls certificate
 *         var myPerHostnameAopCert = new AuthenticatedOriginPullsCertificate("myPerHostnameAopCert", AuthenticatedOriginPullsCertificateArgs.builder()
 *             .zoneId("0da42c8d2132a9ddaf714f9e7c920711")
 *             .certificate("-----INSERT CERTIFICATE-----")
 *             .privateKey("-----INSERT PRIVATE KEY-----")
 *             .type("per-hostname")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   # Per-Zone Authenticated Origin Pulls certificate
 *   myPerZoneAopCert:
 *     type: cloudflare:AuthenticatedOriginPullsCertificate
 *     name: my_per_zone_aop_cert
 *     properties:
 *       zoneId: 0da42c8d2132a9ddaf714f9e7c920711
 *       certificate: '-----INSERT CERTIFICATE-----'
 *       privateKey: '-----INSERT PRIVATE KEY-----'
 *       type: per-zone
 *   # Per-Hostname Authenticated Origin Pulls certificate
 *   myPerHostnameAopCert:
 *     type: cloudflare:AuthenticatedOriginPullsCertificate
 *     name: my_per_hostname_aop_cert
 *     properties:
 *       zoneId: 0da42c8d2132a9ddaf714f9e7c920711
 *       certificate: '-----INSERT CERTIFICATE-----'
 *       privateKey: '-----INSERT PRIVATE KEY-----'
 *       type: per-hostname
 * ```
 * 
 * ## Import
 * ```sh
 * $ pulumi import cloudflare:index/authenticatedOriginPullsCertificate:AuthenticatedOriginPullsCertificate example //
 * ```
 * @property certificate The public client certificate. **Modifying this attribute will force creation of a new resource.**
 * @property privateKey The private key of the client certificate. **Modifying this attribute will force creation of a new resource.**
 * @property type The form of Authenticated Origin Pulls to upload the certificate to. Available values: `per-zone`, `per-hostname`. **Modifying this attribute will force creation of a new resource.**
 * @property zoneId The zone identifier to target for the resource. **Modifying this attribute will force creation of a new resource.**
 */
public data class AuthenticatedOriginPullsCertificateArgs(
    public val certificate: Output? = null,
    public val privateKey: Output? = null,
    public val type: Output? = null,
    public val zoneId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.cloudflare.AuthenticatedOriginPullsCertificateArgs =
        com.pulumi.cloudflare.AuthenticatedOriginPullsCertificateArgs.builder()
            .certificate(certificate?.applyValue({ args0 -> args0 }))
            .privateKey(privateKey?.applyValue({ args0 -> args0 }))
            .type(type?.applyValue({ args0 -> args0 }))
            .zoneId(zoneId?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [AuthenticatedOriginPullsCertificateArgs].
 */
@PulumiTagMarker
public class AuthenticatedOriginPullsCertificateArgsBuilder internal constructor() {
    private var certificate: Output? = null

    private var privateKey: Output? = null

    private var type: Output? = null

    private var zoneId: Output? = null

    /**
     * @param value The public client certificate. **Modifying this attribute will force creation of a new resource.**
     */
    @JvmName("bvmimydfnwmxpwkw")
    public suspend fun certificate(`value`: Output) {
        this.certificate = value
    }

    /**
     * @param value The private key of the client certificate. **Modifying this attribute will force creation of a new resource.**
     */
    @JvmName("lrprrmekuqdseqxm")
    public suspend fun privateKey(`value`: Output) {
        this.privateKey = value
    }

    /**
     * @param value The form of Authenticated Origin Pulls to upload the certificate to. Available values: `per-zone`, `per-hostname`. **Modifying this attribute will force creation of a new resource.**
     */
    @JvmName("xxpobntxabstjlou")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value The zone identifier to target for the resource. **Modifying this attribute will force creation of a new resource.**
     */
    @JvmName("iniiiwxcbtsifhyi")
    public suspend fun zoneId(`value`: Output) {
        this.zoneId = value
    }

    /**
     * @param value The public client certificate. **Modifying this attribute will force creation of a new resource.**
     */
    @JvmName("vpncoerabpevoiel")
    public suspend fun certificate(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.certificate = mapped
    }

    /**
     * @param value The private key of the client certificate. **Modifying this attribute will force creation of a new resource.**
     */
    @JvmName("bcyvsjonkwvdvfcc")
    public suspend fun privateKey(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.privateKey = mapped
    }

    /**
     * @param value The form of Authenticated Origin Pulls to upload the certificate to. Available values: `per-zone`, `per-hostname`. **Modifying this attribute will force creation of a new resource.**
     */
    @JvmName("jhyrimdiiruwgkbn")
    public suspend fun type(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.type = mapped
    }

    /**
     * @param value The zone identifier to target for the resource. **Modifying this attribute will force creation of a new resource.**
     */
    @JvmName("emyeupvwgwehgglk")
    public suspend fun zoneId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.zoneId = mapped
    }

    internal fun build(): AuthenticatedOriginPullsCertificateArgs =
        AuthenticatedOriginPullsCertificateArgs(
            certificate = certificate,
            privateKey = privateKey,
            type = type,
            zoneId = zoneId,
        )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy