com.pulumi.cloudflare.kotlin.ZoneDnssec.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.
@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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
/**
* Builder for [ZoneDnssec].
*/
@PulumiTagMarker
public class ZoneDnssecResourceBuilder internal constructor() {
public var name: String? = null
public var args: ZoneDnssecArgs = ZoneDnssecArgs()
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 ZoneDnssecArgsBuilder.() -> Unit) {
val builder = ZoneDnssecArgsBuilder()
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(): ZoneDnssec {
val builtJavaResource = com.pulumi.cloudflare.ZoneDnssec(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return ZoneDnssec(builtJavaResource)
}
}
/**
* Provides a Cloudflare resource to create and modify zone DNSSEC settings.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as cloudflare from "@pulumi/cloudflare";
* const example = new cloudflare.Zone("example", {zone: "example.com"});
* const exampleZoneDnssec = new cloudflare.ZoneDnssec("example", {zoneId: example.id});
* ```
* ```python
* import pulumi
* import pulumi_cloudflare as cloudflare
* example = cloudflare.Zone("example", zone="example.com")
* example_zone_dnssec = cloudflare.ZoneDnssec("example", zone_id=example.id)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Cloudflare = Pulumi.Cloudflare;
* return await Deployment.RunAsync(() =>
* {
* var example = new Cloudflare.Zone("example", new()
* {
* ZoneName = "example.com",
* });
* var exampleZoneDnssec = new Cloudflare.ZoneDnssec("example", new()
* {
* ZoneId = example.Id,
* });
* });
* ```
* ```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 {
* example, err := cloudflare.NewZone(ctx, "example", &cloudflare.ZoneArgs{
* Zone: pulumi.String("example.com"),
* })
* if err != nil {
* return err
* }
* _, err = cloudflare.NewZoneDnssec(ctx, "example", &cloudflare.ZoneDnssecArgs{
* ZoneId: example.ID(),
* })
* 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.Zone;
* import com.pulumi.cloudflare.ZoneArgs;
* import com.pulumi.cloudflare.ZoneDnssec;
* import com.pulumi.cloudflare.ZoneDnssecArgs;
* 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 example = new Zone("example", ZoneArgs.builder()
* .zone("example.com")
* .build());
* var exampleZoneDnssec = new ZoneDnssec("exampleZoneDnssec", ZoneDnssecArgs.builder()
* .zoneId(example.id())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: cloudflare:Zone
* properties:
* zone: example.com
* exampleZoneDnssec:
* type: cloudflare:ZoneDnssec
* name: example
* properties:
* zoneId: ${example.id}
* ```
*
* ## Import
* ```sh
* $ pulumi import cloudflare:index/zoneDnssec:ZoneDnssec example
* ```
*/
public class ZoneDnssec internal constructor(
override val javaResource: com.pulumi.cloudflare.ZoneDnssec,
) : KotlinCustomResource(javaResource, ZoneDnssecMapper) {
/**
* Zone DNSSEC algorithm.
*/
public val algorithm: Output
get() = javaResource.algorithm().applyValue({ args0 -> args0 })
/**
* Zone DNSSEC digest.
*/
public val digest: Output
get() = javaResource.digest().applyValue({ args0 -> args0 })
/**
* Digest algorithm use for Zone DNSSEC.
*/
public val digestAlgorithm: Output
get() = javaResource.digestAlgorithm().applyValue({ args0 -> args0 })
/**
* Digest Type for Zone DNSSEC.
*/
public val digestType: Output
get() = javaResource.digestType().applyValue({ args0 -> args0 })
/**
* DS for the Zone DNSSEC.
*/
public val ds: Output
get() = javaResource.ds().applyValue({ args0 -> args0 })
/**
* Zone DNSSEC flags.
*/
public val flags: Output
get() = javaResource.flags().applyValue({ args0 -> args0 })
/**
* Key Tag for the Zone DNSSEC.
*/
public val keyTag: Output
get() = javaResource.keyTag().applyValue({ args0 -> args0 })
/**
* Key type used for Zone DNSSEC.
*/
public val keyType: Output
get() = javaResource.keyType().applyValue({ args0 -> args0 })
/**
* Zone DNSSEC updated time.
*/
public val modifiedOn: Output
get() = javaResource.modifiedOn().applyValue({ args0 -> args0 })
/**
* Public Key for the Zone DNSSEC.
*/
public val publicKey: Output
get() = javaResource.publicKey().applyValue({ args0 -> args0 })
/**
* The status of the Zone DNSSEC.
*/
public val status: Output
get() = javaResource.status().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 ZoneDnssecMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.cloudflare.ZoneDnssec::class == javaResource::class
override fun map(javaResource: Resource): ZoneDnssec = ZoneDnssec(
javaResource as
com.pulumi.cloudflare.ZoneDnssec,
)
}
/**
* @see [ZoneDnssec].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [ZoneDnssec].
*/
public suspend fun zoneDnssec(name: String, block: suspend ZoneDnssecResourceBuilder.() -> Unit): ZoneDnssec {
val builder = ZoneDnssecResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [ZoneDnssec].
* @param name The _unique_ name of the resulting resource.
*/
public fun zoneDnssec(name: String): ZoneDnssec {
val builder = ZoneDnssecResourceBuilder()
builder.name(name)
return builder.build()
}