UNPKG

@cdktf/provider-aws

Version:

Prebuilt aws Provider for Terraform CDK (cdktf)

1,184 lines 204 kB
"use strict"; var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o; Object.defineProperty(exports, "__esModule", { value: true }); exports.BackupPlan = exports.BackupPlanScanSettingList = exports.BackupPlanScanSettingOutputReference = exports.BackupPlanRuleList = exports.BackupPlanRuleOutputReference = exports.BackupPlanRuleScanActionList = exports.BackupPlanRuleScanActionOutputReference = exports.BackupPlanRuleLifecycleOutputReference = exports.BackupPlanRuleCopyActionList = exports.BackupPlanRuleCopyActionOutputReference = exports.BackupPlanRuleCopyActionLifecycleOutputReference = exports.BackupPlanAdvancedBackupSettingList = exports.BackupPlanAdvancedBackupSettingOutputReference = void 0; exports.backupPlanAdvancedBackupSettingToTerraform = backupPlanAdvancedBackupSettingToTerraform; exports.backupPlanAdvancedBackupSettingToHclTerraform = backupPlanAdvancedBackupSettingToHclTerraform; exports.backupPlanRuleCopyActionLifecycleToTerraform = backupPlanRuleCopyActionLifecycleToTerraform; exports.backupPlanRuleCopyActionLifecycleToHclTerraform = backupPlanRuleCopyActionLifecycleToHclTerraform; exports.backupPlanRuleCopyActionToTerraform = backupPlanRuleCopyActionToTerraform; exports.backupPlanRuleCopyActionToHclTerraform = backupPlanRuleCopyActionToHclTerraform; exports.backupPlanRuleLifecycleToTerraform = backupPlanRuleLifecycleToTerraform; exports.backupPlanRuleLifecycleToHclTerraform = backupPlanRuleLifecycleToHclTerraform; exports.backupPlanRuleScanActionToTerraform = backupPlanRuleScanActionToTerraform; exports.backupPlanRuleScanActionToHclTerraform = backupPlanRuleScanActionToHclTerraform; exports.backupPlanRuleToTerraform = backupPlanRuleToTerraform; exports.backupPlanRuleToHclTerraform = backupPlanRuleToHclTerraform; exports.backupPlanScanSettingToTerraform = backupPlanScanSettingToTerraform; exports.backupPlanScanSettingToHclTerraform = backupPlanScanSettingToHclTerraform; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const cdktf = require("cdktf"); function backupPlanAdvancedBackupSettingToTerraform(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 { backup_options: cdktf.hashMapper(cdktf.stringToTerraform)(struct.backupOptions), resource_type: cdktf.stringToTerraform(struct.resourceType), }; } function backupPlanAdvancedBackupSettingToHclTerraform(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 = { backup_options: { value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(struct.backupOptions), isBlock: false, type: "map", storageClassType: "stringMap", }, resource_type: { value: cdktf.stringToHclTerraform(struct.resourceType), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class BackupPlanAdvancedBackupSettingOutputReference 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._backupOptions !== undefined) { hasAnyValues = true; internalValueResult.backupOptions = this._backupOptions; } if (this._resourceType !== undefined) { hasAnyValues = true; internalValueResult.resourceType = this._resourceType; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._backupOptions = undefined; this._resourceType = 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._backupOptions = value.backupOptions; this._resourceType = value.resourceType; } } get backupOptions() { return this.getStringMapAttribute('backup_options'); } set backupOptions(value) { this._backupOptions = value; } // Temporarily expose input value. Use with caution. get backupOptionsInput() { return this._backupOptions; } get resourceType() { return this.getStringAttribute('resource_type'); } set resourceType(value) { this._resourceType = value; } // Temporarily expose input value. Use with caution. get resourceTypeInput() { return this._resourceType; } } exports.BackupPlanAdvancedBackupSettingOutputReference = BackupPlanAdvancedBackupSettingOutputReference; _a = JSII_RTTI_SYMBOL_1; BackupPlanAdvancedBackupSettingOutputReference[_a] = { fqn: "@cdktf/provider-aws.backupPlan.BackupPlanAdvancedBackupSettingOutputReference", version: "21.22.1" }; class BackupPlanAdvancedBackupSettingList 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 BackupPlanAdvancedBackupSettingOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.BackupPlanAdvancedBackupSettingList = BackupPlanAdvancedBackupSettingList; _b = JSII_RTTI_SYMBOL_1; BackupPlanAdvancedBackupSettingList[_b] = { fqn: "@cdktf/provider-aws.backupPlan.BackupPlanAdvancedBackupSettingList", version: "21.22.1" }; function backupPlanRuleCopyActionLifecycleToTerraform(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 { cold_storage_after: cdktf.numberToTerraform(struct.coldStorageAfter), delete_after: cdktf.numberToTerraform(struct.deleteAfter), opt_in_to_archive_for_supported_resources: cdktf.booleanToTerraform(struct.optInToArchiveForSupportedResources), }; } function backupPlanRuleCopyActionLifecycleToHclTerraform(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 = { cold_storage_after: { value: cdktf.numberToHclTerraform(struct.coldStorageAfter), isBlock: false, type: "simple", storageClassType: "number", }, delete_after: { value: cdktf.numberToHclTerraform(struct.deleteAfter), isBlock: false, type: "simple", storageClassType: "number", }, opt_in_to_archive_for_supported_resources: { value: cdktf.booleanToHclTerraform(struct.optInToArchiveForSupportedResources), isBlock: false, type: "simple", storageClassType: "boolean", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class BackupPlanRuleCopyActionLifecycleOutputReference 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._coldStorageAfter !== undefined) { hasAnyValues = true; internalValueResult.coldStorageAfter = this._coldStorageAfter; } if (this._deleteAfter !== undefined) { hasAnyValues = true; internalValueResult.deleteAfter = this._deleteAfter; } if (this._optInToArchiveForSupportedResources !== undefined) { hasAnyValues = true; internalValueResult.optInToArchiveForSupportedResources = this._optInToArchiveForSupportedResources; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._coldStorageAfter = undefined; this._deleteAfter = undefined; this._optInToArchiveForSupportedResources = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._coldStorageAfter = value.coldStorageAfter; this._deleteAfter = value.deleteAfter; this._optInToArchiveForSupportedResources = value.optInToArchiveForSupportedResources; } } get coldStorageAfter() { return this.getNumberAttribute('cold_storage_after'); } set coldStorageAfter(value) { this._coldStorageAfter = value; } resetColdStorageAfter() { this._coldStorageAfter = undefined; } // Temporarily expose input value. Use with caution. get coldStorageAfterInput() { return this._coldStorageAfter; } get deleteAfter() { return this.getNumberAttribute('delete_after'); } set deleteAfter(value) { this._deleteAfter = value; } resetDeleteAfter() { this._deleteAfter = undefined; } // Temporarily expose input value. Use with caution. get deleteAfterInput() { return this._deleteAfter; } get optInToArchiveForSupportedResources() { return this.getBooleanAttribute('opt_in_to_archive_for_supported_resources'); } set optInToArchiveForSupportedResources(value) { this._optInToArchiveForSupportedResources = value; } resetOptInToArchiveForSupportedResources() { this._optInToArchiveForSupportedResources = undefined; } // Temporarily expose input value. Use with caution. get optInToArchiveForSupportedResourcesInput() { return this._optInToArchiveForSupportedResources; } } exports.BackupPlanRuleCopyActionLifecycleOutputReference = BackupPlanRuleCopyActionLifecycleOutputReference; _c = JSII_RTTI_SYMBOL_1; BackupPlanRuleCopyActionLifecycleOutputReference[_c] = { fqn: "@cdktf/provider-aws.backupPlan.BackupPlanRuleCopyActionLifecycleOutputReference", version: "21.22.1" }; function backupPlanRuleCopyActionToTerraform(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 { destination_vault_arn: cdktf.stringToTerraform(struct.destinationVaultArn), lifecycle: backupPlanRuleCopyActionLifecycleToTerraform(struct.lifecycle), }; } function backupPlanRuleCopyActionToHclTerraform(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 = { destination_vault_arn: { value: cdktf.stringToHclTerraform(struct.destinationVaultArn), isBlock: false, type: "simple", storageClassType: "string", }, lifecycle: { value: backupPlanRuleCopyActionLifecycleToHclTerraform(struct.lifecycle), isBlock: true, type: "list", storageClassType: "BackupPlanRuleCopyActionLifecycleList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class BackupPlanRuleCopyActionOutputReference 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; // lifecycle - computed: false, optional: true, required: false this._lifecycle = new BackupPlanRuleCopyActionLifecycleOutputReference(this, "lifecycle"); } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._destinationVaultArn !== undefined) { hasAnyValues = true; internalValueResult.destinationVaultArn = this._destinationVaultArn; } if (this._lifecycle?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.lifecycle = this._lifecycle?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._destinationVaultArn = undefined; this._lifecycle.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._destinationVaultArn = value.destinationVaultArn; this._lifecycle.internalValue = value.lifecycle; } } get destinationVaultArn() { return this.getStringAttribute('destination_vault_arn'); } set destinationVaultArn(value) { this._destinationVaultArn = value; } // Temporarily expose input value. Use with caution. get destinationVaultArnInput() { return this._destinationVaultArn; } get lifecycle() { return this._lifecycle; } putLifecycle(value) { this._lifecycle.internalValue = value; } resetLifecycle() { this._lifecycle.internalValue = undefined; } // Temporarily expose input value. Use with caution. get lifecycleInput() { return this._lifecycle.internalValue; } } exports.BackupPlanRuleCopyActionOutputReference = BackupPlanRuleCopyActionOutputReference; _d = JSII_RTTI_SYMBOL_1; BackupPlanRuleCopyActionOutputReference[_d] = { fqn: "@cdktf/provider-aws.backupPlan.BackupPlanRuleCopyActionOutputReference", version: "21.22.1" }; class BackupPlanRuleCopyActionList 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 BackupPlanRuleCopyActionOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.BackupPlanRuleCopyActionList = BackupPlanRuleCopyActionList; _e = JSII_RTTI_SYMBOL_1; BackupPlanRuleCopyActionList[_e] = { fqn: "@cdktf/provider-aws.backupPlan.BackupPlanRuleCopyActionList", version: "21.22.1" }; function backupPlanRuleLifecycleToTerraform(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 { cold_storage_after: cdktf.numberToTerraform(struct.coldStorageAfter), delete_after: cdktf.numberToTerraform(struct.deleteAfter), opt_in_to_archive_for_supported_resources: cdktf.booleanToTerraform(struct.optInToArchiveForSupportedResources), }; } function backupPlanRuleLifecycleToHclTerraform(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 = { cold_storage_after: { value: cdktf.numberToHclTerraform(struct.coldStorageAfter), isBlock: false, type: "simple", storageClassType: "number", }, delete_after: { value: cdktf.numberToHclTerraform(struct.deleteAfter), isBlock: false, type: "simple", storageClassType: "number", }, opt_in_to_archive_for_supported_resources: { value: cdktf.booleanToHclTerraform(struct.optInToArchiveForSupportedResources), isBlock: false, type: "simple", storageClassType: "boolean", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class BackupPlanRuleLifecycleOutputReference 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._coldStorageAfter !== undefined) { hasAnyValues = true; internalValueResult.coldStorageAfter = this._coldStorageAfter; } if (this._deleteAfter !== undefined) { hasAnyValues = true; internalValueResult.deleteAfter = this._deleteAfter; } if (this._optInToArchiveForSupportedResources !== undefined) { hasAnyValues = true; internalValueResult.optInToArchiveForSupportedResources = this._optInToArchiveForSupportedResources; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._coldStorageAfter = undefined; this._deleteAfter = undefined; this._optInToArchiveForSupportedResources = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._coldStorageAfter = value.coldStorageAfter; this._deleteAfter = value.deleteAfter; this._optInToArchiveForSupportedResources = value.optInToArchiveForSupportedResources; } } get coldStorageAfter() { return this.getNumberAttribute('cold_storage_after'); } set coldStorageAfter(value) { this._coldStorageAfter = value; } resetColdStorageAfter() { this._coldStorageAfter = undefined; } // Temporarily expose input value. Use with caution. get coldStorageAfterInput() { return this._coldStorageAfter; } get deleteAfter() { return this.getNumberAttribute('delete_after'); } set deleteAfter(value) { this._deleteAfter = value; } resetDeleteAfter() { this._deleteAfter = undefined; } // Temporarily expose input value. Use with caution. get deleteAfterInput() { return this._deleteAfter; } get optInToArchiveForSupportedResources() { return this.getBooleanAttribute('opt_in_to_archive_for_supported_resources'); } set optInToArchiveForSupportedResources(value) { this._optInToArchiveForSupportedResources = value; } resetOptInToArchiveForSupportedResources() { this._optInToArchiveForSupportedResources = undefined; } // Temporarily expose input value. Use with caution. get optInToArchiveForSupportedResourcesInput() { return this._optInToArchiveForSupportedResources; } } exports.BackupPlanRuleLifecycleOutputReference = BackupPlanRuleLifecycleOutputReference; _f = JSII_RTTI_SYMBOL_1; BackupPlanRuleLifecycleOutputReference[_f] = { fqn: "@cdktf/provider-aws.backupPlan.BackupPlanRuleLifecycleOutputReference", version: "21.22.1" }; function backupPlanRuleScanActionToTerraform(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 { malware_scanner: cdktf.stringToTerraform(struct.malwareScanner), scan_mode: cdktf.stringToTerraform(struct.scanMode), }; } function backupPlanRuleScanActionToHclTerraform(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 = { malware_scanner: { value: cdktf.stringToHclTerraform(struct.malwareScanner), isBlock: false, type: "simple", storageClassType: "string", }, scan_mode: { value: cdktf.stringToHclTerraform(struct.scanMode), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class BackupPlanRuleScanActionOutputReference 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._malwareScanner !== undefined) { hasAnyValues = true; internalValueResult.malwareScanner = this._malwareScanner; } if (this._scanMode !== undefined) { hasAnyValues = true; internalValueResult.scanMode = this._scanMode; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._malwareScanner = undefined; this._scanMode = 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._malwareScanner = value.malwareScanner; this._scanMode = value.scanMode; } } get malwareScanner() { return this.getStringAttribute('malware_scanner'); } set malwareScanner(value) { this._malwareScanner = value; } // Temporarily expose input value. Use with caution. get malwareScannerInput() { return this._malwareScanner; } get scanMode() { return this.getStringAttribute('scan_mode'); } set scanMode(value) { this._scanMode = value; } // Temporarily expose input value. Use with caution. get scanModeInput() { return this._scanMode; } } exports.BackupPlanRuleScanActionOutputReference = BackupPlanRuleScanActionOutputReference; _g = JSII_RTTI_SYMBOL_1; BackupPlanRuleScanActionOutputReference[_g] = { fqn: "@cdktf/provider-aws.backupPlan.BackupPlanRuleScanActionOutputReference", version: "21.22.1" }; class BackupPlanRuleScanActionList 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 BackupPlanRuleScanActionOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.BackupPlanRuleScanActionList = BackupPlanRuleScanActionList; _h = JSII_RTTI_SYMBOL_1; BackupPlanRuleScanActionList[_h] = { fqn: "@cdktf/provider-aws.backupPlan.BackupPlanRuleScanActionList", version: "21.22.1" }; function backupPlanRuleToTerraform(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 { completion_window: cdktf.numberToTerraform(struct.completionWindow), enable_continuous_backup: cdktf.booleanToTerraform(struct.enableContinuousBackup), recovery_point_tags: cdktf.hashMapper(cdktf.stringToTerraform)(struct.recoveryPointTags), rule_name: cdktf.stringToTerraform(struct.ruleName), schedule: cdktf.stringToTerraform(struct.schedule), schedule_expression_timezone: cdktf.stringToTerraform(struct.scheduleExpressionTimezone), start_window: cdktf.numberToTerraform(struct.startWindow), target_logically_air_gapped_backup_vault_arn: cdktf.stringToTerraform(struct.targetLogicallyAirGappedBackupVaultArn), target_vault_name: cdktf.stringToTerraform(struct.targetVaultName), copy_action: cdktf.listMapper(backupPlanRuleCopyActionToTerraform, true)(struct.copyAction), lifecycle: backupPlanRuleLifecycleToTerraform(struct.lifecycle), scan_action: cdktf.listMapper(backupPlanRuleScanActionToTerraform, true)(struct.scanAction), }; } function backupPlanRuleToHclTerraform(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 = { completion_window: { value: cdktf.numberToHclTerraform(struct.completionWindow), isBlock: false, type: "simple", storageClassType: "number", }, enable_continuous_backup: { value: cdktf.booleanToHclTerraform(struct.enableContinuousBackup), isBlock: false, type: "simple", storageClassType: "boolean", }, recovery_point_tags: { value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(struct.recoveryPointTags), isBlock: false, type: "map", storageClassType: "stringMap", }, rule_name: { value: cdktf.stringToHclTerraform(struct.ruleName), isBlock: false, type: "simple", storageClassType: "string", }, schedule: { value: cdktf.stringToHclTerraform(struct.schedule), isBlock: false, type: "simple", storageClassType: "string", }, schedule_expression_timezone: { value: cdktf.stringToHclTerraform(struct.scheduleExpressionTimezone), isBlock: false, type: "simple", storageClassType: "string", }, start_window: { value: cdktf.numberToHclTerraform(struct.startWindow), isBlock: false, type: "simple", storageClassType: "number", }, target_logically_air_gapped_backup_vault_arn: { value: cdktf.stringToHclTerraform(struct.targetLogicallyAirGappedBackupVaultArn), isBlock: false, type: "simple", storageClassType: "string", }, target_vault_name: { value: cdktf.stringToHclTerraform(struct.targetVaultName), isBlock: false, type: "simple", storageClassType: "string", }, copy_action: { value: cdktf.listMapperHcl(backupPlanRuleCopyActionToHclTerraform, true)(struct.copyAction), isBlock: true, type: "set", storageClassType: "BackupPlanRuleCopyActionList", }, lifecycle: { value: backupPlanRuleLifecycleToHclTerraform(struct.lifecycle), isBlock: true, type: "list", storageClassType: "BackupPlanRuleLifecycleList", }, scan_action: { value: cdktf.listMapperHcl(backupPlanRuleScanActionToHclTerraform, true)(struct.scanAction), isBlock: true, type: "set", storageClassType: "BackupPlanRuleScanActionList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class BackupPlanRuleOutputReference 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; // copy_action - computed: false, optional: true, required: false this._copyAction = new BackupPlanRuleCopyActionList(this, "copy_action", true); // lifecycle - computed: false, optional: true, required: false this._lifecycle = new BackupPlanRuleLifecycleOutputReference(this, "lifecycle"); // scan_action - computed: false, optional: true, required: false this._scanAction = new BackupPlanRuleScanActionList(this, "scan_action", true); } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._completionWindow !== undefined) { hasAnyValues = true; internalValueResult.completionWindow = this._completionWindow; } if (this._enableContinuousBackup !== undefined) { hasAnyValues = true; internalValueResult.enableContinuousBackup = this._enableContinuousBackup; } if (this._recoveryPointTags !== undefined) { hasAnyValues = true; internalValueResult.recoveryPointTags = this._recoveryPointTags; } if (this._ruleName !== undefined) { hasAnyValues = true; internalValueResult.ruleName = this._ruleName; } if (this._schedule !== undefined) { hasAnyValues = true; internalValueResult.schedule = this._schedule; } if (this._scheduleExpressionTimezone !== undefined) { hasAnyValues = true; internalValueResult.scheduleExpressionTimezone = this._scheduleExpressionTimezone; } if (this._startWindow !== undefined) { hasAnyValues = true; internalValueResult.startWindow = this._startWindow; } if (this._targetLogicallyAirGappedBackupVaultArn !== undefined) { hasAnyValues = true; internalValueResult.targetLogicallyAirGappedBackupVaultArn = this._targetLogicallyAirGappedBackupVaultArn; } if (this._targetVaultName !== undefined) { hasAnyValues = true; internalValueResult.targetVaultName = this._targetVaultName; } if (this._copyAction?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.copyAction = this._copyAction?.internalValue; } if (this._lifecycle?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.lifecycle = this._lifecycle?.internalValue; } if (this._scanAction?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.scanAction = this._scanAction?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._completionWindow = undefined; this._enableContinuousBackup = undefined; this._recoveryPointTags = undefined; this._ruleName = undefined; this._schedule = undefined; this._scheduleExpressionTimezone = undefined; this._startWindow = undefined; this._targetLogicallyAirGappedBackupVaultArn = undefined; this._targetVaultName = undefined; this._copyAction.internalValue = undefined; this._lifecycle.internalValue = undefined; this._scanAction.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._completionWindow = value.completionWindow; this._enableContinuousBackup = value.enableContinuousBackup; this._recoveryPointTags = value.recoveryPointTags; this._ruleName = value.ruleName; this._schedule = value.schedule; this._scheduleExpressionTimezone = value.scheduleExpressionTimezone; this._startWindow = value.startWindow; this._targetLogicallyAirGappedBackupVaultArn = value.targetLogicallyAirGappedBackupVaultArn; this._targetVaultName = value.targetVaultName; this._copyAction.internalValue = value.copyAction; this._lifecycle.internalValue = value.lifecycle; this._scanAction.internalValue = value.scanAction; } } get completionWindow() { return this.getNumberAttribute('completion_window'); } set completionWindow(value) { this._completionWindow = value; } resetCompletionWindow() { this._completionWindow = undefined; } // Temporarily expose input value. Use with caution. get completionWindowInput() { return this._completionWindow; } get enableContinuousBackup() { return this.getBooleanAttribute('enable_continuous_backup'); } set enableContinuousBackup(value) { this._enableContinuousBackup = value; } resetEnableContinuousBackup() { this._enableContinuousBackup = undefined; } // Temporarily expose input value. Use with caution. get enableContinuousBackupInput() { return this._enableContinuousBackup; } get recoveryPointTags() { return this.getStringMapAttribute('recovery_point_tags'); } set recoveryPointTags(value) { this._recoveryPointTags = value; } resetRecoveryPointTags() { this._recoveryPointTags = undefined; } // Temporarily expose input value. Use with caution. get recoveryPointTagsInput() { return this._recoveryPointTags; } get ruleName() { return this.getStringAttribute('rule_name'); } set ruleName(value) { this._ruleName = value; } // Temporarily expose input value. Use with caution. get ruleNameInput() { return this._ruleName; } get schedule() { return this.getStringAttribute('schedule'); } set schedule(value) { this._schedule = value; } resetSchedule() { this._schedule = undefined; } // Temporarily expose input value. Use with caution. get scheduleInput() { return this._schedule; } get scheduleExpressionTimezone() { return this.getStringAttribute('schedule_expression_timezone'); } set scheduleExpressionTimezone(value) { this._scheduleExpressionTimezone = value; } resetScheduleExpressionTimezone() { this._scheduleExpressionTimezone = undefined; } // Temporarily expose input value. Use with caution. get scheduleExpressionTimezoneInput() { return this._scheduleExpressionTimezone; } get startWindow() { return this.getNumberAttribute('start_window'); } set startWindow(value) { this._startWindow = value; } resetStartWindow() { this._startWindow = undefined; } // Temporarily expose input value. Use with caution. get startWindowInput() { return this._startWindow; } get targetLogicallyAirGappedBackupVaultArn() { return this.getStringAttribute('target_logically_air_gapped_backup_vault_arn'); } set targetLogicallyAirGappedBackupVaultArn(value) { this._targetLogicallyAirGappedBackupVaultArn = value; } resetTargetLogicallyAirGappedBackupVaultArn() { this._targetLogicallyAirGappedBackupVaultArn = undefined; } // Temporarily expose input value. Use with caution. get targetLogicallyAirGappedBackupVaultArnInput() { return this._targetLogicallyAirGappedBackupVaultArn; } get targetVaultName() { return this.getStringAttribute('target_vault_name'); } set targetVaultName(value) { this._targetVaultName = value; } // Temporarily expose input value. Use with caution. get targetVaultNameInput() { return this._targetVaultName; } get copyAction() { return this._copyAction; } putCopyAction(value) { this._copyAction.internalValue = value; } resetCopyAction() { this._copyAction.internalValue = undefined; } // Temporarily expose input value. Use with caution. get copyActionInput() { return this._copyAction.internalValue; } get lifecycle() { return this._lifecycle; } putLifecycle(value) { this._lifecycle.internalValue = value; } resetLifecycle() { this._lifecycle.internalValue = undefined; } // Temporarily expose input value. Use with caution. get lifecycleInput() { return this._lifecycle.internalValue; } get scanAction() { return this._scanAction; } putScanAction(value) { this._scanAction.internalValue = value; } resetScanAction() { this._scanAction.internalValue = undefined; } // Temporarily expose input value. Use with caution. get scanActionInput() { return this._scanAction.internalValue; } } exports.BackupPlanRuleOutputReference = BackupPlanRuleOutputReference; _j = JSII_RTTI_SYMBOL_1; BackupPlanRuleOutputReference[_j] = { fqn: "@cdktf/provider-aws.backupPlan.BackupPlanRuleOutputReference", version: "21.22.1" }; class BackupPlanRuleList 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 BackupPlanRuleOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.BackupPlanRuleList = BackupPlanRuleList; _k = JSII_RTTI_SYMBOL_1; BackupPlanRuleList[_k] = { fqn: "@cdktf/provider-aws.backupPlan.BackupPlanRuleList", version: "21.22.1" }; function backupPlanScanSettingToTerraform(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 { malware_scanner: cdktf.stringToTerraform(struct.malwareScanner), resource_types: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.resourceTypes), scanner_role_arn: cdktf.stringToTerraform(struct.scannerRoleArn), }; } function backupPlanScanSettingToHclTerraform(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 = { malware_scanner: { value: cdktf.stringToHclTerraform(struct.malwareScanner), isBlock: false, type: "simple", storageClassType: "string", }, resource_types: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.resourceTypes), isBlock: false, type: "set", storageClassType: "stringList", }, scanner_role_arn: { value: cdktf.stringToHclTerraform(struct.scannerRoleArn), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class BackupPlanScanSettingOutputReference 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._malwareScanner !== undefined) { hasAnyValues = true; internalValueResult.malwareScanner = this._malwareScanner; } if (this._resourceTypes !== undefined) { hasAnyValues = true; internalValueResult.resourceTypes = this._resourceTypes; } if (this._scannerRoleArn !== undefined) { hasAnyValues = true; internalValueResult.scannerRoleArn = this._scannerRoleArn; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._malwareScanner = undefined; this._resourceTypes = undefined; this._scannerRoleArn = 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._malwareScanner = value.malwareScanner; this._resourceTypes = value.resourceTypes; this._scannerRoleArn = value.scannerRoleArn; } } get malwareScanner() { return this.getStringAttribute('malware_scanner'); } set malwareScanner(value) { this._malwareScanner = value; } // Temporarily expose input value. Use with caution. get malwareScannerInput() { return this._malwareScanner; } get resourceTypes() { return cdktf.Fn.tolist(this.getListAttribute('resource_types')); } set resourceTypes(value) { this._resourceTypes = value; } // Temporarily expose input value. Use with caution. get resourceTypesInput() { return this._resourceTypes; } get scannerRoleArn() { return this.getStringAttribute('scanner_role_arn'); } set scannerRoleArn(value) { this._scannerRoleArn = value; } // Temporarily expose input value. Use with caution. get scannerRoleArnInput() { return this._scannerRoleArn; } } exports.BackupPlanScanSettingOutputReference = BackupPlanScanSettingOutputReference; _l = JSII_RTTI_SYMBOL_1; BackupPlanScanSettingOutputReference[_l] = { fqn: "@cdktf/provider-aws.backupPlan.BackupPlanScanSettingOutputReference", version: "21.22.1" }; class BackupPlanScanSettingList 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 (wi