Class: AWSCDK::BedrockAgentCore::CfnDatasetProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
bedrock_agent_core/cfn_dataset_props.rb

Overview

Properties for defining a CfnDataset.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(dataset_name:, schema_type:, description: nil, kms_key_arn: nil, source: nil, tags: nil) ⇒ CfnDatasetProps

Returns a new instance of CfnDatasetProps.

Parameters:

  • dataset_name (String)

    Human-readable name for the dataset.

  • schema_type (String)

    Versioned schema type governing the structure of examples.

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

    A description of the dataset.

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

    Optional AWS KMS key ARN for SSE-KMS on service S3 writes.

  • source (AWSCDK::IResolvable, AWSCDK::BedrockAgentCore::CfnDataset::DataSourceTypeProperty, nil) (defaults to: nil)

    Source of initial examples.

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

    A list of tags to assign to the dataset.



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

def initialize(dataset_name:, schema_type:, description: nil, kms_key_arn: nil, source: nil, tags: nil)
  @dataset_name = dataset_name
  Jsii::Type.check_type(@dataset_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "datasetName")
  @schema_type = schema_type
  Jsii::Type.check_type(@schema_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "schemaType")
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @kms_key_arn = kms_key_arn
  Jsii::Type.check_type(@kms_key_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "kmsKeyArn") unless @kms_key_arn.nil?
  @source = source.is_a?(Hash) ? ::AWSCDK::BedrockAgentCore::CfnDataset::DataSourceTypeProperty.new(**source.transform_keys(&:to_sym)) : source
  Jsii::Type.check_type(@source, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrYWdlbnRjb3JlLkNmbkRhdGFzZXQuRGF0YVNvdXJjZVR5cGVQcm9wZXJ0eSJ9XX19")), "source") unless @source.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
end

Instance Attribute Details

#dataset_nameString (readonly)

Human-readable name for the dataset.

Unique within the account (case-insensitive). Immutable after creation.



36
37
38
# File 'bedrock_agent_core/cfn_dataset_props.rb', line 36

def dataset_name
  @dataset_name
end

#descriptionString? (readonly)

A description of the dataset.



48
49
50
# File 'bedrock_agent_core/cfn_dataset_props.rb', line 48

def description
  @description
end

#kms_key_arnString? (readonly)

Optional AWS KMS key ARN for SSE-KMS on service S3 writes.



53
54
55
# File 'bedrock_agent_core/cfn_dataset_props.rb', line 53

def kms_key_arn
  @kms_key_arn
end

#schema_typeString (readonly)

Versioned schema type governing the structure of examples.

Immutable after creation.



43
44
45
# File 'bedrock_agent_core/cfn_dataset_props.rb', line 43

def schema_type
  @schema_type
end

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

Source of initial examples.

Provide either inline examples or an S3 URI pointing to a JSONL file.



60
61
62
# File 'bedrock_agent_core/cfn_dataset_props.rb', line 60

def source
  @source
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

A list of tags to assign to the dataset.



65
66
67
# File 'bedrock_agent_core/cfn_dataset_props.rb', line 65

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



67
68
69
70
71
72
73
74
75
76
# File 'bedrock_agent_core/cfn_dataset_props.rb', line 67

def self.jsii_properties
  {
    :dataset_name => "datasetName",
    :schema_type => "schemaType",
    :description => "description",
    :kms_key_arn => "kmsKeyArn",
    :source => "source",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



78
79
80
81
82
83
84
85
86
87
88
89
# File 'bedrock_agent_core/cfn_dataset_props.rb', line 78

def to_jsii
  result = {}
  result.merge!({
    "datasetName" => @dataset_name,
    "schemaType" => @schema_type,
    "description" => @description,
    "kmsKeyArn" => @kms_key_arn,
    "source" => @source,
    "tags" => @tags,
  })
  result.compact
end