Documentation
¶
Index ¶
- func AgentAliasBase_IsConstruct(x interface{}) *bool
- func AgentAliasBase_IsOwnedResource(construct constructs.IConstruct) *bool
- func AgentAliasBase_IsResource(construct constructs.IConstruct) *bool
- func AgentAlias_IsConstruct(x interface{}) *bool
- func AgentAlias_IsOwnedResource(construct constructs.IConstruct) *bool
- func AgentAlias_IsResource(construct constructs.IConstruct) *bool
- func AgentBase_IsConstruct(x interface{}) *bool
- func AgentBase_IsOwnedResource(construct constructs.IConstruct) *bool
- func AgentBase_IsResource(construct constructs.IConstruct) *bool
- func Agent_IsConstruct(x interface{}) *bool
- func Agent_IsOwnedResource(construct constructs.IConstruct) *bool
- func Agent_IsResource(construct constructs.IConstruct) *bool
- func ApplicationInferenceProfile_IsConstruct(x interface{}) *bool
- func ApplicationInferenceProfile_IsOwnedResource(construct constructs.IConstruct) *bool
- func ApplicationInferenceProfile_IsResource(construct constructs.IConstruct) *bool
- func ConfluenceDataSource_IsConstruct(x interface{}) *bool
- func ConfluenceDataSource_IsOwnedResource(construct constructs.IConstruct) *bool
- func ConfluenceDataSource_IsResource(construct constructs.IConstruct) *bool
- func DataSourceBase_IsConstruct(x interface{}) *bool
- func DataSourceBase_IsOwnedResource(construct constructs.IConstruct) *bool
- func DataSourceBase_IsResource(construct constructs.IConstruct) *bool
- func DataSourceNew_IsConstruct(x interface{}) *bool
- func DataSourceNew_IsOwnedResource(construct constructs.IConstruct) *bool
- func DataSourceNew_IsResource(construct constructs.IConstruct) *bool
- func DataSource_IsConstruct(x interface{}) *bool
- func DataSource_IsOwnedResource(construct constructs.IConstruct) *bool
- func DataSource_IsResource(construct constructs.IConstruct) *bool
- func GuardrailBase_IsConstruct(x interface{}) *bool
- func GuardrailBase_IsOwnedResource(construct constructs.IConstruct) *bool
- func GuardrailBase_IsResource(construct constructs.IConstruct) *bool
- func GuardrailBase_MetricAll(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric
- func GuardrailBase_MetricAllInvocationLatency(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
- func GuardrailBase_MetricAllInvocations(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
- func GuardrailBase_MetricAllInvocationsIntervened(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
- func GuardrailBase_MetricAllTextUnitCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
- func Guardrail_IsConstruct(x interface{}) *bool
- func Guardrail_IsOwnedResource(construct constructs.IConstruct) *bool
- func Guardrail_IsResource(construct constructs.IConstruct) *bool
- func Guardrail_MetricAll(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric
- func Guardrail_MetricAllInvocationLatency(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
- func Guardrail_MetricAllInvocations(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
- func Guardrail_MetricAllInvocationsIntervened(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
- func Guardrail_MetricAllTextUnitCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
- func InferenceProfileBase_IsConstruct(x interface{}) *bool
- func InferenceProfileBase_IsOwnedResource(construct constructs.IConstruct) *bool
- func InferenceProfileBase_IsResource(construct constructs.IConstruct) *bool
- func KendraKnowledgeBaseBase_IsConstruct(x interface{}) *bool
- func KendraKnowledgeBaseBase_IsOwnedResource(construct constructs.IConstruct) *bool
- func KendraKnowledgeBaseBase_IsResource(construct constructs.IConstruct) *bool
- func KendraKnowledgeBase_IsConstruct(x interface{}) *bool
- func KendraKnowledgeBase_IsOwnedResource(construct constructs.IConstruct) *bool
- func KendraKnowledgeBase_IsResource(construct constructs.IConstruct) *bool
- func KnowledgeBaseBase_IsConstruct(x interface{}) *bool
- func KnowledgeBaseBase_IsOwnedResource(construct constructs.IConstruct) *bool
- func KnowledgeBaseBase_IsResource(construct constructs.IConstruct) *bool
- func Memory_SESSION_SUMMARY() *awsbedrock.CfnAgent_MemoryConfigurationProperty
- func Memory_SessionSummary(props *SessionSummaryMemoryProps) *awsbedrock.CfnAgent_MemoryConfigurationProperty
- func NewAgentActionGroup_Override(a AgentActionGroup, props *AgentActionGroupProps)
- func NewAgentAliasBase_Override(a AgentAliasBase, scope constructs.Construct, id *string, ...)
- func NewAgentAlias_Override(a AgentAlias, scope constructs.Construct, id *string, props *AgentAliasProps)
- func NewAgentBase_Override(a AgentBase, scope constructs.Construct, id *string, ...)
- func NewAgent_Override(a Agent, scope constructs.Construct, id *string, props *AgentProps)
- func NewApiSchema_Override(a ApiSchema, s3File *awss3.Location, inlineSchema *string)
- func NewApplicationInferenceProfile_Override(a ApplicationInferenceProfile, scope constructs.Construct, id *string, ...)
- func NewBedrockFoundationModel_Override(b BedrockFoundationModel, value *string, props *BedrockFoundationModelProps)
- func NewChatMessage_Override(c ChatMessage, role ChatMessageRole, text *string)
- func NewConfluenceDataSource_Override(c ConfluenceDataSource, scope constructs.Construct, id *string, ...)
- func NewCustomTransformation_Override(c CustomTransformation)
- func NewDataSourceBase_Override(d DataSourceBase, scope constructs.Construct, id *string, ...)
- func NewDataSourceNew_Override(d DataSourceNew, scope constructs.Construct, id *string, ...)
- func NewGuardrailBase_Override(g GuardrailBase, scope constructs.Construct, id *string, ...)
- func NewGuardrail_Override(g Guardrail, scope constructs.Construct, id *string, props *GuardrailProps)
- func NewInferenceProfileBase_Override(i InferenceProfileBase, scope constructs.Construct, id *string, ...)
- func NewInlineApiSchema_Override(i InlineApiSchema, schema *string)
- func NewKendraKnowledgeBaseBase_Override(k KendraKnowledgeBaseBase, scope constructs.Construct, id *string)
- func NewKendraKnowledgeBase_Override(k KendraKnowledgeBase, scope constructs.Construct, id *string, ...)
- func NewKnowledgeBaseBase_Override(k KnowledgeBaseBase, scope constructs.Construct, id *string)
- func NewMemory_Override(m Memory)
- func NewParentActionGroupSignature_Override(p ParentActionGroupSignature, value *string)
- func NewParsingStategy_Override(p ParsingStategy)
- func NewPromptBase_Override(p PromptBase, scope constructs.Construct, id *string, ...)
- func NewPromptRouter_Override(p PromptRouter, props *PromptRouterProps, region *string)
- func NewPromptVariant_Override(p PromptVariant)
- func NewPromptVersion_Override(p PromptVersion, scope constructs.Construct, id *string, ...)
- func NewPrompt_Override(p Prompt, scope constructs.Construct, id *string, props *PromptProps)
- func NewS3ApiSchema_Override(s S3ApiSchema, location *awss3.Location)
- func NewS3DataSource_Override(s S3DataSource, scope constructs.Construct, id *string, ...)
- func NewSalesforceDataSource_Override(s SalesforceDataSource, scope constructs.Construct, id *string, ...)
- func NewSharePointDataSource_Override(s SharePointDataSource, scope constructs.Construct, id *string, ...)
- func NewToolChoice_Override(t ToolChoice, any interface{}, auto interface{}, tool *string)
- func NewTopic_Override(t Topic, props *CustomTopicProps)
- func NewVectorKnowledgeBase_Override(v VectorKnowledgeBase, scope constructs.Construct, id *string, ...)
- func NewWebCrawlerDataSource_Override(w WebCrawlerDataSource, scope constructs.Construct, id *string, ...)
- func PromptBase_IsConstruct(x interface{}) *bool
- func PromptBase_IsOwnedResource(construct constructs.IConstruct) *bool
- func PromptBase_IsResource(construct constructs.IConstruct) *bool
- func PromptVersion_IsConstruct(x interface{}) *bool
- func Prompt_IsConstruct(x interface{}) *bool
- func S3DataSource_IsConstruct(x interface{}) *bool
- func S3DataSource_IsOwnedResource(construct constructs.IConstruct) *bool
- func S3DataSource_IsResource(construct constructs.IConstruct) *bool
- func SalesforceDataSource_IsConstruct(x interface{}) *bool
- func SalesforceDataSource_IsOwnedResource(construct constructs.IConstruct) *bool
- func SalesforceDataSource_IsResource(construct constructs.IConstruct) *bool
- func SharePointDataSource_IsConstruct(x interface{}) *bool
- func SharePointDataSource_IsOwnedResource(construct constructs.IConstruct) *bool
- func SharePointDataSource_IsResource(construct constructs.IConstruct) *bool
- func VectorKnowledgeBase_IsConstruct(x interface{}) *bool
- func VectorKnowledgeBase_IsOwnedResource(construct constructs.IConstruct) *bool
- func VectorKnowledgeBase_IsResource(construct constructs.IConstruct) *bool
- func WebCrawlerDataSource_IsConstruct(x interface{}) *bool
- func WebCrawlerDataSource_IsOwnedResource(construct constructs.IConstruct) *bool
- func WebCrawlerDataSource_IsResource(construct constructs.IConstruct) *bool
- type ActionGroupExecutor
- type Agent
- type AgentActionGroup
- type AgentActionGroupProps
- type AgentAlias
- type AgentAliasAttributes
- type AgentAliasBase
- type AgentAliasProps
- type AgentAttributes
- type AgentBase
- type AgentPromptVariantProps
- type AgentProps
- type AgentStepType
- type ApiSchema
- type ApplicationInferenceProfile
- type ApplicationInferenceProfileAttributes
- type ApplicationInferenceProfileProps
- type BedrockFoundationModel
- func BedrockFoundationModel_AI21_JAMBA_1_5_LARGE_V1() BedrockFoundationModel
- func BedrockFoundationModel_AI21_JAMBA_1_5_MINI_V1() BedrockFoundationModel
- func BedrockFoundationModel_AI21_JAMBA_INSTRUCT_V1() BedrockFoundationModel
- func BedrockFoundationModel_AMAZON_NOVA_LITE_V1() BedrockFoundationModel
- func BedrockFoundationModel_AMAZON_NOVA_MICRO_V1() BedrockFoundationModel
- func BedrockFoundationModel_AMAZON_NOVA_PRO_V1() BedrockFoundationModel
- func BedrockFoundationModel_AMAZON_TITAN_PREMIER_V1_0() BedrockFoundationModel
- func BedrockFoundationModel_AMAZON_TITAN_TEXT_EXPRESS_V1() BedrockFoundationModel
- func BedrockFoundationModel_ANTHROPIC_CLAUDE_3_5_HAIKU_V1_0() BedrockFoundationModel
- func BedrockFoundationModel_ANTHROPIC_CLAUDE_3_5_SONNET_V1_0() BedrockFoundationModel
- func BedrockFoundationModel_ANTHROPIC_CLAUDE_3_5_SONNET_V2_0() BedrockFoundationModel
- func BedrockFoundationModel_ANTHROPIC_CLAUDE_3_7_SONNET_V1_0() BedrockFoundationModel
- func BedrockFoundationModel_ANTHROPIC_CLAUDE_HAIKU_V1_0() BedrockFoundationModel
- func BedrockFoundationModel_ANTHROPIC_CLAUDE_INSTANT_V1_2() BedrockFoundationModel
- func BedrockFoundationModel_ANTHROPIC_CLAUDE_OPUS_V1_0() BedrockFoundationModel
- func BedrockFoundationModel_ANTHROPIC_CLAUDE_SONNET_V1_0() BedrockFoundationModel
- func BedrockFoundationModel_ANTHROPIC_CLAUDE_V2() BedrockFoundationModel
- func BedrockFoundationModel_ANTHROPIC_CLAUDE_V2_1() BedrockFoundationModel
- func BedrockFoundationModel_COHERE_EMBED_ENGLISH_V3() BedrockFoundationModel
- func BedrockFoundationModel_COHERE_EMBED_MULTILINGUAL_V3() BedrockFoundationModel
- func BedrockFoundationModel_FromCdkFoundationModel(modelId awsbedrock.FoundationModel, props *BedrockFoundationModelProps) BedrockFoundationModel
- func BedrockFoundationModel_FromCdkFoundationModelId(modelId awsbedrock.FoundationModelIdentifier, ...) BedrockFoundationModel
- func BedrockFoundationModel_META_LLAMA_3_1_70B_INSTRUCT_V1() BedrockFoundationModel
- func BedrockFoundationModel_META_LLAMA_3_1_8B_INSTRUCT_V1() BedrockFoundationModel
- func BedrockFoundationModel_META_LLAMA_3_2_11B_INSTRUCT_V1() BedrockFoundationModel
- func BedrockFoundationModel_META_LLAMA_3_2_1B_INSTRUCT_V1() BedrockFoundationModel
- func BedrockFoundationModel_META_LLAMA_3_2_3B_INSTRUCT_V1() BedrockFoundationModel
- func BedrockFoundationModel_META_LLAMA_3_3_70B_INSTRUCT_V1() BedrockFoundationModel
- func BedrockFoundationModel_TITAN_EMBED_TEXT_V1() BedrockFoundationModel
- func BedrockFoundationModel_TITAN_EMBED_TEXT_V2_1024() BedrockFoundationModel
- func BedrockFoundationModel_TITAN_EMBED_TEXT_V2_256() BedrockFoundationModel
- func BedrockFoundationModel_TITAN_EMBED_TEXT_V2_512() BedrockFoundationModel
- func NewBedrockFoundationModel(value *string, props *BedrockFoundationModelProps) BedrockFoundationModel
- type BedrockFoundationModelProps
- type ChatMessage
- type ChatMessageRole
- type ChatPromptVariantProps
- type ChunkingStrategy
- func ChunkingStrategy_DEFAULT() ChunkingStrategy
- func ChunkingStrategy_FIXED_SIZE() ChunkingStrategy
- func ChunkingStrategy_FixedSize(props *awsbedrock.CfnDataSource_FixedSizeChunkingConfigurationProperty) ChunkingStrategy
- func ChunkingStrategy_HIERARCHICAL_COHERE() ChunkingStrategy
- func ChunkingStrategy_HIERARCHICAL_TITAN() ChunkingStrategy
- func ChunkingStrategy_Hierarchical(props *HierarchicalChunkingProps) ChunkingStrategy
- func ChunkingStrategy_NONE() ChunkingStrategy
- func ChunkingStrategy_SEMANTIC() ChunkingStrategy
- func ChunkingStrategy_Semantic(props *awsbedrock.CfnDataSource_SemanticChunkingConfigurationProperty) ChunkingStrategy
- type CommonKnowledgeBaseAttributes
- type CommonKnowledgeBaseProps
- type CommonPromptVariantProps
- type ConfluenceCrawlingFilters
- type ConfluenceDataSource
- type ConfluenceDataSourceAssociationProps
- type ConfluenceDataSourceAuthType
- type ConfluenceDataSourceProps
- type ConfluenceObjectType
- type ContentFilter
- type ContentFilterStrength
- type ContentFilterType
- type ContextualGroundingFilter
- type ContextualGroundingFilterType
- type CrawlingFilters
- type CrawlingScope
- type CrossRegionInferenceProfile
- type CrossRegionInferenceProfileProps
- type CrossRegionInferenceProfileRegion
- type CustomParserProps
- type CustomTopicProps
- type CustomTransformation
- type DataDeletionPolicy
- type DataSource
- type DataSourceAssociationProps
- type DataSourceBase
- type DataSourceNew
- type DataSourceType
- type DefaultPromptRouterIdentifier
- type FoundationModelParsingStategyProps
- type Guardrail
- type GuardrailAction
- type GuardrailAttributes
- type GuardrailBase
- type GuardrailProps
- type HierarchicalChunkingProps
- type IAgent
- type IAgentAlias
- type IDataSource
- type IGuardrail
- type IInferenceProfile
- type IInvokable
- type IKendraKnowledgeBase
- type IKnowledgeBase
- type IPrompt
- type IPromptRouter
- type IVectorKnowledgeBase
- type InferenceConfiguration
- type InferenceProfileBase
- type InferenceProfileType
- type InlineApiSchema
- func ApiSchema_FromInline(schema *string) InlineApiSchema
- func ApiSchema_FromLocalAsset(path *string) InlineApiSchema
- func InlineApiSchema_FromInline(schema *string) InlineApiSchema
- func InlineApiSchema_FromLocalAsset(path *string) InlineApiSchema
- func NewInlineApiSchema(schema *string) InlineApiSchema
- func S3ApiSchema_FromInline(schema *string) InlineApiSchema
- func S3ApiSchema_FromLocalAsset(path *string) InlineApiSchema
- type KendraKnowledgeBase
- type KendraKnowledgeBaseAttributes
- type KendraKnowledgeBaseBase
- type KendraKnowledgeBaseProps
- type KnowledgeBaseBase
- type KnowledgeBaseType
- type LambdaCustomTransformationProps
- type ManagedWordFilterType
- type Memory
- type PIIFilter
- type ParentActionGroupSignature
- type ParsingModality
- type ParsingStategy
- type ParsingStategyType
- type Prompt
- type PromptAttributes
- type PromptBase
- type PromptOverrideConfiguration
- type PromptProps
- type PromptRouter
- type PromptRouterProps
- type PromptStepConfiguration
- type PromptStepConfigurationCustomParser
- type PromptTemplateType
- type PromptVariant
- type PromptVersion
- type PromptVersionProps
- type RegexFilter
- type S3ApiSchema
- func ApiSchema_FromS3File(bucket awss3.IBucket, objectKey *string) S3ApiSchema
- func InlineApiSchema_FromS3File(bucket awss3.IBucket, objectKey *string) S3ApiSchema
- func NewS3ApiSchema(location *awss3.Location) S3ApiSchema
- func S3ApiSchema_FromS3File(bucket awss3.IBucket, objectKey *string) S3ApiSchema
- type S3DataSource
- type S3DataSourceAssociationProps
- type S3DataSourceProps
- type SalesforceCrawlingFilters
- type SalesforceDataSource
- type SalesforceDataSourceAssociationProps
- type SalesforceDataSourceAuthType
- type SalesforceDataSourceProps
- type SalesforceObjectType
- type SessionSummaryMemoryProps
- type SharePointCrawlingFilters
- type SharePointDataSource
- type SharePointDataSourceAssociationProps
- type SharePointDataSourceAuthType
- type SharePointDataSourceProps
- type SharePointObjectType
- type TextPromptVariantProps
- type ToolChoice
- type ToolConfiguration
- type Topic
- type TransformationStep
- type VectorKnowledgeBase
- type VectorKnowledgeBaseAttributes
- type VectorKnowledgeBaseProps
- type VectorType
- type WebCrawlerDataSource
- type WebCrawlerDataSourceAssociationProps
- type WebCrawlerDataSourceProps
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AgentAliasBase_IsConstruct ¶ added in v0.1.290
func AgentAliasBase_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func AgentAliasBase_IsOwnedResource ¶ added in v0.1.290
func AgentAliasBase_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise. Experimental.
func AgentAliasBase_IsResource ¶ added in v0.1.290
func AgentAliasBase_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource. Experimental.
func AgentAlias_IsConstruct ¶
func AgentAlias_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func AgentAlias_IsOwnedResource ¶ added in v0.1.290
func AgentAlias_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise. Experimental.
func AgentAlias_IsResource ¶ added in v0.1.290
func AgentAlias_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource. Experimental.
func AgentBase_IsConstruct ¶ added in v0.1.290
func AgentBase_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func AgentBase_IsOwnedResource ¶ added in v0.1.290
func AgentBase_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise. Experimental.
func AgentBase_IsResource ¶ added in v0.1.290
func AgentBase_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource. Experimental.
func Agent_IsConstruct ¶
func Agent_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func Agent_IsOwnedResource ¶ added in v0.1.290
func Agent_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise. Experimental.
func Agent_IsResource ¶ added in v0.1.290
func Agent_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource. Experimental.
func ApplicationInferenceProfile_IsConstruct ¶ added in v0.1.283
func ApplicationInferenceProfile_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func ApplicationInferenceProfile_IsOwnedResource ¶ added in v0.1.283
func ApplicationInferenceProfile_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise. Experimental.
func ApplicationInferenceProfile_IsResource ¶ added in v0.1.283
func ApplicationInferenceProfile_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource. Experimental.
func ConfluenceDataSource_IsConstruct ¶ added in v0.1.270
func ConfluenceDataSource_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func ConfluenceDataSource_IsOwnedResource ¶ added in v0.1.270
func ConfluenceDataSource_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise. Experimental.
func ConfluenceDataSource_IsResource ¶ added in v0.1.270
func ConfluenceDataSource_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource. Experimental.
func DataSourceBase_IsConstruct ¶ added in v0.1.270
func DataSourceBase_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func DataSourceBase_IsOwnedResource ¶ added in v0.1.270
func DataSourceBase_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise. Experimental.
func DataSourceBase_IsResource ¶ added in v0.1.270
func DataSourceBase_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource. Experimental.
func DataSourceNew_IsConstruct ¶ added in v0.1.270
func DataSourceNew_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func DataSourceNew_IsOwnedResource ¶ added in v0.1.270
func DataSourceNew_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise. Experimental.
func DataSourceNew_IsResource ¶ added in v0.1.270
func DataSourceNew_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource. Experimental.
func DataSource_IsConstruct ¶ added in v0.1.270
func DataSource_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func DataSource_IsOwnedResource ¶ added in v0.1.270
func DataSource_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise. Experimental.
func DataSource_IsResource ¶ added in v0.1.270
func DataSource_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource. Experimental.
func GuardrailBase_IsConstruct ¶ added in v0.1.276
func GuardrailBase_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func GuardrailBase_IsOwnedResource ¶ added in v0.1.276
func GuardrailBase_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise. Experimental.
func GuardrailBase_IsResource ¶ added in v0.1.276
func GuardrailBase_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource. Experimental.
func GuardrailBase_MetricAll ¶ added in v0.1.293
func GuardrailBase_MetricAll(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric
Return the given named metric for all guardrails.
By default, the metric will be calculated as a sum over a period of 5 minutes. You can customize this by using the `statistic` and `period` properties. Experimental.
func GuardrailBase_MetricAllInvocationLatency ¶ added in v0.1.293
func GuardrailBase_MetricAllInvocationLatency(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
Return the invocation latency metric for all guardrails. Experimental.
func GuardrailBase_MetricAllInvocations ¶ added in v0.1.293
func GuardrailBase_MetricAllInvocations(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
Return the invocations metric for all guardrails. Experimental.
func GuardrailBase_MetricAllInvocationsIntervened ¶ added in v0.1.293
func GuardrailBase_MetricAllInvocationsIntervened(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
Return the invocations intervened metric for all guardrails. Experimental.
func GuardrailBase_MetricAllTextUnitCount ¶ added in v0.1.293
func GuardrailBase_MetricAllTextUnitCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
Return the text unit count metric for all guardrails. Experimental.
func Guardrail_IsConstruct ¶
func Guardrail_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func Guardrail_IsOwnedResource ¶ added in v0.1.276
func Guardrail_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise. Experimental.
func Guardrail_IsResource ¶ added in v0.1.276
func Guardrail_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource. Experimental.
func Guardrail_MetricAll ¶ added in v0.1.293
func Guardrail_MetricAll(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric
Return the given named metric for all guardrails.
By default, the metric will be calculated as a sum over a period of 5 minutes. You can customize this by using the `statistic` and `period` properties. Experimental.
func Guardrail_MetricAllInvocationLatency ¶ added in v0.1.293
func Guardrail_MetricAllInvocationLatency(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
Return the invocation latency metric for all guardrails. Experimental.
func Guardrail_MetricAllInvocations ¶ added in v0.1.293
func Guardrail_MetricAllInvocations(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
Return the invocations metric for all guardrails. Experimental.
func Guardrail_MetricAllInvocationsIntervened ¶ added in v0.1.293
func Guardrail_MetricAllInvocationsIntervened(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
Return the invocations intervened metric for all guardrails. Experimental.
func Guardrail_MetricAllTextUnitCount ¶ added in v0.1.293
func Guardrail_MetricAllTextUnitCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
Return the text unit count metric for all guardrails. Experimental.
func InferenceProfileBase_IsConstruct ¶ added in v0.1.283
func InferenceProfileBase_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func InferenceProfileBase_IsOwnedResource ¶ added in v0.1.283
func InferenceProfileBase_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise. Experimental.
func InferenceProfileBase_IsResource ¶ added in v0.1.283
func InferenceProfileBase_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource. Experimental.
func KendraKnowledgeBaseBase_IsConstruct ¶ added in v0.1.292
func KendraKnowledgeBaseBase_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func KendraKnowledgeBaseBase_IsOwnedResource ¶ added in v0.1.292
func KendraKnowledgeBaseBase_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise. Experimental.
func KendraKnowledgeBaseBase_IsResource ¶ added in v0.1.292
func KendraKnowledgeBaseBase_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource. Experimental.
func KendraKnowledgeBase_IsConstruct ¶ added in v0.1.292
func KendraKnowledgeBase_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func KendraKnowledgeBase_IsOwnedResource ¶ added in v0.1.292
func KendraKnowledgeBase_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise. Experimental.
func KendraKnowledgeBase_IsResource ¶ added in v0.1.292
func KendraKnowledgeBase_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource. Experimental.
func KnowledgeBaseBase_IsConstruct ¶ added in v0.1.292
func KnowledgeBaseBase_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func KnowledgeBaseBase_IsOwnedResource ¶ added in v0.1.292
func KnowledgeBaseBase_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise. Experimental.
func KnowledgeBaseBase_IsResource ¶ added in v0.1.292
func KnowledgeBaseBase_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource. Experimental.
func Memory_SESSION_SUMMARY ¶ added in v0.1.295
func Memory_SESSION_SUMMARY() *awsbedrock.CfnAgent_MemoryConfigurationProperty
func Memory_SessionSummary ¶ added in v0.1.295
func Memory_SessionSummary(props *SessionSummaryMemoryProps) *awsbedrock.CfnAgent_MemoryConfigurationProperty
Creates a session summary memory with custom configuration.
Returns: Memory configuration object. Experimental.
func NewAgentActionGroup_Override ¶
func NewAgentActionGroup_Override(a AgentActionGroup, props *AgentActionGroupProps)
Experimental.
func NewAgentAliasBase_Override ¶ added in v0.1.290
func NewAgentAliasBase_Override(a AgentAliasBase, scope constructs.Construct, id *string, props *awscdk.ResourceProps)
Experimental.
func NewAgentAlias_Override ¶
func NewAgentAlias_Override(a AgentAlias, scope constructs.Construct, id *string, props *AgentAliasProps)
Experimental.
func NewAgentBase_Override ¶ added in v0.1.290
func NewAgentBase_Override(a AgentBase, scope constructs.Construct, id *string, props *awscdk.ResourceProps)
Experimental.
func NewAgent_Override ¶
func NewAgent_Override(a Agent, scope constructs.Construct, id *string, props *AgentProps)
Experimental.
func NewApiSchema_Override ¶
Constructor accessible only to extending classes. Experimental.
func NewApplicationInferenceProfile_Override ¶ added in v0.1.283
func NewApplicationInferenceProfile_Override(a ApplicationInferenceProfile, scope constructs.Construct, id *string, props *ApplicationInferenceProfileProps)
Experimental.
func NewBedrockFoundationModel_Override ¶
func NewBedrockFoundationModel_Override(b BedrockFoundationModel, value *string, props *BedrockFoundationModelProps)
Experimental.
func NewChatMessage_Override ¶ added in v0.1.289
func NewChatMessage_Override(c ChatMessage, role ChatMessageRole, text *string)
Experimental.
func NewConfluenceDataSource_Override ¶ added in v0.1.270
func NewConfluenceDataSource_Override(c ConfluenceDataSource, scope constructs.Construct, id *string, props *ConfluenceDataSourceProps)
Experimental.
func NewCustomTransformation_Override ¶ added in v0.1.270
func NewCustomTransformation_Override(c CustomTransformation)
Experimental.
func NewDataSourceBase_Override ¶ added in v0.1.270
func NewDataSourceBase_Override(d DataSourceBase, scope constructs.Construct, id *string, props *awscdk.ResourceProps)
Experimental.
func NewDataSourceNew_Override ¶ added in v0.1.270
func NewDataSourceNew_Override(d DataSourceNew, scope constructs.Construct, id *string, props *awscdk.ResourceProps)
Experimental.
func NewGuardrailBase_Override ¶ added in v0.1.276
func NewGuardrailBase_Override(g GuardrailBase, scope constructs.Construct, id *string, props *awscdk.ResourceProps)
Experimental.
func NewGuardrail_Override ¶
func NewGuardrail_Override(g Guardrail, scope constructs.Construct, id *string, props *GuardrailProps)
Experimental.
func NewInferenceProfileBase_Override ¶ added in v0.1.283
func NewInferenceProfileBase_Override(i InferenceProfileBase, scope constructs.Construct, id *string, props *awscdk.ResourceProps)
Experimental.
func NewInlineApiSchema_Override ¶
func NewInlineApiSchema_Override(i InlineApiSchema, schema *string)
Experimental.
func NewKendraKnowledgeBaseBase_Override ¶ added in v0.1.292
func NewKendraKnowledgeBaseBase_Override(k KendraKnowledgeBaseBase, scope constructs.Construct, id *string)
Experimental.
func NewKendraKnowledgeBase_Override ¶ added in v0.1.292
func NewKendraKnowledgeBase_Override(k KendraKnowledgeBase, scope constructs.Construct, id *string, props *KendraKnowledgeBaseProps)
Experimental.
func NewKnowledgeBaseBase_Override ¶ added in v0.1.292
func NewKnowledgeBaseBase_Override(k KnowledgeBaseBase, scope constructs.Construct, id *string)
Experimental.
func NewParentActionGroupSignature_Override ¶ added in v0.1.290
func NewParentActionGroupSignature_Override(p ParentActionGroupSignature, value *string)
Constructor should be used as a temporary solution when a new signature is supported but its implementation in CDK hasn't been added yet. Experimental.
func NewParsingStategy_Override ¶ added in v0.1.270
func NewParsingStategy_Override(p ParsingStategy)
Experimental.
func NewPromptBase_Override ¶ added in v0.1.279
func NewPromptBase_Override(p PromptBase, scope constructs.Construct, id *string, props *awscdk.ResourceProps)
Experimental.
func NewPromptRouter_Override ¶ added in v0.1.289
func NewPromptRouter_Override(p PromptRouter, props *PromptRouterProps, region *string)
Experimental.
func NewPromptVariant_Override ¶ added in v0.1.262
func NewPromptVariant_Override(p PromptVariant)
Experimental.
func NewPromptVersion_Override ¶ added in v0.1.262
func NewPromptVersion_Override(p PromptVersion, scope constructs.Construct, id *string, props *PromptVersionProps)
Experimental.
func NewPrompt_Override ¶ added in v0.1.262
func NewPrompt_Override(p Prompt, scope constructs.Construct, id *string, props *PromptProps)
Experimental.
func NewS3ApiSchema_Override ¶
func NewS3ApiSchema_Override(s S3ApiSchema, location *awss3.Location)
Experimental.
func NewS3DataSource_Override ¶
func NewS3DataSource_Override(s S3DataSource, scope constructs.Construct, id *string, props *S3DataSourceProps)
Experimental.
func NewSalesforceDataSource_Override ¶ added in v0.1.270
func NewSalesforceDataSource_Override(s SalesforceDataSource, scope constructs.Construct, id *string, props *SalesforceDataSourceProps)
Experimental.
func NewSharePointDataSource_Override ¶ added in v0.1.270
func NewSharePointDataSource_Override(s SharePointDataSource, scope constructs.Construct, id *string, props *SharePointDataSourceProps)
Experimental.
func NewToolChoice_Override ¶ added in v0.1.289
func NewToolChoice_Override(t ToolChoice, any interface{}, auto interface{}, tool *string)
Experimental.
func NewVectorKnowledgeBase_Override ¶ added in v0.1.292
func NewVectorKnowledgeBase_Override(v VectorKnowledgeBase, scope constructs.Construct, id *string, props *VectorKnowledgeBaseProps)
Experimental.
func NewWebCrawlerDataSource_Override ¶ added in v0.1.270
func NewWebCrawlerDataSource_Override(w WebCrawlerDataSource, scope constructs.Construct, id *string, props *WebCrawlerDataSourceProps)
Experimental.
func PromptBase_IsConstruct ¶ added in v0.1.279
func PromptBase_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func PromptBase_IsOwnedResource ¶ added in v0.1.279
func PromptBase_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise. Experimental.
func PromptBase_IsResource ¶ added in v0.1.279
func PromptBase_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource. Experimental.
func PromptVersion_IsConstruct ¶ added in v0.1.262
func PromptVersion_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func Prompt_IsConstruct ¶ added in v0.1.262
func Prompt_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func S3DataSource_IsConstruct ¶
func S3DataSource_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func S3DataSource_IsOwnedResource ¶ added in v0.1.270
func S3DataSource_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise. Experimental.
func S3DataSource_IsResource ¶ added in v0.1.270
func S3DataSource_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource. Experimental.
func SalesforceDataSource_IsConstruct ¶ added in v0.1.270
func SalesforceDataSource_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func SalesforceDataSource_IsOwnedResource ¶ added in v0.1.270
func SalesforceDataSource_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise. Experimental.
func SalesforceDataSource_IsResource ¶ added in v0.1.270
func SalesforceDataSource_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource. Experimental.
func SharePointDataSource_IsConstruct ¶ added in v0.1.270
func SharePointDataSource_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func SharePointDataSource_IsOwnedResource ¶ added in v0.1.270
func SharePointDataSource_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise. Experimental.
func SharePointDataSource_IsResource ¶ added in v0.1.270
func SharePointDataSource_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource. Experimental.
func VectorKnowledgeBase_IsConstruct ¶ added in v0.1.292
func VectorKnowledgeBase_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func VectorKnowledgeBase_IsOwnedResource ¶ added in v0.1.292
func VectorKnowledgeBase_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise. Experimental.
func VectorKnowledgeBase_IsResource ¶ added in v0.1.292
func VectorKnowledgeBase_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource. Experimental.
func WebCrawlerDataSource_IsConstruct ¶ added in v0.1.270
func WebCrawlerDataSource_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func WebCrawlerDataSource_IsOwnedResource ¶ added in v0.1.270
func WebCrawlerDataSource_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise. Experimental.
func WebCrawlerDataSource_IsResource ¶ added in v0.1.270
func WebCrawlerDataSource_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource. Experimental.
Types ¶
type ActionGroupExecutor ¶
type ActionGroupExecutor interface { // Experimental. CustomControl() *string // Experimental. LambdaFunction() awslambda.IFunction }
Defines how fulfillment of the action group is handled after the necessary information has been elicited from the user.
Valid executors are: - Lambda function - Return Control. See: https://docs.aws.amazon.com/bedrock/latest/userguide/action-handle.html
Experimental.
func ActionGroupExecutor_FromlambdaFunction ¶ added in v0.1.290
func ActionGroupExecutor_FromlambdaFunction(lambdaFunction awslambda.IFunction) ActionGroupExecutor
Defines an action group with a Lambda function containing the business logic. See: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-lambda.html
Experimental.
func ActionGroupExecutor_RETURN_CONTROL ¶ added in v0.1.290
func ActionGroupExecutor_RETURN_CONTROL() ActionGroupExecutor
type Agent ¶
type Agent interface { AgentBase // The action groups associated with the agent. // Experimental. ActionGroups() *[]AgentActionGroup // Experimental. SetActionGroups(val *[]AgentActionGroup) // The ARN of the agent. // Experimental. AgentArn() *string // The unique identifier for the agent. // Experimental. AgentId() *string // The version of the agent. // Experimental. AgentVersion() *string // Experimental. SetAgentVersion(val *string) // Whether the agent can generate, run, and troubleshoot code when trying to complete a task. // Experimental. CodeInterpreterEnabled() *bool // The description for the agent. // Experimental. Description() *string // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. // Experimental. Env() *awscdk.ResourceEnvironment // Whether the resource will be deleted even if it's in use. // Experimental. ForceDelete() *bool // The foundation model used for orchestration by the agent. // Experimental. FoundationModel() IInvokable // The guardrail associated with the agent. // Experimental. Guardrail() IGuardrail // Experimental. SetGuardrail(val IGuardrail) // How long sessions should be kept open for the agent. // Experimental. IdleSessionTTL() awscdk.Duration // The instruction used by the agent. // // This determines how the agent will perform his task. // Experimental. Instruction() *string // Optional KMS encryption key associated with this agent. // Experimental. KmsKey() awskms.IKey // The KnowledgeBases associated with the agent. // Experimental. KnowledgeBases() *[]IKnowledgeBase // Experimental. SetKnowledgeBases(val *[]IKnowledgeBase) // When this agent was last updated. // Experimental. LastUpdated() *string // The memory configuration for the agent. // Experimental. Memory() Memory // The name of the agent. // Experimental. Name() *string // The tree node. // Experimental. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. // Experimental. PhysicalName() *string // Overrides some prompt templates in different parts of an agent sequence configuration. // Default: - No overrides are provided. // // Experimental. PromptOverrideConfiguration() PromptOverrideConfiguration // The IAM role associated to the agent. // Experimental. Role() awsiam.IRole // Whether the agent will automatically update the DRAFT version of the agent after making changes to the agent. // Experimental. ShouldPrepareAgent() *bool // The stack in which this resource is defined. // Experimental. Stack() awscdk.Stack // The default test alias for this agent. // // This corresponds to the test alias // (`TSTALIASID`) that points to the working (`DRAFT`) version. // Experimental. TestAlias() IAgentAlias // Whether the agent can prompt additional information from the user when it does not have enough information to respond to an utterance. // Experimental. UserInputEnabled() *bool // Add an action group to the agent. // Experimental. AddActionGroup(actionGroup AgentActionGroup) // Add multiple action groups to the agent. // Experimental. AddActionGroups(actionGroups ...AgentActionGroup) // Add guardrail to the agent. // Experimental. AddGuardrail(guardrail IGuardrail) // Add knowledge base to the agent. // Experimental. AddKnowledgeBase(knowledgeBase IKnowledgeBase) // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). // Experimental. ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Experimental. GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. // Experimental. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. // Experimental. GetResourceNameAttribute(nameAttr *string) *string // Returns a string representation of this construct. // Experimental. ToString() *string }
Class to create (or import) an Agent with CDK. Experimental.
func NewAgent ¶
func NewAgent(scope constructs.Construct, id *string, props *AgentProps) Agent
Experimental.
type AgentActionGroup ¶
type AgentActionGroup interface { // The api schema for this action group (if defined). // Experimental. ApiSchema() ApiSchema // A description of the action group. // Experimental. Description() *string // Whether this action group is available for the agent to invoke or not. // Experimental. Enabled() *bool // The action group executor for this action group (if defined). // Experimental. Executor() ActionGroupExecutor // Whether to delete the resource even if it's in use. // Experimental. ForceDelete() *bool // The function schema for this action group (if defined). // Experimental. FunctionSchema() *awsbedrock.CfnAgent_FunctionSchemaProperty // The name of the action group. // Experimental. Name() *string // The AWS Defined signature (if defined). // Experimental. ParentActionGroupSignature() ParentActionGroupSignature }
**************************************************************************** DEF - Action Group Class ***************************************************************************. Experimental.
func AgentActionGroup_CodeInterpreter ¶ added in v0.1.290
func AgentActionGroup_CodeInterpreter(enabled *bool) AgentActionGroup
Defines an action group that allows your agent to request the user for additional information when trying to complete a task. Experimental.
func AgentActionGroup_UserInput ¶ added in v0.1.290
func AgentActionGroup_UserInput(enabled *bool) AgentActionGroup
Defines an action group that allows your agent to request the user for additional information when trying to complete a task. Experimental.
func NewAgentActionGroup ¶
func NewAgentActionGroup(props *AgentActionGroupProps) AgentActionGroup
Experimental.
type AgentActionGroupProps ¶
type AgentActionGroupProps struct { // The name of the action group. // Experimental. Name *string `field:"required" json:"name" yaml:"name"` // The API Schema. // Default: - No API Schema. // // Experimental. ApiSchema ApiSchema `field:"optional" json:"apiSchema" yaml:"apiSchema"` // A description of the action group. // Default: - No description. // // Experimental. Description *string `field:"optional" json:"description" yaml:"description"` // Specifies whether the action group is available for the agent to invoke or not when sending an InvokeAgent request. // Default: true. // // Experimental. Enabled *bool `field:"optional" json:"enabled" yaml:"enabled"` // The action group executor. // Default: - No executor. // // Experimental. Executor ActionGroupExecutor `field:"optional" json:"executor" yaml:"executor"` // Specifies whether to delete the resource even if it's in use. // Default: false. // // Experimental. ForceDelete *bool `field:"optional" json:"forceDelete" yaml:"forceDelete"` // Defines functions that each define parameters that the agent needs to invoke from the user. // // NO L2 yet as this doesn't make much sense IMHO. // Experimental. FunctionSchema *awsbedrock.CfnAgent_FunctionSchemaProperty `field:"optional" json:"functionSchema" yaml:"functionSchema"` // The AWS Defined signature for enabling certain capabilities in your agent. // // When this property is specified, you must leave the description, apiSchema, // and actionGroupExecutor fields blank for this action group. // Experimental. ParentActionGroupSignature ParentActionGroupSignature `field:"optional" json:"parentActionGroupSignature" yaml:"parentActionGroupSignature"` }
**************************************************************************** PROPS - Action Group Class ***************************************************************************. Experimental.
type AgentAlias ¶
type AgentAlias interface { AgentAliasBase // The underlying agent for this alias. // Experimental. Agent() IAgent // The ARN of the agent alias. // Experimental. AliasArn() *string // The unique identifier of the agent alias. // Experimental. AliasId() *string // Experimental. AliasName() *string // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. // Experimental. Env() *awscdk.ResourceEnvironment // The tree node. // Experimental. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. // Experimental. PhysicalName() *string // The stack in which this resource is defined. // Experimental. Stack() awscdk.Stack // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). // Experimental. ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Experimental. GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. // Experimental. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. // Experimental. GetResourceNameAttribute(nameAttr *string) *string // Grant the given principal identity permissions to perform actions on this agent alias. // Experimental. Grant(grantee awsiam.IGrantable, actions ...*string) awsiam.Grant // Grant the given identity permissions to invoke the agent alias. // Experimental. GrantInvoke(grantee awsiam.IGrantable) awsiam.Grant // Define an EventBridge rule that triggers when something happens to this agent alias. // // Requires that there exists at least one CloudTrail Trail in your account // that captures the event. This method will not create the Trail. // Experimental. OnCloudTrailEvent(id *string, options *awsevents.OnEventOptions) awsevents.Rule // Returns a string representation of this construct. // Experimental. ToString() *string }
Class to create an Agent Alias with CDK. Experimental.
func NewAgentAlias ¶
func NewAgentAlias(scope constructs.Construct, id *string, props *AgentAliasProps) AgentAlias
Experimental.
type AgentAliasAttributes ¶ added in v0.1.290
type AgentAliasAttributes struct { // The underlying agent for this alias. // Experimental. Agent IAgent `field:"required" json:"agent" yaml:"agent"` // The agent version for this alias. // Experimental. AgentVersion *string `field:"required" json:"agentVersion" yaml:"agentVersion"` // The Id of the agent alias. // Experimental. AliasId *string `field:"required" json:"aliasId" yaml:"aliasId"` // The name of the agent alias. // Experimental. AliasName *string `field:"optional" json:"aliasName" yaml:"aliasName"` }
Attributes needed to create an import. Experimental.
type AgentAliasBase ¶ added in v0.1.290
type AgentAliasBase interface { awscdk.Resource IAgentAlias // The underlying agent for this alias. // Experimental. Agent() IAgent // The ARN of the agent alias. // Experimental. AliasArn() *string // The unique identifier of the agent alias. // Experimental. AliasId() *string // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. // Experimental. Env() *awscdk.ResourceEnvironment // The tree node. // Experimental. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. // Experimental. PhysicalName() *string // The stack in which this resource is defined. // Experimental. Stack() awscdk.Stack // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). // Experimental. ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Experimental. GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. // Experimental. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. // Experimental. GetResourceNameAttribute(nameAttr *string) *string // Grant the given principal identity permissions to perform actions on this agent alias. // Experimental. Grant(grantee awsiam.IGrantable, actions ...*string) awsiam.Grant // Grant the given identity permissions to invoke the agent alias. // Experimental. GrantInvoke(grantee awsiam.IGrantable) awsiam.Grant // Define an EventBridge rule that triggers when something happens to this agent alias. // // Requires that there exists at least one CloudTrail Trail in your account // that captures the event. This method will not create the Trail. // Experimental. OnCloudTrailEvent(id *string, options *awsevents.OnEventOptions) awsevents.Rule // Returns a string representation of this construct. // Experimental. ToString() *string }
Abstract base class for an Agent.
Contains methods and attributes valid for Agents either created with CDK or imported. Experimental.
type AgentAliasProps ¶
type AgentAliasProps struct { // The agent associated to this alias. // Experimental. Agent IAgent `field:"required" json:"agent" yaml:"agent"` // The version of the agent to associate with the agent alias. // Default: - Creates a new version of the agent. // // Experimental. AgentVersion *string `field:"optional" json:"agentVersion" yaml:"agentVersion"` // The name for the agent alias. // Default: - "latest-{hash}". // // Experimental. AliasName *string `field:"optional" json:"aliasName" yaml:"aliasName"` // Description for the agent alias. // Experimental. Description *string `field:"optional" json:"description" yaml:"description"` }
Properties for creating a CDK-Managed Agent Alias. Experimental.
type AgentAttributes ¶ added in v0.1.290
type AgentAttributes struct { // The ARN of the agent. // // Example: // "arn:aws:bedrock:us-east-1:123456789012:agent/OKDSJOGKMO"@attributeundefined // // Experimental. AgentArn *string `field:"required" json:"agentArn" yaml:"agentArn"` // The ARN of the IAM role associated to the agent. // // Example: // "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"@attributeundefined // // Experimental. RoleArn *string `field:"required" json:"roleArn" yaml:"roleArn"` // The agent version. // // If no explicit versions have been created, // leave this empty to use the DRAFT version. Otherwise, use the // version number (e.g. 1). // Experimental. AgentVersion *string `field:"optional" json:"agentVersion" yaml:"agentVersion"` // Optional KMS encryption key associated with this agent. // Experimental. KmsKeyArn *string `field:"optional" json:"kmsKeyArn" yaml:"kmsKeyArn"` // When this agent was last updated. // Experimental. LastUpdated *string `field:"optional" json:"lastUpdated" yaml:"lastUpdated"` }
Attributes for specifying an imported Bedrock Agent. Experimental.
type AgentBase ¶ added in v0.1.290
type AgentBase interface { awscdk.Resource IAgent // The ARN of the agent. // Experimental. AgentArn() *string // The ID of the Agent. // Experimental. AgentId() *string // Experimental. AgentVersion() *string // Experimental. SetAgentVersion(val *string) // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. // Experimental. Env() *awscdk.ResourceEnvironment // Optional KMS encryption key associated with this agent. // Experimental. KmsKey() awskms.IKey // When this agent was last updated. // Experimental. LastUpdated() *string // The tree node. // Experimental. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. // Experimental. PhysicalName() *string // The IAM role associated to the agent. // Experimental. Role() awsiam.IRole // The stack in which this resource is defined. // Experimental. Stack() awscdk.Stack // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). // Experimental. ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Experimental. GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. // Experimental. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. // Experimental. GetResourceNameAttribute(nameAttr *string) *string // Returns a string representation of this construct. // Experimental. ToString() *string }
Abstract base class for an Agent.
Contains methods and attributes valid for Agents either created with CDK or imported. Experimental.
type AgentPromptVariantProps ¶ added in v0.1.289
type AgentPromptVariantProps struct { // The model which is used to run the prompt. // // The model could be a foundation // model, a custom model, or a provisioned model. // Experimental. Model IInvokable `field:"required" json:"model" yaml:"model"` // The name of the prompt variant. // Experimental. VariantName *string `field:"required" json:"variantName" yaml:"variantName"` // The variables in the prompt template that can be filled in at runtime. // Experimental. PromptVariables *[]*string `field:"optional" json:"promptVariables" yaml:"promptVariables"` // An alias pointing to the agent version to be used. // Experimental. AgentAlias IAgentAlias `field:"required" json:"agentAlias" yaml:"agentAlias"` // The text prompt. // // Variables are used by enclosing its name with double curly braces // as in `{{variable_name}}`. // Experimental. PromptText *string `field:"required" json:"promptText" yaml:"promptText"` }
Experimental.
type AgentProps ¶
type AgentProps struct { // The foundation model used for orchestration by the agent. // Experimental. FoundationModel IInvokable `field:"required" json:"foundationModel" yaml:"foundationModel"` // The instruction used by the agent. // // This determines how the agent will perform his task. // This instruction must have a minimum of 40 characters. // Experimental. Instruction *string `field:"required" json:"instruction" yaml:"instruction"` // The Action Groups associated with the agent. // Experimental. ActionGroups *[]AgentActionGroup `field:"optional" json:"actionGroups" yaml:"actionGroups"` // Select whether the agent can generate, run, and troubleshoot code when trying to complete a task. // Default: - false. // // Experimental. CodeInterpreterEnabled *bool `field:"optional" json:"codeInterpreterEnabled" yaml:"codeInterpreterEnabled"` // A description of the agent. // Default: - No description is provided. // // Experimental. Description *string `field:"optional" json:"description" yaml:"description"` // The existing IAM Role for the agent to use. // // Ensure the role has a trust policy that allows the Bedrock service to assume the role. // Default: - A new role is created for you. // // Experimental. ExistingRole awsiam.IRole `field:"optional" json:"existingRole" yaml:"existingRole"` // Whether to delete the resource even if it's in use. // Default: - true. // // Experimental. ForceDelete *bool `field:"optional" json:"forceDelete" yaml:"forceDelete"` // The guardrail that will be associated with the agent. // Experimental. Guardrail IGuardrail `field:"optional" json:"guardrail" yaml:"guardrail"` // How long sessions should be kept open for the agent. // // If no conversation occurs // during this time, the session expires and Amazon Bedrock deletes any data // provided before the timeout. // Default: - 1 hour. // // Experimental. IdleSessionTTL awscdk.Duration `field:"optional" json:"idleSessionTTL" yaml:"idleSessionTTL"` // The KMS key of the agent if custom encryption is configured. // Default: - An AWS managed key is used. // // Experimental. KmsKey awskms.IKey `field:"optional" json:"kmsKey" yaml:"kmsKey"` // The KnowledgeBases associated with the agent. // Experimental. KnowledgeBases *[]IKnowledgeBase `field:"optional" json:"knowledgeBases" yaml:"knowledgeBases"` // The type and configuration of the memory to maintain context across multiple sessions and recall past interactions. // // This can be useful for maintaining continuity in multi-turn conversations and recalling user preferences // or past interactions. // See: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-memory.html // // Default: - No memory will be used. Agents will retain context from the current session only. // // Experimental. Memory Memory `field:"optional" json:"memory" yaml:"memory"` // The name of the agent. // Default: - A name is generated by CDK. // // Experimental. Name *string `field:"optional" json:"name" yaml:"name"` // Overrides some prompt templates in different parts of an agent sequence configuration. // Default: - No overrides are provided. // // Experimental. PromptOverrideConfiguration PromptOverrideConfiguration `field:"optional" json:"promptOverrideConfiguration" yaml:"promptOverrideConfiguration"` // Specifies whether to automatically update the `DRAFT` version of the agent after making changes to the agent. // // The `DRAFT` version can be continually iterated // upon during internal development. // Default: - false. // // Experimental. ShouldPrepareAgent *bool `field:"optional" json:"shouldPrepareAgent" yaml:"shouldPrepareAgent"` // Select whether the agent can prompt additional information from the user when it does not have enough information to respond to an utterance. // Default: - false. // // Experimental. UserInputEnabled *bool `field:"optional" json:"userInputEnabled" yaml:"userInputEnabled"` }
Properties for creating a CDK managed Bedrock Agent. Experimental.
type AgentStepType ¶ added in v0.1.290
type AgentStepType string
The step in the agent sequence that this prompt configuration applies to. Experimental.
const ( // Experimental. AgentStepType_PRE_PROCESSING AgentStepType = "PRE_PROCESSING" // Experimental. AgentStepType_ORCHESTRATION AgentStepType = "ORCHESTRATION" // Experimental. AgentStepType_POST_PROCESSING AgentStepType = "POST_PROCESSING" // Experimental. AgentStepType_ROUTING_CLASSIFIER AgentStepType = "ROUTING_CLASSIFIER" // Experimental. AgentStepType_MEMORY_SUMMARIZATION AgentStepType = "MEMORY_SUMMARIZATION" // Experimental. AgentStepType_KNOWLEDGE_BASE_RESPONSE_GENERATION AgentStepType = "KNOWLEDGE_BASE_RESPONSE_GENERATION" )
type ApiSchema ¶
type ApiSchema interface { // Experimental. InlineSchema() *string // Experimental. S3File() *awss3.Location }
Represents the concept of an API Schema for a Bedrock Agent Action Group. Experimental.
type ApplicationInferenceProfile ¶ added in v0.1.283
type ApplicationInferenceProfile interface { InferenceProfileBase IInvokable // Time Stamp for ApplicationInferenceProfile creation. // Experimental. CreatedAt() *string // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. // Experimental. Env() *awscdk.ResourceEnvironment // The ARN of the application application inference profile. // Experimental. InferenceProfileArn() *string // The unique identifier of the application inference profile. // Experimental. InferenceProfileId() *string // The underlying model/cross-region model used by the application inference profile. // Experimental. InferenceProfileModel() IInvokable // The name of the application inference profile. // Experimental. InferenceProfileName() *string // This equals to the inferenceProfileArn property, useful just to implement IInvokable interface. // Experimental. InvokableArn() *string // The tree node. // Experimental. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. // Experimental. PhysicalName() *string // The stack in which this resource is defined. // Experimental. Stack() awscdk.Stack // The status of the application inference profile. // // ACTIVE means that the inference profile is ready to be used. // Experimental. Status() *string // The type of the inference profile. // // The following types are possible: // SYSTEM_DEFINED – The inference profile is defined by Amazon Bedrock. // You can route inference requests across regions with these inference profiles. // APPLICATION – The inference profile was created by a user. // This type of inference profile can track metrics and costs when invoking the model in it. // The inference profile may route requests to one or multiple regions. // Experimental. Type() InferenceProfileType // Time Stamp for ApplicationInferenceProfile update. // Experimental. UpdatedAt() *string // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). // Experimental. ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Experimental. GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. // Experimental. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. // Experimental. GetResourceNameAttribute(nameAttr *string) *string // Gives the appropriate policies to invoke and use the application inference profile. // Experimental. GrantInvoke(grantee awsiam.IGrantable) awsiam.Grant // Grants appropriate permissions to use the application inference profile (AIP). // // Does not grant permissions to use the model/cross-region profile in the AIP. // Experimental. GrantProfileUsage(grantee awsiam.IGrantable) awsiam.Grant // Returns a string representation of this construct. // Experimental. ToString() *string }
Class to create a ApplicationInferenceProfile with CDK.
These are inference profiles created by users (user defined). This helps to track costs and model usage. See: https://docs.aws.amazon.com/bedrock/latest/userguide/inference-profiles-create.html
Experimental.
func NewApplicationInferenceProfile ¶ added in v0.1.283
func NewApplicationInferenceProfile(scope constructs.Construct, id *string, props *ApplicationInferenceProfileProps) ApplicationInferenceProfile
Experimental.
type ApplicationInferenceProfileAttributes ¶ added in v0.1.283
type ApplicationInferenceProfileAttributes struct { // The ARN of the application inference profile. // Experimental. InferenceProfileArn *string `field:"required" json:"inferenceProfileArn" yaml:"inferenceProfileArn"` // The ID or Amazon Resource Name (ARN) of the inference profile. // Experimental. InferenceProfileIdentifier *string `field:"required" json:"inferenceProfileIdentifier" yaml:"inferenceProfileIdentifier"` }
**************************************************************************** ATTRS FOR IMPORTED CONSTRUCT ***************************************************************************. Experimental.
type ApplicationInferenceProfileProps ¶ added in v0.1.283
type ApplicationInferenceProfileProps struct { // The name of the inference profile. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-applicationinferenceprofile.html#cfn-bedrock-applicationinferenceprofile-inferenceprofilename // // Experimental. InferenceProfileName *string `field:"required" json:"inferenceProfileName" yaml:"inferenceProfileName"` // To create an application inference profile for one Region, specify a foundation model. // // Usage and costs for requests made to that Region with that model will be tracked. // // To create an application inference profile for multiple Regions, // specify a cross region (system-defined) inference profile. // The inference profile will route requests to the Regions defined in // the cross region (system-defined) inference profile that you choose. // Usage and costs for requests made to the Regions in the inference profile will be tracked. // Experimental. ModelSource IInvokable `field:"required" json:"modelSource" yaml:"modelSource"` // Description of the inference profile. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-applicationinferenceprofile.html#cfn-bedrock-applicationinferenceprofile-description // // Experimental. Description *string `field:"optional" json:"description" yaml:"description"` // A list of tags associated with the inference profile. // Experimental. Tags *[]*awscdk.CfnTag `field:"optional" json:"tags" yaml:"tags"` }
Properties for creating a ApplicationInferenceProfile. Experimental.
type BedrockFoundationModel ¶
type BedrockFoundationModel interface { IInvokable // The ARN of the Bedrock invokable abstraction. // Experimental. InvokableArn() *string // Experimental. ModelArn() *string // ************************************************************************** Constructor *************************************************************************. // Experimental. ModelId() *string // Experimental. SupportedVectorType() *[]VectorType // Experimental. SupportsAgents() *bool // Experimental. SupportsCrossRegion() *bool // Experimental. SupportsKnowledgeBase() *bool // Experimental. VectorDimensions() *float64 // Returns the ARN of the foundation model in the following format: `arn:${Partition}:bedrock:${Region}::foundation-model/${ResourceId}`. // Experimental. AsArn(construct constructs.IConstruct) *string // Experimental. AsIModel(construct constructs.IConstruct) awsbedrock.IModel // Gives the appropriate policies to invoke and use the Foundation Model in the stack region. // Experimental. GrantInvoke(grantee awsiam.IGrantable) awsiam.Grant // Gives the appropriate policies to invoke and use the Foundation Model in all regions. // Experimental. GrantInvokeAllRegions(grantee awsiam.IGrantable) awsiam.Grant // Returns a string representation of an object. // Experimental. ToString() *string }
Bedrock models.
If you need to use a model name that doesn't exist as a static member, you can instantiate a `BedrockFoundationModel` object, e.g: `new BedrockFoundationModel('my-model')`. Experimental.
func BedrockFoundationModel_AI21_JAMBA_1_5_LARGE_V1 ¶ added in v0.1.296
func BedrockFoundationModel_AI21_JAMBA_1_5_LARGE_V1() BedrockFoundationModel
func BedrockFoundationModel_AI21_JAMBA_1_5_MINI_V1 ¶ added in v0.1.296
func BedrockFoundationModel_AI21_JAMBA_1_5_MINI_V1() BedrockFoundationModel
func BedrockFoundationModel_AI21_JAMBA_INSTRUCT_V1 ¶ added in v0.1.296
func BedrockFoundationModel_AI21_JAMBA_INSTRUCT_V1() BedrockFoundationModel
func BedrockFoundationModel_AMAZON_NOVA_LITE_V1 ¶ added in v0.1.287
func BedrockFoundationModel_AMAZON_NOVA_LITE_V1() BedrockFoundationModel
func BedrockFoundationModel_AMAZON_NOVA_MICRO_V1 ¶ added in v0.1.287
func BedrockFoundationModel_AMAZON_NOVA_MICRO_V1() BedrockFoundationModel
func BedrockFoundationModel_AMAZON_NOVA_PRO_V1 ¶ added in v0.1.287
func BedrockFoundationModel_AMAZON_NOVA_PRO_V1() BedrockFoundationModel
func BedrockFoundationModel_AMAZON_TITAN_PREMIER_V1_0 ¶
func BedrockFoundationModel_AMAZON_TITAN_PREMIER_V1_0() BedrockFoundationModel
func BedrockFoundationModel_AMAZON_TITAN_TEXT_EXPRESS_V1 ¶
func BedrockFoundationModel_AMAZON_TITAN_TEXT_EXPRESS_V1() BedrockFoundationModel
func BedrockFoundationModel_ANTHROPIC_CLAUDE_3_5_HAIKU_V1_0 ¶ added in v0.1.279
func BedrockFoundationModel_ANTHROPIC_CLAUDE_3_5_HAIKU_V1_0() BedrockFoundationModel
func BedrockFoundationModel_ANTHROPIC_CLAUDE_3_5_SONNET_V1_0 ¶ added in v0.1.264
func BedrockFoundationModel_ANTHROPIC_CLAUDE_3_5_SONNET_V1_0() BedrockFoundationModel
func BedrockFoundationModel_ANTHROPIC_CLAUDE_3_5_SONNET_V2_0 ¶ added in v0.1.278
func BedrockFoundationModel_ANTHROPIC_CLAUDE_3_5_SONNET_V2_0() BedrockFoundationModel
func BedrockFoundationModel_ANTHROPIC_CLAUDE_3_7_SONNET_V1_0 ¶ added in v0.1.294
func BedrockFoundationModel_ANTHROPIC_CLAUDE_3_7_SONNET_V1_0() BedrockFoundationModel
func BedrockFoundationModel_ANTHROPIC_CLAUDE_HAIKU_V1_0 ¶
func BedrockFoundationModel_ANTHROPIC_CLAUDE_HAIKU_V1_0() BedrockFoundationModel
func BedrockFoundationModel_ANTHROPIC_CLAUDE_INSTANT_V1_2 ¶
func BedrockFoundationModel_ANTHROPIC_CLAUDE_INSTANT_V1_2() BedrockFoundationModel
func BedrockFoundationModel_ANTHROPIC_CLAUDE_OPUS_V1_0 ¶ added in v0.1.264
func BedrockFoundationModel_ANTHROPIC_CLAUDE_OPUS_V1_0() BedrockFoundationModel
func BedrockFoundationModel_ANTHROPIC_CLAUDE_SONNET_V1_0 ¶
func BedrockFoundationModel_ANTHROPIC_CLAUDE_SONNET_V1_0() BedrockFoundationModel
func BedrockFoundationModel_ANTHROPIC_CLAUDE_V2 ¶
func BedrockFoundationModel_ANTHROPIC_CLAUDE_V2() BedrockFoundationModel
func BedrockFoundationModel_ANTHROPIC_CLAUDE_V2_1 ¶
func BedrockFoundationModel_ANTHROPIC_CLAUDE_V2_1() BedrockFoundationModel
func BedrockFoundationModel_COHERE_EMBED_ENGLISH_V3 ¶
func BedrockFoundationModel_COHERE_EMBED_ENGLISH_V3() BedrockFoundationModel
func BedrockFoundationModel_COHERE_EMBED_MULTILINGUAL_V3 ¶
func BedrockFoundationModel_COHERE_EMBED_MULTILINGUAL_V3() BedrockFoundationModel
func BedrockFoundationModel_FromCdkFoundationModel ¶ added in v0.1.283
func BedrockFoundationModel_FromCdkFoundationModel(modelId awsbedrock.FoundationModel, props *BedrockFoundationModelProps) BedrockFoundationModel
Experimental.
func BedrockFoundationModel_FromCdkFoundationModelId ¶ added in v0.1.283
func BedrockFoundationModel_FromCdkFoundationModelId(modelId awsbedrock.FoundationModelIdentifier, props *BedrockFoundationModelProps) BedrockFoundationModel
Experimental.
func BedrockFoundationModel_META_LLAMA_3_1_70B_INSTRUCT_V1 ¶ added in v0.1.289
func BedrockFoundationModel_META_LLAMA_3_1_70B_INSTRUCT_V1() BedrockFoundationModel
func BedrockFoundationModel_META_LLAMA_3_1_8B_INSTRUCT_V1 ¶ added in v0.1.289
func BedrockFoundationModel_META_LLAMA_3_1_8B_INSTRUCT_V1() BedrockFoundationModel
func BedrockFoundationModel_META_LLAMA_3_2_11B_INSTRUCT_V1 ¶ added in v0.1.283
func BedrockFoundationModel_META_LLAMA_3_2_11B_INSTRUCT_V1() BedrockFoundationModel
func BedrockFoundationModel_META_LLAMA_3_2_1B_INSTRUCT_V1 ¶ added in v0.1.283
func BedrockFoundationModel_META_LLAMA_3_2_1B_INSTRUCT_V1() BedrockFoundationModel
func BedrockFoundationModel_META_LLAMA_3_2_3B_INSTRUCT_V1 ¶ added in v0.1.283
func BedrockFoundationModel_META_LLAMA_3_2_3B_INSTRUCT_V1() BedrockFoundationModel
func BedrockFoundationModel_META_LLAMA_3_3_70B_INSTRUCT_V1 ¶ added in v0.1.296
func BedrockFoundationModel_META_LLAMA_3_3_70B_INSTRUCT_V1() BedrockFoundationModel
func BedrockFoundationModel_TITAN_EMBED_TEXT_V1 ¶
func BedrockFoundationModel_TITAN_EMBED_TEXT_V1() BedrockFoundationModel
func BedrockFoundationModel_TITAN_EMBED_TEXT_V2_1024 ¶
func BedrockFoundationModel_TITAN_EMBED_TEXT_V2_1024() BedrockFoundationModel
func BedrockFoundationModel_TITAN_EMBED_TEXT_V2_256 ¶ added in v0.1.263
func BedrockFoundationModel_TITAN_EMBED_TEXT_V2_256() BedrockFoundationModel
func BedrockFoundationModel_TITAN_EMBED_TEXT_V2_512 ¶ added in v0.1.263
func BedrockFoundationModel_TITAN_EMBED_TEXT_V2_512() BedrockFoundationModel
func NewBedrockFoundationModel ¶
func NewBedrockFoundationModel(value *string, props *BedrockFoundationModelProps) BedrockFoundationModel
Experimental.
type BedrockFoundationModelProps ¶
type BedrockFoundationModelProps struct { // https://docs.aws.amazon.com/bedrock/latest/userguide/model-lifecycle.html A version is marked Legacy when there is a more recent version which provides superior performance. Amazon Bedrock sets an EOL date for Legacy versions. // Default: - false. // // Experimental. Legacy *bool `field:"optional" json:"legacy" yaml:"legacy"` // Currently, some of the offered models are optimized with prompts/parsers fine-tuned for integrating with the agents architecture. // Default: - false. // // Experimental. OptimizedForAgents *bool `field:"optional" json:"optimizedForAgents" yaml:"optimizedForAgents"` // Embeddings models have different supported vector types. // Experimental. SupportedVectorType *[]VectorType `field:"optional" json:"supportedVectorType" yaml:"supportedVectorType"` // Bedrock Agents can use this model. // Default: - false. // // Experimental. SupportsAgents *bool `field:"optional" json:"supportsAgents" yaml:"supportsAgents"` // Can be used with a Cross-Region Inference Profile. // Default: - false. // // Experimental. SupportsCrossRegion *bool `field:"optional" json:"supportsCrossRegion" yaml:"supportsCrossRegion"` // Bedrock Knowledge Base can use this model. // Default: - false. // // Experimental. SupportsKnowledgeBase *bool `field:"optional" json:"supportsKnowledgeBase" yaml:"supportsKnowledgeBase"` // Embedding models have different vector dimensions. // // Only applicable for embedding models. // Experimental. VectorDimensions *float64 `field:"optional" json:"vectorDimensions" yaml:"vectorDimensions"` }
Experimental.
type ChatMessage ¶ added in v0.1.289
type ChatMessage interface { // Experimental. Role() ChatMessageRole // Experimental. Text() *string }
Experimental.
func ChatMessage_Assistant ¶ added in v0.1.289
func ChatMessage_Assistant(text *string) ChatMessage
Experimental.
func ChatMessage_User ¶ added in v0.1.289
func ChatMessage_User(text *string) ChatMessage
Experimental.
func NewChatMessage ¶ added in v0.1.289
func NewChatMessage(role ChatMessageRole, text *string) ChatMessage
Experimental.
type ChatMessageRole ¶ added in v0.1.289
type ChatMessageRole string
Experimental.
const ( // This role represents the human user in the conversation. // // Inputs from the // user guide the conversation and prompt responses from the assistant. // Experimental. ChatMessageRole_USER ChatMessageRole = "USER" // This is the role of the model itself, responding to user inputs based on the context set by the system. // Experimental. ChatMessageRole_ASSISTANT ChatMessageRole = "ASSISTANT" )
type ChatPromptVariantProps ¶ added in v0.1.289
type ChatPromptVariantProps struct { // The model which is used to run the prompt. // // The model could be a foundation // model, a custom model, or a provisioned model. // Experimental. Model IInvokable `field:"required" json:"model" yaml:"model"` // The name of the prompt variant. // Experimental. VariantName *string `field:"required" json:"variantName" yaml:"variantName"` // The variables in the prompt template that can be filled in at runtime. // Experimental. PromptVariables *[]*string `field:"optional" json:"promptVariables" yaml:"promptVariables"` // Inference configuration for the Chat Prompt. // // Must include at least one User Message. // The messages should alternate between User and Assistant. // Experimental. Messages *[]ChatMessage `field:"required" json:"messages" yaml:"messages"` // Inference configuration for the Text Prompt. // Experimental. InferenceConfiguration *awsbedrock.CfnPrompt_PromptModelInferenceConfigurationProperty `field:"optional" json:"inferenceConfiguration" yaml:"inferenceConfiguration"` // Context or instructions for the model to consider before generating a response. // Experimental. System *string `field:"optional" json:"system" yaml:"system"` // The configuration with available tools to the model and how it must use them. // Experimental. ToolConfiguration *ToolConfiguration `field:"optional" json:"toolConfiguration" yaml:"toolConfiguration"` }
Experimental.
type ChunkingStrategy ¶
type ChunkingStrategy interface { // The CloudFormation property representation of this configuration. // Experimental. Configuration() *awsbedrock.CfnDataSource_ChunkingConfigurationProperty // Experimental. SetConfiguration(val *awsbedrock.CfnDataSource_ChunkingConfigurationProperty) }
Experimental.
func ChunkingStrategy_DEFAULT ¶
func ChunkingStrategy_DEFAULT() ChunkingStrategy
func ChunkingStrategy_FIXED_SIZE ¶
func ChunkingStrategy_FIXED_SIZE() ChunkingStrategy
func ChunkingStrategy_FixedSize ¶ added in v0.1.270
func ChunkingStrategy_FixedSize(props *awsbedrock.CfnDataSource_FixedSizeChunkingConfigurationProperty) ChunkingStrategy
Method for customizing a fixed sized chunking strategy. Experimental.
func ChunkingStrategy_HIERARCHICAL_COHERE ¶ added in v0.1.270
func ChunkingStrategy_HIERARCHICAL_COHERE() ChunkingStrategy
func ChunkingStrategy_HIERARCHICAL_TITAN ¶ added in v0.1.270
func ChunkingStrategy_HIERARCHICAL_TITAN() ChunkingStrategy
func ChunkingStrategy_Hierarchical ¶ added in v0.1.270
func ChunkingStrategy_Hierarchical(props *HierarchicalChunkingProps) ChunkingStrategy
Method for customizing a hierarchical chunking strategy.
For custom chunking, the maximum token chunk size depends on the model. - Amazon Titan Text Embeddings: 8192 - Cohere Embed models: 512. Experimental.
func ChunkingStrategy_NONE ¶
func ChunkingStrategy_NONE() ChunkingStrategy
func ChunkingStrategy_SEMANTIC ¶ added in v0.1.270
func ChunkingStrategy_SEMANTIC() ChunkingStrategy
func ChunkingStrategy_Semantic ¶ added in v0.1.270
func ChunkingStrategy_Semantic(props *awsbedrock.CfnDataSource_SemanticChunkingConfigurationProperty) ChunkingStrategy
Method for customizing a semantic chunking strategy.
For custom chunking, the maximum token chunk size depends on the model. - Amazon Titan Text Embeddings: 8192 - Cohere Embed models: 512. Experimental.
type CommonKnowledgeBaseAttributes ¶ added in v0.1.292
type CommonKnowledgeBaseAttributes struct { // The Service Execution Role associated with the knowledge base. // // Example: // "arn:aws:iam::123456789012:role/AmazonBedrockExecutionRoleForKnowledgeBaseawscdkbdgeBaseKB12345678" // // Experimental. ExecutionRoleArn *string `field:"required" json:"executionRoleArn" yaml:"executionRoleArn"` // The ID of the knowledge base. // // Example: // "KB12345678" // // Experimental. KnowledgeBaseId *string `field:"required" json:"knowledgeBaseId" yaml:"knowledgeBaseId"` // The description of the knowledge base. // Default: - No description provided. // // Experimental. Description *string `field:"optional" json:"description" yaml:"description"` // Instructions for agents based on the design and type of information of the Knowledge Base. // // This will impact how Agents interact with the Knowledge Base. // Default: - No description provided. // // Experimental. Instruction *string `field:"optional" json:"instruction" yaml:"instruction"` // Specifies whether to use the knowledge base or not when sending an InvokeAgent request. // Default: - ENABLED. // // Experimental. KnowledgeBaseState *string `field:"optional" json:"knowledgeBaseState" yaml:"knowledgeBaseState"` }
Common properties for importing a knowledge base (of any type) created outside of this stack. Experimental.
type CommonKnowledgeBaseProps ¶ added in v0.1.292
type CommonKnowledgeBaseProps struct { // The description of the knowledge base. // Default: - No description provided. // // Experimental. Description *string `field:"optional" json:"description" yaml:"description"` // Existing IAM role with policy statements granting appropriate permissions to invoke the specific embeddings models. // // Any entity (e.g., an AWS service or application) that assumes // this role will be able to invoke or use the // specified embeddings model within the Bedrock service. // Experimental. ExistingRole awsiam.IRole `field:"optional" json:"existingRole" yaml:"existingRole"` // A narrative description of the knowledge base. // // A Bedrock Agent can use this instruction to determine if it should // query this Knowledge Base. // Default: - No description provided. // // Experimental. Instruction *string `field:"optional" json:"instruction" yaml:"instruction"` // The name of the knowledge base. // Experimental. Name *string `field:"optional" json:"name" yaml:"name"` }
Common properties for creating any type of new Knowledge Base. Experimental.
type CommonPromptVariantProps ¶ added in v0.1.262
type CommonPromptVariantProps struct { // The model which is used to run the prompt. // // The model could be a foundation // model, a custom model, or a provisioned model. // Experimental. Model IInvokable `field:"required" json:"model" yaml:"model"` // The name of the prompt variant. // Experimental. VariantName *string `field:"required" json:"variantName" yaml:"variantName"` // The variables in the prompt template that can be filled in at runtime. // Experimental. PromptVariables *[]*string `field:"optional" json:"promptVariables" yaml:"promptVariables"` }
Experimental.
type ConfluenceCrawlingFilters ¶ added in v0.1.270
type ConfluenceCrawlingFilters struct { // The type of Confluence object to apply the filters to. // Experimental. ObjectType ConfluenceObjectType `field:"required" json:"objectType" yaml:"objectType"` // Regular expression patterns to exclude content. // // Content matching these patterns will not be crawled, even if it matches an include pattern. // Experimental. ExcludePatterns *[]*string `field:"optional" json:"excludePatterns" yaml:"excludePatterns"` // Regular expression patterns to include content. // // If specified, only content matching these patterns will be crawled. // Experimental. IncludePatterns *[]*string `field:"optional" json:"includePatterns" yaml:"includePatterns"` }
Defines filters for crawling Confluence content.
These filters allow you to include or exclude specific content based on object types and patterns.
- For Spaces: Use the unique space key - For Pages: Use the main page title - For Blogs: Use the main blog title - For Comments: Use "Re: Page/Blog Title" - For Attachments: Use the filename with extension.
Example:
{ objectType: ConfluenceObjectType.ATTACHMENT, excludePatterns: [".*private.*\\.pdf"] }
Experimental.
type ConfluenceDataSource ¶ added in v0.1.270
type ConfluenceDataSource interface { DataSourceNew // The AWS Secrets Manager secret that stores your authentication credentials. // Experimental. AuthSecret() awssecretsmanager.ISecret // The Confluence host URL or instance URL. // Experimental. ConfluenceUrl() *string // The unique identifier of the data source. // // Example: // 'JHUEVXUZMU' // // Experimental. DataSourceId() *string // The name of the data source. // Experimental. DataSourceName() *string // The type of data source. // Experimental. DataSourceType() DataSourceType // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. // Experimental. Env() *awscdk.ResourceEnvironment // The KMS key to use to encrypt the data source. // Experimental. KmsKey() awskms.IKey // The knowledge base associated with the data source. // Experimental. KnowledgeBase() IKnowledgeBase // The tree node. // Experimental. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. // Experimental. PhysicalName() *string // The stack in which this resource is defined. // Experimental. Stack() awscdk.Stack // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). // Experimental. ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Formats the data source configuration properties for CloudFormation. // Experimental. FormatAsCfnProps(props *DataSourceAssociationProps, dataSourceConfiguration *awsbedrock.CfnDataSource_DataSourceConfigurationProperty) *awsbedrock.CfnDataSourceProps // Experimental. GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. // Experimental. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. // Experimental. GetResourceNameAttribute(nameAttr *string) *string // Adds appropriate permissions to the KB execution role needed by the data source. // Experimental. HandleCommonPermissions(props *DataSourceAssociationProps) // Returns a string representation of this construct. // Experimental. ToString() *string }
Sets up a Confluence Data Source to be added to a knowledge base. See: https://docs.aws.amazon.com/bedrock/latest/userguide/confluence-data-source-connector.html
Experimental.
func NewConfluenceDataSource ¶ added in v0.1.270
func NewConfluenceDataSource(scope constructs.Construct, id *string, props *ConfluenceDataSourceProps) ConfluenceDataSource
Experimental.
type ConfluenceDataSourceAssociationProps ¶ added in v0.1.270
type ConfluenceDataSourceAssociationProps struct { // The chunking stategy to use for splitting your documents or content. // // The chunks are then converted to embeddings and written to the vector // index allowing for similarity search and retrieval of the content. // Default: ChunkingStrategy.DEFAULT // // Experimental. ChunkingStrategy ChunkingStrategy `field:"optional" json:"chunkingStrategy" yaml:"chunkingStrategy"` // The custom transformation strategy to use. // Default: - No custom transformation is used. // // Experimental. CustomTransformation CustomTransformation `field:"optional" json:"customTransformation" yaml:"customTransformation"` // The data deletion policy to apply to the data source. // Default: - Sets the data deletion policy to the default of the data source type. // // Experimental. DataDeletionPolicy DataDeletionPolicy `field:"optional" json:"dataDeletionPolicy" yaml:"dataDeletionPolicy"` // The name of the data source. // Default: - A new name will be generated. // // Experimental. DataSourceName *string `field:"optional" json:"dataSourceName" yaml:"dataSourceName"` // A description of the data source. // Default: - No description is provided. // // Experimental. Description *string `field:"optional" json:"description" yaml:"description"` // The KMS key to use to encrypt the data source. // Default: - Service owned and managed key. // // Experimental. KmsKey awskms.IKey `field:"optional" json:"kmsKey" yaml:"kmsKey"` // The parsing strategy to use. // Default: - No Parsing Stategy is used. // // Experimental. ParsingStrategy ParsingStategy `field:"optional" json:"parsingStrategy" yaml:"parsingStrategy"` // The AWS Secrets Manager secret that stores your authentication credentials for your Confluence instance URL. // // Secret must start with "AmazonBedrock-". // Experimental. AuthSecret awssecretsmanager.ISecret `field:"required" json:"authSecret" yaml:"authSecret"` // The Confluence host URL or instance URL. // // Example: // https://example.atlassian.net // // Experimental. ConfluenceUrl *string `field:"required" json:"confluenceUrl" yaml:"confluenceUrl"` // The supported authentication method to connect to the data source. // Default: ConfluenceDataSourceAuthType.OAUTH2_CLIENT_CREDENTIALS // // Experimental. AuthType ConfluenceDataSourceAuthType `field:"optional" json:"authType" yaml:"authType"` // The filters (regular expression patterns) for the crawling. // // If there's a conflict, the exclude pattern takes precedence. // Default: None - all your content is crawled. // // Experimental. Filters *[]*ConfluenceCrawlingFilters `field:"optional" json:"filters" yaml:"filters"` }
Interface to add a new data source to an existing KB. Experimental.
type ConfluenceDataSourceAuthType ¶ added in v0.1.270
type ConfluenceDataSourceAuthType string
The different authentication types available to connect to your Confluence instance. See: https://docs.aws.amazon.com/bedrock/latest/userguide/confluence-data-source-connector.html#configuration-confluence-connector
Experimental.
const ( // Your secret authentication credentials in AWS Secrets Manager should include: - `confluenceAppKey` - `confluenceAppSecret` - `confluenceAccessToken` - `confluenceRefreshToken`. // Experimental. ConfluenceDataSourceAuthType_OAUTH2_CLIENT_CREDENTIALS ConfluenceDataSourceAuthType = "OAUTH2_CLIENT_CREDENTIALS" // Your secret authentication credentials in AWS Secrets Manager should include: - `username` (email of admin account) - `password` (API token). // Experimental. ConfluenceDataSourceAuthType_BASIC ConfluenceDataSourceAuthType = "BASIC" )
type ConfluenceDataSourceProps ¶ added in v0.1.270
type ConfluenceDataSourceProps struct { // The chunking stategy to use for splitting your documents or content. // // The chunks are then converted to embeddings and written to the vector // index allowing for similarity search and retrieval of the content. // Default: ChunkingStrategy.DEFAULT // // Experimental. ChunkingStrategy ChunkingStrategy `field:"optional" json:"chunkingStrategy" yaml:"chunkingStrategy"` // The custom transformation strategy to use. // Default: - No custom transformation is used. // // Experimental. CustomTransformation CustomTransformation `field:"optional" json:"customTransformation" yaml:"customTransformation"` // The data deletion policy to apply to the data source. // Default: - Sets the data deletion policy to the default of the data source type. // // Experimental. DataDeletionPolicy DataDeletionPolicy `field:"optional" json:"dataDeletionPolicy" yaml:"dataDeletionPolicy"` // The name of the data source. // Default: - A new name will be generated. // // Experimental. DataSourceName *string `field:"optional" json:"dataSourceName" yaml:"dataSourceName"` // A description of the data source. // Default: - No description is provided. // // Experimental. Description *string `field:"optional" json:"description" yaml:"description"` // The KMS key to use to encrypt the data source. // Default: - Service owned and managed key. // // Experimental. KmsKey awskms.IKey `field:"optional" json:"kmsKey" yaml:"kmsKey"` // The parsing strategy to use. // Default: - No Parsing Stategy is used. // // Experimental. ParsingStrategy ParsingStategy `field:"optional" json:"parsingStrategy" yaml:"parsingStrategy"` // The AWS Secrets Manager secret that stores your authentication credentials for your Confluence instance URL. // // Secret must start with "AmazonBedrock-". // Experimental. AuthSecret awssecretsmanager.ISecret `field:"required" json:"authSecret" yaml:"authSecret"` // The Confluence host URL or instance URL. // // Example: // https://example.atlassian.net // // Experimental. ConfluenceUrl *string `field:"required" json:"confluenceUrl" yaml:"confluenceUrl"` // The supported authentication method to connect to the data source. // Default: ConfluenceDataSourceAuthType.OAUTH2_CLIENT_CREDENTIALS // // Experimental. AuthType ConfluenceDataSourceAuthType `field:"optional" json:"authType" yaml:"authType"` // The filters (regular expression patterns) for the crawling. // // If there's a conflict, the exclude pattern takes precedence. // Default: None - all your content is crawled. // // Experimental. Filters *[]*ConfluenceCrawlingFilters `field:"optional" json:"filters" yaml:"filters"` // The knowledge base to associate with the data source. // Experimental. KnowledgeBase IKnowledgeBase `field:"required" json:"knowledgeBase" yaml:"knowledgeBase"` }
Interface to create a new standalone data source object. Experimental.
type ConfluenceObjectType ¶ added in v0.1.270
type ConfluenceObjectType string
Represents the different types of content objects in Confluence that can be crawled by the data source. Experimental.
const ( // Experimental. ConfluenceObjectType_SPACE ConfluenceObjectType = "SPACE" // Experimental. ConfluenceObjectType_PAGE ConfluenceObjectType = "PAGE" // Experimental. ConfluenceObjectType_BLOG ConfluenceObjectType = "BLOG" // Experimental. ConfluenceObjectType_COMMENT ConfluenceObjectType = "COMMENT" // Experimental. ConfluenceObjectType_ATTACHMENT ConfluenceObjectType = "ATTACHMENT" )
type ContentFilter ¶ added in v0.1.276
type ContentFilter struct { // The strength of the content filter to apply to prompts / user input. // Experimental. InputStrength ContentFilterStrength `field:"required" json:"inputStrength" yaml:"inputStrength"` // The strength of the content filter to apply to model responses. // Experimental. OutputStrength ContentFilterStrength `field:"required" json:"outputStrength" yaml:"outputStrength"` // The type of harmful category that the content filter is applied to. // Experimental. Type ContentFilterType `field:"required" json:"type" yaml:"type"` }
Interface to declare a content filter. Experimental.
type ContentFilterStrength ¶ added in v0.1.276
type ContentFilterStrength string
The strength of the content filter.
As you increase the filter strength, the likelihood of filtering harmful content increases and the probability of seeing harmful content in your application reduces. Experimental.
const ( // Experimental. ContentFilterStrength_NONE ContentFilterStrength = "NONE" // Experimental. ContentFilterStrength_LOW ContentFilterStrength = "LOW" // Experimental. ContentFilterStrength_MEDIUM ContentFilterStrength = "MEDIUM" // Experimental. ContentFilterStrength_HIGH ContentFilterStrength = "HIGH" )
type ContentFilterType ¶ added in v0.1.276
type ContentFilterType string
The type of harmful category usable in a content filter. Experimental.
const ( // Describes input prompts and model responses that indicates sexual interest, activity, or arousal using direct or indirect references to body parts, physical traits, or sex. // Experimental. ContentFilterType_SEXUAL ContentFilterType = "SEXUAL" // Describes input prompts and model responses that includes glorification of or threats to inflict physical pain, hurt, or injury toward a person, group or thing. // Experimental. ContentFilterType_VIOLENCE ContentFilterType = "VIOLENCE" // Describes input prompts and model responses that discriminate, criticize, insult, denounce, or dehumanize a person or group on the basis of an identity (such as race, ethnicity, gender, religion, sexual orientation, ability, and national origin). // Experimental. ContentFilterType_HATE ContentFilterType = "HATE" // Describes input prompts and model responses that includes demeaning, humiliating, mocking, insulting, or belittling language. // // This type of language is also labeled // as bullying. // Experimental. ContentFilterType_INSULTS ContentFilterType = "INSULTS" // Describes input prompts and model responses that seeks or provides information about engaging in misconduct activity, or harming, defrauding, or taking advantage of a person, group or institution. // Experimental. ContentFilterType_MISCONDUCT ContentFilterType = "MISCONDUCT" // Enable to detect and block user inputs attempting to override system instructions. // // To avoid misclassifying system prompts as a prompt attack and ensure that the filters // are selectively applied to user inputs, use input tagging. // Experimental. ContentFilterType_PROMPT_ATTACK ContentFilterType = "PROMPT_ATTACK" )
type ContextualGroundingFilter ¶ added in v0.1.276
type ContextualGroundingFilter struct { // The threshold for the contextual grounding filter. // // - `0` (blocks nothing) // - `0.99` (blocks almost everything) // Experimental. Threshold *float64 `field:"required" json:"threshold" yaml:"threshold"` // The type of contextual grounding filter. // Experimental. Type ContextualGroundingFilterType `field:"required" json:"type" yaml:"type"` }
Interface to define a Contextual Grounding Filter. Experimental.
type ContextualGroundingFilterType ¶ added in v0.1.276
type ContextualGroundingFilterType string
The type of contextual grounding filter. Experimental.
const ( // Grounding score represents the confidence that the model response is factually correct and grounded in the source. // // If the model response has a lower score than // the defined threshold, the response will be blocked and the configured blocked // message will be returned to the user. A higher threshold level blocks more responses. // Experimental. ContextualGroundingFilterType_GROUNDING ContextualGroundingFilterType = "GROUNDING" // Relevance score represents the confidence that the model response is relevant to the user's query. // // If the model response has a lower score than the defined // threshold, the response will be blocked and the configured blocked message will // be returned to the user. A higher threshold level blocks more responses. // Experimental. ContextualGroundingFilterType_RELEVANCE ContextualGroundingFilterType = "RELEVANCE" )
type CrawlingFilters ¶ added in v0.1.270
type CrawlingFilters struct { // Exclude paths. // Experimental. ExcludePatterns *[]*string `field:"optional" json:"excludePatterns" yaml:"excludePatterns"` // Include patterns. // Experimental. IncludePatterns *[]*string `field:"optional" json:"includePatterns" yaml:"includePatterns"` }
The filters (regular expression patterns) to include or exclude in the crawling in accordance with your scope. Experimental.
type CrawlingScope ¶ added in v0.1.270
type CrawlingScope string
The scope of the crawling. Experimental.
const ( // Crawls only web pages that belong to the same host or primary domain. // Experimental. CrawlingScope_HOST_ONLY CrawlingScope = "HOST_ONLY" // Includes subdomains in addition to the host or primary domain, i.e. web pages that contain "aws.amazon.com" can also include sub domain "docs.aws.amazon.com". // Experimental. CrawlingScope_SUBDOMAINS CrawlingScope = "SUBDOMAINS" // Limit crawling to web pages that belong to the same host and with the same initial URL path. // Experimental. CrawlingScope_DEFAULT CrawlingScope = "DEFAULT" )
type CrossRegionInferenceProfile ¶ added in v0.1.283
type CrossRegionInferenceProfile interface { IInferenceProfile IInvokable // The ARN of the application inference profile. // // Example: // 'arn:aws:bedrock:us-east-1:123456789012:inference-profile/us.anthropic.claude-3-5-sonnet-20240620-v1:0' // // Experimental. InferenceProfileArn() *string // The unique identifier of the inference profile. // // Example: // 'us.anthropic.claude-3-5-sonnet-20240620-v1:0' // // Experimental. InferenceProfileId() *string // The underlying model supporting cross-region inference. // Experimental. InferenceProfileModel() BedrockFoundationModel // This equals to the inferenceProfileArn property, useful just to implement IInvokable interface. // Experimental. InvokableArn() *string // The type of inference profile. // // Example: // InferenceProfileType.SYSTEM_DEFINED // // Experimental. Type() InferenceProfileType // Gives the appropriate policies to invoke and use the Foundation Model. // Experimental. GrantInvoke(grantee awsiam.IGrantable) awsiam.Grant // Grants appropriate permissions to use the cross-region inference profile. // // Does not grant permissions to use the model in the profile. // Experimental. GrantProfileUsage(grantee awsiam.IGrantable) awsiam.Grant }
Cross-region inference enables you to seamlessly manage unplanned traffic bursts by utilizing compute across different AWS Regions.
With cross-region inference, you can distribute traffic across multiple AWS Regions, enabling higher throughput and enhanced resilience during periods of peak demands. See: https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference.html
Experimental.
func CrossRegionInferenceProfile_FromConfig ¶ added in v0.1.283
func CrossRegionInferenceProfile_FromConfig(config *CrossRegionInferenceProfileProps) CrossRegionInferenceProfile
Experimental.
type CrossRegionInferenceProfileProps ¶ added in v0.1.283
type CrossRegionInferenceProfileProps struct { // The geographic region where the traffic is going to be distributed. // // Routing // factors in user traffic, demand and utilization of resources. // Experimental. GeoRegion CrossRegionInferenceProfileRegion `field:"required" json:"geoRegion" yaml:"geoRegion"` // A model supporting cross-region inference. // See: https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference-support.html // // Experimental. Model BedrockFoundationModel `field:"required" json:"model" yaml:"model"` }
**************************************************************************** PROPS FOR NEW CONSTRUCT ***************************************************************************. Experimental.
type CrossRegionInferenceProfileRegion ¶ added in v0.1.283
type CrossRegionInferenceProfileRegion string
Experimental.
const ( // Cross-region Inference Identifier for the European area. // // According to the model chosen, this might include: // - Frankfurt (`eu-central-1`) // - Ireland (`eu-west-1`) // - Paris (`eu-west-3`). // Experimental. CrossRegionInferenceProfileRegion_EU CrossRegionInferenceProfileRegion = "EU" // Cross-region Inference Identifier for the United States area. // // According to the model chosen, this might include: // - N. Virginia (`us-east-1`) // - Oregon (`us-west-2`) // - Ohio (`us-east-2`). // Experimental. CrossRegionInferenceProfileRegion_US CrossRegionInferenceProfileRegion = "US" // Cross-region Inference Identifier for the Asia-Pacific area. // // According to the model chosen, this might include: // - Tokyo (`ap-northeast-1`) // - Seoul (`ap-northeast-2`) // - Mumbai (`ap-south-1`) // - Singapore (`ap-southeast-1`) // - Sydney (`ap-southeast-2`). // Experimental. CrossRegionInferenceProfileRegion_APAC CrossRegionInferenceProfileRegion = "APAC" )
type CustomParserProps ¶ added in v0.1.290
type CustomParserProps struct { // Experimental. Parser awslambda.IFunction `field:"optional" json:"parser" yaml:"parser"` // Experimental. Steps *[]*PromptStepConfigurationCustomParser `field:"optional" json:"steps" yaml:"steps"` }
Experimental.
type CustomTopicProps ¶ added in v0.1.276
type CustomTopicProps struct { // Provide a clear definition to detect and block user inputs and FM responses that fall into this topic. // // Avoid starting with "don't". // // Example: // `Investment advice refers to inquiries, guidance, or recommendations // regarding the management or allocation of funds or assets with the goal of // generating returns or achieving specific financial objectives.` // // Experimental. Definition *string `field:"required" json:"definition" yaml:"definition"` // Representative phrases that refer to the topic. // // These phrases can represent // a user input or a model response. Add up to 5 phrases, up to 100 characters // each. // // Example: // "Where should I invest my money?" // // Experimental. Examples *[]*string `field:"required" json:"examples" yaml:"examples"` // The name of the topic to deny. // Experimental. Name *string `field:"required" json:"name" yaml:"name"` }
Interface for creating a custom Topic. Experimental.
type CustomTransformation ¶ added in v0.1.270
type CustomTransformation interface { // The CloudFormation property representation of this custom transformation configuration. // Experimental. Configuration() *awsbedrock.CfnDataSource_CustomTransformationConfigurationProperty // Experimental. SetConfiguration(val *awsbedrock.CfnDataSource_CustomTransformationConfigurationProperty) // Experimental. GeneratePolicyStatements(scope constructs.Construct) *[]awsiam.PolicyStatement }
Represents a custom transformation configuration for a data source ingestion. See: https://docs.aws.amazon.com/bedrock/latest/userguide/kb-chunking-parsing.html#kb-custom-transformation
Experimental.
func CustomTransformation_Lambda ¶ added in v0.1.270
func CustomTransformation_Lambda(props *LambdaCustomTransformationProps) CustomTransformation
This feature allows you to use a Lambda function to inject your own logic into the knowledge base ingestion process. See: https://github.com/aws-samples/amazon-bedrock-samples/blob/main/knowledge-bases/features-examples/02-optimizing-accuracy-retrieved-results/advanced_chunking_options.ipynb
Experimental.
type DataDeletionPolicy ¶ added in v0.1.270
type DataDeletionPolicy string
Specifies the policy for handling data when a data source resource is deleted.
This policy affects the vector embeddings created from the data source. Experimental.
const ( // Deletes all vector embeddings derived from the data source upon deletion of a data source resource. // Experimental. DataDeletionPolicy_DELETE DataDeletionPolicy = "DELETE" // Retains all vector embeddings derived from the data source even after deletion of a data source resource. // Experimental. DataDeletionPolicy_RETAIN DataDeletionPolicy = "RETAIN" )
type DataSource ¶ added in v0.1.270
type DataSource interface { DataSourceBase // The unique identifier of the data source. // Experimental. DataSourceId() *string // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. // Experimental. Env() *awscdk.ResourceEnvironment // The tree node. // Experimental. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. // Experimental. PhysicalName() *string // The stack in which this resource is defined. // Experimental. Stack() awscdk.Stack // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). // Experimental. ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Experimental. GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. // Experimental. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. // Experimental. GetResourceNameAttribute(nameAttr *string) *string // Returns a string representation of this construct. // Experimental. ToString() *string }
Experimental.
type DataSourceAssociationProps ¶ added in v0.1.270
type DataSourceAssociationProps struct { // The chunking stategy to use for splitting your documents or content. // // The chunks are then converted to embeddings and written to the vector // index allowing for similarity search and retrieval of the content. // Default: ChunkingStrategy.DEFAULT // // Experimental. ChunkingStrategy ChunkingStrategy `field:"optional" json:"chunkingStrategy" yaml:"chunkingStrategy"` // The custom transformation strategy to use. // Default: - No custom transformation is used. // // Experimental. CustomTransformation CustomTransformation `field:"optional" json:"customTransformation" yaml:"customTransformation"` // The data deletion policy to apply to the data source. // Default: - Sets the data deletion policy to the default of the data source type. // // Experimental. DataDeletionPolicy DataDeletionPolicy `field:"optional" json:"dataDeletionPolicy" yaml:"dataDeletionPolicy"` // The name of the data source. // Default: - A new name will be generated. // // Experimental. DataSourceName *string `field:"optional" json:"dataSourceName" yaml:"dataSourceName"` // A description of the data source. // Default: - No description is provided. // // Experimental. Description *string `field:"optional" json:"description" yaml:"description"` // The KMS key to use to encrypt the data source. // Default: - Service owned and managed key. // // Experimental. KmsKey awskms.IKey `field:"optional" json:"kmsKey" yaml:"kmsKey"` // The parsing strategy to use. // Default: - No Parsing Stategy is used. // // Experimental. ParsingStrategy ParsingStategy `field:"optional" json:"parsingStrategy" yaml:"parsingStrategy"` }
Properties common for creating any of the different data source types. Experimental.
type DataSourceBase ¶ added in v0.1.270
type DataSourceBase interface { awscdk.Resource IDataSource // The unique identifier of the data source. // // Example: // 'JHUEVXUZMU' // // Experimental. DataSourceId() *string // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. // Experimental. Env() *awscdk.ResourceEnvironment // The tree node. // Experimental. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. // Experimental. PhysicalName() *string // The stack in which this resource is defined. // Experimental. Stack() awscdk.Stack // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). // Experimental. ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Experimental. GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. // Experimental. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. // Experimental. GetResourceNameAttribute(nameAttr *string) *string // Returns a string representation of this construct. // Experimental. ToString() *string }
Specifies the base class for all data source resources (imported and new). Experimental.
type DataSourceNew ¶ added in v0.1.270
type DataSourceNew interface { DataSourceBase // The unique identifier of the data source. // // Example: // 'JHUEVXUZMU' // // Experimental. DataSourceId() *string // The name of the data source. // Experimental. DataSourceName() *string // The type of data source. // Experimental. DataSourceType() DataSourceType // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. // Experimental. Env() *awscdk.ResourceEnvironment // The KMS key to use to encrypt the data source. // Experimental. KmsKey() awskms.IKey // The knowledge base associated with the data source. // Experimental. KnowledgeBase() IKnowledgeBase // The tree node. // Experimental. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. // Experimental. PhysicalName() *string // The stack in which this resource is defined. // Experimental. Stack() awscdk.Stack // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). // Experimental. ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Formats the data source configuration properties for CloudFormation. // Experimental. FormatAsCfnProps(props *DataSourceAssociationProps, dataSourceConfiguration *awsbedrock.CfnDataSource_DataSourceConfigurationProperty) *awsbedrock.CfnDataSourceProps // Experimental. GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. // Experimental. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. // Experimental. GetResourceNameAttribute(nameAttr *string) *string // Adds appropriate permissions to the KB execution role needed by the data source. // Experimental. HandleCommonPermissions(props *DataSourceAssociationProps) // Returns a string representation of this construct. // Experimental. ToString() *string }
Specifies the base class for all NEW data source resources of ANY type. Experimental.
type DataSourceType ¶ added in v0.1.270
type DataSourceType string
Represents the types of data sources that can be associated to an Knowledge Base. Experimental.
const ( // Amazon S3 Bucket data source. // Experimental. DataSourceType_S3 DataSourceType = "S3" // Confluence Cloud Instance data source. // Experimental. DataSourceType_CONFLUENCE DataSourceType = "CONFLUENCE" // Salesforce instance data source. // Experimental. DataSourceType_SALESFORCE DataSourceType = "SALESFORCE" // Microsoft SharePoint instance data source. // Experimental. DataSourceType_SHAREPOINT DataSourceType = "SHAREPOINT" // Web Crawler data source. // // Extracts content from authorized public web pages using a crawler. // Experimental. DataSourceType_WEB_CRAWLER DataSourceType = "WEB_CRAWLER" )
type DefaultPromptRouterIdentifier ¶ added in v0.1.289
type DefaultPromptRouterIdentifier interface { // Experimental. PromptRouterId() *string // Experimental. RoutingModels() *[]BedrockFoundationModel }
Represents identifiers for default prompt routers in Bedrock. Experimental.
func DefaultPromptRouterIdentifier_ANTHROPIC_CLAUDE_V1 ¶ added in v0.1.289
func DefaultPromptRouterIdentifier_ANTHROPIC_CLAUDE_V1() DefaultPromptRouterIdentifier
func DefaultPromptRouterIdentifier_META_LLAMA_3_1 ¶ added in v0.1.289
func DefaultPromptRouterIdentifier_META_LLAMA_3_1() DefaultPromptRouterIdentifier
type FoundationModelParsingStategyProps ¶ added in v0.1.270
type FoundationModelParsingStategyProps struct { // The Foundation Model to use for parsing non-textual information. // // Currently supported models are Claude 3 Sonnet and Claude 3 Haiku. // Experimental. ParsingModel IInvokable `field:"required" json:"parsingModel" yaml:"parsingModel"` // Specifies whether to enable parsing of multimodal data, including both text and/or images. // Default: undefined - Text only. // // Experimental. ParsingModality ParsingModality `field:"optional" json:"parsingModality" yaml:"parsingModality"` // Custom prompt to instruct the parser on how to interpret the document. // Default: - Uses the default instruction prompt as provided in the AWS Console. // // Experimental. ParsingPrompt *string `field:"optional" json:"parsingPrompt" yaml:"parsingPrompt"` }
Properties for configuring a Foundation Model parsing strategy. Experimental.
type Guardrail ¶
type Guardrail interface { GuardrailBase // The content filters applied by the guardrail. // Experimental. ContentFilters() *[]*ContentFilter // The contextual grounding filters applied by the guardrail. // Experimental. ContextualGroundingFilters() *[]*ContextualGroundingFilter // The denied topic filters applied by the guardrail. // Experimental. DeniedTopics() *[]Topic // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. // Experimental. Env() *awscdk.ResourceEnvironment // The ARN of the guardrail. // Experimental. GuardrailArn() *string // The ID of the guardrail. // Experimental. GuardrailId() *string // The version of the guardrail. // // By default, this value will always be `DRAFT` unless an explicit version is created. // For an explicit version created, this will usually be a number (e.g. for Version 1 just enter "1") // // Example: // "1" // // Default: - "DRAFT". // // Experimental. GuardrailVersion() *string // Experimental. SetGuardrailVersion(val *string) // The computed hash of the guardrail properties. // Experimental. Hash() *string // The KMS key used to encrypt data. // Default: undefined - "Data is encrypted by default with a key that AWS owns and manages for you". // // Experimental. KmsKey() awskms.IKey // When this guardrail was last updated. // Experimental. LastUpdated() *string // The managed word list filters applied by the guardrail. // Experimental. ManagedWordListFilters() *[]ManagedWordFilterType // The name of the guardrail. // Experimental. Name() *string // The tree node. // Experimental. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. // Experimental. PhysicalName() *string // The PII filters applied by the guardrail. // Experimental. PiiFilters() *[]*PIIFilter // The regex filters applied by the guardrail. // Experimental. RegexFilters() *[]*RegexFilter // The stack in which this resource is defined. // Experimental. Stack() awscdk.Stack // The word filters applied by the guardrail. // Experimental. WordFilters() *[]*string // Adds a content filter to the guardrail. // Experimental. AddContentFilter(filter *ContentFilter) // Adds a contextual grounding filter to the guardrail. // Experimental. AddContextualGroundingFilter(filter *ContextualGroundingFilter) // Adds a denied topic filter to the guardrail. // Experimental. AddDeniedTopicFilter(filter Topic) // Adds a managed word list filter to the guardrail. // Experimental. AddManagedWordListFilter(filter ManagedWordFilterType) // Adds a PII filter to the guardrail. // Experimental. AddPIIFilter(filter *PIIFilter) // Adds a regex filter to the guardrail. // Experimental. AddRegexFilter(filter *RegexFilter) // Adds a word filter to the guardrail. // Experimental. AddWordFilter(filter *string) // Adds a word filter to the guardrail. // Experimental. AddWordFilterFromFile(filePath *string) // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). // Experimental. ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Create a version for the guardrail. // // Returns: The guardrail version. // Experimental. CreateVersion(description *string) *string // Experimental. GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. // Experimental. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. // Experimental. GetResourceNameAttribute(nameAttr *string) *string // Grant the given principal identity permissions to perform actions on this agent alias. // Experimental. Grant(grantee awsiam.IGrantable, actions ...*string) awsiam.Grant // Grant the given identity permissions to apply the guardrail. // Experimental. GrantApply(grantee awsiam.IGrantable) awsiam.Grant // Return the given named metric for this guardrail. // // By default, the metric will be calculated as a sum over a period of 5 minutes. // You can customize this by using the `statistic` and `period` properties. // Experimental. Metric(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Return the invocation client errors metric for this guardrail. // Experimental. MetricInvocationClientErrors(props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Return the invocation latency metric for this guardrail. // Experimental. MetricInvocationLatency(props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Return the invocations metric for this guardrail. // Experimental. MetricInvocations(props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Return the invocation server errors metric for this guardrail. // Experimental. MetricInvocationServerErrors(props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Return the invocations intervened metric for this guardrail. // Experimental. MetricInvocationsIntervened(props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Return the invocation throttles metric for this guardrail. // Experimental. MetricInvocationThrottles(props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Return the text unit count metric for this guardrail. // Experimental. MetricTextUnitCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Returns a string representation of this construct. // Experimental. ToString() *string }
Class to create a Guardrail with CDK. Experimental.
func NewGuardrail ¶
func NewGuardrail(scope constructs.Construct, id *string, props *GuardrailProps) Guardrail
Experimental.
type GuardrailAction ¶ added in v0.1.276
type GuardrailAction string
Guardrail action when a sensitive entity is detected. Experimental.
const ( // If sensitive information is detected in the prompt or response, the guardrail blocks all the content and returns a message that you configure. // Experimental. GuardrailAction_BLOCK GuardrailAction = "BLOCK" // If sensitive information is detected in the model response, the guardrail masks it with an identifier, the sensitive information is masked and replaced with identifier tags (for example: [NAME-1], [NAME-2], [EMAIL-1], etc.). // Experimental. GuardrailAction_ANONYMIZE GuardrailAction = "ANONYMIZE" )
type GuardrailAttributes ¶ added in v0.1.276
type GuardrailAttributes struct { // The ARN of the guardrail. // // At least one of guardrailArn or guardrailId must be // defined in order to initialize a guardrail ref. // Experimental. GuardrailArn *string `field:"required" json:"guardrailArn" yaml:"guardrailArn"` // The version of the guardrail. // Default: "DRAFT". // // Experimental. GuardrailVersion *string `field:"optional" json:"guardrailVersion" yaml:"guardrailVersion"` // The KMS key of the guardrail if custom encryption is configured. // Default: undefined - Means data is encrypted by default with a AWS-managed key. // // Experimental. KmsKey awskms.IKey `field:"optional" json:"kmsKey" yaml:"kmsKey"` }
**************************************************************************** ATTRS FOR IMPORTED CONSTRUCT ***************************************************************************. Experimental.
type GuardrailBase ¶ added in v0.1.276
type GuardrailBase interface { awscdk.Resource IGuardrail // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. // Experimental. Env() *awscdk.ResourceEnvironment // The ARN of the guardrail. // Experimental. GuardrailArn() *string // The ID of the guardrail. // Experimental. GuardrailId() *string // The ID of the guardrail. // Experimental. GuardrailVersion() *string // Experimental. SetGuardrailVersion(val *string) // The KMS key of the guardrail if custom encryption is configured. // Experimental. KmsKey() awskms.IKey // When this guardrail was last updated. // Experimental. LastUpdated() *string // The tree node. // Experimental. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. // Experimental. PhysicalName() *string // The stack in which this resource is defined. // Experimental. Stack() awscdk.Stack // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). // Experimental. ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Experimental. GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. // Experimental. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. // Experimental. GetResourceNameAttribute(nameAttr *string) *string // Grant the given principal identity permissions to perform actions on this agent alias. // Experimental. Grant(grantee awsiam.IGrantable, actions ...*string) awsiam.Grant // Grant the given identity permissions to apply the guardrail. // Experimental. GrantApply(grantee awsiam.IGrantable) awsiam.Grant // Return the given named metric for this guardrail. // // By default, the metric will be calculated as a sum over a period of 5 minutes. // You can customize this by using the `statistic` and `period` properties. // Experimental. Metric(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Return the invocation client errors metric for this guardrail. // Experimental. MetricInvocationClientErrors(props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Return the invocation latency metric for this guardrail. // Experimental. MetricInvocationLatency(props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Return the invocations metric for this guardrail. // Experimental. MetricInvocations(props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Return the invocation server errors metric for this guardrail. // Experimental. MetricInvocationServerErrors(props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Return the invocations intervened metric for this guardrail. // Experimental. MetricInvocationsIntervened(props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Return the invocation throttles metric for this guardrail. // Experimental. MetricInvocationThrottles(props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Return the text unit count metric for this guardrail. // Experimental. MetricTextUnitCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Returns a string representation of this construct. // Experimental. ToString() *string }
Abstract base class for a Guardrail.
Contains methods and attributes valid for Guardrails either created with CDK or imported. Experimental.
type GuardrailProps ¶
type GuardrailProps struct { // The name of the guardrail. // Experimental. Name *string `field:"required" json:"name" yaml:"name"` // The message to return when the guardrail blocks a prompt. // Default: "Sorry, your query violates our usage policy." // // Experimental. BlockedInputMessaging *string `field:"optional" json:"blockedInputMessaging" yaml:"blockedInputMessaging"` // The message to return when the guardrail blocks a model response. // Default: "Sorry, I am unable to answer your question because of our usage policy." // // Experimental. BlockedOutputsMessaging *string `field:"optional" json:"blockedOutputsMessaging" yaml:"blockedOutputsMessaging"` // The content filters to apply to the guardrail. // // Note, if one of. // Experimental. ContentFilters *[]*ContentFilter `field:"optional" json:"contentFilters" yaml:"contentFilters"` // The contextual grounding filters to apply to the guardrail. // Experimental. ContextualGroundingFilters *[]*ContextualGroundingFilter `field:"optional" json:"contextualGroundingFilters" yaml:"contextualGroundingFilters"` // Up to 30 denied topics to block user inputs or model responses associated with the topic. // Experimental. DeniedTopics *[]Topic `field:"optional" json:"deniedTopics" yaml:"deniedTopics"` // The description of the guardrail. // Experimental. Description *string `field:"optional" json:"description" yaml:"description"` // A custom KMS key to use for encrypting data. // Default: "Your data is encrypted by default with a key that AWS owns and manages for you." // // Experimental. KmsKey awskms.IKey `field:"optional" json:"kmsKey" yaml:"kmsKey"` // The managed word filters to apply to the guardrail. // Experimental. ManagedWordListFilters *[]ManagedWordFilterType `field:"optional" json:"managedWordListFilters" yaml:"managedWordListFilters"` // The PII filters to apply to the guardrail. // Experimental. PiiFilters *[]*PIIFilter `field:"optional" json:"piiFilters" yaml:"piiFilters"` // The regular expression (regex) filters to apply to the guardrail. // Experimental. RegexFilters *[]*RegexFilter `field:"optional" json:"regexFilters" yaml:"regexFilters"` // The word filters to apply to the guardrail. // Experimental. WordFilters *[]*string `field:"optional" json:"wordFilters" yaml:"wordFilters"` }
Properties for creating a Guardrail. Experimental.
type HierarchicalChunkingProps ¶ added in v0.1.270
type HierarchicalChunkingProps struct { // Maximum number of tokens that a child chunk can contain. // // Keep in mind the maximum chunk size depends on the embedding model chosen. // Experimental. MaxChildTokenSize *float64 `field:"required" json:"maxChildTokenSize" yaml:"maxChildTokenSize"` // Maximum number of tokens that a parent chunk can contain. // // Keep in mind the maximum chunk size depends on the embedding model chosen. // Experimental. MaxParentTokenSize *float64 `field:"required" json:"maxParentTokenSize" yaml:"maxParentTokenSize"` // The overlap tokens between adjacent chunks. // Experimental. OverlapTokens *float64 `field:"required" json:"overlapTokens" yaml:"overlapTokens"` }
Experimental.
type IAgent ¶ added in v0.1.290
type IAgent interface { awscdk.IResource // The ARN of the agent. // // Example: // "arn:aws:bedrock:us-east-1:123456789012:agent/OKDSJOGKMO"@attributeundefined // // Experimental. AgentArn() *string // The ID of the Agent. // // Example: // "OKDSJOGKMO"@attributeundefined // // Experimental. AgentId() *string // Optional KMS encryption key associated with this agent. // Experimental. KmsKey() awskms.IKey // When this agent was last updated. // Experimental. LastUpdated() *string // The IAM role associated to the agent. // Experimental. Role() awsiam.IRole }
Represents an Agent, either created with CDK or imported. Experimental.
func Agent_FromAgentAttrs ¶ added in v0.1.290
func Agent_FromAgentAttrs(scope constructs.Construct, id *string, attrs *AgentAttributes) IAgent
Static Method for importing an existing Bedrock Agent. Experimental.
type IAgentAlias ¶ added in v0.1.263
type IAgentAlias interface { awscdk.IResource // Grant the given principal identity permissions to perform actions on this agent alias. // Experimental. Grant(grantee awsiam.IGrantable, actions ...*string) awsiam.Grant // Grant the given identity permissions to invoke the agent alias. // Experimental. GrantInvoke(grantee awsiam.IGrantable) awsiam.Grant // Define an EventBridge rule that triggers when something happens to this agent alias. // // Requires that there exists at least one CloudTrail Trail in your account // that captures the event. This method will not create the Trail. // Experimental. OnCloudTrailEvent(id *string, options *awsevents.OnEventOptions) awsevents.Rule // The underlying agent for this alias. // Experimental. Agent() IAgent // The ARN of the agent alias. // // Example: // `arn:aws:bedrock:us-east-1:123456789012:agent-alias/DNCJJYQKSU/TCLCITFZTN` // // Experimental. AliasArn() *string // The unique identifier of the agent alias. // // Example: // `TCLCITFZTN` // // Experimental. AliasId() *string }
Represents an Agent Alias, either created with CDK or imported. Experimental.
func AgentAlias_FromAttributes ¶ added in v0.1.290
func AgentAlias_FromAttributes(scope constructs.Construct, id *string, attrs *AgentAliasAttributes) IAgentAlias
Brings an Agent Alias from an existing one created outside of CDK. Experimental.
type IDataSource ¶ added in v0.1.270
type IDataSource interface { awscdk.IResource // The unique identifier of the data source. // // Example: // 'JHUEVXUZMU' // // Experimental. DataSourceId() *string }
Specifies interface for resources created with CDK or imported into CDK. Experimental.
func DataSource_FromDataSourceId ¶ added in v0.1.270
func DataSource_FromDataSourceId(scope constructs.Construct, id *string, dataSourceId *string) IDataSource
Experimental.
type IGuardrail ¶ added in v0.1.276
type IGuardrail interface { awscdk.IResource // Grant the given principal identity permissions to perform actions on this guardrail. // Experimental. Grant(grantee awsiam.IGrantable, actions ...*string) awsiam.Grant // Grant the given identity permissions to apply the guardrail. // Experimental. GrantApply(grantee awsiam.IGrantable) awsiam.Grant // Return the given named metric for this guardrail. // Experimental. Metric(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Return the invocation client errors metric for this guardrail. // Experimental. MetricInvocationClientErrors(props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Return the invocation latency metric for this guardrail. // Experimental. MetricInvocationLatency(props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Return the invocations metric for this guardrail. // Experimental. MetricInvocations(props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Return the invocation server errors metric for this guardrail. // Experimental. MetricInvocationServerErrors(props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Return the invocations intervened metric for this guardrail. // Experimental. MetricInvocationsIntervened(props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Return the invocation throttles metric for this guardrail. // Experimental. MetricInvocationThrottles(props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Return the text unit count metric for this guardrail. // Experimental. MetricTextUnitCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric // The ARN of the guardrail. // // Example: // "arn:aws:bedrock:us-east-1:123456789012:guardrail/yympzo398ipq"@attributeundefined // // Experimental. GuardrailArn() *string // The ID of the guardrail. // // Example: // "yympzo398ipq"@attributeundefined // // Experimental. GuardrailId() *string // The version of the guardrail. // // If no explicit version is created, // this will default to "DRAFT". // Experimental. GuardrailVersion() *string // Experimental. SetGuardrailVersion(g *string) // Optional KMS encryption key associated with this guardrail. // Experimental. KmsKey() awskms.IKey // When this guardrail was last updated. // Experimental. LastUpdated() *string }
Represents a Guardrail, either created with CDK or imported. Experimental.
func Guardrail_FromCfnGuardrail ¶ added in v0.1.276
func Guardrail_FromCfnGuardrail(cfnGuardrail awsbedrock.CfnGuardrail) IGuardrail
Import a low-level L1 Cfn Guardrail. Experimental.
func Guardrail_FromGuardrailAttributes ¶ added in v0.1.276
func Guardrail_FromGuardrailAttributes(scope constructs.Construct, id *string, attrs *GuardrailAttributes) IGuardrail
Import a guardrail given its attributes. Experimental.
type IInferenceProfile ¶ added in v0.1.283
type IInferenceProfile interface { // Grants appropriate permissions to use the inference profile. // Experimental. GrantProfileUsage(grantee awsiam.IGrantable) awsiam.Grant // The ARN of the application inference profile. // Experimental. InferenceProfileArn() *string // The unique identifier of the inference profile. // Experimental. InferenceProfileId() *string // The type of inference profile. // Experimental. Type() InferenceProfileType }
Represents a ApplicationInferenceProfile, either created with CDK or imported. Experimental.
func ApplicationInferenceProfile_FromApplicationInferenceProfileAttributes ¶ added in v0.1.283
func ApplicationInferenceProfile_FromApplicationInferenceProfileAttributes(scope constructs.Construct, id *string, attrs *ApplicationInferenceProfileAttributes) IInferenceProfile
Import a ApplicationInferenceProfile given its attributes. Experimental.
func ApplicationInferenceProfile_FromCfnApplicationInferenceProfile ¶ added in v0.1.283
func ApplicationInferenceProfile_FromCfnApplicationInferenceProfile(CfnApplicationInferenceProfile awsbedrock.CfnApplicationInferenceProfile) IInferenceProfile
Import a low-level L1 Cfn ApplicationInferenceProfile. Experimental.
type IInvokable ¶ added in v0.1.283
type IInvokable interface { // Gives the appropriate policies to invoke and use the invokable abstraction. // Experimental. GrantInvoke(grantee awsiam.IGrantable) awsiam.Grant // The ARN of the Bedrock invokable abstraction. // Experimental. InvokableArn() *string }
Represents an Amazon Bedrock abstraction on which you can run the `Invoke` API.
This can be a Foundational Model, a Custom Model, or an Inference Profile. Experimental.
type IKendraKnowledgeBase ¶ added in v0.1.292
type IKendraKnowledgeBase interface { IKnowledgeBase // The GenAI Kendra Index. // Experimental. KendraIndex() kendra.IKendraGenAiIndex }
**************************************************************************** COMMON INTERFACES ***************************************************************************. Experimental.
func KendraKnowledgeBase_FromKnowledgeBaseAttributes ¶ added in v0.1.292
func KendraKnowledgeBase_FromKnowledgeBaseAttributes(scope constructs.Construct, id *string, attrs *KendraKnowledgeBaseAttributes) IKendraKnowledgeBase
Experimental.
type IKnowledgeBase ¶ added in v0.1.270
type IKnowledgeBase interface { awscdk.IResource // Grant the given principal identity permissions to perform actions on this knowledge base. // Experimental. Grant(grantee awsiam.IGrantable, actions ...*string) awsiam.Grant // Grant the given identity permissions to query the knowledge base. // Experimental. GrantQuery(grantee awsiam.IGrantable) awsiam.Grant // The description of the knowledge base. // Experimental. Description() *string // A narrative instruction of the knowledge base. // // A Bedrock Agent can use this instruction to determine if it should // query this Knowledge Base. // Experimental. Instruction() *string // The ARN of the knowledge base. // // Example: // "arn:aws:bedrock:us-east-1:123456789012:knowledge-base/KB12345678" // // Experimental. KnowledgeBaseArn() *string // The ID of the knowledge base. // // Example: // "KB12345678" // // Experimental. KnowledgeBaseId() *string // The role associated with the knowledge base. // Experimental. Role() awsiam.IRole // The type of knowledge base. // Experimental. Type() KnowledgeBaseType }
Represents a Knowledge Base, either created with CDK or imported, of any type. Experimental.
type IPrompt ¶ added in v0.1.262
type IPrompt interface { // Optional KMS encryption key associated with this prompt. // Experimental. KmsKey() awskms.IKey // The ARN of the prompt. // // Example: // "arn:aws:bedrock:us-east-1:123456789012:prompt/PROMPT12345" // // Experimental. PromptArn() *string // The ID of the prompt. // // Example: // "PROMPT12345" // // Experimental. PromptId() *string // The version of the prompt. // Default: - "DRAFT". // // Experimental. PromptVersion() *string // Experimental. SetPromptVersion(p *string) }
Represents a Prompt, either created with CDK or imported. Experimental.
func Prompt_FromPromptAttributes ¶ added in v0.1.279
func Prompt_FromPromptAttributes(scope constructs.Construct, id *string, attrs *PromptAttributes) IPrompt
Experimental.
type IPromptRouter ¶ added in v0.1.289
type IPromptRouter interface { // The ARN of the prompt router. // Experimental. PromptRouterArn() *string // The Id of the prompt router. // Experimental. PromptRouterId() *string // The foundation models / profiles this router will route to. // Experimental. RoutingEndpoints() *[]IInvokable }
Experimental.
type IVectorKnowledgeBase ¶ added in v0.1.292
type IVectorKnowledgeBase interface { IKnowledgeBase // Add a Confluence data source to the knowledge base. // Experimental. AddConfluenceDataSource(props *ConfluenceDataSourceAssociationProps) ConfluenceDataSource // Add an S3 data source to the knowledge base. // Experimental. AddS3DataSource(props *S3DataSourceAssociationProps) S3DataSource // Add a Salesforce data source to the knowledge base. // Experimental. AddSalesforceDataSource(props *SalesforceDataSourceAssociationProps) SalesforceDataSource // Experimental. AddSharePointDataSource(props *SharePointDataSourceAssociationProps) SharePointDataSource // Add a web crawler data source to the knowledge base. // Experimental. AddWebCrawlerDataSource(props *WebCrawlerDataSourceAssociationProps) WebCrawlerDataSource // Grant the given identity permissions to retrieve content from the knowledge base. // Experimental. GrantRetrieve(grantee awsiam.IGrantable) awsiam.Grant // Grant the given identity permissions to retrieve content from the knowledge base. // Experimental. GrantRetrieveAndGenerate(grantee awsiam.IGrantable) awsiam.Grant }
Represents a Knowledge Base, either created with CDK or imported. Experimental.
func VectorKnowledgeBase_FromKnowledgeBaseAttributes ¶ added in v0.1.292
func VectorKnowledgeBase_FromKnowledgeBaseAttributes(scope constructs.Construct, id *string, attrs *VectorKnowledgeBaseAttributes) IVectorKnowledgeBase
Experimental.
type InferenceConfiguration ¶
type InferenceConfiguration struct { // The maximum number of tokens to generate in the response. // // Integer // // min 0 // max 4096. // Experimental. MaximumLength *float64 `field:"required" json:"maximumLength" yaml:"maximumLength"` // A list of stop sequences. // // A stop sequence is a sequence of characters that // causes the model to stop generating the response. // // length 0-4. // Experimental. StopSequences *[]*string `field:"required" json:"stopSequences" yaml:"stopSequences"` // The likelihood of the model selecting higher-probability options while generating a response. // // A lower value makes the model more likely to choose // higher-probability options, while a higher value makes the model more // likely to choose lower-probability options. // // Floating point // // min 0 // max 1. // Experimental. Temperature *float64 `field:"required" json:"temperature" yaml:"temperature"` // While generating a response, the model determines the probability of the following token at each point of generation. // // The value that you set for // topK is the number of most-likely candidates from which the model chooses // the next token in the sequence. For example, if you set topK to 50, the // model selects the next token from among the top 50 most likely choices. // // Integer // // min 0 // max 500. // Experimental. TopK *float64 `field:"required" json:"topK" yaml:"topK"` // While generating a response, the model determines the probability of the following token at each point of generation. // // The value that you set for // Top P determines the number of most-likely candidates from which the model // chooses the next token in the sequence. For example, if you set topP to // 80, the model only selects the next token from the top 80% of the // probability distribution of next tokens. // // Floating point // // min 0 // max 1. // Experimental. TopP *float64 `field:"required" json:"topP" yaml:"topP"` }
LLM inference configuration. Experimental.
type InferenceProfileBase ¶ added in v0.1.283
type InferenceProfileBase interface { awscdk.Resource IInferenceProfile awscdk.IResource // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. // Experimental. Env() *awscdk.ResourceEnvironment // The ARN of the application inference profile. // Experimental. InferenceProfileArn() *string // The unique identifier of the inference profile. // Experimental. InferenceProfileId() *string // The tree node. // Experimental. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. // Experimental. PhysicalName() *string // The stack in which this resource is defined. // Experimental. Stack() awscdk.Stack // The ID or Amazon Resource Name (ARN) of the inference profile. // Experimental. Type() InferenceProfileType // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). // Experimental. ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Experimental. GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. // Experimental. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. // Experimental. GetResourceNameAttribute(nameAttr *string) *string // Grants appropriate permissions to use the cross-region inference profile. // // Does not grant permissions to use the model in the profile. // Experimental. GrantProfileUsage(grantee awsiam.IGrantable) awsiam.Grant // Returns a string representation of this construct. // Experimental. ToString() *string }
Abstract base class for a ApplicationInferenceProfile.
Contains methods and attributes valid for ApplicationInferenceProfiles either created with CDK or imported. Experimental.
type InferenceProfileType ¶ added in v0.1.283
type InferenceProfileType string
These are the values used by the API when using aws bedrock get-inference-profile --inference-profile-identifier XXXXXXX. Experimental.
const ( // An inference profile that is created by AWS. // // These are profiles such as cross-region // which help you distributed traffic across a geographic region. // Experimental. InferenceProfileType_SYSTEM_DEFINED InferenceProfileType = "SYSTEM_DEFINED" // An inference profile that is user-created. // // These are profiles that help // you track costs or metrics. // Experimental. InferenceProfileType_APPLICATION InferenceProfileType = "APPLICATION" )
type InlineApiSchema ¶
type InlineApiSchema interface { ApiSchema // Experimental. InlineSchema() *string // Experimental. S3File() *awss3.Location }
Experimental.
func ApiSchema_FromInline ¶
func ApiSchema_FromInline(schema *string) InlineApiSchema
Creates an API Schema from an inline string. Experimental.
func ApiSchema_FromLocalAsset ¶ added in v0.1.290
func ApiSchema_FromLocalAsset(path *string) InlineApiSchema
Creates an API Schema from a local file. Experimental.
func InlineApiSchema_FromInline ¶
func InlineApiSchema_FromInline(schema *string) InlineApiSchema
Creates an API Schema from an inline string. Experimental.
func InlineApiSchema_FromLocalAsset ¶ added in v0.1.290
func InlineApiSchema_FromLocalAsset(path *string) InlineApiSchema
Creates an API Schema from a local file. Experimental.
func S3ApiSchema_FromInline ¶
func S3ApiSchema_FromInline(schema *string) InlineApiSchema
Creates an API Schema from an inline string. Experimental.
func S3ApiSchema_FromLocalAsset ¶ added in v0.1.290
func S3ApiSchema_FromLocalAsset(path *string) InlineApiSchema
Creates an API Schema from a local file. Experimental.
type KendraKnowledgeBase ¶ added in v0.1.292
type KendraKnowledgeBase interface { KendraKnowledgeBaseBase // The description of the knowledge base. // Experimental. Description() *string // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. // Experimental. Env() *awscdk.ResourceEnvironment // A narrative instruction of the knowledge base. // // A Bedrock Agent can use this instruction to determine if it should // query this Knowledge Base. // Experimental. Instruction() *string // The GenAI Kendra Index. // Experimental. KendraIndex() kendra.IKendraGenAiIndex // The ARN of the knowledge base. // Experimental. KnowledgeBaseArn() *string // The ID of the knowledge base. // Experimental. KnowledgeBaseId() *string // The name of the knowledge base. // Experimental. Name() *string // The tree node. // Experimental. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. // Experimental. PhysicalName() *string // The role associated with the knowledge base. // Experimental. Role() awsiam.IRole // The stack in which this resource is defined. // Experimental. Stack() awscdk.Stack // The type of Knowledge Base. // Experimental. Type() KnowledgeBaseType // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). // Experimental. ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Experimental. GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. // Experimental. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. // Experimental. GetResourceNameAttribute(nameAttr *string) *string // Grant the given principal identity permissions to perform actions on this knowledge base. // Experimental. Grant(grantee awsiam.IGrantable, actions ...*string) awsiam.Grant // Grant the given identity permissions to query the knowledge base. // // This contains: // - Retrieve // - RetrieveAndGenerate. // Experimental. GrantQuery(grantee awsiam.IGrantable) awsiam.Grant // Grant the given identity permissions to retrieve content from the knowledge base. // Experimental. GrantRetrieve(grantee awsiam.IGrantable) awsiam.Grant // Grant the given identity permissions to retrieve content from the knowledge base. // Experimental. GrantRetrieveAndGenerate(grantee awsiam.IGrantable) awsiam.Grant // Returns a string representation of this construct. // Experimental. ToString() *string }
**************************************************************************** CONSTRUCT ***************************************************************************. Experimental.
func NewKendraKnowledgeBase ¶ added in v0.1.292
func NewKendraKnowledgeBase(scope constructs.Construct, id *string, props *KendraKnowledgeBaseProps) KendraKnowledgeBase
Experimental.
type KendraKnowledgeBaseAttributes ¶ added in v0.1.292
type KendraKnowledgeBaseAttributes struct { // The Service Execution Role associated with the knowledge base. // // Example: // "arn:aws:iam::123456789012:role/AmazonBedrockExecutionRoleForKnowledgeBaseawscdkbdgeBaseKB12345678" // // Experimental. ExecutionRoleArn *string `field:"required" json:"executionRoleArn" yaml:"executionRoleArn"` // The ID of the knowledge base. // // Example: // "KB12345678" // // Experimental. KnowledgeBaseId *string `field:"required" json:"knowledgeBaseId" yaml:"knowledgeBaseId"` // The description of the knowledge base. // Default: - No description provided. // // Experimental. Description *string `field:"optional" json:"description" yaml:"description"` // Instructions for agents based on the design and type of information of the Knowledge Base. // // This will impact how Agents interact with the Knowledge Base. // Default: - No description provided. // // Experimental. Instruction *string `field:"optional" json:"instruction" yaml:"instruction"` // Specifies whether to use the knowledge base or not when sending an InvokeAgent request. // Default: - ENABLED. // // Experimental. KnowledgeBaseState *string `field:"optional" json:"knowledgeBaseState" yaml:"knowledgeBaseState"` // The GenAI Kendra Index ARN. // Experimental. KendraIndex kendra.IKendraGenAiIndex `field:"required" json:"kendraIndex" yaml:"kendraIndex"` }
Properties for importing a knowledge base outside of this stack. Experimental.
type KendraKnowledgeBaseBase ¶ added in v0.1.292
type KendraKnowledgeBaseBase interface { KnowledgeBaseBase // The description of the knowledge base. // Experimental. Description() *string // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. // Experimental. Env() *awscdk.ResourceEnvironment // A narrative instruction of the knowledge base. // // A Bedrock Agent can use this instruction to determine if it should // query this Knowledge Base. // Experimental. Instruction() *string // Experimental. KendraIndex() kendra.IKendraGenAiIndex // The ARN of the knowledge base. // Experimental. KnowledgeBaseArn() *string // The ID of the knowledge base. // Experimental. KnowledgeBaseId() *string // The tree node. // Experimental. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. // Experimental. PhysicalName() *string // The role associated with the knowledge base. // Experimental. Role() awsiam.IRole // The stack in which this resource is defined. // Experimental. Stack() awscdk.Stack // The type of knowledge base. // Experimental. Type() KnowledgeBaseType // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). // Experimental. ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Experimental. GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. // Experimental. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. // Experimental. GetResourceNameAttribute(nameAttr *string) *string // Grant the given principal identity permissions to perform actions on this knowledge base. // Experimental. Grant(grantee awsiam.IGrantable, actions ...*string) awsiam.Grant // Grant the given identity permissions to query the knowledge base. // // This contains: // - Retrieve // - RetrieveAndGenerate. // Experimental. GrantQuery(grantee awsiam.IGrantable) awsiam.Grant // Grant the given identity permissions to retrieve content from the knowledge base. // Experimental. GrantRetrieve(grantee awsiam.IGrantable) awsiam.Grant // Grant the given identity permissions to retrieve content from the knowledge base. // Experimental. GrantRetrieveAndGenerate(grantee awsiam.IGrantable) awsiam.Grant // Returns a string representation of this construct. // Experimental. ToString() *string }
**************************************************************************** ABSTRACT CLASS ***************************************************************************. Experimental.
type KendraKnowledgeBaseProps ¶ added in v0.1.292
type KendraKnowledgeBaseProps struct { // The description of the knowledge base. // Default: - No description provided. // // Experimental. Description *string `field:"optional" json:"description" yaml:"description"` // Existing IAM role with policy statements granting appropriate permissions to invoke the specific embeddings models. // // Any entity (e.g., an AWS service or application) that assumes // this role will be able to invoke or use the // specified embeddings model within the Bedrock service. // Experimental. ExistingRole awsiam.IRole `field:"optional" json:"existingRole" yaml:"existingRole"` // A narrative description of the knowledge base. // // A Bedrock Agent can use this instruction to determine if it should // query this Knowledge Base. // Default: - No description provided. // // Experimental. Instruction *string `field:"optional" json:"instruction" yaml:"instruction"` // The name of the knowledge base. // Experimental. Name *string `field:"optional" json:"name" yaml:"name"` // The Kendra Index to use for the knowledge base. // Experimental. KendraIndex kendra.IKendraGenAiIndex `field:"required" json:"kendraIndex" yaml:"kendraIndex"` }
Properties for creating a Kendra Index Knowledge Base. Experimental.
type KnowledgeBaseBase ¶ added in v0.1.292
type KnowledgeBaseBase interface { awscdk.Resource IKnowledgeBase // The description of the knowledge base. // Experimental. Description() *string // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. // Experimental. Env() *awscdk.ResourceEnvironment // A narrative instruction of the knowledge base. // // A Bedrock Agent can use this instruction to determine if it should // query this Knowledge Base. // Experimental. Instruction() *string // The ARN of the knowledge base. // Experimental. KnowledgeBaseArn() *string // The ID of the knowledge base. // Experimental. KnowledgeBaseId() *string // The tree node. // Experimental. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. // Experimental. PhysicalName() *string // The role associated with the knowledge base. // Experimental. Role() awsiam.IRole // The stack in which this resource is defined. // Experimental. Stack() awscdk.Stack // The type of knowledge base. // Experimental. Type() KnowledgeBaseType // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). // Experimental. ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Experimental. GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. // Experimental. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. // Experimental. GetResourceNameAttribute(nameAttr *string) *string // Grant the given principal identity permissions to perform actions on this knowledge base. // Experimental. Grant(grantee awsiam.IGrantable, actions ...*string) awsiam.Grant // Grant the given identity permissions to query the knowledge base. // // This contains: // - Retrieve // - RetrieveAndGenerate. // Experimental. GrantQuery(grantee awsiam.IGrantable) awsiam.Grant // Grant the given identity permissions to retrieve content from the knowledge base. // Experimental. GrantRetrieve(grantee awsiam.IGrantable) awsiam.Grant // Grant the given identity permissions to retrieve content from the knowledge base. // Experimental. GrantRetrieveAndGenerate(grantee awsiam.IGrantable) awsiam.Grant // Returns a string representation of this construct. // Experimental. ToString() *string }
Abstract base class for Knowledge Base (regarless the type).
Contains methods valid for KBs either created with CDK or imported and applicable to Knowledge Bases of any type. Experimental.
type KnowledgeBaseType ¶ added in v0.1.292
type KnowledgeBaseType string
Types of possible knowledge bases supported by Amazon Bedrock Knowledge Bases. Experimental.
const ( // Vector database with emebeddings vectors. // See: https://docs.aws.amazon.com/bedrock/latest/userguide/kb-how-it-works.html // // Experimental. KnowledgeBaseType_VECTOR KnowledgeBaseType = "VECTOR" // Kendra GenAI Index. // See: https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base-build-kendra-genai-index.html // // Experimental. KnowledgeBaseType_KENDRA KnowledgeBaseType = "KENDRA" // Structured data store (e.g. REDSHIFT). // See: https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base-build-structured.html // // Experimental. KnowledgeBaseType_SQL KnowledgeBaseType = "SQL" )
type LambdaCustomTransformationProps ¶ added in v0.1.270
type LambdaCustomTransformationProps struct { // The Lambda function to use for custom document processing. // Experimental. LambdaFunction awslambda.IFunction `field:"required" json:"lambdaFunction" yaml:"lambdaFunction"` // An S3 bucket URL/path to store input documents for Lambda processing and to store the output of the processed documents. // // Example: // "s3://my-bucket/chunk-processor/" // // Experimental. S3BucketUri *string `field:"required" json:"s3BucketUri" yaml:"s3BucketUri"` }
Properties for configuring a Lambda-based custom transformation. Experimental.
type ManagedWordFilterType ¶ added in v0.1.276
type ManagedWordFilterType string
The managed word type filter available for guardrails. Experimental.
const ( // Experimental. ManagedWordFilterType_PROFANITY ManagedWordFilterType = "PROFANITY" )
type Memory ¶ added in v0.1.295
type Memory interface { }
Memory class for managing Bedrock Agent memory configurations.
Enables conversational context retention across multiple sessions through session identifiers. Memory context is stored with unique memory IDs per user, allowing access to conversation history and summaries. Supports viewing stored sessions and clearing memory. See: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-memory.html
Experimental.
type PIIFilter ¶ added in v0.1.276
type PIIFilter struct { // The action to take when PII is detected. // Experimental. Action GuardrailAction `field:"required" json:"action" yaml:"action"` // The type of PII to filter. // Experimental. Type interface{} `field:"required" json:"type" yaml:"type"` }
Interface to define a PII Filter. Experimental.
type ParentActionGroupSignature ¶ added in v0.1.290
type ParentActionGroupSignature interface { // Experimental. Value() *string // Experimental. ToString() *string }
AWS Defined signatures for enabling certain capabilities in your agent. Experimental.
func NewParentActionGroupSignature ¶ added in v0.1.290
func NewParentActionGroupSignature(value *string) ParentActionGroupSignature
Constructor should be used as a temporary solution when a new signature is supported but its implementation in CDK hasn't been added yet. Experimental.
func ParentActionGroupSignature_CODE_INTERPRETER ¶ added in v0.1.290
func ParentActionGroupSignature_CODE_INTERPRETER() ParentActionGroupSignature
func ParentActionGroupSignature_USER_INPUT ¶ added in v0.1.290
func ParentActionGroupSignature_USER_INPUT() ParentActionGroupSignature
type ParsingModality ¶ added in v0.1.292
type ParsingModality string
Experimental.
const ( // Specifies whether to enable parsing of multimodal data, including both text and/or images. // Experimental. ParsingModality_MULTIMODAL ParsingModality = "MULTIMODAL" )
type ParsingStategy ¶ added in v0.1.270
type ParsingStategy interface { // The CloudFormation property representation of this configuration. // Experimental. Configuration() *awsbedrock.CfnDataSource_ParsingConfigurationProperty // Experimental. SetConfiguration(val *awsbedrock.CfnDataSource_ParsingConfigurationProperty) // Experimental. GeneratePolicyStatements() *[]awsiam.PolicyStatement }
Represents an advanced parsing strategy configuration for Knowledge Base ingestion. See: https://docs.aws.amazon.com/bedrock/latest/userguide/kb-chunking-parsing.html#kb-advanced-parsing
Experimental.
func ParsingStategy_FoundationModel ¶ added in v0.1.270
func ParsingStategy_FoundationModel(props *FoundationModelParsingStategyProps) ParsingStategy
Creates a Foundation Model-based parsing strategy for extracting non-textual information from documents such as tables and charts.
- Additional costs apply when using advanced parsing due to foundation model usage. - There are limits on file types (PDF) and total data that can be parsed using advanced parsing. See: https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base-ds.html#kb-ds-supported-doc-formats-limits
Experimental.
type ParsingStategyType ¶ added in v0.1.292
type ParsingStategyType string
Enum representing the types of parsing strategies available for Amazon Bedrock Knowledge Bases. See: https://docs.aws.amazon.com/bedrock/latest/userguide/kb-advanced-parsing.html
Experimental.
const ( // Uses a Bedrock Foundation Model for advanced parsing of non-textual information from documents. // Experimental. ParsingStategyType_FOUNDATION_MODEL ParsingStategyType = "FOUNDATION_MODEL" // Processes multimodal data using Bedrock Data Automation (BDA). // // It leverages // generative AI to automate the transformation of multi-modal data into structured formats. // If you choose a foundation model or Amazon Bedrock Data Automation for parsing and it fails // to parse a file, the Amazon Bedrock default parser is used instead. // Experimental. ParsingStategyType_DATA_AUTOMATION ParsingStategyType = "DATA_AUTOMATION" )
type Prompt ¶ added in v0.1.262
type Prompt interface { constructs.Construct IPrompt // The KMS key that the prompt is encrypted with. // Experimental. KmsKey() awskms.IKey // The tree node. // Experimental. Node() constructs.Node // The ARN of the prompt. // // Example: // "arn:aws:bedrock:us-east-1:123456789012:prompt/PROMPT12345" // // Experimental. PromptArn() *string // The ID of the prompt. // // Example: // "PROMPT12345" // // Experimental. PromptId() *string // The name of the prompt. // Experimental. PromptName() *string // The version of the prompt. // Experimental. PromptVersion() *string // Experimental. SetPromptVersion(val *string) // The variants of the prompt. // Experimental. Variants() *[]PromptVariant // Adds a prompt variant. // Experimental. AddVariant(variant PromptVariant) // Creates a prompt version, a static snapshot of your prompt that can be deployed to production. // Experimental. CreateVersion(description *string) *string // Returns a string representation of this construct. // Experimental. ToString() *string }
Prompts are a specific set of inputs that guide FMs on Amazon Bedrock to generate an appropriate response or output for a given task or instruction.
You can optimize the prompt for specific use cases and models. See: https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-management.html
Experimental.
func NewPrompt ¶ added in v0.1.262
func NewPrompt(scope constructs.Construct, id *string, props *PromptProps) Prompt
Experimental.
type PromptAttributes ¶ added in v0.1.279
type PromptAttributes struct { // The ARN of the prompt. // // Example: // "arn:aws:bedrock:us-east-1:123456789012:prompt/PROMPT12345" // // Experimental. PromptArn *string `field:"required" json:"promptArn" yaml:"promptArn"` // Optional KMS encryption key associated with this prompt. // Experimental. KmsKey awskms.IKey `field:"optional" json:"kmsKey" yaml:"kmsKey"` // The version of the prompt. // Default: - "DRAFT". // // Experimental. PromptVersion *string `field:"optional" json:"promptVersion" yaml:"promptVersion"` }
**************************************************************************** ATTRS FOR IMPORTED CONSTRUCT ***************************************************************************. Experimental.
type PromptBase ¶ added in v0.1.279
type PromptBase interface { awscdk.Resource IPrompt // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. // Experimental. Env() *awscdk.ResourceEnvironment // Optional KMS encryption key associated with this prompt. // Experimental. KmsKey() awskms.IKey // The tree node. // Experimental. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. // Experimental. PhysicalName() *string // The ARN of the prompt. // Experimental. PromptArn() *string // The ID of the prompt. // Experimental. PromptId() *string // The version of the prompt. // Experimental. PromptVersion() *string // Experimental. SetPromptVersion(val *string) // The stack in which this resource is defined. // Experimental. Stack() awscdk.Stack // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). // Experimental. ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Experimental. GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. // Experimental. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. // Experimental. GetResourceNameAttribute(nameAttr *string) *string // Grant the given identity permissions to get the prompt. // Experimental. GrantGet(grantee awsiam.IGrantable) awsiam.Grant // Returns a string representation of this construct. // Experimental. ToString() *string }
Abstract base class for a Prompt.
Contains methods and attributes valid for Promtps either created with CDK or imported. Experimental.
type PromptOverrideConfiguration ¶
type PromptOverrideConfiguration interface { // The custom Lambda parser function to use. // // The Lambda parser processes and interprets the raw foundation model output. // It receives an input event with: // - messageVersion: Version of message format (1.0) // - agent: Info about the agent (name, id, alias, version) // - invokeModelRawResponse: Raw model output to parse // - promptType: Type of prompt being parsed // - overrideType: Type of override (OUTPUT_PARSER) // // The Lambda must return a response that the agent uses for next actions. // See: https://docs.aws.amazon.com/bedrock/latest/userguide/lambda-parser.html // // Experimental. Parser() awslambda.IFunction // The prompt configurations to override the prompt templates in the agent sequence. // Default: - No prompt configuration will be overridden. // // Experimental. Steps() *[]*PromptStepConfigurationCustomParser }
Experimental.
func PromptOverrideConfiguration_FromSteps ¶ added in v0.1.290
func PromptOverrideConfiguration_FromSteps(steps *[]*PromptStepConfiguration) PromptOverrideConfiguration
Experimental.
func PromptOverrideConfiguration_WithCustomParser ¶ added in v0.1.290
func PromptOverrideConfiguration_WithCustomParser(props *CustomParserProps) PromptOverrideConfiguration
Creates a PromptOverrideConfiguration with a custom Lambda parser function. Experimental.
type PromptProps ¶ added in v0.1.262
type PromptProps struct { // The name of the prompt. // Experimental. PromptName *string `field:"required" json:"promptName" yaml:"promptName"` // The Prompt Variant that will be used by default. // Default: - No default variant provided. // // Experimental. DefaultVariant PromptVariant `field:"optional" json:"defaultVariant" yaml:"defaultVariant"` // A description of what the prompt does. // Default: - No description provided. // // Experimental. Description *string `field:"optional" json:"description" yaml:"description"` // The KMS key that the prompt is encrypted with. // Default: - AWS owned and managed key. // // Experimental. KmsKey awskms.IKey `field:"optional" json:"kmsKey" yaml:"kmsKey"` // The variants of your prompt. // // Variants can use different messages, models, // or configurations so that you can compare their outputs to decide the best // variant for your use case. Maximum of 3 variants. // Experimental. Variants *[]PromptVariant `field:"optional" json:"variants" yaml:"variants"` }
**************************************************************************** PROPS FOR NEW CONSTRUCT ***************************************************************************. Experimental.
type PromptRouter ¶ added in v0.1.289
type PromptRouter interface { IInvokable IPromptRouter // The ARN of the Bedrock invokable abstraction. // Experimental. InvokableArn() *string // The ARN of the prompt router. // Experimental. PromptRouterArn() *string // The Id of the prompt router. // Experimental. PromptRouterId() *string // The foundation models / profiles this router will route to. // Experimental. RoutingEndpoints() *[]IInvokable // Gives the appropriate policies to invoke and use the invokable abstraction. // Experimental. GrantInvoke(grantee awsiam.IGrantable) awsiam.Grant }
Experimental.
func NewPromptRouter ¶ added in v0.1.289
func NewPromptRouter(props *PromptRouterProps, region *string) PromptRouter
Experimental.
func PromptRouter_FromDefaultId ¶ added in v0.1.289
func PromptRouter_FromDefaultId(defaultRouter DefaultPromptRouterIdentifier, region *string) PromptRouter
Experimental.
type PromptRouterProps ¶ added in v0.1.289
type PromptRouterProps struct { // Prompt Router Id. // Experimental. PromptRouterId *string `field:"required" json:"promptRouterId" yaml:"promptRouterId"` // The foundation models this router will route to. // Experimental. RoutingModels *[]BedrockFoundationModel `field:"required" json:"routingModels" yaml:"routingModels"` }
Experimental.
type PromptStepConfiguration ¶ added in v0.1.290
type PromptStepConfiguration struct { // The step in the agent sequence where to set a specific prompt configuration. // Experimental. StepType AgentStepType `field:"required" json:"stepType" yaml:"stepType"` // The custom prompt template to be used. // See: https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-placeholders.html // // Default: - The default prompt template will be used. // // Experimental. CustomPromptTemplate *string `field:"optional" json:"customPromptTemplate" yaml:"customPromptTemplate"` // The inference configuration parameters to use. // Experimental. InferenceConfig *InferenceConfiguration `field:"optional" json:"inferenceConfig" yaml:"inferenceConfig"` // Whether to enable or skip this step in the agent sequence. // Default: - The default state for each step type is as follows. // // PRE_PROCESSING – ENABLED // ORCHESTRATION – ENABLED // KNOWLEDGE_BASE_RESPONSE_GENERATION – ENABLED // POST_PROCESSING – DISABLED. // // Experimental. StepEnabled *bool `field:"optional" json:"stepEnabled" yaml:"stepEnabled"` }
Contains configurations to override a prompt template in one part of an agent sequence. Experimental.
type PromptStepConfigurationCustomParser ¶ added in v0.1.290
type PromptStepConfigurationCustomParser struct { // The step in the agent sequence where to set a specific prompt configuration. // Experimental. StepType AgentStepType `field:"required" json:"stepType" yaml:"stepType"` // The custom prompt template to be used. // See: https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-placeholders.html // // Default: - The default prompt template will be used. // // Experimental. CustomPromptTemplate *string `field:"optional" json:"customPromptTemplate" yaml:"customPromptTemplate"` // The inference configuration parameters to use. // Experimental. InferenceConfig *InferenceConfiguration `field:"optional" json:"inferenceConfig" yaml:"inferenceConfig"` // Whether to enable or skip this step in the agent sequence. // Default: - The default state for each step type is as follows. // // PRE_PROCESSING – ENABLED // ORCHESTRATION – ENABLED // KNOWLEDGE_BASE_RESPONSE_GENERATION – ENABLED // POST_PROCESSING – DISABLED. // // Experimental. StepEnabled *bool `field:"optional" json:"stepEnabled" yaml:"stepEnabled"` // Whether to use the custom Lambda parser defined for the sequence. // Default: - false. // // Experimental. UseCustomParser *bool `field:"optional" json:"useCustomParser" yaml:"useCustomParser"` }
Experimental.
type PromptTemplateType ¶ added in v0.1.262
type PromptTemplateType string
Experimental.
const ( // Experimental. PromptTemplateType_TEXT PromptTemplateType = "TEXT" // Experimental. PromptTemplateType_CHAT PromptTemplateType = "CHAT" )
type PromptVariant ¶ added in v0.1.262
type PromptVariant interface { // The template configuration. // Experimental. GenAiResource() *awsbedrock.CfnPrompt_PromptGenAiResourceProperty // Experimental. SetGenAiResource(val *awsbedrock.CfnPrompt_PromptGenAiResourceProperty) // The inference configuration. // Experimental. InferenceConfiguration() *awsbedrock.CfnPrompt_PromptInferenceConfigurationProperty // Experimental. SetInferenceConfiguration(val *awsbedrock.CfnPrompt_PromptInferenceConfigurationProperty) // The unique identifier of the model with which to run inference on the prompt. // Experimental. ModelId() *string // Experimental. SetModelId(val *string) // The name of the prompt variant. // Experimental. Name() *string // Experimental. SetName(val *string) // The template configuration. // Experimental. TemplateConfiguration() *awsbedrock.CfnPrompt_PromptTemplateConfigurationProperty // Experimental. SetTemplateConfiguration(val *awsbedrock.CfnPrompt_PromptTemplateConfigurationProperty) // The type of prompt template. // Experimental. TemplateType() PromptTemplateType // Experimental. SetTemplateType(val PromptTemplateType) }
Variants are specific sets of inputs that guide FMs on Amazon Bedrock to generate an appropriate response or output for a given task or instruction.
You can optimize the prompt for specific use cases and models. Experimental.
func PromptVariant_Agent ¶ added in v0.1.289
func PromptVariant_Agent(props *AgentPromptVariantProps) PromptVariant
Static method to create an agent prompt template. Experimental.
func PromptVariant_Chat ¶ added in v0.1.289
func PromptVariant_Chat(props *ChatPromptVariantProps) PromptVariant
Static method to create a chat template.
Use this template type when the model supports the Converse API or the AnthropicClaude Messages API. This allows you to include a System prompt and previous User messages and Assistant messages for context. Experimental.
func PromptVariant_Text ¶ added in v0.1.262
func PromptVariant_Text(props *TextPromptVariantProps) PromptVariant
Static method to create a text template. Experimental.
type PromptVersion ¶ added in v0.1.262
type PromptVersion interface { constructs.Construct // The tree node. // Experimental. Node() constructs.Node // The prompt used by this version. // Experimental. Prompt() Prompt // The version of the prompt that was created. // Experimental. Version() *string // The Amazon Resource Name (ARN) of the prompt version. // // Example: // "arn:aws:bedrock:us-east-1:123456789012:prompt/PROMPT12345:1" // // Experimental. VersionArn() *string // Returns a string representation of this construct. // Experimental. ToString() *string }
Creates a version of the prompt.
Use this to create a static snapshot of your prompt that can be deployed to production. Versions allow you to easily switch between different configurations for your prompt and update your application with the most appropriate version for your use-case. See: https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-management-deploy.html
Experimental.
func NewPromptVersion ¶ added in v0.1.262
func NewPromptVersion(scope constructs.Construct, id *string, props *PromptVersionProps) PromptVersion
Experimental.
type PromptVersionProps ¶ added in v0.1.262
type PromptVersionProps struct { // The prompt to use for this version. // Experimental. Prompt Prompt `field:"required" json:"prompt" yaml:"prompt"` // The description of the prompt version. // Experimental. Description *string `field:"optional" json:"description" yaml:"description"` }
Experimental.
type RegexFilter ¶ added in v0.1.276
type RegexFilter struct { // The action to take when a regex match is detected. // Experimental. Action GuardrailAction `field:"required" json:"action" yaml:"action"` // The name of the regex filter. // Experimental. Name *string `field:"required" json:"name" yaml:"name"` // The regular expression pattern to match. // Experimental. Pattern *string `field:"required" json:"pattern" yaml:"pattern"` // The description of the regex filter. // Experimental. Description *string `field:"optional" json:"description" yaml:"description"` }
A Regular expression (regex) filter for sensitive information.
Example:
const regexFilter: RegexFilter = { name: "my-custom-filter", action: SensitiveInfoGuardrailAction.BLOCK, pattern: "\\b(?:\\d{1,3}\\.){3}\\d{1,3}\\b", };
Experimental.
type S3ApiSchema ¶
type S3ApiSchema interface { ApiSchema // Experimental. InlineSchema() *string // Experimental. S3File() *awss3.Location }
Class to define an API Schema from an S3 object. Experimental.
func ApiSchema_FromS3File ¶ added in v0.1.290
func ApiSchema_FromS3File(bucket awss3.IBucket, objectKey *string) S3ApiSchema
Creates an API Schema from an S3 File. Experimental.
func InlineApiSchema_FromS3File ¶ added in v0.1.290
func InlineApiSchema_FromS3File(bucket awss3.IBucket, objectKey *string) S3ApiSchema
Creates an API Schema from an S3 File. Experimental.
func S3ApiSchema_FromS3File ¶ added in v0.1.290
func S3ApiSchema_FromS3File(bucket awss3.IBucket, objectKey *string) S3ApiSchema
Creates an API Schema from an S3 File. Experimental.
type S3DataSource ¶
type S3DataSource interface { DataSourceNew // The bucket associated with the data source. // Experimental. Bucket() awss3.IBucket // The unique identifier of the data source. // // Example: // 'JHUEVXUZMU' // // Experimental. DataSourceId() *string // The name of the data source. // Experimental. DataSourceName() *string // The type of data source. // Experimental. DataSourceType() DataSourceType // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. // Experimental. Env() *awscdk.ResourceEnvironment // The KMS key to use to encrypt the data source. // Experimental. KmsKey() awskms.IKey // The knowledge base associated with the data source. // Experimental. KnowledgeBase() IKnowledgeBase // The tree node. // Experimental. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. // Experimental. PhysicalName() *string // The stack in which this resource is defined. // Experimental. Stack() awscdk.Stack // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). // Experimental. ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Formats the data source configuration properties for CloudFormation. // Experimental. FormatAsCfnProps(props *DataSourceAssociationProps, dataSourceConfiguration *awsbedrock.CfnDataSource_DataSourceConfigurationProperty) *awsbedrock.CfnDataSourceProps // Experimental. GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. // Experimental. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. // Experimental. GetResourceNameAttribute(nameAttr *string) *string // Adds appropriate permissions to the KB execution role needed by the data source. // Experimental. HandleCommonPermissions(props *DataSourceAssociationProps) // Returns a string representation of this construct. // Experimental. ToString() *string }
Sets up an S3 Data Source to be added to a knowledge base. Experimental.
func NewS3DataSource ¶
func NewS3DataSource(scope constructs.Construct, id *string, props *S3DataSourceProps) S3DataSource
Experimental.
type S3DataSourceAssociationProps ¶ added in v0.1.270
type S3DataSourceAssociationProps struct { // The chunking stategy to use for splitting your documents or content. // // The chunks are then converted to embeddings and written to the vector // index allowing for similarity search and retrieval of the content. // Default: ChunkingStrategy.DEFAULT // // Experimental. ChunkingStrategy ChunkingStrategy `field:"optional" json:"chunkingStrategy" yaml:"chunkingStrategy"` // The custom transformation strategy to use. // Default: - No custom transformation is used. // // Experimental. CustomTransformation CustomTransformation `field:"optional" json:"customTransformation" yaml:"customTransformation"` // The data deletion policy to apply to the data source. // Default: - Sets the data deletion policy to the default of the data source type. // // Experimental. DataDeletionPolicy DataDeletionPolicy `field:"optional" json:"dataDeletionPolicy" yaml:"dataDeletionPolicy"` // The name of the data source. // Default: - A new name will be generated. // // Experimental. DataSourceName *string `field:"optional" json:"dataSourceName" yaml:"dataSourceName"` // A description of the data source. // Default: - No description is provided. // // Experimental. Description *string `field:"optional" json:"description" yaml:"description"` // The KMS key to use to encrypt the data source. // Default: - Service owned and managed key. // // Experimental. KmsKey awskms.IKey `field:"optional" json:"kmsKey" yaml:"kmsKey"` // The parsing strategy to use. // Default: - No Parsing Stategy is used. // // Experimental. ParsingStrategy ParsingStategy `field:"optional" json:"parsingStrategy" yaml:"parsingStrategy"` // The bucket that contains the data source. // Experimental. Bucket awss3.IBucket `field:"required" json:"bucket" yaml:"bucket"` // The prefixes of the objects in the bucket that should be included in the data source. // Default: - All objects in the bucket. // // Experimental. InclusionPrefixes *[]*string `field:"optional" json:"inclusionPrefixes" yaml:"inclusionPrefixes"` }
Interface to add a new S3DataSource to an existing KB. Experimental.
type S3DataSourceProps ¶
type S3DataSourceProps struct { // The chunking stategy to use for splitting your documents or content. // // The chunks are then converted to embeddings and written to the vector // index allowing for similarity search and retrieval of the content. // Default: ChunkingStrategy.DEFAULT // // Experimental. ChunkingStrategy ChunkingStrategy `field:"optional" json:"chunkingStrategy" yaml:"chunkingStrategy"` // The custom transformation strategy to use. // Default: - No custom transformation is used. // // Experimental. CustomTransformation CustomTransformation `field:"optional" json:"customTransformation" yaml:"customTransformation"` // The data deletion policy to apply to the data source. // Default: - Sets the data deletion policy to the default of the data source type. // // Experimental. DataDeletionPolicy DataDeletionPolicy `field:"optional" json:"dataDeletionPolicy" yaml:"dataDeletionPolicy"` // The name of the data source. // Default: - A new name will be generated. // // Experimental. DataSourceName *string `field:"optional" json:"dataSourceName" yaml:"dataSourceName"` // A description of the data source. // Default: - No description is provided. // // Experimental. Description *string `field:"optional" json:"description" yaml:"description"` // The KMS key to use to encrypt the data source. // Default: - Service owned and managed key. // // Experimental. KmsKey awskms.IKey `field:"optional" json:"kmsKey" yaml:"kmsKey"` // The parsing strategy to use. // Default: - No Parsing Stategy is used. // // Experimental. ParsingStrategy ParsingStategy `field:"optional" json:"parsingStrategy" yaml:"parsingStrategy"` // The bucket that contains the data source. // Experimental. Bucket awss3.IBucket `field:"required" json:"bucket" yaml:"bucket"` // The prefixes of the objects in the bucket that should be included in the data source. // Default: - All objects in the bucket. // // Experimental. InclusionPrefixes *[]*string `field:"optional" json:"inclusionPrefixes" yaml:"inclusionPrefixes"` // The knowledge base to associate with the data source. // Experimental. KnowledgeBase IKnowledgeBase `field:"required" json:"knowledgeBase" yaml:"knowledgeBase"` }
Interface to create a new S3 Data Source object. Experimental.
type SalesforceCrawlingFilters ¶ added in v0.1.270
type SalesforceCrawlingFilters struct { // The Salesforce object type to which this filter applies. // Experimental. ObjectType SalesforceObjectType `field:"required" json:"objectType" yaml:"objectType"` // Regular expression patterns to exclude specific content. // Experimental. ExcludePatterns *[]*string `field:"optional" json:"excludePatterns" yaml:"excludePatterns"` // Regular expression patterns to include specific content. // Experimental. IncludePatterns *[]*string `field:"optional" json:"includePatterns" yaml:"includePatterns"` }
Defines the crawling filters for Salesforce data ingestion. Experimental.
type SalesforceDataSource ¶ added in v0.1.270
type SalesforceDataSource interface { DataSourceNew // The AWS Secrets Manager secret that stores your authentication credentials. // Experimental. AuthSecret() awssecretsmanager.ISecret // The unique identifier of the data source. // // Example: // 'JHUEVXUZMU' // // Experimental. DataSourceId() *string // The name of the data source. // Experimental. DataSourceName() *string // The type of data source. // Experimental. DataSourceType() DataSourceType // The Salesforce host URL or instance URL. // Experimental. Endpoint() *string // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. // Experimental. Env() *awscdk.ResourceEnvironment // The KMS key to use to encrypt the data source. // Experimental. KmsKey() awskms.IKey // The knowledge base associated with the data source. // Experimental. KnowledgeBase() IKnowledgeBase // The tree node. // Experimental. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. // Experimental. PhysicalName() *string // The stack in which this resource is defined. // Experimental. Stack() awscdk.Stack // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). // Experimental. ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Formats the data source configuration properties for CloudFormation. // Experimental. FormatAsCfnProps(props *DataSourceAssociationProps, dataSourceConfiguration *awsbedrock.CfnDataSource_DataSourceConfigurationProperty) *awsbedrock.CfnDataSourceProps // Experimental. GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. // Experimental. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. // Experimental. GetResourceNameAttribute(nameAttr *string) *string // Adds appropriate permissions to the KB execution role needed by the data source. // Experimental. HandleCommonPermissions(props *DataSourceAssociationProps) // Returns a string representation of this construct. // Experimental. ToString() *string }
Sets up an data source to be added to a knowledge base. Experimental.
func NewSalesforceDataSource ¶ added in v0.1.270
func NewSalesforceDataSource(scope constructs.Construct, id *string, props *SalesforceDataSourceProps) SalesforceDataSource
Experimental.
type SalesforceDataSourceAssociationProps ¶ added in v0.1.270
type SalesforceDataSourceAssociationProps struct { // The chunking stategy to use for splitting your documents or content. // // The chunks are then converted to embeddings and written to the vector // index allowing for similarity search and retrieval of the content. // Default: ChunkingStrategy.DEFAULT // // Experimental. ChunkingStrategy ChunkingStrategy `field:"optional" json:"chunkingStrategy" yaml:"chunkingStrategy"` // The custom transformation strategy to use. // Default: - No custom transformation is used. // // Experimental. CustomTransformation CustomTransformation `field:"optional" json:"customTransformation" yaml:"customTransformation"` // The data deletion policy to apply to the data source. // Default: - Sets the data deletion policy to the default of the data source type. // // Experimental. DataDeletionPolicy DataDeletionPolicy `field:"optional" json:"dataDeletionPolicy" yaml:"dataDeletionPolicy"` // The name of the data source. // Default: - A new name will be generated. // // Experimental. DataSourceName *string `field:"optional" json:"dataSourceName" yaml:"dataSourceName"` // A description of the data source. // Default: - No description is provided. // // Experimental. Description *string `field:"optional" json:"description" yaml:"description"` // The KMS key to use to encrypt the data source. // Default: - Service owned and managed key. // // Experimental. KmsKey awskms.IKey `field:"optional" json:"kmsKey" yaml:"kmsKey"` // The parsing strategy to use. // Default: - No Parsing Stategy is used. // // Experimental. ParsingStrategy ParsingStategy `field:"optional" json:"parsingStrategy" yaml:"parsingStrategy"` // The AWS Secrets Manager secret that stores your authentication credentials for your Salesforce instance URL. // // Secret must start with "AmazonBedrock-". // Experimental. AuthSecret awssecretsmanager.ISecret `field:"required" json:"authSecret" yaml:"authSecret"` // The Salesforce host URL or instance URL. // // Example: // "https://company.salesforce.com/" // // Experimental. Endpoint *string `field:"required" json:"endpoint" yaml:"endpoint"` // The filters (regular expression patterns) for the crawling. // // If there's a conflict, the exclude pattern takes precedence. // Default: None - all your content is crawled. // // Experimental. Filters *[]*SalesforceCrawlingFilters `field:"optional" json:"filters" yaml:"filters"` }
Interface to add a new data source to an existing KB. Experimental.
type SalesforceDataSourceAuthType ¶ added in v0.1.270
type SalesforceDataSourceAuthType string
Represents the authentication types available for connecting to a Salesforce data source. Experimental.
const ( // Your secret authentication credentials in AWS Secrets Manager should include: - `consumerKey` (app client ID) - `consumerSecret` (client secret) - `authenticationUrl`. // Experimental. SalesforceDataSourceAuthType_OAUTH2_CLIENT_CREDENTIALS SalesforceDataSourceAuthType = "OAUTH2_CLIENT_CREDENTIALS" )
type SalesforceDataSourceProps ¶ added in v0.1.270
type SalesforceDataSourceProps struct { // The chunking stategy to use for splitting your documents or content. // // The chunks are then converted to embeddings and written to the vector // index allowing for similarity search and retrieval of the content. // Default: ChunkingStrategy.DEFAULT // // Experimental. ChunkingStrategy ChunkingStrategy `field:"optional" json:"chunkingStrategy" yaml:"chunkingStrategy"` // The custom transformation strategy to use. // Default: - No custom transformation is used. // // Experimental. CustomTransformation CustomTransformation `field:"optional" json:"customTransformation" yaml:"customTransformation"` // The data deletion policy to apply to the data source. // Default: - Sets the data deletion policy to the default of the data source type. // // Experimental. DataDeletionPolicy DataDeletionPolicy `field:"optional" json:"dataDeletionPolicy" yaml:"dataDeletionPolicy"` // The name of the data source. // Default: - A new name will be generated. // // Experimental. DataSourceName *string `field:"optional" json:"dataSourceName" yaml:"dataSourceName"` // A description of the data source. // Default: - No description is provided. // // Experimental. Description *string `field:"optional" json:"description" yaml:"description"` // The KMS key to use to encrypt the data source. // Default: - Service owned and managed key. // // Experimental. KmsKey awskms.IKey `field:"optional" json:"kmsKey" yaml:"kmsKey"` // The parsing strategy to use. // Default: - No Parsing Stategy is used. // // Experimental. ParsingStrategy ParsingStategy `field:"optional" json:"parsingStrategy" yaml:"parsingStrategy"` // The AWS Secrets Manager secret that stores your authentication credentials for your Salesforce instance URL. // // Secret must start with "AmazonBedrock-". // Experimental. AuthSecret awssecretsmanager.ISecret `field:"required" json:"authSecret" yaml:"authSecret"` // The Salesforce host URL or instance URL. // // Example: // "https://company.salesforce.com/" // // Experimental. Endpoint *string `field:"required" json:"endpoint" yaml:"endpoint"` // The filters (regular expression patterns) for the crawling. // // If there's a conflict, the exclude pattern takes precedence. // Default: None - all your content is crawled. // // Experimental. Filters *[]*SalesforceCrawlingFilters `field:"optional" json:"filters" yaml:"filters"` // The knowledge base to associate with the data source. // Experimental. KnowledgeBase IKnowledgeBase `field:"required" json:"knowledgeBase" yaml:"knowledgeBase"` }
Interface to create a new standalone data source object. Experimental.
type SalesforceObjectType ¶ added in v0.1.270
type SalesforceObjectType string
Represents the Salesforce object types that can be accessed by the data source connector. Experimental.
const ( // Experimental. SalesforceObjectType_ACCOUNT SalesforceObjectType = "ACCOUNT" // Experimental. SalesforceObjectType_ATTACHMENT SalesforceObjectType = "ATTACHMENT" // Experimental. SalesforceObjectType_CAMPAIGN SalesforceObjectType = "CAMPAIGN" // Experimental. SalesforceObjectType_CONTENT_VERSION SalesforceObjectType = "CONTENT_VERSION" // Experimental. SalesforceObjectType_PARTNER SalesforceObjectType = "PARTNER" // Experimental. SalesforceObjectType_PRICEBOOK_2 SalesforceObjectType = "PRICEBOOK_2" // Experimental. SalesforceObjectType_CASE SalesforceObjectType = "CASE" // Experimental. SalesforceObjectType_CONTACT SalesforceObjectType = "CONTACT" // Experimental. SalesforceObjectType_CONTRACT SalesforceObjectType = "CONTRACT" // Experimental. SalesforceObjectType_DOCUMENT SalesforceObjectType = "DOCUMENT" // Experimental. SalesforceObjectType_IDEA SalesforceObjectType = "IDEA" // Experimental. SalesforceObjectType_LEAD SalesforceObjectType = "LEAD" // Experimental. SalesforceObjectType_OPPORTUNITY SalesforceObjectType = "OPPORTUNITY" // Experimental. SalesforceObjectType_PRODUCT_2 SalesforceObjectType = "PRODUCT_2" // Experimental. SalesforceObjectType_SOLUTION SalesforceObjectType = "SOLUTION" // Experimental. SalesforceObjectType_TASK SalesforceObjectType = "TASK" // Experimental. SalesforceObjectType_FEED_ITEM SalesforceObjectType = "FEED_ITEM" // Experimental. SalesforceObjectType_FEED_COMMENT SalesforceObjectType = "FEED_COMMENT" // Experimental. SalesforceObjectType_KNOWLEDGE_KAV SalesforceObjectType = "KNOWLEDGE_KAV" // Experimental. SalesforceObjectType_USER SalesforceObjectType = "USER" // Experimental. SalesforceObjectType_COLLABORATION_GROUP SalesforceObjectType = "COLLABORATION_GROUP" )
type SessionSummaryMemoryProps ¶ added in v0.1.295
type SessionSummaryMemoryProps struct { // Maximum number of recent session summaries to include (min 1). // Default: 20. // // Experimental. MaxRecentSessions *float64 `field:"optional" json:"maxRecentSessions" yaml:"maxRecentSessions"` // Duration in days for which session summaries are retained (1-365). // Default: 30. // // Experimental. MemoryDurationDays *float64 `field:"optional" json:"memoryDurationDays" yaml:"memoryDurationDays"` }
Experimental.
type SharePointCrawlingFilters ¶ added in v0.1.270
type SharePointCrawlingFilters struct { // Experimental. ObjectType SharePointObjectType `field:"required" json:"objectType" yaml:"objectType"` // // Content matching these patterns will be skipped during crawling. // // Example: // ['.*private.*', '.*confidential.*'] // // Experimental. ExcludePatterns *[]*string `field:"optional" json:"excludePatterns" yaml:"excludePatterns"` // // Only content matching these patterns will be crawled. // // Example: // ['.*public.*', '.*shared.*'] // // Experimental. IncludePatterns *[]*string `field:"optional" json:"includePatterns" yaml:"includePatterns"` }
Defines the crawling filters for SharePoint data ingestion.
These filters allow you to specify which content should be included or excluded during the crawling process. If you specify an inclusion and exclusion filter and both match a document, the exclusion filter takes precedence and the document isn’t crawled. Experimental.
type SharePointDataSource ¶ added in v0.1.270
type SharePointDataSource interface { DataSourceNew // Experimental. AuthSecret() awssecretsmanager.ISecret // // Example: // 'JHUEVXUZMU' // // Experimental. DataSourceId() *string // Experimental. DataSourceName() *string // Experimental. DataSourceType() DataSourceType // Experimental. Domain() *string // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. // Experimental. Env() *awscdk.ResourceEnvironment // Experimental. KmsKey() awskms.IKey // Experimental. KnowledgeBase() IKnowledgeBase // Experimental. Node() constructs.Node // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. // Experimental. PhysicalName() *string // Experimental. SiteUrls() *[]*string // Experimental. Stack() awscdk.Stack // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). // Experimental. ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Experimental. FormatAsCfnProps(props *DataSourceAssociationProps, dataSourceConfiguration *awsbedrock.CfnDataSource_DataSourceConfigurationProperty) *awsbedrock.CfnDataSourceProps GeneratePhysicalName() *string // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. // Experimental. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. // Experimental. GetResourceNameAttribute(nameAttr *string) *string // Experimental. HandleCommonPermissions(props *DataSourceAssociationProps) // Experimental. ToString() *string }
Sets up an data source to be added to a knowledge base. Experimental.
func NewSharePointDataSource ¶ added in v0.1.270
func NewSharePointDataSource(scope constructs.Construct, id *string, props *SharePointDataSourceProps) SharePointDataSource
Experimental.
type SharePointDataSourceAssociationProps ¶ added in v0.1.270
type SharePointDataSourceAssociationProps struct { // // The chunks are then converted to embeddings and written to the vector // index allowing for similarity search and retrieval of the content. // Default: ChunkingStrategy.DEFAULT // // Experimental. ChunkingStrategy ChunkingStrategy `field:"optional" json:"chunkingStrategy" yaml:"chunkingStrategy"` // Default: - No custom transformation is used. // // Experimental. CustomTransformation CustomTransformation `field:"optional" json:"customTransformation" yaml:"customTransformation"` // Default: - Sets the data deletion policy to the default of the data source type. // // Experimental. DataDeletionPolicy DataDeletionPolicy `field:"optional" json:"dataDeletionPolicy" yaml:"dataDeletionPolicy"` // Default: - A new name will be generated. // // Experimental. DataSourceName *string `field:"optional" json:"dataSourceName" yaml:"dataSourceName"` // Default: - No description is provided. // // Experimental. Description *string `field:"optional" json:"description" yaml:"description"` // Default: - Service owned and managed key. // // Experimental. KmsKey awskms.IKey `field:"optional" json:"kmsKey" yaml:"kmsKey"` // Default: - No Parsing Stategy is used. // // Experimental. ParsingStrategy ParsingStategy `field:"optional" json:"parsingStrategy" yaml:"parsingStrategy"` // // Secret must start with "AmazonBedrock-". // Experimental. AuthSecret awssecretsmanager.ISecret `field:"required" json:"authSecret" yaml:"authSecret"` // // Example: // "yourdomain" // // Experimental. Domain *string `field:"required" json:"domain" yaml:"domain"` // // Must start with “https”. All URLs must start with same protocol. // // Example: // ["https://yourdomain.sharepoint.com/sites/mysite"] // // Experimental. SiteUrls *[]*string `field:"required" json:"siteUrls" yaml:"siteUrls"` // // Example: // "d1c035a6-1dcf-457d-97e3" // // Experimental. TenantId *string `field:"required" json:"tenantId" yaml:"tenantId"` // // If there's a conflict, the exclude pattern takes precedence. // Default: None - all your content is crawled. // // Experimental. Filters *[]*SharePointCrawlingFilters `field:"optional" json:"filters" yaml:"filters"` }
Interface to add a new data source to an existing KB. Experimental.
type SharePointDataSourceAuthType ¶ added in v0.1.270
type SharePointDataSourceAuthType string
Represents the authentication types available for connecting to a SharePoint data source. Experimental.
const ( // Experimental. SharePointDataSourceAuthType_OAUTH2_CLIENT_CREDENTIALS SharePointDataSourceAuthType = "OAUTH2_CLIENT_CREDENTIALS" )
type SharePointDataSourceProps ¶ added in v0.1.270
type SharePointDataSourceProps struct { // // The chunks are then converted to embeddings and written to the vector // index allowing for similarity search and retrieval of the content. // Default: ChunkingStrategy.DEFAULT // // Experimental. ChunkingStrategy ChunkingStrategy `field:"optional" json:"chunkingStrategy" yaml:"chunkingStrategy"` // Default: - No custom transformation is used. // // Experimental. CustomTransformation CustomTransformation `field:"optional" json:"customTransformation" yaml:"customTransformation"` // Default: - Sets the data deletion policy to the default of the data source type. // // Experimental. DataDeletionPolicy DataDeletionPolicy `field:"optional" json:"dataDeletionPolicy" yaml:"dataDeletionPolicy"` // Default: - A new name will be generated. // // Experimental. DataSourceName *string `field:"optional" json:"dataSourceName" yaml:"dataSourceName"` // Default: - No description is provided. // // Experimental. Description *string `field:"optional" json:"description" yaml:"description"` // Default: - Service owned and managed key. // // Experimental. KmsKey awskms.IKey `field:"optional" json:"kmsKey" yaml:"kmsKey"` // Default: - No Parsing Stategy is used. // // Experimental. ParsingStrategy ParsingStategy `field:"optional" json:"parsingStrategy" yaml:"parsingStrategy"` // // Secret must start with "AmazonBedrock-". // Experimental. AuthSecret awssecretsmanager.ISecret `field:"required" json:"authSecret" yaml:"authSecret"` // // Example: // "yourdomain" // // Experimental. Domain *string `field:"required" json:"domain" yaml:"domain"` // // Must start with “https”. All URLs must start with same protocol. // // Example: // ["https://yourdomain.sharepoint.com/sites/mysite"] // // Experimental. SiteUrls *[]*string `field:"required" json:"siteUrls" yaml:"siteUrls"` // // Example: // "d1c035a6-1dcf-457d-97e3" // // Experimental. TenantId *string `field:"required" json:"tenantId" yaml:"tenantId"` // // If there's a conflict, the exclude pattern takes precedence. // Default: None - all your content is crawled. // // Experimental. Filters *[]*SharePointCrawlingFilters `field:"optional" json:"filters" yaml:"filters"` // Experimental. KnowledgeBase IKnowledgeBase `field:"required" json:"knowledgeBase" yaml:"knowledgeBase"` }
Interface to create a new standalone data source object. Experimental.
type SharePointObjectType ¶ added in v0.1.270
type SharePointObjectType string
Represents the SharePoint object types that can be accessed by the data source connector. Experimental.
const ( // Experimental. SharePointObjectType_PAGE SharePointObjectType = "PAGE" // Experimental. SharePointObjectType_EVENT SharePointObjectType = "EVENT" // Experimental. SharePointObjectType_FILE SharePointObjectType = "FILE" )
type TextPromptVariantProps ¶ added in v0.1.262
type TextPromptVariantProps struct { // The model which is used to run the prompt. // // The model could be a foundation // model, a custom model, or a provisioned model. // Experimental. Model IInvokable `field:"required" json:"model" yaml:"model"` // The name of the prompt variant. // Experimental. VariantName *string `field:"required" json:"variantName" yaml:"variantName"` // The variables in the prompt template that can be filled in at runtime. // Experimental. PromptVariables *[]*string `field:"optional" json:"promptVariables" yaml:"promptVariables"` // The text prompt. // // Variables are used by enclosing its name with double curly braces // as in `{{variable_name}}`. // Experimental. PromptText *string `field:"required" json:"promptText" yaml:"promptText"` // Inference configuration for the Text Prompt. // Experimental. InferenceConfiguration *awsbedrock.CfnPrompt_PromptModelInferenceConfigurationProperty `field:"optional" json:"inferenceConfiguration" yaml:"inferenceConfiguration"` }
Experimental.
type ToolChoice ¶ added in v0.1.289
type ToolChoice interface { // Experimental. Any() interface{} // Experimental. Auto() interface{} // Experimental. Tool() *string }
Experimental.
func NewToolChoice ¶ added in v0.1.289
func NewToolChoice(any interface{}, auto interface{}, tool *string) ToolChoice
Experimental.
func ToolChoice_ANY ¶ added in v0.1.289
func ToolChoice_ANY() ToolChoice
func ToolChoice_AUTO ¶ added in v0.1.289
func ToolChoice_AUTO() ToolChoice
func ToolChoice_SpecificTool ¶ added in v0.1.289
func ToolChoice_SpecificTool(toolName *string) ToolChoice
The Model must request the specified tool.
Only supported by some models like Anthropic Claude 3 models. Experimental.
type ToolConfiguration ¶ added in v0.1.289
type ToolConfiguration struct { // Experimental. ToolChoice ToolChoice `field:"required" json:"toolChoice" yaml:"toolChoice"` // Experimental. Tools *[]*awsbedrock.CfnPrompt_ToolProperty `field:"required" json:"tools" yaml:"tools"` }
Experimental.
type Topic ¶
type Topic interface { // Definition of the topic. // Experimental. Definition() *string // Representative phrases that refer to the topic. // Experimental. Examples() *[]*string // The name of the topic to deny. // Experimental. Name() *string }
Defines a topic to deny. Experimental.
func Topic_Custom ¶ added in v0.1.276
func Topic_Custom(props *CustomTopicProps) Topic
Experimental.
func Topic_FINANCIAL_ADVICE ¶ added in v0.1.276
func Topic_FINANCIAL_ADVICE() Topic
func Topic_INAPPROPRIATE_CONTENT ¶ added in v0.1.293
func Topic_INAPPROPRIATE_CONTENT() Topic
func Topic_LEGAL_ADVICE ¶ added in v0.1.276
func Topic_LEGAL_ADVICE() Topic
func Topic_MEDICAL_ADVICE ¶ added in v0.1.276
func Topic_MEDICAL_ADVICE() Topic
func Topic_POLITICAL_ADVICE ¶ added in v0.1.276
func Topic_POLITICAL_ADVICE() Topic
type TransformationStep ¶ added in v0.1.270
type TransformationStep string
Defines the step in the ingestion process where the custom transformation is applied. Experimental.
const ( // Processes documents after they have been converted into chunks. // // This allows for custom chunk-level metadata addition or custom post-chunking logic. // Experimental. TransformationStep_POST_CHUNKING TransformationStep = "POST_CHUNKING" )
type VectorKnowledgeBase ¶ added in v0.1.292
type VectorKnowledgeBase interface { KnowledgeBaseBase IVectorKnowledgeBase // A description of the knowledge base. // Experimental. Description() *string // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. // Experimental. Env() *awscdk.ResourceEnvironment // Instructions for agents based on the design and type of information of the Knowledge Base. // // This will impact how Agents interact with the Knowledge Base. // Experimental. Instruction() *string // The ARN of the knowledge base. // Experimental. KnowledgeBaseArn() *string // The ID of the knowledge base. // Experimental. KnowledgeBaseId() *string // Instance of knowledge base. // Experimental. KnowledgeBaseInstance() awsbedrock.CfnKnowledgeBase // The name of the knowledge base. // Experimental. Name() *string // The tree node. // Experimental. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. // Experimental. PhysicalName() *string // The role the Knowledge Base uses to access the vector store and data source. // Experimental. Role() awsiam.IRole // The stack in which this resource is defined. // Experimental. Stack() awscdk.Stack // The type of knowledge base. // Experimental. Type() KnowledgeBaseType // The vector store for the knowledge base. // Experimental. VectorStore() interface{} // Add a Confluence data source to the knowledge base. // Experimental. AddConfluenceDataSource(props *ConfluenceDataSourceAssociationProps) ConfluenceDataSource // Add an S3 data source to the knowledge base. // Experimental. AddS3DataSource(props *S3DataSourceAssociationProps) S3DataSource // Add a Salesforce data source to the knowledge base. // Experimental. AddSalesforceDataSource(props *SalesforceDataSourceAssociationProps) SalesforceDataSource // Experimental. AddSharePointDataSource(props *SharePointDataSourceAssociationProps) SharePointDataSource // Add a web crawler data source to the knowledge base. // Experimental. AddWebCrawlerDataSource(props *WebCrawlerDataSourceAssociationProps) WebCrawlerDataSource // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). // Experimental. ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Associate knowledge base with an agent. // Experimental. AssociateToAgent(agent Agent) // Experimental. GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. // Experimental. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. // Experimental. GetResourceNameAttribute(nameAttr *string) *string // Grant the given principal identity permissions to perform actions on this knowledge base. // Experimental. Grant(grantee awsiam.IGrantable, actions ...*string) awsiam.Grant // Grant the given identity permissions to query the knowledge base. // // This contains: // - Retrieve // - RetrieveAndGenerate. // Experimental. GrantQuery(grantee awsiam.IGrantable) awsiam.Grant // Grant the given identity permissions to retrieve content from the knowledge base. // Experimental. GrantRetrieve(grantee awsiam.IGrantable) awsiam.Grant // Grant the given identity permissions to retrieve content from the knowledge base. // Experimental. GrantRetrieveAndGenerate(grantee awsiam.IGrantable) awsiam.Grant // Returns a string representation of this construct. // Experimental. ToString() *string }
Deploys a Bedrock Knowledge Base and configures a backend by OpenSearch Serverless, Pinecone, Redis Enterprise Cloud or Amazon Aurora PostgreSQL. Experimental.
func NewVectorKnowledgeBase ¶ added in v0.1.292
func NewVectorKnowledgeBase(scope constructs.Construct, id *string, props *VectorKnowledgeBaseProps) VectorKnowledgeBase
Experimental.
type VectorKnowledgeBaseAttributes ¶ added in v0.1.292
type VectorKnowledgeBaseAttributes struct { // The Service Execution Role associated with the knowledge base. // // Example: // "arn:aws:iam::123456789012:role/AmazonBedrockExecutionRoleForKnowledgeBaseawscdkbdgeBaseKB12345678" // // Experimental. ExecutionRoleArn *string `field:"required" json:"executionRoleArn" yaml:"executionRoleArn"` // The ID of the knowledge base. // // Example: // "KB12345678" // // Experimental. KnowledgeBaseId *string `field:"required" json:"knowledgeBaseId" yaml:"knowledgeBaseId"` // The description of the knowledge base. // Default: - No description provided. // // Experimental. Description *string `field:"optional" json:"description" yaml:"description"` // Instructions for agents based on the design and type of information of the Knowledge Base. // // This will impact how Agents interact with the Knowledge Base. // Default: - No description provided. // // Experimental. Instruction *string `field:"optional" json:"instruction" yaml:"instruction"` // Specifies whether to use the knowledge base or not when sending an InvokeAgent request. // Default: - ENABLED. // // Experimental. KnowledgeBaseState *string `field:"optional" json:"knowledgeBaseState" yaml:"knowledgeBaseState"` }
Properties for importing a knowledge base outside of this stack. Experimental.
type VectorKnowledgeBaseProps ¶ added in v0.1.292
type VectorKnowledgeBaseProps struct { // The description of the knowledge base. // Default: - No description provided. // // Experimental. Description *string `field:"optional" json:"description" yaml:"description"` // Existing IAM role with policy statements granting appropriate permissions to invoke the specific embeddings models. // // Any entity (e.g., an AWS service or application) that assumes // this role will be able to invoke or use the // specified embeddings model within the Bedrock service. // Experimental. ExistingRole awsiam.IRole `field:"optional" json:"existingRole" yaml:"existingRole"` // A narrative description of the knowledge base. // // A Bedrock Agent can use this instruction to determine if it should // query this Knowledge Base. // Default: - No description provided. // // Experimental. Instruction *string `field:"optional" json:"instruction" yaml:"instruction"` // The name of the knowledge base. // Experimental. Name *string `field:"optional" json:"name" yaml:"name"` // The embeddings model for the knowledge base. // Experimental. EmbeddingsModel BedrockFoundationModel `field:"required" json:"embeddingsModel" yaml:"embeddingsModel"` // The name of the vector index. // // If vectorStore is not of type `VectorCollection`, // do not include this property as it will throw error. // Default: - 'bedrock-knowledge-base-default-index'. // // Experimental. IndexName *string `field:"optional" json:"indexName" yaml:"indexName"` // The name of the field in the vector index. // // If vectorStore is not of type `VectorCollection`, // do not include this property as it will throw error. // Default: - 'bedrock-knowledge-base-default-vector'. // // Experimental. VectorField *string `field:"optional" json:"vectorField" yaml:"vectorField"` // The vector index for the OpenSearch Serverless backed knowledge base. // // If vectorStore is not of type `VectorCollection`, do not include // this property as it will throw error. // Default: - A new vector index is created on the Vector Collection // if vector store is of `VectorCollection` type. // // Experimental. VectorIndex opensearchvectorindex.VectorIndex `field:"optional" json:"vectorIndex" yaml:"vectorIndex"` // The vector store for the knowledge base. // // Must be either of // type `VectorCollection`, `RedisEnterpriseVectorStore`, // `PineconeVectorStore` or `AmazonAuroraVectorStore`. // Default: - A new OpenSearch Serverless vector collection is created. // // Experimental. VectorStore interface{} `field:"optional" json:"vectorStore" yaml:"vectorStore"` // The vector type to store vector embeddings. // Default: - VectorType.FLOATING_POINT // // Experimental. VectorType VectorType `field:"optional" json:"vectorType" yaml:"vectorType"` }
Properties for a knowledge base. Experimental.
type VectorType ¶ added in v0.1.293
type VectorType string
The data type for the vectors when using a model to convert text into vector embeddings.
The model must support the specified data type for vector embeddings. Floating-point (float32) is the default data type, and is supported by most models for vector embeddings. See Supported embeddings models for information on the available models and their vector data types. Experimental.
const ( // `FLOATING_POINT` convert the data to floating-point (float32) vector embeddings (more precise, but more costly). // Experimental. VectorType_FLOATING_POINT VectorType = "FLOATING_POINT" // `BINARY` convert the data to binary vector embeddings (less precise, but less costly). // Experimental. VectorType_BINARY VectorType = "BINARY" )
type WebCrawlerDataSource ¶ added in v0.1.270
type WebCrawlerDataSource interface { DataSourceNew // The max rate at which pages are crawled. // Experimental. CrawlingRate() *float64 // The unique identifier of the data source. // // Example: // 'JHUEVXUZMU' // // Experimental. DataSourceId() *string // The name of the data source. // Experimental. DataSourceName() *string // The type of data source. // Experimental. DataSourceType() DataSourceType // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. // Experimental. Env() *awscdk.ResourceEnvironment // The KMS key to use to encrypt the data source. // Experimental. KmsKey() awskms.IKey // The knowledge base associated with the data source. // Experimental. KnowledgeBase() IKnowledgeBase // The tree node. // Experimental. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. // Experimental. PhysicalName() *string // The max rate at which pages are crawled. // Experimental. SiteUrls() *[]*string // The stack in which this resource is defined. // Experimental. Stack() awscdk.Stack // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). // Experimental. ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Formats the data source configuration properties for CloudFormation. // Experimental. FormatAsCfnProps(props *DataSourceAssociationProps, dataSourceConfiguration *awsbedrock.CfnDataSource_DataSourceConfigurationProperty) *awsbedrock.CfnDataSourceProps // Experimental. GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. // Experimental. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. // Experimental. GetResourceNameAttribute(nameAttr *string) *string // Adds appropriate permissions to the KB execution role needed by the data source. // Experimental. HandleCommonPermissions(props *DataSourceAssociationProps) // Returns a string representation of this construct. // Experimental. ToString() *string }
Sets up a web crawler data source to be added to a knowledge base. Experimental.
func NewWebCrawlerDataSource ¶ added in v0.1.270
func NewWebCrawlerDataSource(scope constructs.Construct, id *string, props *WebCrawlerDataSourceProps) WebCrawlerDataSource
Experimental.
type WebCrawlerDataSourceAssociationProps ¶ added in v0.1.270
type WebCrawlerDataSourceAssociationProps struct { // The chunking stategy to use for splitting your documents or content. // // The chunks are then converted to embeddings and written to the vector // index allowing for similarity search and retrieval of the content. // Default: ChunkingStrategy.DEFAULT // // Experimental. ChunkingStrategy ChunkingStrategy `field:"optional" json:"chunkingStrategy" yaml:"chunkingStrategy"` // The custom transformation strategy to use. // Default: - No custom transformation is used. // // Experimental. CustomTransformation CustomTransformation `field:"optional" json:"customTransformation" yaml:"customTransformation"` // The data deletion policy to apply to the data source. // Default: - Sets the data deletion policy to the default of the data source type. // // Experimental. DataDeletionPolicy DataDeletionPolicy `field:"optional" json:"dataDeletionPolicy" yaml:"dataDeletionPolicy"` // The name of the data source. // Default: - A new name will be generated. // // Experimental. DataSourceName *string `field:"optional" json:"dataSourceName" yaml:"dataSourceName"` // A description of the data source. // Default: - No description is provided. // // Experimental. Description *string `field:"optional" json:"description" yaml:"description"` // The KMS key to use to encrypt the data source. // Default: - Service owned and managed key. // // Experimental. KmsKey awskms.IKey `field:"optional" json:"kmsKey" yaml:"kmsKey"` // The parsing strategy to use. // Default: - No Parsing Stategy is used. // // Experimental. ParsingStrategy ParsingStategy `field:"optional" json:"parsingStrategy" yaml:"parsingStrategy"` // The source urls in the format `https://www.sitename.com`. Maximum of 100 URLs. // Experimental. SourceUrls *[]*string `field:"required" json:"sourceUrls" yaml:"sourceUrls"` // The max rate at which pages are crawled, up to 300 per minute per host. // // Higher values will decrease sync time but increase the load on the host. // Default: 300. // // Experimental. CrawlingRate *float64 `field:"optional" json:"crawlingRate" yaml:"crawlingRate"` // The scope of the crawling. // Default: - CrawlingScope.DEFAULT // // Experimental. CrawlingScope CrawlingScope `field:"optional" json:"crawlingScope" yaml:"crawlingScope"` // The filters (regular expression patterns) for the crawling. // // If there's a conflict, the exclude pattern takes precedence. // Default: None. // // Experimental. Filters *CrawlingFilters `field:"optional" json:"filters" yaml:"filters"` }
Interface to add a new data source to an existing KB. Experimental.
type WebCrawlerDataSourceProps ¶ added in v0.1.270
type WebCrawlerDataSourceProps struct { // The chunking stategy to use for splitting your documents or content. // // The chunks are then converted to embeddings and written to the vector // index allowing for similarity search and retrieval of the content. // Default: ChunkingStrategy.DEFAULT // // Experimental. ChunkingStrategy ChunkingStrategy `field:"optional" json:"chunkingStrategy" yaml:"chunkingStrategy"` // The custom transformation strategy to use. // Default: - No custom transformation is used. // // Experimental. CustomTransformation CustomTransformation `field:"optional" json:"customTransformation" yaml:"customTransformation"` // The data deletion policy to apply to the data source. // Default: - Sets the data deletion policy to the default of the data source type. // // Experimental. DataDeletionPolicy DataDeletionPolicy `field:"optional" json:"dataDeletionPolicy" yaml:"dataDeletionPolicy"` // The name of the data source. // Default: - A new name will be generated. // // Experimental. DataSourceName *string `field:"optional" json:"dataSourceName" yaml:"dataSourceName"` // A description of the data source. // Default: - No description is provided. // // Experimental. Description *string `field:"optional" json:"description" yaml:"description"` // The KMS key to use to encrypt the data source. // Default: - Service owned and managed key. // // Experimental. KmsKey awskms.IKey `field:"optional" json:"kmsKey" yaml:"kmsKey"` // The parsing strategy to use. // Default: - No Parsing Stategy is used. // // Experimental. ParsingStrategy ParsingStategy `field:"optional" json:"parsingStrategy" yaml:"parsingStrategy"` // The source urls in the format `https://www.sitename.com`. Maximum of 100 URLs. // Experimental. SourceUrls *[]*string `field:"required" json:"sourceUrls" yaml:"sourceUrls"` // The max rate at which pages are crawled, up to 300 per minute per host. // // Higher values will decrease sync time but increase the load on the host. // Default: 300. // // Experimental. CrawlingRate *float64 `field:"optional" json:"crawlingRate" yaml:"crawlingRate"` // The scope of the crawling. // Default: - CrawlingScope.DEFAULT // // Experimental. CrawlingScope CrawlingScope `field:"optional" json:"crawlingScope" yaml:"crawlingScope"` // The filters (regular expression patterns) for the crawling. // // If there's a conflict, the exclude pattern takes precedence. // Default: None. // // Experimental. Filters *CrawlingFilters `field:"optional" json:"filters" yaml:"filters"` // The knowledge base to associate with the data source. // Experimental. KnowledgeBase IKnowledgeBase `field:"required" json:"knowledgeBase" yaml:"knowledgeBase"` }
Interface to create a new standalone data source object. Experimental.
Source Files
¶
- ActionGroupExecutor.go
- ActionGroupExecutor__checks.go
- Agent.go
- AgentActionGroup.go
- AgentActionGroupProps.go
- AgentActionGroup__checks.go
- AgentAlias.go
- AgentAliasAttributes.go
- AgentAliasBase.go
- AgentAliasBase__checks.go
- AgentAliasProps.go
- AgentAlias__checks.go
- AgentAttributes.go
- AgentBase.go
- AgentBase__checks.go
- AgentPromptVariantProps.go
- AgentProps.go
- AgentStepType.go
- Agent__checks.go
- ApiSchema.go
- ApiSchema__checks.go
- ApplicationInferenceProfile.go
- ApplicationInferenceProfileAttributes.go
- ApplicationInferenceProfileProps.go
- ApplicationInferenceProfile__checks.go
- BedrockFoundationModel.go
- BedrockFoundationModelProps.go
- BedrockFoundationModel__checks.go
- ChatMessage.go
- ChatMessageRole.go
- ChatMessage__checks.go
- ChatPromptVariantProps.go
- ChunkingStrategy.go
- ChunkingStrategy__checks.go
- CommonKnowledgeBaseAttributes.go
- CommonKnowledgeBaseProps.go
- CommonPromptVariantProps.go
- ConfluenceCrawlingFilters.go
- ConfluenceDataSource.go
- ConfluenceDataSourceAssociationProps.go
- ConfluenceDataSourceAuthType.go
- ConfluenceDataSourceProps.go
- ConfluenceDataSource__checks.go
- ConfluenceObjectType.go
- ContentFilter.go
- ContentFilterStrength.go
- ContentFilterType.go
- ContextualGroundingFilter.go
- ContextualGroundingFilterType.go
- CrawlingFilters.go
- CrawlingScope.go
- CrossRegionInferenceProfile.go
- CrossRegionInferenceProfileProps.go
- CrossRegionInferenceProfileRegion.go
- CrossRegionInferenceProfile__checks.go
- CustomParserProps.go
- CustomTopicProps.go
- CustomTransformation.go
- CustomTransformation__checks.go
- DataDeletionPolicy.go
- DataSource.go
- DataSourceAssociationProps.go
- DataSourceBase.go
- DataSourceBase__checks.go
- DataSourceNew.go
- DataSourceNew__checks.go
- DataSourceType.go
- DataSource__checks.go
- DefaultPromptRouterIdentifier.go
- FoundationModelParsingStategyProps.go
- Guardrail.go
- GuardrailAction.go
- GuardrailAttributes.go
- GuardrailBase.go
- GuardrailBase__checks.go
- GuardrailProps.go
- Guardrail__checks.go
- HierarchicalChunkingProps.go
- IAgent.go
- IAgentAlias.go
- IAgentAlias__checks.go
- IDataSource.go
- IGuardrail.go
- IGuardrail__checks.go
- IInferenceProfile.go
- IInferenceProfile__checks.go
- IInvokable.go
- IInvokable__checks.go
- IKendraKnowledgeBase.go
- IKnowledgeBase.go
- IKnowledgeBase__checks.go
- IPrompt.go
- IPromptRouter.go
- IPrompt__checks.go
- IVectorKnowledgeBase.go
- IVectorKnowledgeBase__checks.go
- InferenceConfiguration.go
- InferenceProfileBase.go
- InferenceProfileBase__checks.go
- InferenceProfileType.go
- InlineApiSchema.go
- InlineApiSchema__checks.go
- KendraKnowledgeBase.go
- KendraKnowledgeBaseAttributes.go
- KendraKnowledgeBaseBase.go
- KendraKnowledgeBaseBase__checks.go
- KendraKnowledgeBaseProps.go
- KendraKnowledgeBase__checks.go
- KnowledgeBaseBase.go
- KnowledgeBaseBase__checks.go
- KnowledgeBaseType.go
- LambdaCustomTransformationProps.go
- ManagedWordFilterType.go
- Memory.go
- Memory__checks.go
- PIIFilter.go
- ParentActionGroupSignature.go
- ParentActionGroupSignature__checks.go
- ParsingModality.go
- ParsingStategy.go
- ParsingStategyType.go
- ParsingStategy__checks.go
- Prompt.go
- PromptAttributes.go
- PromptBase.go
- PromptBase__checks.go
- PromptOverrideConfiguration.go
- PromptOverrideConfiguration__checks.go
- PromptProps.go
- PromptRouter.go
- PromptRouterProps.go
- PromptRouter__checks.go
- PromptStepConfiguration.go
- PromptStepConfigurationCustomParser.go
- PromptTemplateType.go
- PromptVariant.go
- PromptVariant__checks.go
- PromptVersion.go
- PromptVersionProps.go
- PromptVersion__checks.go
- Prompt__checks.go
- RegexFilter.go
- S3ApiSchema.go
- S3ApiSchema__checks.go
- S3DataSource.go
- S3DataSourceAssociationProps.go
- S3DataSourceProps.go
- S3DataSource__checks.go
- SalesforceCrawlingFilters.go
- SalesforceDataSource.go
- SalesforceDataSourceAssociationProps.go
- SalesforceDataSourceAuthType.go
- SalesforceDataSourceProps.go
- SalesforceDataSource__checks.go
- SalesforceObjectType.go
- SessionSummaryMemoryProps.go
- SharePointCrawlingFilters.go
- SharePointDataSource.go
- SharePointDataSourceAssociationProps.go
- SharePointDataSourceAuthType.go
- SharePointDataSourceProps.go
- SharePointDataSource__checks.go
- SharePointObjectType.go
- TextPromptVariantProps.go
- ToolChoice.go
- ToolChoice__checks.go
- ToolConfiguration.go
- Topic.go
- Topic__checks.go
- TransformationStep.go
- VectorKnowledgeBase.go
- VectorKnowledgeBaseAttributes.go
- VectorKnowledgeBaseProps.go
- VectorKnowledgeBase__checks.go
- VectorType.go
- WebCrawlerDataSource.go
- WebCrawlerDataSourceAssociationProps.go
- WebCrawlerDataSourceProps.go
- WebCrawlerDataSource__checks.go
- main.go