@cdktf/provider-aws
Version:
Prebuilt aws Provider for Terraform CDK (cdktf)
1,122 lines • 173 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
Object.defineProperty(exports, "__esModule", { value: true });
exports.BedrockCustomModel = exports.BedrockCustomModelVpcConfigList = exports.BedrockCustomModelVpcConfigOutputReference = exports.BedrockCustomModelValidationDataConfigList = exports.BedrockCustomModelValidationDataConfigOutputReference = exports.BedrockCustomModelValidationDataConfigValidatorList = exports.BedrockCustomModelValidationDataConfigValidatorOutputReference = exports.BedrockCustomModelTrainingDataConfigList = exports.BedrockCustomModelTrainingDataConfigOutputReference = exports.BedrockCustomModelTimeoutsOutputReference = exports.BedrockCustomModelOutputDataConfigList = exports.BedrockCustomModelOutputDataConfigOutputReference = exports.BedrockCustomModelValidationMetricsList = exports.BedrockCustomModelValidationMetricsOutputReference = exports.BedrockCustomModelTrainingMetricsList = exports.BedrockCustomModelTrainingMetricsOutputReference = void 0;
exports.bedrockCustomModelTrainingMetricsToTerraform = bedrockCustomModelTrainingMetricsToTerraform;
exports.bedrockCustomModelTrainingMetricsToHclTerraform = bedrockCustomModelTrainingMetricsToHclTerraform;
exports.bedrockCustomModelValidationMetricsToTerraform = bedrockCustomModelValidationMetricsToTerraform;
exports.bedrockCustomModelValidationMetricsToHclTerraform = bedrockCustomModelValidationMetricsToHclTerraform;
exports.bedrockCustomModelOutputDataConfigToTerraform = bedrockCustomModelOutputDataConfigToTerraform;
exports.bedrockCustomModelOutputDataConfigToHclTerraform = bedrockCustomModelOutputDataConfigToHclTerraform;
exports.bedrockCustomModelTimeoutsToTerraform = bedrockCustomModelTimeoutsToTerraform;
exports.bedrockCustomModelTimeoutsToHclTerraform = bedrockCustomModelTimeoutsToHclTerraform;
exports.bedrockCustomModelTrainingDataConfigToTerraform = bedrockCustomModelTrainingDataConfigToTerraform;
exports.bedrockCustomModelTrainingDataConfigToHclTerraform = bedrockCustomModelTrainingDataConfigToHclTerraform;
exports.bedrockCustomModelValidationDataConfigValidatorToTerraform = bedrockCustomModelValidationDataConfigValidatorToTerraform;
exports.bedrockCustomModelValidationDataConfigValidatorToHclTerraform = bedrockCustomModelValidationDataConfigValidatorToHclTerraform;
exports.bedrockCustomModelValidationDataConfigToTerraform = bedrockCustomModelValidationDataConfigToTerraform;
exports.bedrockCustomModelValidationDataConfigToHclTerraform = bedrockCustomModelValidationDataConfigToHclTerraform;
exports.bedrockCustomModelVpcConfigToTerraform = bedrockCustomModelVpcConfigToTerraform;
exports.bedrockCustomModelVpcConfigToHclTerraform = bedrockCustomModelVpcConfigToHclTerraform;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function bedrockCustomModelTrainingMetricsToTerraform(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 {};
}
function bedrockCustomModelTrainingMetricsToHclTerraform(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 = {};
return attrs;
}
class BedrockCustomModelTrainingMetricsOutputReference 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() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
}
}
// training_loss - computed: true, optional: false, required: false
get trainingLoss() {
return this.getNumberAttribute('training_loss');
}
}
exports.BedrockCustomModelTrainingMetricsOutputReference = BedrockCustomModelTrainingMetricsOutputReference;
_a = JSII_RTTI_SYMBOL_1;
BedrockCustomModelTrainingMetricsOutputReference[_a] = { fqn: "@cdktf/provider-aws.bedrockCustomModel.BedrockCustomModelTrainingMetricsOutputReference", version: "21.22.1" };
class BedrockCustomModelTrainingMetricsList 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 BedrockCustomModelTrainingMetricsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.BedrockCustomModelTrainingMetricsList = BedrockCustomModelTrainingMetricsList;
_b = JSII_RTTI_SYMBOL_1;
BedrockCustomModelTrainingMetricsList[_b] = { fqn: "@cdktf/provider-aws.bedrockCustomModel.BedrockCustomModelTrainingMetricsList", version: "21.22.1" };
function bedrockCustomModelValidationMetricsToTerraform(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 {};
}
function bedrockCustomModelValidationMetricsToHclTerraform(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 = {};
return attrs;
}
class BedrockCustomModelValidationMetricsOutputReference 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() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
}
}
// validation_loss - computed: true, optional: false, required: false
get validationLoss() {
return this.getNumberAttribute('validation_loss');
}
}
exports.BedrockCustomModelValidationMetricsOutputReference = BedrockCustomModelValidationMetricsOutputReference;
_c = JSII_RTTI_SYMBOL_1;
BedrockCustomModelValidationMetricsOutputReference[_c] = { fqn: "@cdktf/provider-aws.bedrockCustomModel.BedrockCustomModelValidationMetricsOutputReference", version: "21.22.1" };
class BedrockCustomModelValidationMetricsList 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 BedrockCustomModelValidationMetricsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.BedrockCustomModelValidationMetricsList = BedrockCustomModelValidationMetricsList;
_d = JSII_RTTI_SYMBOL_1;
BedrockCustomModelValidationMetricsList[_d] = { fqn: "@cdktf/provider-aws.bedrockCustomModel.BedrockCustomModelValidationMetricsList", version: "21.22.1" };
function bedrockCustomModelOutputDataConfigToTerraform(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 {
s3_uri: cdktf.stringToTerraform(struct.s3Uri),
};
}
function bedrockCustomModelOutputDataConfigToHclTerraform(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 = {
s3_uri: {
value: cdktf.stringToHclTerraform(struct.s3Uri),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class BedrockCustomModelOutputDataConfigOutputReference 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._s3Uri !== undefined) {
hasAnyValues = true;
internalValueResult.s3Uri = this._s3Uri;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._s3Uri = 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._s3Uri = value.s3Uri;
}
}
get s3Uri() {
return this.getStringAttribute('s3_uri');
}
set s3Uri(value) {
this._s3Uri = value;
}
// Temporarily expose input value. Use with caution.
get s3UriInput() {
return this._s3Uri;
}
}
exports.BedrockCustomModelOutputDataConfigOutputReference = BedrockCustomModelOutputDataConfigOutputReference;
_e = JSII_RTTI_SYMBOL_1;
BedrockCustomModelOutputDataConfigOutputReference[_e] = { fqn: "@cdktf/provider-aws.bedrockCustomModel.BedrockCustomModelOutputDataConfigOutputReference", version: "21.22.1" };
class BedrockCustomModelOutputDataConfigList 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 BedrockCustomModelOutputDataConfigOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.BedrockCustomModelOutputDataConfigList = BedrockCustomModelOutputDataConfigList;
_f = JSII_RTTI_SYMBOL_1;
BedrockCustomModelOutputDataConfigList[_f] = { fqn: "@cdktf/provider-aws.bedrockCustomModel.BedrockCustomModelOutputDataConfigList", version: "21.22.1" };
function bedrockCustomModelTimeoutsToTerraform(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),
};
}
function bedrockCustomModelTimeoutsToHclTerraform(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",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class BedrockCustomModelTimeoutsOutputReference 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;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._create = undefined;
this._delete = 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;
}
}
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;
}
}
exports.BedrockCustomModelTimeoutsOutputReference = BedrockCustomModelTimeoutsOutputReference;
_g = JSII_RTTI_SYMBOL_1;
BedrockCustomModelTimeoutsOutputReference[_g] = { fqn: "@cdktf/provider-aws.bedrockCustomModel.BedrockCustomModelTimeoutsOutputReference", version: "21.22.1" };
function bedrockCustomModelTrainingDataConfigToTerraform(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 {
s3_uri: cdktf.stringToTerraform(struct.s3Uri),
};
}
function bedrockCustomModelTrainingDataConfigToHclTerraform(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 = {
s3_uri: {
value: cdktf.stringToHclTerraform(struct.s3Uri),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class BedrockCustomModelTrainingDataConfigOutputReference 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._s3Uri !== undefined) {
hasAnyValues = true;
internalValueResult.s3Uri = this._s3Uri;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._s3Uri = 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._s3Uri = value.s3Uri;
}
}
get s3Uri() {
return this.getStringAttribute('s3_uri');
}
set s3Uri(value) {
this._s3Uri = value;
}
// Temporarily expose input value. Use with caution.
get s3UriInput() {
return this._s3Uri;
}
}
exports.BedrockCustomModelTrainingDataConfigOutputReference = BedrockCustomModelTrainingDataConfigOutputReference;
_h = JSII_RTTI_SYMBOL_1;
BedrockCustomModelTrainingDataConfigOutputReference[_h] = { fqn: "@cdktf/provider-aws.bedrockCustomModel.BedrockCustomModelTrainingDataConfigOutputReference", version: "21.22.1" };
class BedrockCustomModelTrainingDataConfigList 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 BedrockCustomModelTrainingDataConfigOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.BedrockCustomModelTrainingDataConfigList = BedrockCustomModelTrainingDataConfigList;
_j = JSII_RTTI_SYMBOL_1;
BedrockCustomModelTrainingDataConfigList[_j] = { fqn: "@cdktf/provider-aws.bedrockCustomModel.BedrockCustomModelTrainingDataConfigList", version: "21.22.1" };
function bedrockCustomModelValidationDataConfigValidatorToTerraform(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 {
s3_uri: cdktf.stringToTerraform(struct.s3Uri),
};
}
function bedrockCustomModelValidationDataConfigValidatorToHclTerraform(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 = {
s3_uri: {
value: cdktf.stringToHclTerraform(struct.s3Uri),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class BedrockCustomModelValidationDataConfigValidatorOutputReference 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._s3Uri !== undefined) {
hasAnyValues = true;
internalValueResult.s3Uri = this._s3Uri;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._s3Uri = 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._s3Uri = value.s3Uri;
}
}
get s3Uri() {
return this.getStringAttribute('s3_uri');
}
set s3Uri(value) {
this._s3Uri = value;
}
// Temporarily expose input value. Use with caution.
get s3UriInput() {
return this._s3Uri;
}
}
exports.BedrockCustomModelValidationDataConfigValidatorOutputReference = BedrockCustomModelValidationDataConfigValidatorOutputReference;
_k = JSII_RTTI_SYMBOL_1;
BedrockCustomModelValidationDataConfigValidatorOutputReference[_k] = { fqn: "@cdktf/provider-aws.bedrockCustomModel.BedrockCustomModelValidationDataConfigValidatorOutputReference", version: "21.22.1" };
class BedrockCustomModelValidationDataConfigValidatorList 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 BedrockCustomModelValidationDataConfigValidatorOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.BedrockCustomModelValidationDataConfigValidatorList = BedrockCustomModelValidationDataConfigValidatorList;
_l = JSII_RTTI_SYMBOL_1;
BedrockCustomModelValidationDataConfigValidatorList[_l] = { fqn: "@cdktf/provider-aws.bedrockCustomModel.BedrockCustomModelValidationDataConfigValidatorList", version: "21.22.1" };
function bedrockCustomModelValidationDataConfigToTerraform(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 {
validator: cdktf.listMapper(bedrockCustomModelValidationDataConfigValidatorToTerraform, true)(struct.validator),
};
}
function bedrockCustomModelValidationDataConfigToHclTerraform(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 = {
validator: {
value: cdktf.listMapperHcl(bedrockCustomModelValidationDataConfigValidatorToHclTerraform, true)(struct.validator),
isBlock: true,
type: "list",
storageClassType: "BedrockCustomModelValidationDataConfigValidatorList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class BedrockCustomModelValidationDataConfigOutputReference 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;
// validator - computed: false, optional: true, required: false
this._validator = new BedrockCustomModelValidationDataConfigValidatorList(this, "validator", false);
}
get internalValue() {
if (this.resolvableValue) {
return this.resolvableValue;
}
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._validator?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.validator = this._validator?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._validator.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._validator.internalValue = value.validator;
}
}
get validator() {
return this._validator;
}
putValidator(value) {
this._validator.internalValue = value;
}
resetValidator() {
this._validator.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get validatorInput() {
return this._validator.internalValue;
}
}
exports.BedrockCustomModelValidationDataConfigOutputReference = BedrockCustomModelValidationDataConfigOutputReference;
_m = JSII_RTTI_SYMBOL_1;
BedrockCustomModelValidationDataConfigOutputReference[_m] = { fqn: "@cdktf/provider-aws.bedrockCustomModel.BedrockCustomModelValidationDataConfigOutputReference", version: "21.22.1" };
class BedrockCustomModelValidationDataConfigList 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 BedrockCustomModelValidationDataConfigOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.BedrockCustomModelValidationDataConfigList = BedrockCustomModelValidationDataConfigList;
_o = JSII_RTTI_SYMBOL_1;
BedrockCustomModelValidationDataConfigList[_o] = { fqn: "@cdktf/provider-aws.bedrockCustomModel.BedrockCustomModelValidationDataConfigList", version: "21.22.1" };
function bedrockCustomModelVpcConfigToTerraform(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 {
security_group_ids: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.securityGroupIds),
subnet_ids: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.subnetIds),
};
}
function bedrockCustomModelVpcConfigToHclTerraform(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 = {
security_group_ids: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.securityGroupIds),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
subnet_ids: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.subnetIds),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class BedrockCustomModelVpcConfigOutputReference 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._securityGroupIds !== undefined) {
hasAnyValues = true;
internalValueResult.securityGroupIds = this._securityGroupIds;
}
if (this._subnetIds !== undefined) {
hasAnyValues = true;
internalValueResult.subnetIds = this._subnetIds;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._securityGroupIds = undefined;
this._subnetIds = 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._securityGroupIds = value.securityGroupIds;
this._subnetIds = value.subnetIds;
}
}
get securityGroupIds() {
return cdktf.Fn.tolist(this.getListAttribute('security_group_ids'));
}
set securityGroupIds(value) {
this._securityGroupIds = value;
}
// Temporarily expose input value. Use with caution.
get securityGroupIdsInput() {
return this._securityGroupIds;
}
get subnetIds() {
return cdktf.Fn.tolist(this.getListAttribute('subnet_ids'));
}
set subnetIds(value) {
this._subnetIds = value;
}
// Temporarily expose input value. Use with caution.
get subnetIdsInput() {
return this._subnetIds;
}
}
exports.BedrockCustomModelVpcConfigOutputReference = BedrockCustomModelVpcConfigOutputReference;
_p = JSII_RTTI_SYMBOL_1;
BedrockCustomModelVpcConfigOutputReference[_p] = { fqn: "@cdktf/provider-aws.bedrockCustomModel.BedrockCustomModelVpcConfigOutputReference", version: "21.22.1" };
class BedrockCustomModelVpcConfigList 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 BedrockCustomModelVpcConfigOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.BedrockCustomModelVpcConfigList = BedrockCustomModelVpcConfigList;
_q = JSII_RTTI_SYMBOL_1;
BedrockCustomModelVpcConfigList[_q] = { fqn: "@cdktf/provider-aws.bedrockCustomModel.BedrockCustomModelVpcConfigList", version: "21.22.1" };
/**
* Represents a {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/bedrock_custom_model aws_bedrock_custom_model}
*/
class BedrockCustomModel extends cdktf.TerraformResource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a BedrockCustomModel 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 BedrockCustomModel to import
* @param importFromId The id of the existing BedrockCustomModel that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/bedrock_custom_model#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the BedrockCustomModel to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "aws_bedrock_custom_model", importId: importFromId, provider });
}
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/bedrock_custom_model aws_bedrock_custom_model} 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 BedrockCustomModelConfig
*/
constructor(scope, id, config) {
super(scope, id, {
terraformResourceType: 'aws_bedrock_custom_model',
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
});
// tags_all - computed: true, optional: false, required: false
this._tagsAll = new cdktf.StringMap(this, "tags_all");
// training_metrics - computed: true, optional: false, required: false
this._trainingMetrics = new BedrockCustomModelTrainingMetricsList(this, "training_metrics", false);
// validation_metrics - computed: true, optional: false, required: false
this._validationMetrics = new BedrockCustomModelValidationMetricsList(this, "validation_metrics", false);
// output_data_config - computed: false, optional: true, required: false
this._outputDataConfig = new BedrockCustomModelOutputDataConfigList(this, "output_data_config", false);
// timeouts - computed: false, optional: true, required: false
this._timeouts = new BedrockCustomModelTimeoutsOutputReference(this, "timeouts");
// training_data_config - computed: false, optional: true, required: false
this._trainingDataConfig = new BedrockCustomModelTrainingDataConfigList(this, "training_data_config", false);
// validation_data_config - computed: false, optional: true, required: false
this._validationDataConfig = new BedrockCustomModelValidationDataConfigList(this, "validation_data_config", false);
// vpc_config - computed: false, optional: true, required: false
this._vpcConfig = new BedrockCustomModelVpcConfigList(this, "vpc_config", false);
this._baseModelIdentifier = config.baseModelIdentifier;
this._customModelKmsKeyId = config.customModelKmsKeyId;
this._customModelName = config.customModelName;
this._customizationType = config.customizationType;
this._hyperparameters = config.hyperparameters;
this._jobName = config.jobName;
this._region = config.region;
this._roleArn = config.roleArn;
this._tags = config.tags;
this._outputDataConfig.internalValue = config.outputDataConfig;
this._timeouts.internalValue = config.timeouts;
this._trainingDataConfig.internalValue = config.trainingDataConfig;
this._validationDataConfig.internalValue = config.validationDataConfig;
this._vpcConfig.internalValue = config.vpcConfig;
}
get baseModelIdentifier() {
return this.getStringAttribute('base_model_identifier');
}
set baseModelIdentifier(value) {
this._baseModelIdentifier = value;
}
// Temporarily expose input value. Use with caution.
get baseModelIdentifierInput() {
return this._baseModelIdentifier;
}
// custom_model_arn - computed: true, optional: false, required: false
get customModelArn() {
return this.getStringAttribute('custom_model_arn');
}
get customModelKmsKeyId() {
return this.getStringAttribute('custom_model_kms_key_id');
}
set customModelKmsKeyId(value) {
this._customModelKmsKeyId = value;
}
resetCustomModelKmsKeyId() {
this._customModelKmsKeyId = undefined;
}
// Temporarily expose input value. Use with caution.
get customModelKmsKeyIdInput() {
return this._customModelKmsKeyId;
}
get customModelName() {
return this.getStringAttribute('custom_model_name');
}
set customModelName(value) {
this._customModelName = value;
}
// Temporarily expose input value. Use with caution.
get customModelNameInput() {
return this._customModelName;
}
get customizationType() {
return this.getStringAttribute('customization_type');
}
set customizationType(value) {
this._customizationType = value;
}
resetCustomizationType() {
this._customizationType = undefined;
}
// Temporarily expose input value. Use with caution.
get customizationTypeInput() {
return this._customizationType;
}
get hyperparameters() {
return this.getStringMapAttribute('hyperparameters');
}
set hyperparameters(value) {
this._hyperparameters = value;
}
// Temporarily expose input value. Use with caution.
get hyperparametersInput() {
return this._hyperparameters;
}
// id - computed: true, optional: false, required: false
get id() {
return this.getStringAttribute('id');
}
// job_arn - computed: true, optional: false, required: false
get jobArn() {
return this.getStringAttribute('job_arn');
}
get jobName() {
return this.getStringAttribute('job_name');
}
set jobName(value) {
this._jobName = value;
}
// Temporarily expose input value. Use with caution.
get jobNameInput() {
return this._jobName;
}
// job_status - computed: true, optional: false, required: false
get jobStatus() {
return this.getStringAttribute('job_status');
}
get region() {
return this.getStringAttribute('region');
}
set region(value) {
this._region = value;
}
resetRegion() {
this._region = undefined;
}
// Temporarily expose input value. Use with caution.
get regionInput() {
return this._region;
}
get roleArn() {
return this.getStringAttribute('role_arn');
}
set roleArn(value) {
this._roleArn = value;
}
// Temporarily expose input value. Use with caution.
get roleArnInput() {
return this._roleArn;
}
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 trainingMetrics() {
return this._trainingMetrics;
}
get validationMetrics() {
return this._validationMetrics;
}
get outputDataConfig() {
return this._outputDataConfig;
}
putOutputDataConfig(value) {
this._outputDataConfig.internalValue = value;
}
resetOutputDataConfig() {
this._outputDataConfig.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get outputDataConfigInput() {
return this._outputDataConfig.internalValue;
}
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;
}
get trainingDataConfig() {
return this._trainingDataConfig;
}
putTrainingDataConfig(value) {
this._trainingDataConfig.internalValue = value;
}
resetTrainingDataConfig() {
this._trainingDataConfig.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get trainingDataConfigInput() {
return this._trainingDataConfig.internalValue;
}
get validationDataConfig() {
return this._validationDataConfig;
}
putValidationDataConfig(value) {
this._validationDataConfig.internalValue = value;
}
resetValidationDataConfig() {
this._validationDataConfig.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get validationDataConfigInput() {
return this._validationDataConfig.internalValue;
}
get vpcConfig() {
return this._vpcConfig;
}
putVpcConfig(value) {
this._vpcConfig.internalValue = value;
}
resetVpcConfig() {
this._vpcConfig.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get vpcConfigInput() {
return this._vpcConfig.internalValue;
}
// =========
// SYNTHESIS
// =========
synthesizeAttributes() {
return {
base_model_identifier: cdktf.stringToTerraform(this._baseModelIdentifier),
custom_model_kms_key_id: cdktf.stringToTerraform(this._customModelKmsKeyId),
custom_model_name: cdktf.stringToTerraform(this._customModelName),
customization_type: cdktf.stringToTerraform(this._customizationType),
hyperparameters: cdktf.hashMapper(cdktf.stringToTerraform)(this._hyperparameters),
job_name: cdktf.stringToTerraform(this._jobName),
region: cdktf.stringToTerraform(this._region),
role_arn: cdktf.stringToTerraform(this._roleArn),
tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags),
output_data_config: cdktf.listMapper(bedrockCustomModelOutputDataConfigToTerraform, true)(this._outputDataConfig.internalValue),
timeouts: bedrockCustomModelTimeoutsToTerraform(this._timeouts.internalValue),
training_data_config: cdktf.listMapper(bedrockCustomModelTrainingDataConfigToTerraform, true)(this._trainingDataConfig.internalValue),
validation_data_config: cdktf.listMapper(bedrockCustomModelValidationDataConfigToTerraform, true)(this._validationDataConfig.internalValue),
vpc_config: cdktf.listMapper(bedrockCustomModelVpcConfigToTerraform, true)(this._vpcConfig.internalValue),
};
}
synthesizeHclAttributes() {
const attrs = {
base_model_identifier: {
value: cdktf.stringToHclTerraform(this._baseModelIdentifier),
isBlock: false,
type: "simple",
storageClassType: "string",
},
custom_model_kms_key_id: {
value: cdktf.stringToHclTerraform(this._customModelKmsKeyId),