com.pulumi.aws.route53.kotlin.ResolverDnsSecConfig.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-kotlin Show documentation
Show all versions of pulumi-aws-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.aws.route53.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 [ResolverDnsSecConfig].
*/
@PulumiTagMarker
public class ResolverDnsSecConfigResourceBuilder internal constructor() {
public var name: String? = null
public var args: ResolverDnsSecConfigArgs = ResolverDnsSecConfigArgs()
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 ResolverDnsSecConfigArgsBuilder.() -> Unit) {
val builder = ResolverDnsSecConfigArgsBuilder()
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(): ResolverDnsSecConfig {
val builtJavaResource = com.pulumi.aws.route53.ResolverDnsSecConfig(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return ResolverDnsSecConfig(builtJavaResource)
}
}
/**
* Provides a Route 53 Resolver DNSSEC config resource.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const example = new aws.ec2.Vpc("example", {
* cidrBlock: "10.0.0.0/16",
* enableDnsSupport: true,
* enableDnsHostnames: true,
* });
* const exampleResolverDnsSecConfig = new aws.route53.ResolverDnsSecConfig("example", {resourceId: example.id});
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* example = aws.ec2.Vpc("example",
* cidr_block="10.0.0.0/16",
* enable_dns_support=True,
* enable_dns_hostnames=True)
* example_resolver_dns_sec_config = aws.route53.ResolverDnsSecConfig("example", resource_id=example.id)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var example = new Aws.Ec2.Vpc("example", new()
* {
* CidrBlock = "10.0.0.0/16",
* EnableDnsSupport = true,
* EnableDnsHostnames = true,
* });
* var exampleResolverDnsSecConfig = new Aws.Route53.ResolverDnsSecConfig("example", new()
* {
* ResourceId = example.Id,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := ec2.NewVpc(ctx, "example", &ec2.VpcArgs{
* CidrBlock: pulumi.String("10.0.0.0/16"),
* EnableDnsSupport: pulumi.Bool(true),
* EnableDnsHostnames: pulumi.Bool(true),
* })
* if err != nil {
* return err
* }
* _, err = route53.NewResolverDnsSecConfig(ctx, "example", &route53.ResolverDnsSecConfigArgs{
* ResourceId: 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.aws.ec2.Vpc;
* import com.pulumi.aws.ec2.VpcArgs;
* import com.pulumi.aws.route53.ResolverDnsSecConfig;
* import com.pulumi.aws.route53.ResolverDnsSecConfigArgs;
* 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 Vpc("example", VpcArgs.builder()
* .cidrBlock("10.0.0.0/16")
* .enableDnsSupport(true)
* .enableDnsHostnames(true)
* .build());
* var exampleResolverDnsSecConfig = new ResolverDnsSecConfig("exampleResolverDnsSecConfig", ResolverDnsSecConfigArgs.builder()
* .resourceId(example.id())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: aws:ec2:Vpc
* properties:
* cidrBlock: 10.0.0.0/16
* enableDnsSupport: true
* enableDnsHostnames: true
* exampleResolverDnsSecConfig:
* type: aws:route53:ResolverDnsSecConfig
* name: example
* properties:
* resourceId: ${example.id}
* ```
*
* ## Import
* Using `pulumi import`, import Route 53 Resolver DNSSEC configs using the Route 53 Resolver DNSSEC config ID. For example:
* ```sh
* $ pulumi import aws:route53/resolverDnsSecConfig:ResolverDnsSecConfig example rdsc-be1866ecc1683e95
* ```
*/
public class ResolverDnsSecConfig internal constructor(
override val javaResource: com.pulumi.aws.route53.ResolverDnsSecConfig,
) : KotlinCustomResource(javaResource, ResolverDnsSecConfigMapper) {
/**
* The ARN for a configuration for DNSSEC validation.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* The owner account ID of the virtual private cloud (VPC) for a configuration for DNSSEC validation.
*/
public val ownerId: Output
get() = javaResource.ownerId().applyValue({ args0 -> args0 })
/**
* The ID of the virtual private cloud (VPC) that you're updating the DNSSEC validation status for.
*/
public val resourceId: Output
get() = javaResource.resourceId().applyValue({ args0 -> args0 })
/**
* The validation status for a DNSSEC configuration. The status can be one of the following: `ENABLING`, `ENABLED`, `DISABLING` and `DISABLED`.
*/
public val validationStatus: Output
get() = javaResource.validationStatus().applyValue({ args0 -> args0 })
}
public object ResolverDnsSecConfigMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.aws.route53.ResolverDnsSecConfig::class == javaResource::class
override fun map(javaResource: Resource): ResolverDnsSecConfig = ResolverDnsSecConfig(
javaResource
as com.pulumi.aws.route53.ResolverDnsSecConfig,
)
}
/**
* @see [ResolverDnsSecConfig].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [ResolverDnsSecConfig].
*/
public suspend fun resolverDnsSecConfig(
name: String,
block: suspend ResolverDnsSecConfigResourceBuilder.() -> Unit,
): ResolverDnsSecConfig {
val builder = ResolverDnsSecConfigResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [ResolverDnsSecConfig].
* @param name The _unique_ name of the resulting resource.
*/
public fun resolverDnsSecConfig(name: String): ResolverDnsSecConfig {
val builder = ResolverDnsSecConfigResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy