@cdktf/provider-aws
Version:
Prebuilt aws Provider for Terraform CDK (cdktf)
1,044 lines • 475 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
Object.defineProperty(exports, "__esModule", { value: true });
exports.OpensearchDomainOffPeakWindowOptionsOffPeakWindowOutputReference = exports.opensearchDomainOffPeakWindowOptionsOffPeakWindowToHclTerraform = exports.opensearchDomainOffPeakWindowOptionsOffPeakWindowToTerraform = exports.OpensearchDomainOffPeakWindowOptionsOffPeakWindowWindowStartTimeOutputReference = exports.opensearchDomainOffPeakWindowOptionsOffPeakWindowWindowStartTimeToHclTerraform = exports.opensearchDomainOffPeakWindowOptionsOffPeakWindowWindowStartTimeToTerraform = exports.OpensearchDomainNodeToNodeEncryptionOutputReference = exports.opensearchDomainNodeToNodeEncryptionToHclTerraform = exports.opensearchDomainNodeToNodeEncryptionToTerraform = exports.OpensearchDomainLogPublishingOptionsList = exports.OpensearchDomainLogPublishingOptionsOutputReference = exports.opensearchDomainLogPublishingOptionsToHclTerraform = exports.opensearchDomainLogPublishingOptionsToTerraform = exports.OpensearchDomainEncryptAtRestOutputReference = exports.opensearchDomainEncryptAtRestToHclTerraform = exports.opensearchDomainEncryptAtRestToTerraform = exports.OpensearchDomainEbsOptionsOutputReference = exports.opensearchDomainEbsOptionsToHclTerraform = exports.opensearchDomainEbsOptionsToTerraform = exports.OpensearchDomainDomainEndpointOptionsOutputReference = exports.opensearchDomainDomainEndpointOptionsToHclTerraform = exports.opensearchDomainDomainEndpointOptionsToTerraform = exports.OpensearchDomainCognitoOptionsOutputReference = exports.opensearchDomainCognitoOptionsToHclTerraform = exports.opensearchDomainCognitoOptionsToTerraform = exports.OpensearchDomainClusterConfigOutputReference = exports.opensearchDomainClusterConfigToHclTerraform = exports.opensearchDomainClusterConfigToTerraform = exports.OpensearchDomainClusterConfigZoneAwarenessConfigOutputReference = exports.opensearchDomainClusterConfigZoneAwarenessConfigToHclTerraform = exports.opensearchDomainClusterConfigZoneAwarenessConfigToTerraform = exports.OpensearchDomainClusterConfigColdStorageOptionsOutputReference = exports.opensearchDomainClusterConfigColdStorageOptionsToHclTerraform = exports.opensearchDomainClusterConfigColdStorageOptionsToTerraform = exports.OpensearchDomainAutoTuneOptionsOutputReference = exports.opensearchDomainAutoTuneOptionsToHclTerraform = exports.opensearchDomainAutoTuneOptionsToTerraform = exports.OpensearchDomainAutoTuneOptionsMaintenanceScheduleList = exports.OpensearchDomainAutoTuneOptionsMaintenanceScheduleOutputReference = exports.opensearchDomainAutoTuneOptionsMaintenanceScheduleToHclTerraform = exports.opensearchDomainAutoTuneOptionsMaintenanceScheduleToTerraform = exports.OpensearchDomainAutoTuneOptionsMaintenanceScheduleDurationOutputReference = exports.opensearchDomainAutoTuneOptionsMaintenanceScheduleDurationToHclTerraform = exports.opensearchDomainAutoTuneOptionsMaintenanceScheduleDurationToTerraform = exports.OpensearchDomainAdvancedSecurityOptionsOutputReference = exports.opensearchDomainAdvancedSecurityOptionsToHclTerraform = exports.opensearchDomainAdvancedSecurityOptionsToTerraform = exports.OpensearchDomainAdvancedSecurityOptionsMasterUserOptionsOutputReference = exports.opensearchDomainAdvancedSecurityOptionsMasterUserOptionsToHclTerraform = exports.opensearchDomainAdvancedSecurityOptionsMasterUserOptionsToTerraform = void 0;
exports.OpensearchDomain = exports.OpensearchDomainVpcOptionsOutputReference = exports.opensearchDomainVpcOptionsToHclTerraform = exports.opensearchDomainVpcOptionsToTerraform = exports.OpensearchDomainTimeoutsOutputReference = exports.opensearchDomainTimeoutsToHclTerraform = exports.opensearchDomainTimeoutsToTerraform = exports.OpensearchDomainSoftwareUpdateOptionsOutputReference = exports.opensearchDomainSoftwareUpdateOptionsToHclTerraform = exports.opensearchDomainSoftwareUpdateOptionsToTerraform = exports.OpensearchDomainSnapshotOptionsOutputReference = exports.opensearchDomainSnapshotOptionsToHclTerraform = exports.opensearchDomainSnapshotOptionsToTerraform = exports.OpensearchDomainOffPeakWindowOptionsOutputReference = exports.opensearchDomainOffPeakWindowOptionsToHclTerraform = exports.opensearchDomainOffPeakWindowOptionsToTerraform = void 0;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function opensearchDomainAdvancedSecurityOptionsMasterUserOptionsToTerraform(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 {
master_user_arn: cdktf.stringToTerraform(struct.masterUserArn),
master_user_name: cdktf.stringToTerraform(struct.masterUserName),
master_user_password: cdktf.stringToTerraform(struct.masterUserPassword),
};
}
exports.opensearchDomainAdvancedSecurityOptionsMasterUserOptionsToTerraform = opensearchDomainAdvancedSecurityOptionsMasterUserOptionsToTerraform;
function opensearchDomainAdvancedSecurityOptionsMasterUserOptionsToHclTerraform(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 = {
master_user_arn: {
value: cdktf.stringToHclTerraform(struct.masterUserArn),
isBlock: false,
type: "simple",
storageClassType: "string",
},
master_user_name: {
value: cdktf.stringToHclTerraform(struct.masterUserName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
master_user_password: {
value: cdktf.stringToHclTerraform(struct.masterUserPassword),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.opensearchDomainAdvancedSecurityOptionsMasterUserOptionsToHclTerraform = opensearchDomainAdvancedSecurityOptionsMasterUserOptionsToHclTerraform;
class OpensearchDomainAdvancedSecurityOptionsMasterUserOptionsOutputReference 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, 0);
this.isEmptyObject = false;
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._masterUserArn !== undefined) {
hasAnyValues = true;
internalValueResult.masterUserArn = this._masterUserArn;
}
if (this._masterUserName !== undefined) {
hasAnyValues = true;
internalValueResult.masterUserName = this._masterUserName;
}
if (this._masterUserPassword !== undefined) {
hasAnyValues = true;
internalValueResult.masterUserPassword = this._masterUserPassword;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._masterUserArn = undefined;
this._masterUserName = undefined;
this._masterUserPassword = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._masterUserArn = value.masterUserArn;
this._masterUserName = value.masterUserName;
this._masterUserPassword = value.masterUserPassword;
}
}
get masterUserArn() {
return this.getStringAttribute('master_user_arn');
}
set masterUserArn(value) {
this._masterUserArn = value;
}
resetMasterUserArn() {
this._masterUserArn = undefined;
}
// Temporarily expose input value. Use with caution.
get masterUserArnInput() {
return this._masterUserArn;
}
get masterUserName() {
return this.getStringAttribute('master_user_name');
}
set masterUserName(value) {
this._masterUserName = value;
}
resetMasterUserName() {
this._masterUserName = undefined;
}
// Temporarily expose input value. Use with caution.
get masterUserNameInput() {
return this._masterUserName;
}
get masterUserPassword() {
return this.getStringAttribute('master_user_password');
}
set masterUserPassword(value) {
this._masterUserPassword = value;
}
resetMasterUserPassword() {
this._masterUserPassword = undefined;
}
// Temporarily expose input value. Use with caution.
get masterUserPasswordInput() {
return this._masterUserPassword;
}
}
exports.OpensearchDomainAdvancedSecurityOptionsMasterUserOptionsOutputReference = OpensearchDomainAdvancedSecurityOptionsMasterUserOptionsOutputReference;
_a = JSII_RTTI_SYMBOL_1;
OpensearchDomainAdvancedSecurityOptionsMasterUserOptionsOutputReference[_a] = { fqn: "@cdktf/provider-aws.opensearchDomain.OpensearchDomainAdvancedSecurityOptionsMasterUserOptionsOutputReference", version: "19.50.0" };
function opensearchDomainAdvancedSecurityOptionsToTerraform(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 {
anonymous_auth_enabled: cdktf.booleanToTerraform(struct.anonymousAuthEnabled),
enabled: cdktf.booleanToTerraform(struct.enabled),
internal_user_database_enabled: cdktf.booleanToTerraform(struct.internalUserDatabaseEnabled),
master_user_options: opensearchDomainAdvancedSecurityOptionsMasterUserOptionsToTerraform(struct.masterUserOptions),
};
}
exports.opensearchDomainAdvancedSecurityOptionsToTerraform = opensearchDomainAdvancedSecurityOptionsToTerraform;
function opensearchDomainAdvancedSecurityOptionsToHclTerraform(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 = {
anonymous_auth_enabled: {
value: cdktf.booleanToHclTerraform(struct.anonymousAuthEnabled),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
enabled: {
value: cdktf.booleanToHclTerraform(struct.enabled),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
internal_user_database_enabled: {
value: cdktf.booleanToHclTerraform(struct.internalUserDatabaseEnabled),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
master_user_options: {
value: opensearchDomainAdvancedSecurityOptionsMasterUserOptionsToHclTerraform(struct.masterUserOptions),
isBlock: true,
type: "list",
storageClassType: "OpensearchDomainAdvancedSecurityOptionsMasterUserOptionsList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.opensearchDomainAdvancedSecurityOptionsToHclTerraform = opensearchDomainAdvancedSecurityOptionsToHclTerraform;
class OpensearchDomainAdvancedSecurityOptionsOutputReference 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, 0);
this.isEmptyObject = false;
// master_user_options - computed: false, optional: true, required: false
this._masterUserOptions = new OpensearchDomainAdvancedSecurityOptionsMasterUserOptionsOutputReference(this, "master_user_options");
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._anonymousAuthEnabled !== undefined) {
hasAnyValues = true;
internalValueResult.anonymousAuthEnabled = this._anonymousAuthEnabled;
}
if (this._enabled !== undefined) {
hasAnyValues = true;
internalValueResult.enabled = this._enabled;
}
if (this._internalUserDatabaseEnabled !== undefined) {
hasAnyValues = true;
internalValueResult.internalUserDatabaseEnabled = this._internalUserDatabaseEnabled;
}
if (this._masterUserOptions?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.masterUserOptions = this._masterUserOptions?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._anonymousAuthEnabled = undefined;
this._enabled = undefined;
this._internalUserDatabaseEnabled = undefined;
this._masterUserOptions.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._anonymousAuthEnabled = value.anonymousAuthEnabled;
this._enabled = value.enabled;
this._internalUserDatabaseEnabled = value.internalUserDatabaseEnabled;
this._masterUserOptions.internalValue = value.masterUserOptions;
}
}
get anonymousAuthEnabled() {
return this.getBooleanAttribute('anonymous_auth_enabled');
}
set anonymousAuthEnabled(value) {
this._anonymousAuthEnabled = value;
}
resetAnonymousAuthEnabled() {
this._anonymousAuthEnabled = undefined;
}
// Temporarily expose input value. Use with caution.
get anonymousAuthEnabledInput() {
return this._anonymousAuthEnabled;
}
get enabled() {
return this.getBooleanAttribute('enabled');
}
set enabled(value) {
this._enabled = value;
}
// Temporarily expose input value. Use with caution.
get enabledInput() {
return this._enabled;
}
get internalUserDatabaseEnabled() {
return this.getBooleanAttribute('internal_user_database_enabled');
}
set internalUserDatabaseEnabled(value) {
this._internalUserDatabaseEnabled = value;
}
resetInternalUserDatabaseEnabled() {
this._internalUserDatabaseEnabled = undefined;
}
// Temporarily expose input value. Use with caution.
get internalUserDatabaseEnabledInput() {
return this._internalUserDatabaseEnabled;
}
get masterUserOptions() {
return this._masterUserOptions;
}
putMasterUserOptions(value) {
this._masterUserOptions.internalValue = value;
}
resetMasterUserOptions() {
this._masterUserOptions.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get masterUserOptionsInput() {
return this._masterUserOptions.internalValue;
}
}
exports.OpensearchDomainAdvancedSecurityOptionsOutputReference = OpensearchDomainAdvancedSecurityOptionsOutputReference;
_b = JSII_RTTI_SYMBOL_1;
OpensearchDomainAdvancedSecurityOptionsOutputReference[_b] = { fqn: "@cdktf/provider-aws.opensearchDomain.OpensearchDomainAdvancedSecurityOptionsOutputReference", version: "19.50.0" };
function opensearchDomainAutoTuneOptionsMaintenanceScheduleDurationToTerraform(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 {
unit: cdktf.stringToTerraform(struct.unit),
value: cdktf.numberToTerraform(struct.value),
};
}
exports.opensearchDomainAutoTuneOptionsMaintenanceScheduleDurationToTerraform = opensearchDomainAutoTuneOptionsMaintenanceScheduleDurationToTerraform;
function opensearchDomainAutoTuneOptionsMaintenanceScheduleDurationToHclTerraform(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 = {
unit: {
value: cdktf.stringToHclTerraform(struct.unit),
isBlock: false,
type: "simple",
storageClassType: "string",
},
value: {
value: cdktf.numberToHclTerraform(struct.value),
isBlock: false,
type: "simple",
storageClassType: "number",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.opensearchDomainAutoTuneOptionsMaintenanceScheduleDurationToHclTerraform = opensearchDomainAutoTuneOptionsMaintenanceScheduleDurationToHclTerraform;
class OpensearchDomainAutoTuneOptionsMaintenanceScheduleDurationOutputReference 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, 0);
this.isEmptyObject = false;
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._unit !== undefined) {
hasAnyValues = true;
internalValueResult.unit = this._unit;
}
if (this._value !== undefined) {
hasAnyValues = true;
internalValueResult.value = this._value;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._unit = undefined;
this._value = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._unit = value.unit;
this._value = value.value;
}
}
get unit() {
return this.getStringAttribute('unit');
}
set unit(value) {
this._unit = value;
}
// Temporarily expose input value. Use with caution.
get unitInput() {
return this._unit;
}
get value() {
return this.getNumberAttribute('value');
}
set value(value) {
this._value = value;
}
// Temporarily expose input value. Use with caution.
get valueInput() {
return this._value;
}
}
exports.OpensearchDomainAutoTuneOptionsMaintenanceScheduleDurationOutputReference = OpensearchDomainAutoTuneOptionsMaintenanceScheduleDurationOutputReference;
_c = JSII_RTTI_SYMBOL_1;
OpensearchDomainAutoTuneOptionsMaintenanceScheduleDurationOutputReference[_c] = { fqn: "@cdktf/provider-aws.opensearchDomain.OpensearchDomainAutoTuneOptionsMaintenanceScheduleDurationOutputReference", version: "19.50.0" };
function opensearchDomainAutoTuneOptionsMaintenanceScheduleToTerraform(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 {
cron_expression_for_recurrence: cdktf.stringToTerraform(struct.cronExpressionForRecurrence),
start_at: cdktf.stringToTerraform(struct.startAt),
duration: opensearchDomainAutoTuneOptionsMaintenanceScheduleDurationToTerraform(struct.duration),
};
}
exports.opensearchDomainAutoTuneOptionsMaintenanceScheduleToTerraform = opensearchDomainAutoTuneOptionsMaintenanceScheduleToTerraform;
function opensearchDomainAutoTuneOptionsMaintenanceScheduleToHclTerraform(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 = {
cron_expression_for_recurrence: {
value: cdktf.stringToHclTerraform(struct.cronExpressionForRecurrence),
isBlock: false,
type: "simple",
storageClassType: "string",
},
start_at: {
value: cdktf.stringToHclTerraform(struct.startAt),
isBlock: false,
type: "simple",
storageClassType: "string",
},
duration: {
value: opensearchDomainAutoTuneOptionsMaintenanceScheduleDurationToHclTerraform(struct.duration),
isBlock: true,
type: "list",
storageClassType: "OpensearchDomainAutoTuneOptionsMaintenanceScheduleDurationList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.opensearchDomainAutoTuneOptionsMaintenanceScheduleToHclTerraform = opensearchDomainAutoTuneOptionsMaintenanceScheduleToHclTerraform;
class OpensearchDomainAutoTuneOptionsMaintenanceScheduleOutputReference 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;
// duration - computed: false, optional: false, required: true
this._duration = new OpensearchDomainAutoTuneOptionsMaintenanceScheduleDurationOutputReference(this, "duration");
}
get internalValue() {
if (this.resolvableValue) {
return this.resolvableValue;
}
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._cronExpressionForRecurrence !== undefined) {
hasAnyValues = true;
internalValueResult.cronExpressionForRecurrence = this._cronExpressionForRecurrence;
}
if (this._startAt !== undefined) {
hasAnyValues = true;
internalValueResult.startAt = this._startAt;
}
if (this._duration?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.duration = this._duration?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._cronExpressionForRecurrence = undefined;
this._startAt = undefined;
this._duration.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._cronExpressionForRecurrence = value.cronExpressionForRecurrence;
this._startAt = value.startAt;
this._duration.internalValue = value.duration;
}
}
get cronExpressionForRecurrence() {
return this.getStringAttribute('cron_expression_for_recurrence');
}
set cronExpressionForRecurrence(value) {
this._cronExpressionForRecurrence = value;
}
// Temporarily expose input value. Use with caution.
get cronExpressionForRecurrenceInput() {
return this._cronExpressionForRecurrence;
}
get startAt() {
return this.getStringAttribute('start_at');
}
set startAt(value) {
this._startAt = value;
}
// Temporarily expose input value. Use with caution.
get startAtInput() {
return this._startAt;
}
get duration() {
return this._duration;
}
putDuration(value) {
this._duration.internalValue = value;
}
// Temporarily expose input value. Use with caution.
get durationInput() {
return this._duration.internalValue;
}
}
exports.OpensearchDomainAutoTuneOptionsMaintenanceScheduleOutputReference = OpensearchDomainAutoTuneOptionsMaintenanceScheduleOutputReference;
_d = JSII_RTTI_SYMBOL_1;
OpensearchDomainAutoTuneOptionsMaintenanceScheduleOutputReference[_d] = { fqn: "@cdktf/provider-aws.opensearchDomain.OpensearchDomainAutoTuneOptionsMaintenanceScheduleOutputReference", version: "19.50.0" };
class OpensearchDomainAutoTuneOptionsMaintenanceScheduleList 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 OpensearchDomainAutoTuneOptionsMaintenanceScheduleOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.OpensearchDomainAutoTuneOptionsMaintenanceScheduleList = OpensearchDomainAutoTuneOptionsMaintenanceScheduleList;
_e = JSII_RTTI_SYMBOL_1;
OpensearchDomainAutoTuneOptionsMaintenanceScheduleList[_e] = { fqn: "@cdktf/provider-aws.opensearchDomain.OpensearchDomainAutoTuneOptionsMaintenanceScheduleList", version: "19.50.0" };
function opensearchDomainAutoTuneOptionsToTerraform(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 {
desired_state: cdktf.stringToTerraform(struct.desiredState),
rollback_on_disable: cdktf.stringToTerraform(struct.rollbackOnDisable),
use_off_peak_window: cdktf.booleanToTerraform(struct.useOffPeakWindow),
maintenance_schedule: cdktf.listMapper(opensearchDomainAutoTuneOptionsMaintenanceScheduleToTerraform, true)(struct.maintenanceSchedule),
};
}
exports.opensearchDomainAutoTuneOptionsToTerraform = opensearchDomainAutoTuneOptionsToTerraform;
function opensearchDomainAutoTuneOptionsToHclTerraform(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 = {
desired_state: {
value: cdktf.stringToHclTerraform(struct.desiredState),
isBlock: false,
type: "simple",
storageClassType: "string",
},
rollback_on_disable: {
value: cdktf.stringToHclTerraform(struct.rollbackOnDisable),
isBlock: false,
type: "simple",
storageClassType: "string",
},
use_off_peak_window: {
value: cdktf.booleanToHclTerraform(struct.useOffPeakWindow),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
maintenance_schedule: {
value: cdktf.listMapperHcl(opensearchDomainAutoTuneOptionsMaintenanceScheduleToHclTerraform, true)(struct.maintenanceSchedule),
isBlock: true,
type: "set",
storageClassType: "OpensearchDomainAutoTuneOptionsMaintenanceScheduleList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.opensearchDomainAutoTuneOptionsToHclTerraform = opensearchDomainAutoTuneOptionsToHclTerraform;
class OpensearchDomainAutoTuneOptionsOutputReference 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, 0);
this.isEmptyObject = false;
// maintenance_schedule - computed: false, optional: true, required: false
this._maintenanceSchedule = new OpensearchDomainAutoTuneOptionsMaintenanceScheduleList(this, "maintenance_schedule", true);
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._desiredState !== undefined) {
hasAnyValues = true;
internalValueResult.desiredState = this._desiredState;
}
if (this._rollbackOnDisable !== undefined) {
hasAnyValues = true;
internalValueResult.rollbackOnDisable = this._rollbackOnDisable;
}
if (this._useOffPeakWindow !== undefined) {
hasAnyValues = true;
internalValueResult.useOffPeakWindow = this._useOffPeakWindow;
}
if (this._maintenanceSchedule?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.maintenanceSchedule = this._maintenanceSchedule?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._desiredState = undefined;
this._rollbackOnDisable = undefined;
this._useOffPeakWindow = undefined;
this._maintenanceSchedule.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._desiredState = value.desiredState;
this._rollbackOnDisable = value.rollbackOnDisable;
this._useOffPeakWindow = value.useOffPeakWindow;
this._maintenanceSchedule.internalValue = value.maintenanceSchedule;
}
}
get desiredState() {
return this.getStringAttribute('desired_state');
}
set desiredState(value) {
this._desiredState = value;
}
// Temporarily expose input value. Use with caution.
get desiredStateInput() {
return this._desiredState;
}
get rollbackOnDisable() {
return this.getStringAttribute('rollback_on_disable');
}
set rollbackOnDisable(value) {
this._rollbackOnDisable = value;
}
resetRollbackOnDisable() {
this._rollbackOnDisable = undefined;
}
// Temporarily expose input value. Use with caution.
get rollbackOnDisableInput() {
return this._rollbackOnDisable;
}
get useOffPeakWindow() {
return this.getBooleanAttribute('use_off_peak_window');
}
set useOffPeakWindow(value) {
this._useOffPeakWindow = value;
}
resetUseOffPeakWindow() {
this._useOffPeakWindow = undefined;
}
// Temporarily expose input value. Use with caution.
get useOffPeakWindowInput() {
return this._useOffPeakWindow;
}
get maintenanceSchedule() {
return this._maintenanceSchedule;
}
putMaintenanceSchedule(value) {
this._maintenanceSchedule.internalValue = value;
}
resetMaintenanceSchedule() {
this._maintenanceSchedule.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get maintenanceScheduleInput() {
return this._maintenanceSchedule.internalValue;
}
}
exports.OpensearchDomainAutoTuneOptionsOutputReference = OpensearchDomainAutoTuneOptionsOutputReference;
_f = JSII_RTTI_SYMBOL_1;
OpensearchDomainAutoTuneOptionsOutputReference[_f] = { fqn: "@cdktf/provider-aws.opensearchDomain.OpensearchDomainAutoTuneOptionsOutputReference", version: "19.50.0" };
function opensearchDomainClusterConfigColdStorageOptionsToTerraform(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: cdktf.booleanToTerraform(struct.enabled),
};
}
exports.opensearchDomainClusterConfigColdStorageOptionsToTerraform = opensearchDomainClusterConfigColdStorageOptionsToTerraform;
function opensearchDomainClusterConfigColdStorageOptionsToHclTerraform(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: {
value: cdktf.booleanToHclTerraform(struct.enabled),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.opensearchDomainClusterConfigColdStorageOptionsToHclTerraform = opensearchDomainClusterConfigColdStorageOptionsToHclTerraform;
class OpensearchDomainClusterConfigColdStorageOptionsOutputReference 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, 0);
this.isEmptyObject = false;
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._enabled !== undefined) {
hasAnyValues = true;
internalValueResult.enabled = this._enabled;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._enabled = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._enabled = value.enabled;
}
}
get enabled() {
return this.getBooleanAttribute('enabled');
}
set enabled(value) {
this._enabled = value;
}
resetEnabled() {
this._enabled = undefined;
}
// Temporarily expose input value. Use with caution.
get enabledInput() {
return this._enabled;
}
}
exports.OpensearchDomainClusterConfigColdStorageOptionsOutputReference = OpensearchDomainClusterConfigColdStorageOptionsOutputReference;
_g = JSII_RTTI_SYMBOL_1;
OpensearchDomainClusterConfigColdStorageOptionsOutputReference[_g] = { fqn: "@cdktf/provider-aws.opensearchDomain.OpensearchDomainClusterConfigColdStorageOptionsOutputReference", version: "19.50.0" };
function opensearchDomainClusterConfigZoneAwarenessConfigToTerraform(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 {
availability_zone_count: cdktf.numberToTerraform(struct.availabilityZoneCount),
};
}
exports.opensearchDomainClusterConfigZoneAwarenessConfigToTerraform = opensearchDomainClusterConfigZoneAwarenessConfigToTerraform;
function opensearchDomainClusterConfigZoneAwarenessConfigToHclTerraform(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 = {
availability_zone_count: {
value: cdktf.numberToHclTerraform(struct.availabilityZoneCount),
isBlock: false,
type: "simple",
storageClassType: "number",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.opensearchDomainClusterConfigZoneAwarenessConfigToHclTerraform = opensearchDomainClusterConfigZoneAwarenessConfigToHclTerraform;
class OpensearchDomainClusterConfigZoneAwarenessConfigOutputReference 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, 0);
this.isEmptyObject = false;
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._availabilityZoneCount !== undefined) {
hasAnyValues = true;
internalValueResult.availabilityZoneCount = this._availabilityZoneCount;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._availabilityZoneCount = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._availabilityZoneCount = value.availabilityZoneCount;
}
}
get availabilityZoneCount() {
return this.getNumberAttribute('availability_zone_count');
}
set availabilityZoneCount(value) {
this._availabilityZoneCount = value;
}
resetAvailabilityZoneCount() {
this._availabilityZoneCount = undefined;
}
// Temporarily expose input value. Use with caution.
get availabilityZoneCountInput() {
return this._availabilityZoneCount;
}
}
exports.OpensearchDomainClusterConfigZoneAwarenessConfigOutputReference = OpensearchDomainClusterConfigZoneAwarenessConfigOutputReference;
_h = JSII_RTTI_SYMBOL_1;
OpensearchDomainClusterConfigZoneAwarenessConfigOutputReference[_h] = { fqn: "@cdktf/provider-aws.opensearchDomain.OpensearchDomainClusterConfigZoneAwarenessConfigOutputReference", version: "19.50.0" };
function opensearchDomainClusterConfigToTerraform(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 {
dedicated_master_count: cdktf.numberToTerraform(struct.dedicatedMasterCount),
dedicated_master_enabled: cdktf.booleanToTerraform(struct.dedicatedMasterEnabled),
dedicated_master_type: cdktf.stringToTerraform(struct.dedicatedMasterType),
instance_count: cdktf.numberToTerraform(struct.instanceCount),
instance_type: cdktf.stringToTerraform(struct.instanceType),
multi_az_with_standby_enabled: cdktf.booleanToTerraform(struct.multiAzWithStandbyEnabled),
warm_count: cdktf.numberToTerraform(struct.warmCount),
warm_enabled: cdktf.booleanToTerraform(struct.warmEnabled),
warm_type: cdktf.stringToTerraform(struct.warmType),
zone_awareness_enabled: cdktf.booleanToTerraform(struct.zoneAwarenessEnabled),
cold_storage_options: opensearchDomainClusterConfigColdStorageOptionsToTerraform(struct.coldStorageOptions),
zone_awareness_config: opensearchDomainClusterConfigZoneAwarenessConfigToTerraform(struct.zoneAwarenessConfig),
};
}
exports.opensearchDomainClusterConfigToTerraform = opensearchDomainClusterConfigToTerraform;
function opensearchDomainClusterConfigToHclTerraform(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 = {
dedicated_master_count: {
value: cdktf.numberToHclTerraform(struct.dedicatedMasterCount),
isBlock: false,
type: "simple",
storageClassType: "number",
},
dedicated_master_enabled: {
value: cdktf.booleanToHclTerraform(struct.dedicatedMasterEnabled),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
dedicated_master_type: {
value: cdktf.stringToHclTerraform(struct.dedicatedMasterType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
instance_count: {
value: cdktf.numberToHclTerraform(struct.instanceCount),
isBlock: false,
type: "simple",
storageClassType: "number",
},
instance_type: {
value: cdktf.stringToHclTerraform(struct.instanceType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
multi_az_with_standby_enabled: {
value: cdktf.booleanToHclTerraform(struct.multiAzWithStandbyEnabled),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
warm_count: {
value: cdktf.numberToHclTerraform(struct.warmCount),
isBlock: false,
type: "simple",
storageClassType: "number",
},
warm_enabled: {
value: cdktf.booleanToHclTerraform(struct.warmEnabled),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
warm_type: {
value: cdktf.stringToHclTerraform(struct.warmType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
zone_awareness_enabled: {
value: cdktf.booleanToHclTerraform(struct.zoneAwarenessEnabled),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
cold_storage_options: {
value: opensearchDomainClusterConfigColdStorageOptionsToHclTerraform(struct.coldStorageOptions),
isBlock: true,
type: "list",
storageClassType: "OpensearchDomainClusterConfigColdStorageOptionsList",
},
zone_awareness_config: {
value: opensearchDomainClusterConfigZoneAwarenessConfigToHclTerraform(struct.zoneAwarenessConfig),
isBlock: true,
type: "list",
storageClassType: "OpensearchDomainClusterConfigZoneAwarenessConfigList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.opensearchDomainClusterConfigToHclTerraform = opensearchDomainClusterConfigToHclTerraform;
class OpensearchDomainClusterConfigOutputReference 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, 0);
this.isEmptyObject = false;
// cold_storage_options - computed: false, optional: true, required: false
this._coldStorageOptions = new OpensearchDomainClusterConfigColdStorageOptionsOutputReference(this, "cold_storage_options");
// zone_awareness_config - computed: false, optional: true, required: false
this._zoneAwarenessConfig = new OpensearchDomainClusterConfigZoneAwarenessConfigOutputReference(this, "zone_awareness_config");
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._dedicatedMasterCount !== undefined) {
hasAnyValues = true;
internalValueResult.dedicatedMasterCount = this._dedicatedMasterCount;
}
if (this._dedicatedMasterEnabled !== undefined) {
hasAnyValues = true;
internalValueResult.dedicatedMasterEnabled = this._dedicatedMasterEnabled;
}
if (this._dedicatedMasterType !== undefined) {
hasAnyValues = true;
internalValueResult.dedicatedMasterType = this._dedicatedMasterType;
}
if (this._instanceCount !== undefined) {
hasAnyValues = true;
internalValueResult.instanceCount = this._instanceCount;
}
if (this._instanceType !== undefined) {
hasAnyValues = true;
internalValueResult.instanceType = this._instanceType;
}
if (this._multiAzWithStandbyEnabled !== undefined) {
hasAnyValues = true;
internalValueResult.multiAzWithStandbyEnabled = this._multiAzWithStandbyEnabled;
}
if (this._warmCount !== undefined) {
hasAnyValues = true;
internalValueResult.warmCount = this._warmCount;
}
if (this._warmEnabled !== undefined) {
hasAnyValues = true;
internalValueResult.warmEnabled = this._warmEnabled;
}
if (this._warmType !== undefined) {
hasAnyValues = true;
internalValueResult.warmType = this._warmType;
}
if (this._zoneAwarenessEnabled !== undefined) {
hasAnyValues = true;
internalValueResult.zoneAwarenessEnabled = this._zoneAwarenessEnabled;
}
if (this._coldStorageOptions?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.coldStorageOptions = this._coldStorageOptions?.internalValue;
}
if (this._zoneAwarenessConfig?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.zoneAwarenessConfig = this._zoneAwarenessConfig?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._dedicatedMasterCount = undefined;
this._dedicatedMasterEnabled = undefined;
this._dedicatedMasterType = undefined;
this._instanceCount = undefined;
this._instanceType = undefined;
this._multiAzWithStandbyEnabled = undefined;
this._warmCount = undefined;
this._warmEnabled = undefined;
this._warmType = undefined;
this._zoneAwarenessEnabled = undefined;
this._coldStorageOptions.internalValue = undefined;
this._zoneAwarenessConfig.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._dedicatedMasterCount = value.dedicatedMasterCount;
this._dedicatedMasterEnabled = value.dedicatedMasterEnabled;
this._dedicatedMasterType = value.dedicatedMasterType;
this._instanceCount = value.instanceCount;
this._instanceType = value.instanceType;
this._multiAzWithStandbyEnabled = value.multiAzWithStandbyEnabled;
this._warmCount = value.warmCount;
this._warmEnabled = value.warmEnabled;
t