UNPKG

@cdktf/provider-aws

Version:

Prebuilt aws Provider for Terraform CDK (cdktf)

1,146 lines 181 kB
"use strict"; var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k; Object.defineProperty(exports, "__esModule", { value: true }); exports.BedrockagentAgent = exports.BedrockagentAgentTimeoutsOutputReference = exports.bedrockagentAgentTimeoutsToHclTerraform = exports.bedrockagentAgentTimeoutsToTerraform = exports.BedrockagentAgentPromptOverrideConfigurationList = exports.BedrockagentAgentPromptOverrideConfigurationOutputReference = exports.bedrockagentAgentPromptOverrideConfigurationToHclTerraform = exports.bedrockagentAgentPromptOverrideConfigurationToTerraform = exports.BedrockagentAgentPromptOverrideConfigurationPromptConfigurationsList = exports.BedrockagentAgentPromptOverrideConfigurationPromptConfigurationsOutputReference = exports.bedrockagentAgentPromptOverrideConfigurationPromptConfigurationsToHclTerraform = exports.bedrockagentAgentPromptOverrideConfigurationPromptConfigurationsToTerraform = exports.BedrockagentAgentPromptOverrideConfigurationPromptConfigurationsInferenceConfigurationList = exports.BedrockagentAgentPromptOverrideConfigurationPromptConfigurationsInferenceConfigurationOutputReference = exports.bedrockagentAgentPromptOverrideConfigurationPromptConfigurationsInferenceConfigurationToHclTerraform = exports.bedrockagentAgentPromptOverrideConfigurationPromptConfigurationsInferenceConfigurationToTerraform = exports.BedrockagentAgentGuardrailConfigurationList = exports.BedrockagentAgentGuardrailConfigurationOutputReference = exports.bedrockagentAgentGuardrailConfigurationToHclTerraform = exports.bedrockagentAgentGuardrailConfigurationToTerraform = void 0; 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), }; } exports.bedrockagentAgentGuardrailConfigurationToTerraform = bedrockagentAgentGuardrailConfigurationToTerraform; 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)); } exports.bedrockagentAgentGuardrailConfigurationToHclTerraform = bedrockagentAgentGuardrailConfigurationToHclTerraform; 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: "19.50.0" }; 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: "19.50.0" }; 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), }; } exports.bedrockagentAgentPromptOverrideConfigurationPromptConfigurationsInferenceConfigurationToTerraform = bedrockagentAgentPromptOverrideConfigurationPromptConfigurationsInferenceConfigurationToTerraform; 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)); } exports.bedrockagentAgentPromptOverrideConfigurationPromptConfigurationsInferenceConfigurationToHclTerraform = bedrockagentAgentPromptOverrideConfigurationPromptConfigurationsInferenceConfigurationToHclTerraform; 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; _c = JSII_RTTI_SYMBOL_1; BedrockagentAgentPromptOverrideConfigurationPromptConfigurationsInferenceConfigurationOutputReference[_c] = { fqn: "@cdktf/provider-aws.bedrockagentAgent.BedrockagentAgentPromptOverrideConfigurationPromptConfigurationsInferenceConfigurationOutputReference", version: "19.50.0" }; 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; _d = JSII_RTTI_SYMBOL_1; BedrockagentAgentPromptOverrideConfigurationPromptConfigurationsInferenceConfigurationList[_d] = { fqn: "@cdktf/provider-aws.bedrockagentAgent.BedrockagentAgentPromptOverrideConfigurationPromptConfigurationsInferenceConfigurationList", version: "19.50.0" }; 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), }; } exports.bedrockagentAgentPromptOverrideConfigurationPromptConfigurationsToTerraform = bedrockagentAgentPromptOverrideConfigurationPromptConfigurationsToTerraform; 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)); } exports.bedrockagentAgentPromptOverrideConfigurationPromptConfigurationsToHclTerraform = bedrockagentAgentPromptOverrideConfigurationPromptConfigurationsToHclTerraform; 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; _e = JSII_RTTI_SYMBOL_1; BedrockagentAgentPromptOverrideConfigurationPromptConfigurationsOutputReference[_e] = { fqn: "@cdktf/provider-aws.bedrockagentAgent.BedrockagentAgentPromptOverrideConfigurationPromptConfigurationsOutputReference", version: "19.50.0" }; 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; _f = JSII_RTTI_SYMBOL_1; BedrockagentAgentPromptOverrideConfigurationPromptConfigurationsList[_f] = { fqn: "@cdktf/provider-aws.bedrockagentAgent.BedrockagentAgentPromptOverrideConfigurationPromptConfigurationsList", version: "19.50.0" }; 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), }; } exports.bedrockagentAgentPromptOverrideConfigurationToTerraform = bedrockagentAgentPromptOverrideConfigurationToTerraform; 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)); } exports.bedrockagentAgentPromptOverrideConfigurationToHclTerraform = bedrockagentAgentPromptOverrideConfigurationToHclTerraform; 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; _g = JSII_RTTI_SYMBOL_1; BedrockagentAgentPromptOverrideConfigurationOutputReference[_g] = { fqn: "@cdktf/provider-aws.bedrockagentAgent.BedrockagentAgentPromptOverrideConfigurationOutputReference", version: "19.50.0" }; 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; _h = JSII_RTTI_SYMBOL_1; BedrockagentAgentPromptOverrideConfigurationList[_h] = { fqn: "@cdktf/provider-aws.bedrockagentAgent.BedrockagentAgentPromptOverrideConfigurationList", version: "19.50.0" }; 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), }; } exports.bedrockagentAgentTimeoutsToTerraform = bedrockagentAgentTimeoutsToTerraform; 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)); } exports.bedrockagentAgentTimeoutsToHclTerraform = bedrockagentAgentTimeoutsToHclTerraform; 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; _j = JSII_RTTI_SYMBOL_1; BedrockagentAgentTimeoutsOutputReference[_j] = { fqn: "@cdktf/provider-aws.bedrockagentAgent.BedrockagentAgentTimeoutsOutputReference", version: "19.50.0" }; /** * Represents a {@link https://registry.terraform.io/providers/hashicorp/aws/5.84.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/5.84.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/5.84.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: '5.84.0', providerVersionConstraint: '~> 5.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); // 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._prepareAgent = config.prepareAgent; this._promptOverrideConfiguration.internalValue = config.promptOverrideConfiguration; 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_version'); } get customerEncryptionKeyArn() { return this.getStringAttribute('customer_encryption_key_arn'); } set customerEncryptionKeyArn(value) { this._customerEncryptionKeyArn = value; } resetCustomerEncryptionKeyArn() { this._customerEncryptionKeyArn = undefined; } // Temporarily expose input value. Use with caution. get customerEncryptionKeyArnInput() { return this._customerEncryptionKeyArn; } get description() { return this.getStringAttribute('description'); } set description(value) { this._description = value; } resetDescription() { this._description = undefined; } // Temporarily expose input value. Use with caution. get descriptionInput() { return this._description; } get foundationModel() { return this.getStringAttribute('foundation_model'); } set foundationModel(value) { this._foundationModel = value; } // Temporarily expose input value. Use with caution. get foundationModelInput() { return this._foundationModel; } get guardrailConfiguration() { return this._guardrailConfiguration; } putGuardrailConfiguration(value) { this._guardrailConfiguration.internalValue = value; } resetGuardrailConfiguration() { this._guardrailConfiguration.internalValue = undefined; } // Temporarily expose input value. Use with caution. get guardrailConfigurationInput() { return this._guardrailConfiguration.internalValue; } // id - computed: true, optional: false, required: false get id() { return this.getStringAttribute('id'); } get idleSessionTtlInSeconds() { return this.getNumberAttribute('idle_session_ttl_in_seconds'); } set idleSessionTtlInSeconds(value) { this._idleSessionTtlInSeconds = value; } resetIdleSessionTtlInSeconds() { this._idleSessionTtlInSeconds = undefined; } // Temporarily expose input value. Use with caution. get idleSessionTtlInSecondsInput() { return this._idleSessionTtlInSeconds; } get instruction() { return this.getStringAttribute('instruction'); } set instruction(value) { this._instruction = value; } resetInstruction() { this._instruction = undefined; } // Temporarily expose input value. Use with caution. get instructionInput() { return this._instruction; } get prepareAgent() { return this.getBooleanAttribute('prepare_agent'); } set prepareAgent(value) { this._prepareAgent = value; } resetPrepareAgent() { this._prepareAgent = undefined; } // Temporarily expose input value. Use with caution. get prepareAgentInput() { return this._prepareAgent; } get promptOverrideConfiguration() { return this._promptOverrideConfiguration; } putPromptOverrideConfiguration(value) { this._promptOverrideConfiguration.internalValue = value; } resetPromptOverrideConfiguration() { this._promptOverrideConfiguration.internalValue = undefined; } // Temporarily expose input value. Use with caution. get promptOverrideConfigurationInput() { return this._promptOverrideConfiguration.internalValue; } get skipResourceInUseCheck() { return this.getBooleanAttribute('skip_resource_in_use_check'); } set skipResourceInUseCheck(value) { this._skipResourceInUseCheck = value; } resetSkipResourceInUseCheck() { this._skipResourceInUseCheck = undefined; } // Temporarily expose input value. Use with caution. get skipResourceInUseCheckInput() { return this._skipResourceInUseCheck; } get tags() { return this.getStringMapAttribute('tags'); } set tags(value) { this._tags = value; } resetTags() { this._tags = undefined; } // Temporarily expose input value. Use with caution. get tagsInput() { return this._tags; } get tagsAll() { return this._tagsAll; } get timeouts() { return this._timeouts; } putTimeouts(value) { this._timeouts.internalValue = value; } resetTimeouts() { this._timeouts.internalValue = undefined; } // Temporarily expose input value. Use with caution. get timeoutsInput() { return this._timeouts.internalValue; } // ========= // SYNTHESIS // ========= synthesizeAttributes() { return { agent_collaboration: cdktf.stringToTerraform(this._agentCollaboration), agent_name: cdktf.stringToTerraform(this._agentName), agent_resource_role_arn: cdktf.stringToTerraform(this._agentResourceRoleArn), customer_encryption_key_arn: cdktf.stringToTerraform(this._customerEncryptionKeyArn), description: cdktf.stringToTerraform(this._description), foundation_model: cdktf.stringToTerraform(this._foundationModel), guardrail_configuration: cdktf.listMapper(bedrockagentAgentGuardrailConfigurationToTerraform, false)(this._guardrailConfiguration.internalValue), idle_session_ttl_in_seconds: cdktf.numberToTerraform(this._idleSessionTtlInSeconds), instruction: cdktf.stringToTerraform(this._instruction), prepare_agent: cdktf.booleanToTerraform(this._prepareAgent), prompt_override_configuration: cdktf.listMapper(bedrockagentAgentPromptOverrideConfigurationToTerraform, false)(this._promptOverrideCon