com.pulumi.cloudflare.kotlin.AuthenticatedOriginPullsCertificate.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-cloudflare-kotlin Show documentation
Show all versions of pulumi-cloudflare-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.cloudflare.kotlin
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
/**
* Builder for [AuthenticatedOriginPullsCertificate].
*/
@PulumiTagMarker
public class AuthenticatedOriginPullsCertificateResourceBuilder internal constructor() {
public var name: String? = null
public var args: AuthenticatedOriginPullsCertificateArgs =
AuthenticatedOriginPullsCertificateArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend AuthenticatedOriginPullsCertificateArgsBuilder.() -> Unit) {
val builder = AuthenticatedOriginPullsCertificateArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): AuthenticatedOriginPullsCertificate {
val builtJavaResource =
com.pulumi.cloudflare.AuthenticatedOriginPullsCertificate(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return AuthenticatedOriginPullsCertificate(builtJavaResource)
}
}
/**
* 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 //
* ```
*/
public class AuthenticatedOriginPullsCertificate internal constructor(
override val javaResource: com.pulumi.cloudflare.AuthenticatedOriginPullsCertificate,
) : KotlinCustomResource(javaResource, AuthenticatedOriginPullsCertificateMapper) {
/**
* The public client certificate. **Modifying this attribute will force creation of a new resource.**
*/
public val certificate: Output
get() = javaResource.certificate().applyValue({ args0 -> args0 })
/**
* **Modifying this attribute will force creation of a new resource.**
*/
public val expiresOn: Output
get() = javaResource.expiresOn().applyValue({ args0 -> args0 })
/**
* **Modifying this attribute will force creation of a new resource.**
*/
public val issuer: Output
get() = javaResource.issuer().applyValue({ args0 -> args0 })
/**
* The private key of the client certificate. **Modifying this attribute will force creation of a new resource.**
*/
public val privateKey: Output
get() = javaResource.privateKey().applyValue({ args0 -> args0 })
/**
* **Modifying this attribute will force creation of a new resource.**
*/
public val serialNumber: Output
get() = javaResource.serialNumber().applyValue({ args0 -> args0 })
/**
* **Modifying this attribute will force creation of a new resource.**
*/
public val signature: Output
get() = javaResource.signature().applyValue({ args0 -> args0 })
/**
* **Modifying this attribute will force creation of a new resource.**
*/
public val status: Output
get() = javaResource.status().applyValue({ args0 -> args0 })
/**
* 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.**
*/
public val type: Output
get() = javaResource.type().applyValue({ args0 -> args0 })
/**
* **Modifying this attribute will force creation of a new resource.**
*/
public val uploadedOn: Output
get() = javaResource.uploadedOn().applyValue({ args0 -> args0 })
/**
* The zone identifier to target for the resource. **Modifying this attribute will force creation of a new resource.**
*/
public val zoneId: Output
get() = javaResource.zoneId().applyValue({ args0 -> args0 })
}
public object AuthenticatedOriginPullsCertificateMapper :
ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.cloudflare.AuthenticatedOriginPullsCertificate::class == javaResource::class
override fun map(javaResource: Resource): AuthenticatedOriginPullsCertificate =
AuthenticatedOriginPullsCertificate(
javaResource as
com.pulumi.cloudflare.AuthenticatedOriginPullsCertificate,
)
}
/**
* @see [AuthenticatedOriginPullsCertificate].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [AuthenticatedOriginPullsCertificate].
*/
public suspend fun authenticatedOriginPullsCertificate(
name: String,
block: suspend AuthenticatedOriginPullsCertificateResourceBuilder.() -> Unit,
): AuthenticatedOriginPullsCertificate {
val builder = AuthenticatedOriginPullsCertificateResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [AuthenticatedOriginPullsCertificate].
* @param name The _unique_ name of the resulting resource.
*/
public fun authenticatedOriginPullsCertificate(name: String): AuthenticatedOriginPullsCertificate {
val builder = AuthenticatedOriginPullsCertificateResourceBuilder()
builder.name(name)
return builder.build()
}