com.pulumi.aws.bedrock.kotlin.GuardrailVersionArgs.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.bedrock.kotlin
import com.pulumi.aws.bedrock.GuardrailVersionArgs.builder
import com.pulumi.aws.bedrock.kotlin.inputs.GuardrailVersionTimeoutsArgs
import com.pulumi.aws.bedrock.kotlin.inputs.GuardrailVersionTimeoutsArgsBuilder
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.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* Resource for managing an AWS Bedrock Guardrail Version.
* ## Example Usage
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const example = new aws.bedrock.GuardrailVersion("example", {
* description: "example",
* guardrailArn: test.guardrailArn,
* skipDestroy: true,
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* example = aws.bedrock.GuardrailVersion("example",
* description="example",
* guardrail_arn=test["guardrailArn"],
* skip_destroy=True)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var example = new Aws.Bedrock.GuardrailVersion("example", new()
* {
* Description = "example",
* GuardrailArn = test.GuardrailArn,
* SkipDestroy = true,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/bedrock"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := bedrock.NewGuardrailVersion(ctx, "example", &bedrock.GuardrailVersionArgs{
* Description: pulumi.String("example"),
* GuardrailArn: pulumi.Any(test.GuardrailArn),
* SkipDestroy: pulumi.Bool(true),
* })
* 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.bedrock.GuardrailVersion;
* import com.pulumi.aws.bedrock.GuardrailVersionArgs;
* 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 GuardrailVersion("example", GuardrailVersionArgs.builder()
* .description("example")
* .guardrailArn(test.guardrailArn())
* .skipDestroy(true)
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: aws:bedrock:GuardrailVersion
* properties:
* description: example
* guardrailArn: ${test.guardrailArn}
* skipDestroy: true
* ```
*
* ## Import
* Using `pulumi import`, import Amazon Bedrock Guardrail Version using using a comma-delimited string of `guardrail_arn` and `version`. For example:
* ```sh
* $ pulumi import aws:bedrock/guardrailVersion:GuardrailVersion example arn:aws:bedrock:us-west-2:123456789012:guardrail-id-12345678,1
* ```
* @property description Description of the Guardrail version.
* @property guardrailArn Guardrail ARN.
* The following arguments are optional:
* @property skipDestroy Whether to retain the old version of a previously deployed Guardrail. Default is `false`
* @property timeouts
*/
public data class GuardrailVersionArgs(
public val description: Output? = null,
public val guardrailArn: Output? = null,
public val skipDestroy: Output? = null,
public val timeouts: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.aws.bedrock.GuardrailVersionArgs =
com.pulumi.aws.bedrock.GuardrailVersionArgs.builder()
.description(description?.applyValue({ args0 -> args0 }))
.guardrailArn(guardrailArn?.applyValue({ args0 -> args0 }))
.skipDestroy(skipDestroy?.applyValue({ args0 -> args0 }))
.timeouts(timeouts?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}
/**
* Builder for [GuardrailVersionArgs].
*/
@PulumiTagMarker
public class GuardrailVersionArgsBuilder internal constructor() {
private var description: Output? = null
private var guardrailArn: Output? = null
private var skipDestroy: Output? = null
private var timeouts: Output? = null
/**
* @param value Description of the Guardrail version.
*/
@JvmName("xbeghgixsuouasfw")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value Guardrail ARN.
* The following arguments are optional:
*/
@JvmName("ixvlkfprqwjpelpa")
public suspend fun guardrailArn(`value`: Output) {
this.guardrailArn = value
}
/**
* @param value Whether to retain the old version of a previously deployed Guardrail. Default is `false`
*/
@JvmName("xykfvxyxtnolscpv")
public suspend fun skipDestroy(`value`: Output) {
this.skipDestroy = value
}
/**
* @param value
*/
@JvmName("ayboeulmyabbensk")
public suspend fun timeouts(`value`: Output) {
this.timeouts = value
}
/**
* @param value Description of the Guardrail version.
*/
@JvmName("wtmgybloxyllsmgd")
public suspend fun description(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.description = mapped
}
/**
* @param value Guardrail ARN.
* The following arguments are optional:
*/
@JvmName("nuitexfwpxhdxbpg")
public suspend fun guardrailArn(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.guardrailArn = mapped
}
/**
* @param value Whether to retain the old version of a previously deployed Guardrail. Default is `false`
*/
@JvmName("plyocgtjwrxawssc")
public suspend fun skipDestroy(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.skipDestroy = mapped
}
/**
* @param value
*/
@JvmName("ybupjcfniukdiaxn")
public suspend fun timeouts(`value`: GuardrailVersionTimeoutsArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.timeouts = mapped
}
/**
* @param argument
*/
@JvmName("rwxyybsjtxsrilda")
public suspend fun timeouts(argument: suspend GuardrailVersionTimeoutsArgsBuilder.() -> Unit) {
val toBeMapped = GuardrailVersionTimeoutsArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.timeouts = mapped
}
internal fun build(): GuardrailVersionArgs = GuardrailVersionArgs(
description = description,
guardrailArn = guardrailArn,
skipDestroy = skipDestroy,
timeouts = timeouts,
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy