UNPKG

@cdktf/provider-aws

Version:

Prebuilt aws Provider for Terraform CDK (cdktf)

1,121 lines 207 kB
"use strict"; var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m; Object.defineProperty(exports, "__esModule", { value: true }); exports.BedrockagentAgent = exports.BedrockagentAgentTimeoutsOutputReference = exports.BedrockagentAgentPromptOverrideConfigurationList = exports.BedrockagentAgentPromptOverrideConfigurationOutputReference = exports.BedrockagentAgentPromptOverrideConfigurationPromptConfigurationsList = exports.BedrockagentAgentPromptOverrideConfigurationPromptConfigurationsOutputReference = exports.BedrockagentAgentPromptOverrideConfigurationPromptConfigurationsInferenceConfigurationList = exports.BedrockagentAgentPromptOverrideConfigurationPromptConfigurationsInferenceConfigurationOutputReference = exports.BedrockagentAgentMemoryConfigurationList = exports.BedrockagentAgentMemoryConfigurationOutputReference = exports.BedrockagentAgentGuardrailConfigurationList = exports.BedrockagentAgentGuardrailConfigurationOutputReference = void 0; exports.bedrockagentAgentGuardrailConfigurationToTerraform = bedrockagentAgentGuardrailConfigurationToTerraform; exports.bedrockagentAgentGuardrailConfigurationToHclTerraform = bedrockagentAgentGuardrailConfigurationToHclTerraform; exports.bedrockagentAgentMemoryConfigurationToTerraform = bedrockagentAgentMemoryConfigurationToTerraform; exports.bedrockagentAgentMemoryConfigurationToHclTerraform = bedrockagentAgentMemoryConfigurationToHclTerraform; exports.bedrockagentAgentPromptOverrideConfigurationPromptConfigurationsInferenceConfigurationToTerraform = bedrockagentAgentPromptOverrideConfigurationPromptConfigurationsInferenceConfigurationToTerraform; exports.bedrockagentAgentPromptOverrideConfigurationPromptConfigurationsInferenceConfigurationToHclTerraform = bedrockagentAgentPromptOverrideConfigurationPromptConfigurationsInferenceConfigurationToHclTerraform; exports.bedrockagentAgentPromptOverrideConfigurationPromptConfigurationsToTerraform = bedrockagentAgentPromptOverrideConfigurationPromptConfigurationsToTerraform; exports.bedrockagentAgentPromptOverrideConfigurationPromptConfigurationsToHclTerraform = bedrockagentAgentPromptOverrideConfigurationPromptConfigurationsToHclTerraform; exports.bedrockagentAgentPromptOverrideConfigurationToTerraform = bedrockagentAgentPromptOverrideConfigurationToTerraform; exports.bedrockagentAgentPromptOverrideConfigurationToHclTerraform = bedrockagentAgentPromptOverrideConfigurationToHclTerraform; exports.bedrockagentAgentTimeoutsToTerraform = bedrockagentAgentTimeoutsToTerraform; exports.bedrockagentAgentTimeoutsToHclTerraform = bedrockagentAgentTimeoutsToHclTerraform; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const cdktf = require("cdktf"); function bedrockagentAgentGuardrailConfigurationToTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { guardrail_identifier: cdktf.stringToTerraform(struct.guardrailIdentifier), guardrail_version: cdktf.stringToTerraform(struct.guardrailVersion), }; } function bedrockagentAgentGuardrailConfigurationToHclTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } const attrs = { guardrail_identifier: { value: cdktf.stringToHclTerraform(struct.guardrailIdentifier), isBlock: false, type: "simple", storageClassType: "string", }, guardrail_version: { value: cdktf.stringToHclTerraform(struct.guardrailVersion), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class BedrockagentAgentGuardrailConfigurationOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param complexObjectIndex the index of this item in the list * @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) { super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex); this.isEmptyObject = false; } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._guardrailIdentifier !== undefined) { hasAnyValues = true; internalValueResult.guardrailIdentifier = this._guardrailIdentifier; } if (this._guardrailVersion !== undefined) { hasAnyValues = true; internalValueResult.guardrailVersion = this._guardrailVersion; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._guardrailIdentifier = undefined; this._guardrailVersion = undefined; } else if (cdktf.Tokenization.isResolvable(value)) { this.isEmptyObject = false; this.resolvableValue = value; } else { this.isEmptyObject = Object.keys(value).length === 0; this.resolvableValue = undefined; this._guardrailIdentifier = value.guardrailIdentifier; this._guardrailVersion = value.guardrailVersion; } } get guardrailIdentifier() { return this.getStringAttribute('guardrail_identifier'); } set guardrailIdentifier(value) { this._guardrailIdentifier = value; } resetGuardrailIdentifier() { this._guardrailIdentifier = undefined; } // Temporarily expose input value. Use with caution. get guardrailIdentifierInput() { return this._guardrailIdentifier; } get guardrailVersion() { return this.getStringAttribute('guardrail_version'); } set guardrailVersion(value) { this._guardrailVersion = value; } resetGuardrailVersion() { this._guardrailVersion = undefined; } // Temporarily expose input value. Use with caution. get guardrailVersionInput() { return this._guardrailVersion; } } exports.BedrockagentAgentGuardrailConfigurationOutputReference = BedrockagentAgentGuardrailConfigurationOutputReference; _a = JSII_RTTI_SYMBOL_1; BedrockagentAgentGuardrailConfigurationOutputReference[_a] = { fqn: "@cdktf/provider-aws.bedrockagentAgent.BedrockagentAgentGuardrailConfigurationOutputReference", version: "21.22.1" }; class BedrockagentAgentGuardrailConfigurationList extends cdktf.ComplexList { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource, terraformAttribute, wrapsSet) { super(terraformResource, terraformAttribute, wrapsSet); this.terraformResource = terraformResource; this.terraformAttribute = terraformAttribute; this.wrapsSet = wrapsSet; } /** * @param index the index of the item to return */ get(index) { return new BedrockagentAgentGuardrailConfigurationOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.BedrockagentAgentGuardrailConfigurationList = BedrockagentAgentGuardrailConfigurationList; _b = JSII_RTTI_SYMBOL_1; BedrockagentAgentGuardrailConfigurationList[_b] = { fqn: "@cdktf/provider-aws.bedrockagentAgent.BedrockagentAgentGuardrailConfigurationList", version: "21.22.1" }; function bedrockagentAgentMemoryConfigurationToTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { enabled_memory_types: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.enabledMemoryTypes), storage_days: cdktf.numberToTerraform(struct.storageDays), }; } function bedrockagentAgentMemoryConfigurationToHclTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } const attrs = { enabled_memory_types: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.enabledMemoryTypes), isBlock: false, type: "list", storageClassType: "stringList", }, storage_days: { value: cdktf.numberToHclTerraform(struct.storageDays), isBlock: false, type: "simple", storageClassType: "number", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class BedrockagentAgentMemoryConfigurationOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param complexObjectIndex the index of this item in the list * @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) { super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex); this.isEmptyObject = false; } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._enabledMemoryTypes !== undefined) { hasAnyValues = true; internalValueResult.enabledMemoryTypes = this._enabledMemoryTypes; } if (this._storageDays !== undefined) { hasAnyValues = true; internalValueResult.storageDays = this._storageDays; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._enabledMemoryTypes = undefined; this._storageDays = undefined; } else if (cdktf.Tokenization.isResolvable(value)) { this.isEmptyObject = false; this.resolvableValue = value; } else { this.isEmptyObject = Object.keys(value).length === 0; this.resolvableValue = undefined; this._enabledMemoryTypes = value.enabledMemoryTypes; this._storageDays = value.storageDays; } } get enabledMemoryTypes() { return this.getListAttribute('enabled_memory_types'); } set enabledMemoryTypes(value) { this._enabledMemoryTypes = value; } resetEnabledMemoryTypes() { this._enabledMemoryTypes = undefined; } // Temporarily expose input value. Use with caution. get enabledMemoryTypesInput() { return this._enabledMemoryTypes; } get storageDays() { return this.getNumberAttribute('storage_days'); } set storageDays(value) { this._storageDays = value; } resetStorageDays() { this._storageDays = undefined; } // Temporarily expose input value. Use with caution. get storageDaysInput() { return this._storageDays; } } exports.BedrockagentAgentMemoryConfigurationOutputReference = BedrockagentAgentMemoryConfigurationOutputReference; _c = JSII_RTTI_SYMBOL_1; BedrockagentAgentMemoryConfigurationOutputReference[_c] = { fqn: "@cdktf/provider-aws.bedrockagentAgent.BedrockagentAgentMemoryConfigurationOutputReference", version: "21.22.1" }; class BedrockagentAgentMemoryConfigurationList extends cdktf.ComplexList { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource, terraformAttribute, wrapsSet) { super(terraformResource, terraformAttribute, wrapsSet); this.terraformResource = terraformResource; this.terraformAttribute = terraformAttribute; this.wrapsSet = wrapsSet; } /** * @param index the index of the item to return */ get(index) { return new BedrockagentAgentMemoryConfigurationOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.BedrockagentAgentMemoryConfigurationList = BedrockagentAgentMemoryConfigurationList; _d = JSII_RTTI_SYMBOL_1; BedrockagentAgentMemoryConfigurationList[_d] = { fqn: "@cdktf/provider-aws.bedrockagentAgent.BedrockagentAgentMemoryConfigurationList", version: "21.22.1" }; function bedrockagentAgentPromptOverrideConfigurationPromptConfigurationsInferenceConfigurationToTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { max_length: cdktf.numberToTerraform(struct.maxLength), stop_sequences: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.stopSequences), temperature: cdktf.numberToTerraform(struct.temperature), top_k: cdktf.numberToTerraform(struct.topK), top_p: cdktf.numberToTerraform(struct.topP), }; } function bedrockagentAgentPromptOverrideConfigurationPromptConfigurationsInferenceConfigurationToHclTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } const attrs = { max_length: { value: cdktf.numberToHclTerraform(struct.maxLength), isBlock: false, type: "simple", storageClassType: "number", }, stop_sequences: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.stopSequences), isBlock: false, type: "list", storageClassType: "stringList", }, temperature: { value: cdktf.numberToHclTerraform(struct.temperature), isBlock: false, type: "simple", storageClassType: "number", }, top_k: { value: cdktf.numberToHclTerraform(struct.topK), isBlock: false, type: "simple", storageClassType: "number", }, top_p: { value: cdktf.numberToHclTerraform(struct.topP), isBlock: false, type: "simple", storageClassType: "number", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class BedrockagentAgentPromptOverrideConfigurationPromptConfigurationsInferenceConfigurationOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param complexObjectIndex the index of this item in the list * @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) { super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex); this.isEmptyObject = false; } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._maxLength !== undefined) { hasAnyValues = true; internalValueResult.maxLength = this._maxLength; } if (this._stopSequences !== undefined) { hasAnyValues = true; internalValueResult.stopSequences = this._stopSequences; } if (this._temperature !== undefined) { hasAnyValues = true; internalValueResult.temperature = this._temperature; } if (this._topK !== undefined) { hasAnyValues = true; internalValueResult.topK = this._topK; } if (this._topP !== undefined) { hasAnyValues = true; internalValueResult.topP = this._topP; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._maxLength = undefined; this._stopSequences = undefined; this._temperature = undefined; this._topK = undefined; this._topP = undefined; } else if (cdktf.Tokenization.isResolvable(value)) { this.isEmptyObject = false; this.resolvableValue = value; } else { this.isEmptyObject = Object.keys(value).length === 0; this.resolvableValue = undefined; this._maxLength = value.maxLength; this._stopSequences = value.stopSequences; this._temperature = value.temperature; this._topK = value.topK; this._topP = value.topP; } } get maxLength() { return this.getNumberAttribute('max_length'); } set maxLength(value) { this._maxLength = value; } resetMaxLength() { this._maxLength = undefined; } // Temporarily expose input value. Use with caution. get maxLengthInput() { return this._maxLength; } get stopSequences() { return this.getListAttribute('stop_sequences'); } set stopSequences(value) { this._stopSequences = value; } resetStopSequences() { this._stopSequences = undefined; } // Temporarily expose input value. Use with caution. get stopSequencesInput() { return this._stopSequences; } get temperature() { return this.getNumberAttribute('temperature'); } set temperature(value) { this._temperature = value; } resetTemperature() { this._temperature = undefined; } // Temporarily expose input value. Use with caution. get temperatureInput() { return this._temperature; } get topK() { return this.getNumberAttribute('top_k'); } set topK(value) { this._topK = value; } resetTopK() { this._topK = undefined; } // Temporarily expose input value. Use with caution. get topKInput() { return this._topK; } get topP() { return this.getNumberAttribute('top_p'); } set topP(value) { this._topP = value; } resetTopP() { this._topP = undefined; } // Temporarily expose input value. Use with caution. get topPInput() { return this._topP; } } exports.BedrockagentAgentPromptOverrideConfigurationPromptConfigurationsInferenceConfigurationOutputReference = BedrockagentAgentPromptOverrideConfigurationPromptConfigurationsInferenceConfigurationOutputReference; _e = JSII_RTTI_SYMBOL_1; BedrockagentAgentPromptOverrideConfigurationPromptConfigurationsInferenceConfigurationOutputReference[_e] = { fqn: "@cdktf/provider-aws.bedrockagentAgent.BedrockagentAgentPromptOverrideConfigurationPromptConfigurationsInferenceConfigurationOutputReference", version: "21.22.1" }; class BedrockagentAgentPromptOverrideConfigurationPromptConfigurationsInferenceConfigurationList extends cdktf.ComplexList { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource, terraformAttribute, wrapsSet) { super(terraformResource, terraformAttribute, wrapsSet); this.terraformResource = terraformResource; this.terraformAttribute = terraformAttribute; this.wrapsSet = wrapsSet; } /** * @param index the index of the item to return */ get(index) { return new BedrockagentAgentPromptOverrideConfigurationPromptConfigurationsInferenceConfigurationOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.BedrockagentAgentPromptOverrideConfigurationPromptConfigurationsInferenceConfigurationList = BedrockagentAgentPromptOverrideConfigurationPromptConfigurationsInferenceConfigurationList; _f = JSII_RTTI_SYMBOL_1; BedrockagentAgentPromptOverrideConfigurationPromptConfigurationsInferenceConfigurationList[_f] = { fqn: "@cdktf/provider-aws.bedrockagentAgent.BedrockagentAgentPromptOverrideConfigurationPromptConfigurationsInferenceConfigurationList", version: "21.22.1" }; function bedrockagentAgentPromptOverrideConfigurationPromptConfigurationsToTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { base_prompt_template: cdktf.stringToTerraform(struct.basePromptTemplate), inference_configuration: cdktf.listMapper(bedrockagentAgentPromptOverrideConfigurationPromptConfigurationsInferenceConfigurationToTerraform, false)(struct.inferenceConfiguration), parser_mode: cdktf.stringToTerraform(struct.parserMode), prompt_creation_mode: cdktf.stringToTerraform(struct.promptCreationMode), prompt_state: cdktf.stringToTerraform(struct.promptState), prompt_type: cdktf.stringToTerraform(struct.promptType), }; } function bedrockagentAgentPromptOverrideConfigurationPromptConfigurationsToHclTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } const attrs = { base_prompt_template: { value: cdktf.stringToHclTerraform(struct.basePromptTemplate), isBlock: false, type: "simple", storageClassType: "string", }, inference_configuration: { value: cdktf.listMapperHcl(bedrockagentAgentPromptOverrideConfigurationPromptConfigurationsInferenceConfigurationToHclTerraform, false)(struct.inferenceConfiguration), isBlock: true, type: "list", storageClassType: "BedrockagentAgentPromptOverrideConfigurationPromptConfigurationsInferenceConfigurationList", }, parser_mode: { value: cdktf.stringToHclTerraform(struct.parserMode), isBlock: false, type: "simple", storageClassType: "string", }, prompt_creation_mode: { value: cdktf.stringToHclTerraform(struct.promptCreationMode), isBlock: false, type: "simple", storageClassType: "string", }, prompt_state: { value: cdktf.stringToHclTerraform(struct.promptState), isBlock: false, type: "simple", storageClassType: "string", }, prompt_type: { value: cdktf.stringToHclTerraform(struct.promptType), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class BedrockagentAgentPromptOverrideConfigurationPromptConfigurationsOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param complexObjectIndex the index of this item in the list * @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) { super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex); this.isEmptyObject = false; // inference_configuration - computed: true, optional: true, required: false this._inferenceConfiguration = new BedrockagentAgentPromptOverrideConfigurationPromptConfigurationsInferenceConfigurationList(this, "inference_configuration", false); } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._basePromptTemplate !== undefined) { hasAnyValues = true; internalValueResult.basePromptTemplate = this._basePromptTemplate; } if (this._inferenceConfiguration?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.inferenceConfiguration = this._inferenceConfiguration?.internalValue; } if (this._parserMode !== undefined) { hasAnyValues = true; internalValueResult.parserMode = this._parserMode; } if (this._promptCreationMode !== undefined) { hasAnyValues = true; internalValueResult.promptCreationMode = this._promptCreationMode; } if (this._promptState !== undefined) { hasAnyValues = true; internalValueResult.promptState = this._promptState; } if (this._promptType !== undefined) { hasAnyValues = true; internalValueResult.promptType = this._promptType; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._basePromptTemplate = undefined; this._inferenceConfiguration.internalValue = undefined; this._parserMode = undefined; this._promptCreationMode = undefined; this._promptState = undefined; this._promptType = undefined; } else if (cdktf.Tokenization.isResolvable(value)) { this.isEmptyObject = false; this.resolvableValue = value; } else { this.isEmptyObject = Object.keys(value).length === 0; this.resolvableValue = undefined; this._basePromptTemplate = value.basePromptTemplate; this._inferenceConfiguration.internalValue = value.inferenceConfiguration; this._parserMode = value.parserMode; this._promptCreationMode = value.promptCreationMode; this._promptState = value.promptState; this._promptType = value.promptType; } } get basePromptTemplate() { return this.getStringAttribute('base_prompt_template'); } set basePromptTemplate(value) { this._basePromptTemplate = value; } resetBasePromptTemplate() { this._basePromptTemplate = undefined; } // Temporarily expose input value. Use with caution. get basePromptTemplateInput() { return this._basePromptTemplate; } get inferenceConfiguration() { return this._inferenceConfiguration; } putInferenceConfiguration(value) { this._inferenceConfiguration.internalValue = value; } resetInferenceConfiguration() { this._inferenceConfiguration.internalValue = undefined; } // Temporarily expose input value. Use with caution. get inferenceConfigurationInput() { return this._inferenceConfiguration.internalValue; } get parserMode() { return this.getStringAttribute('parser_mode'); } set parserMode(value) { this._parserMode = value; } resetParserMode() { this._parserMode = undefined; } // Temporarily expose input value. Use with caution. get parserModeInput() { return this._parserMode; } get promptCreationMode() { return this.getStringAttribute('prompt_creation_mode'); } set promptCreationMode(value) { this._promptCreationMode = value; } resetPromptCreationMode() { this._promptCreationMode = undefined; } // Temporarily expose input value. Use with caution. get promptCreationModeInput() { return this._promptCreationMode; } get promptState() { return this.getStringAttribute('prompt_state'); } set promptState(value) { this._promptState = value; } resetPromptState() { this._promptState = undefined; } // Temporarily expose input value. Use with caution. get promptStateInput() { return this._promptState; } get promptType() { return this.getStringAttribute('prompt_type'); } set promptType(value) { this._promptType = value; } resetPromptType() { this._promptType = undefined; } // Temporarily expose input value. Use with caution. get promptTypeInput() { return this._promptType; } } exports.BedrockagentAgentPromptOverrideConfigurationPromptConfigurationsOutputReference = BedrockagentAgentPromptOverrideConfigurationPromptConfigurationsOutputReference; _g = JSII_RTTI_SYMBOL_1; BedrockagentAgentPromptOverrideConfigurationPromptConfigurationsOutputReference[_g] = { fqn: "@cdktf/provider-aws.bedrockagentAgent.BedrockagentAgentPromptOverrideConfigurationPromptConfigurationsOutputReference", version: "21.22.1" }; class BedrockagentAgentPromptOverrideConfigurationPromptConfigurationsList extends cdktf.ComplexList { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource, terraformAttribute, wrapsSet) { super(terraformResource, terraformAttribute, wrapsSet); this.terraformResource = terraformResource; this.terraformAttribute = terraformAttribute; this.wrapsSet = wrapsSet; } /** * @param index the index of the item to return */ get(index) { return new BedrockagentAgentPromptOverrideConfigurationPromptConfigurationsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.BedrockagentAgentPromptOverrideConfigurationPromptConfigurationsList = BedrockagentAgentPromptOverrideConfigurationPromptConfigurationsList; _h = JSII_RTTI_SYMBOL_1; BedrockagentAgentPromptOverrideConfigurationPromptConfigurationsList[_h] = { fqn: "@cdktf/provider-aws.bedrockagentAgent.BedrockagentAgentPromptOverrideConfigurationPromptConfigurationsList", version: "21.22.1" }; function bedrockagentAgentPromptOverrideConfigurationToTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { override_lambda: cdktf.stringToTerraform(struct.overrideLambda), prompt_configurations: cdktf.listMapper(bedrockagentAgentPromptOverrideConfigurationPromptConfigurationsToTerraform, false)(struct.promptConfigurations), }; } function bedrockagentAgentPromptOverrideConfigurationToHclTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } const attrs = { override_lambda: { value: cdktf.stringToHclTerraform(struct.overrideLambda), isBlock: false, type: "simple", storageClassType: "string", }, prompt_configurations: { value: cdktf.listMapperHcl(bedrockagentAgentPromptOverrideConfigurationPromptConfigurationsToHclTerraform, false)(struct.promptConfigurations), isBlock: true, type: "set", storageClassType: "BedrockagentAgentPromptOverrideConfigurationPromptConfigurationsList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class BedrockagentAgentPromptOverrideConfigurationOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param complexObjectIndex the index of this item in the list * @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) { super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex); this.isEmptyObject = false; // prompt_configurations - computed: true, optional: true, required: false this._promptConfigurations = new BedrockagentAgentPromptOverrideConfigurationPromptConfigurationsList(this, "prompt_configurations", true); } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._overrideLambda !== undefined) { hasAnyValues = true; internalValueResult.overrideLambda = this._overrideLambda; } if (this._promptConfigurations?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.promptConfigurations = this._promptConfigurations?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._overrideLambda = undefined; this._promptConfigurations.internalValue = undefined; } else if (cdktf.Tokenization.isResolvable(value)) { this.isEmptyObject = false; this.resolvableValue = value; } else { this.isEmptyObject = Object.keys(value).length === 0; this.resolvableValue = undefined; this._overrideLambda = value.overrideLambda; this._promptConfigurations.internalValue = value.promptConfigurations; } } get overrideLambda() { return this.getStringAttribute('override_lambda'); } set overrideLambda(value) { this._overrideLambda = value; } resetOverrideLambda() { this._overrideLambda = undefined; } // Temporarily expose input value. Use with caution. get overrideLambdaInput() { return this._overrideLambda; } get promptConfigurations() { return this._promptConfigurations; } putPromptConfigurations(value) { this._promptConfigurations.internalValue = value; } resetPromptConfigurations() { this._promptConfigurations.internalValue = undefined; } // Temporarily expose input value. Use with caution. get promptConfigurationsInput() { return this._promptConfigurations.internalValue; } } exports.BedrockagentAgentPromptOverrideConfigurationOutputReference = BedrockagentAgentPromptOverrideConfigurationOutputReference; _j = JSII_RTTI_SYMBOL_1; BedrockagentAgentPromptOverrideConfigurationOutputReference[_j] = { fqn: "@cdktf/provider-aws.bedrockagentAgent.BedrockagentAgentPromptOverrideConfigurationOutputReference", version: "21.22.1" }; class BedrockagentAgentPromptOverrideConfigurationList extends cdktf.ComplexList { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource, terraformAttribute, wrapsSet) { super(terraformResource, terraformAttribute, wrapsSet); this.terraformResource = terraformResource; this.terraformAttribute = terraformAttribute; this.wrapsSet = wrapsSet; } /** * @param index the index of the item to return */ get(index) { return new BedrockagentAgentPromptOverrideConfigurationOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.BedrockagentAgentPromptOverrideConfigurationList = BedrockagentAgentPromptOverrideConfigurationList; _k = JSII_RTTI_SYMBOL_1; BedrockagentAgentPromptOverrideConfigurationList[_k] = { fqn: "@cdktf/provider-aws.bedrockagentAgent.BedrockagentAgentPromptOverrideConfigurationList", version: "21.22.1" }; function bedrockagentAgentTimeoutsToTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { create: cdktf.stringToTerraform(struct.create), delete: cdktf.stringToTerraform(struct.delete), update: cdktf.stringToTerraform(struct.update), }; } function bedrockagentAgentTimeoutsToHclTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } const attrs = { create: { value: cdktf.stringToHclTerraform(struct.create), isBlock: false, type: "simple", storageClassType: "string", }, delete: { value: cdktf.stringToHclTerraform(struct.delete), isBlock: false, type: "simple", storageClassType: "string", }, update: { value: cdktf.stringToHclTerraform(struct.update), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class BedrockagentAgentTimeoutsOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing */ constructor(terraformResource, terraformAttribute) { super(terraformResource, terraformAttribute, false); this.isEmptyObject = false; } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._create !== undefined) { hasAnyValues = true; internalValueResult.create = this._create; } if (this._delete !== undefined) { hasAnyValues = true; internalValueResult.delete = this._delete; } if (this._update !== undefined) { hasAnyValues = true; internalValueResult.update = this._update; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._create = undefined; this._delete = undefined; this._update = undefined; } else if (cdktf.Tokenization.isResolvable(value)) { this.isEmptyObject = false; this.resolvableValue = value; } else { this.isEmptyObject = Object.keys(value).length === 0; this.resolvableValue = undefined; this._create = value.create; this._delete = value.delete; this._update = value.update; } } get create() { return this.getStringAttribute('create'); } set create(value) { this._create = value; } resetCreate() { this._create = undefined; } // Temporarily expose input value. Use with caution. get createInput() { return this._create; } get delete() { return this.getStringAttribute('delete'); } set delete(value) { this._delete = value; } resetDelete() { this._delete = undefined; } // Temporarily expose input value. Use with caution. get deleteInput() { return this._delete; } get update() { return this.getStringAttribute('update'); } set update(value) { this._update = value; } resetUpdate() { this._update = undefined; } // Temporarily expose input value. Use with caution. get updateInput() { return this._update; } } exports.BedrockagentAgentTimeoutsOutputReference = BedrockagentAgentTimeoutsOutputReference; _l = JSII_RTTI_SYMBOL_1; BedrockagentAgentTimeoutsOutputReference[_l] = { fqn: "@cdktf/provider-aws.bedrockagentAgent.BedrockagentAgentTimeoutsOutputReference", version: "21.22.1" }; /** * Represents a {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/bedrockagent_agent aws_bedrockagent_agent} */ class BedrockagentAgent extends cdktf.TerraformResource { // ============== // STATIC Methods // ============== /** * Generates CDKTF code for importing a BedrockagentAgent resource upon running "cdktf plan <stack-name>" * @param scope The scope in which to define this construct * @param importToId The construct id used in the generated config for the BedrockagentAgent to import * @param importFromId The id of the existing BedrockagentAgent that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/bedrockagent_agent#import import section} in the documentation of this resource for the id to use * @param provider? Optional instance of the provider where the BedrockagentAgent to import is found */ static generateConfigForImport(scope, importToId, importFromId, provider) { return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "aws_bedrockagent_agent", importId: importFromId, provider }); } // =========== // INITIALIZER // =========== /** * Create a new {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/bedrockagent_agent aws_bedrockagent_agent} Resource * * @param scope The scope in which to define this construct * @param id The scoped construct ID. Must be unique amongst siblings in the same scope * @param options BedrockagentAgentConfig */ constructor(scope, id, config) { super(scope, id, { terraformResourceType: 'aws_bedrockagent_agent', terraformGeneratorMetadata: { providerName: 'aws', providerVersion: '6.25.0', providerVersionConstraint: '~> 6.0' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle, provisioners: config.provisioners, connection: config.connection, forEach: config.forEach }); // guardrail_configuration - computed: false, optional: true, required: false this._guardrailConfiguration = new BedrockagentAgentGuardrailConfigurationList(this, "guardrail_configuration", false); // memory_configuration - computed: true, optional: true, required: false this._memoryConfiguration = new BedrockagentAgentMemoryConfigurationList(this, "memory_configuration", false); // prompt_override_configuration - computed: true, optional: true, required: false this._promptOverrideConfiguration = new BedrockagentAgentPromptOverrideConfigurationList(this, "prompt_override_configuration", false); // tags_all - computed: true, optional: false, required: false this._tagsAll = new cdktf.StringMap(this, "tags_all"); // timeouts - computed: false, optional: true, required: false this._timeouts = new BedrockagentAgentTimeoutsOutputReference(this, "timeouts"); this._agentCollaboration = config.agentCollaboration; this._agentName = config.agentName; this._agentResourceRoleArn = config.agentResourceRoleArn; this._customerEncryptionKeyArn = config.customerEncryptionKeyArn; this._description = config.description; this._foundationModel = config.foundationModel; this._guardrailConfiguration.internalValue = config.guardrailConfiguration; this._idleSessionTtlInSeconds = config.idleSessionTtlInSeconds; this._instruction = config.instruction; this._memoryConfiguration.internalValue = config.memoryConfiguration; this._prepareAgent = config.prepareAgent; this._promptOverrideConfiguration.internalValue = config.promptOverrideConfiguration; this._region = config.region; this._skipResourceInUseCheck = config.skipResourceInUseCheck; this._tags = config.tags; this._timeouts.internalValue = config.timeouts; } // ========== // ATTRIBUTES // ========== // agent_arn - computed: true, optional: false, required: false get agentArn() { return this.getStringAttribute('agent_arn'); } get agentCollaboration() { return this.getStringAttribute('agent_collaboration'); } set agentCollaboration(value) { this._agentCollaboration = value; } resetAgentCollaboration() { this._agentCollaboration = undefined; } // Temporarily expose input value. Use with caution. get agentCollaborationInput() { return this._agentCollaboration; } // agent_id - computed: true, optional: false, required: false get agentId() { return this.getStringAttribute('agent_id'); } get agentName() { return this.getStringAttribute('agent_name'); } set agentName(value) { this._agentName = value; } // Temporarily expose input value. Use with caution. get agentNameInput() { return this._agentName; } get agentResourceRoleArn() { return this.getStringAttribute('agent_resource_role_arn'); } set agentResourceRoleArn(value) { this._agentResourceRoleArn = value; } // Temporarily expose input value. Use with caution. get agentResourceRoleArnInput() { return this._agentResourceRoleArn; } // agent_version - computed: true, optional: false, required: false get agentVersion() { return this.getStringAttribute('agent_ve