Class: AWSCDK::Bedrock::CfnPromptProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
bedrock/cfn_prompt_props.rb

Overview

Properties for defining a CfnPrompt.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, customer_encryption_key_arn: nil, default_variant: nil, description: nil, tags: nil, variants: nil) ⇒ CfnPromptProps

Returns a new instance of CfnPromptProps.

Parameters:

  • name (String)

    The name of the prompt.

  • customer_encryption_key_arn (String, nil) (defaults to: nil)

    The Amazon Resource Name (ARN) of the KMS key that the prompt is encrypted with.

  • default_variant (String, nil) (defaults to: nil)

    The name of the default variant for the prompt.

  • description (String, nil) (defaults to: nil)

    The description of the prompt.

  • tags (Hash{String => String}, nil) (defaults to: nil)

    Metadata that you can assign to a resource as key-value pairs. For more information, see the following resources:.

  • variants (AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::Bedrock::CfnPrompt::PromptVariantProperty>, nil) (defaults to: nil)

    A list of objects, each containing details about a variant of the prompt.



15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'bedrock/cfn_prompt_props.rb', line 15

def initialize(name:, customer_encryption_key_arn: nil, default_variant: nil, description: nil, tags: nil, variants: nil)
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @customer_encryption_key_arn = customer_encryption_key_arn
  Jsii::Type.check_type(@customer_encryption_key_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "customerEncryptionKeyArn") unless @customer_encryption_key_arn.nil?
  @default_variant = default_variant
  Jsii::Type.check_type(@default_variant, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "defaultVariant") unless @default_variant.nil?
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @tags = tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "tags") unless @tags.nil?
  @variants = variants
  Jsii::Type.check_type(@variants, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9jay5DZm5Qcm9tcHQuUHJvbXB0VmFyaWFudFByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "variants") unless @variants.nil?
end

Instance Attribute Details

#customer_encryption_key_arnString? (readonly)

The Amazon Resource Name (ARN) of the KMS key that the prompt is encrypted with.



39
40
41
# File 'bedrock/cfn_prompt_props.rb', line 39

def customer_encryption_key_arn
  @customer_encryption_key_arn
end

#default_variantString? (readonly)

The name of the default variant for the prompt.

This value must match the name field in the relevant PromptVariant object.



46
47
48
# File 'bedrock/cfn_prompt_props.rb', line 46

def default_variant
  @default_variant
end

#descriptionString? (readonly)

The description of the prompt.



51
52
53
# File 'bedrock/cfn_prompt_props.rb', line 51

def description
  @description
end

#nameString (readonly)

The name of the prompt.



34
35
36
# File 'bedrock/cfn_prompt_props.rb', line 34

def name
  @name
end

#tagsHash{String => String}? (readonly)

Metadata that you can assign to a resource as key-value pairs. For more information, see the following resources:.



59
60
61
# File 'bedrock/cfn_prompt_props.rb', line 59

def tags
  @tags
end

#variantsAWSCDK::IResolvable, ... (readonly)

A list of objects, each containing details about a variant of the prompt.



64
65
66
# File 'bedrock/cfn_prompt_props.rb', line 64

def variants
  @variants
end

Class Method Details

.jsii_propertiesObject



66
67
68
69
70
71
72
73
74
75
# File 'bedrock/cfn_prompt_props.rb', line 66

def self.jsii_properties
  {
    :name => "name",
    :customer_encryption_key_arn => "customerEncryptionKeyArn",
    :default_variant => "defaultVariant",
    :description => "description",
    :tags => "tags",
    :variants => "variants",
  }
end

Instance Method Details

#to_jsiiObject



77
78
79
80
81
82
83
84
85
86
87
88
# File 'bedrock/cfn_prompt_props.rb', line 77

def to_jsii
  result = {}
  result.merge!({
    "name" => @name,
    "customerEncryptionKeyArn" => @customer_encryption_key_arn,
    "defaultVariant" => @default_variant,
    "description" => @description,
    "tags" => @tags,
    "variants" => @variants,
  })
  result.compact
end