1. Packages
  2. AWS
  3. API Docs
  4. bedrock
  5. GuardrailVersion
AWS v6.77.1 published on Friday, Apr 18, 2025 by Pulumi

aws.bedrock.GuardrailVersion

Explore with Pulumi AI

Resource for managing an AWS Bedrock Guardrail Version.

Example Usage

Basic Usage

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,
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.bedrock.GuardrailVersion("example",
    description="example",
    guardrail_arn=test["guardrailArn"],
    skip_destroy=True)
Copy
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
	})
}
Copy
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,
    });

});
Copy
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());

    }
}
Copy
resources:
  example:
    type: aws:bedrock:GuardrailVersion
    properties:
      description: example
      guardrailArn: ${test.guardrailArn}
      skipDestroy: true
Copy

Create GuardrailVersion Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new GuardrailVersion(name: string, args: GuardrailVersionArgs, opts?: CustomResourceOptions);
@overload
def GuardrailVersion(resource_name: str,
                     args: GuardrailVersionArgs,
                     opts: Optional[ResourceOptions] = None)

@overload
def GuardrailVersion(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     guardrail_arn: Optional[str] = None,
                     description: Optional[str] = None,
                     skip_destroy: Optional[bool] = None,
                     timeouts: Optional[GuardrailVersionTimeoutsArgs] = None)
func NewGuardrailVersion(ctx *Context, name string, args GuardrailVersionArgs, opts ...ResourceOption) (*GuardrailVersion, error)
public GuardrailVersion(string name, GuardrailVersionArgs args, CustomResourceOptions? opts = null)
public GuardrailVersion(String name, GuardrailVersionArgs args)
public GuardrailVersion(String name, GuardrailVersionArgs args, CustomResourceOptions options)
type: aws:bedrock:GuardrailVersion
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. GuardrailVersionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. GuardrailVersionArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. GuardrailVersionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. GuardrailVersionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. GuardrailVersionArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var guardrailVersionResource = new Aws.Bedrock.GuardrailVersion("guardrailVersionResource", new()
{
    GuardrailArn = "string",
    Description = "string",
    SkipDestroy = false,
    Timeouts = new Aws.Bedrock.Inputs.GuardrailVersionTimeoutsArgs
    {
        Create = "string",
        Delete = "string",
    },
});
Copy
example, err := bedrock.NewGuardrailVersion(ctx, "guardrailVersionResource", &bedrock.GuardrailVersionArgs{
	GuardrailArn: pulumi.String("string"),
	Description:  pulumi.String("string"),
	SkipDestroy:  pulumi.Bool(false),
	Timeouts: &bedrock.GuardrailVersionTimeoutsArgs{
		Create: pulumi.String("string"),
		Delete: pulumi.String("string"),
	},
})
Copy
var guardrailVersionResource = new GuardrailVersion("guardrailVersionResource", GuardrailVersionArgs.builder()
    .guardrailArn("string")
    .description("string")
    .skipDestroy(false)
    .timeouts(GuardrailVersionTimeoutsArgs.builder()
        .create("string")
        .delete("string")
        .build())
    .build());
Copy
guardrail_version_resource = aws.bedrock.GuardrailVersion("guardrailVersionResource",
    guardrail_arn="string",
    description="string",
    skip_destroy=False,
    timeouts={
        "create": "string",
        "delete": "string",
    })
Copy
const guardrailVersionResource = new aws.bedrock.GuardrailVersion("guardrailVersionResource", {
    guardrailArn: "string",
    description: "string",
    skipDestroy: false,
    timeouts: {
        create: "string",
        "delete": "string",
    },
});
Copy
type: aws:bedrock:GuardrailVersion
properties:
    description: string
    guardrailArn: string
    skipDestroy: false
    timeouts:
        create: string
        delete: string
Copy

GuardrailVersion Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The GuardrailVersion resource accepts the following input properties:

GuardrailArn This property is required. string

Guardrail ARN.

The following arguments are optional:

Description string
Description of the Guardrail version.
SkipDestroy bool
Whether to retain the old version of a previously deployed Guardrail. Default is false
Timeouts GuardrailVersionTimeouts
GuardrailArn This property is required. string

Guardrail ARN.

The following arguments are optional:

Description string
Description of the Guardrail version.
SkipDestroy bool
Whether to retain the old version of a previously deployed Guardrail. Default is false
Timeouts GuardrailVersionTimeoutsArgs
guardrailArn This property is required. String

Guardrail ARN.

The following arguments are optional:

description String
Description of the Guardrail version.
skipDestroy Boolean
Whether to retain the old version of a previously deployed Guardrail. Default is false
timeouts GuardrailVersionTimeouts
guardrailArn This property is required. string

Guardrail ARN.

The following arguments are optional:

description string
Description of the Guardrail version.
skipDestroy boolean
Whether to retain the old version of a previously deployed Guardrail. Default is false
timeouts GuardrailVersionTimeouts
guardrail_arn This property is required. str

Guardrail ARN.

The following arguments are optional:

description str
Description of the Guardrail version.
skip_destroy bool
Whether to retain the old version of a previously deployed Guardrail. Default is false
timeouts GuardrailVersionTimeoutsArgs
guardrailArn This property is required. String

Guardrail ARN.

The following arguments are optional:

description String
Description of the Guardrail version.
skipDestroy Boolean
Whether to retain the old version of a previously deployed Guardrail. Default is false
timeouts Property Map

Outputs

All input properties are implicitly available as output properties. Additionally, the GuardrailVersion resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Version string
Guardrail version.
Id string
The provider-assigned unique ID for this managed resource.
Version string
Guardrail version.
id String
The provider-assigned unique ID for this managed resource.
version String
Guardrail version.
id string
The provider-assigned unique ID for this managed resource.
version string
Guardrail version.
id str
The provider-assigned unique ID for this managed resource.
version str
Guardrail version.
id String
The provider-assigned unique ID for this managed resource.
version String
Guardrail version.

Look up Existing GuardrailVersion Resource

Get an existing GuardrailVersion resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: GuardrailVersionState, opts?: CustomResourceOptions): GuardrailVersion
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        description: Optional[str] = None,
        guardrail_arn: Optional[str] = None,
        skip_destroy: Optional[bool] = None,
        timeouts: Optional[GuardrailVersionTimeoutsArgs] = None,
        version: Optional[str] = None) -> GuardrailVersion
func GetGuardrailVersion(ctx *Context, name string, id IDInput, state *GuardrailVersionState, opts ...ResourceOption) (*GuardrailVersion, error)
public static GuardrailVersion Get(string name, Input<string> id, GuardrailVersionState? state, CustomResourceOptions? opts = null)
public static GuardrailVersion get(String name, Output<String> id, GuardrailVersionState state, CustomResourceOptions options)
resources:  _:    type: aws:bedrock:GuardrailVersion    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Description string
Description of the Guardrail version.
GuardrailArn string

Guardrail ARN.

The following arguments are optional:

SkipDestroy bool
Whether to retain the old version of a previously deployed Guardrail. Default is false
Timeouts GuardrailVersionTimeouts
Version string
Guardrail version.
Description string
Description of the Guardrail version.
GuardrailArn string

Guardrail ARN.

The following arguments are optional:

SkipDestroy bool
Whether to retain the old version of a previously deployed Guardrail. Default is false
Timeouts GuardrailVersionTimeoutsArgs
Version string
Guardrail version.
description String
Description of the Guardrail version.
guardrailArn String

Guardrail ARN.

The following arguments are optional:

skipDestroy Boolean
Whether to retain the old version of a previously deployed Guardrail. Default is false
timeouts GuardrailVersionTimeouts
version String
Guardrail version.
description string
Description of the Guardrail version.
guardrailArn string

Guardrail ARN.

The following arguments are optional:

skipDestroy boolean
Whether to retain the old version of a previously deployed Guardrail. Default is false
timeouts GuardrailVersionTimeouts
version string
Guardrail version.
description str
Description of the Guardrail version.
guardrail_arn str

Guardrail ARN.

The following arguments are optional:

skip_destroy bool
Whether to retain the old version of a previously deployed Guardrail. Default is false
timeouts GuardrailVersionTimeoutsArgs
version str
Guardrail version.
description String
Description of the Guardrail version.
guardrailArn String

Guardrail ARN.

The following arguments are optional:

skipDestroy Boolean
Whether to retain the old version of a previously deployed Guardrail. Default is false
timeouts Property Map
version String
Guardrail version.

Supporting Types

GuardrailVersionTimeouts
, GuardrailVersionTimeoutsArgs

Create string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Delete string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
Create string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Delete string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
create String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
delete String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
create string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
delete string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
create str
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
delete str
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
create String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
delete String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.

Import

Using pulumi import, import Amazon Bedrock Guardrail Version using using a comma-delimited string of guardrail_arn and version. For example:

$ pulumi import aws:bedrock/guardrailVersion:GuardrailVersion example arn:aws:bedrock:us-west-2:123456789012:guardrail-id-12345678,1
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.