Class: AWSCDK::Bedrock::CfnPrompt::PromptMetadataEntryProperty

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

Overview

Contains a key-value pair that defines a metadata tag and value to attach to a prompt variant.

For more information, see Create a prompt using Prompt management .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key:, value:) ⇒ PromptMetadataEntryProperty

Returns a new instance of PromptMetadataEntryProperty.

Parameters:

  • key (String)

    The key of a metadata tag for a prompt variant.

  • value (String)

    The value of a metadata tag for a prompt variant.



945
946
947
948
949
950
# File 'bedrock/cfn_prompt.rb', line 945

def initialize(key:, value:)
  @key = key
  Jsii::Type.check_type(@key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "key")
  @value = value
  Jsii::Type.check_type(@value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "value")
end

Instance Attribute Details

#keyString (readonly)

The key of a metadata tag for a prompt variant.



956
957
958
# File 'bedrock/cfn_prompt.rb', line 956

def key
  @key
end

#valueString (readonly)

The value of a metadata tag for a prompt variant.



961
962
963
# File 'bedrock/cfn_prompt.rb', line 961

def value
  @value
end

Class Method Details

.jsii_propertiesObject



963
964
965
966
967
968
# File 'bedrock/cfn_prompt.rb', line 963

def self.jsii_properties
  {
    :key => "key",
    :value => "value",
  }
end

Instance Method Details

#to_jsiiObject



970
971
972
973
974
975
976
977
# File 'bedrock/cfn_prompt.rb', line 970

def to_jsii
  result = {}
  result.merge!({
    "key" => @key,
    "value" => @value,
  })
  result.compact
end