@cdktf/provider-aws
Version:
Prebuilt aws Provider for Terraform CDK (cdktf)
1,119 lines • 155 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
Object.defineProperty(exports, "__esModule", { value: true });
exports.BackupSelection = exports.BackupSelectionSelectionTagList = exports.BackupSelectionSelectionTagOutputReference = exports.BackupSelectionConditionList = exports.BackupSelectionConditionOutputReference = exports.BackupSelectionConditionStringNotLikeList = exports.BackupSelectionConditionStringNotLikeOutputReference = exports.BackupSelectionConditionStringNotEqualsList = exports.BackupSelectionConditionStringNotEqualsOutputReference = exports.BackupSelectionConditionStringLikeList = exports.BackupSelectionConditionStringLikeOutputReference = exports.BackupSelectionConditionStringEqualsList = exports.BackupSelectionConditionStringEqualsOutputReference = void 0;
exports.backupSelectionConditionStringEqualsToTerraform = backupSelectionConditionStringEqualsToTerraform;
exports.backupSelectionConditionStringEqualsToHclTerraform = backupSelectionConditionStringEqualsToHclTerraform;
exports.backupSelectionConditionStringLikeToTerraform = backupSelectionConditionStringLikeToTerraform;
exports.backupSelectionConditionStringLikeToHclTerraform = backupSelectionConditionStringLikeToHclTerraform;
exports.backupSelectionConditionStringNotEqualsToTerraform = backupSelectionConditionStringNotEqualsToTerraform;
exports.backupSelectionConditionStringNotEqualsToHclTerraform = backupSelectionConditionStringNotEqualsToHclTerraform;
exports.backupSelectionConditionStringNotLikeToTerraform = backupSelectionConditionStringNotLikeToTerraform;
exports.backupSelectionConditionStringNotLikeToHclTerraform = backupSelectionConditionStringNotLikeToHclTerraform;
exports.backupSelectionConditionToTerraform = backupSelectionConditionToTerraform;
exports.backupSelectionConditionToHclTerraform = backupSelectionConditionToHclTerraform;
exports.backupSelectionSelectionTagToTerraform = backupSelectionSelectionTagToTerraform;
exports.backupSelectionSelectionTagToHclTerraform = backupSelectionSelectionTagToHclTerraform;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function backupSelectionConditionStringEqualsToTerraform(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 {
key: cdktf.stringToTerraform(struct.key),
value: cdktf.stringToTerraform(struct.value),
};
}
function backupSelectionConditionStringEqualsToHclTerraform(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 = {
key: {
value: cdktf.stringToHclTerraform(struct.key),
isBlock: false,
type: "simple",
storageClassType: "string",
},
value: {
value: cdktf.stringToHclTerraform(struct.value),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class BackupSelectionConditionStringEqualsOutputReference 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._key !== undefined) {
hasAnyValues = true;
internalValueResult.key = this._key;
}
if (this._value !== undefined) {
hasAnyValues = true;
internalValueResult.value = this._value;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._key = undefined;
this._value = 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._key = value.key;
this._value = value.value;
}
}
get key() {
return this.getStringAttribute('key');
}
set key(value) {
this._key = value;
}
// Temporarily expose input value. Use with caution.
get keyInput() {
return this._key;
}
get value() {
return this.getStringAttribute('value');
}
set value(value) {
this._value = value;
}
// Temporarily expose input value. Use with caution.
get valueInput() {
return this._value;
}
}
exports.BackupSelectionConditionStringEqualsOutputReference = BackupSelectionConditionStringEqualsOutputReference;
_a = JSII_RTTI_SYMBOL_1;
BackupSelectionConditionStringEqualsOutputReference[_a] = { fqn: "@cdktf/provider-aws.backupSelection.BackupSelectionConditionStringEqualsOutputReference", version: "21.22.1" };
class BackupSelectionConditionStringEqualsList 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 BackupSelectionConditionStringEqualsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.BackupSelectionConditionStringEqualsList = BackupSelectionConditionStringEqualsList;
_b = JSII_RTTI_SYMBOL_1;
BackupSelectionConditionStringEqualsList[_b] = { fqn: "@cdktf/provider-aws.backupSelection.BackupSelectionConditionStringEqualsList", version: "21.22.1" };
function backupSelectionConditionStringLikeToTerraform(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 {
key: cdktf.stringToTerraform(struct.key),
value: cdktf.stringToTerraform(struct.value),
};
}
function backupSelectionConditionStringLikeToHclTerraform(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 = {
key: {
value: cdktf.stringToHclTerraform(struct.key),
isBlock: false,
type: "simple",
storageClassType: "string",
},
value: {
value: cdktf.stringToHclTerraform(struct.value),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class BackupSelectionConditionStringLikeOutputReference 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._key !== undefined) {
hasAnyValues = true;
internalValueResult.key = this._key;
}
if (this._value !== undefined) {
hasAnyValues = true;
internalValueResult.value = this._value;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._key = undefined;
this._value = 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._key = value.key;
this._value = value.value;
}
}
get key() {
return this.getStringAttribute('key');
}
set key(value) {
this._key = value;
}
// Temporarily expose input value. Use with caution.
get keyInput() {
return this._key;
}
get value() {
return this.getStringAttribute('value');
}
set value(value) {
this._value = value;
}
// Temporarily expose input value. Use with caution.
get valueInput() {
return this._value;
}
}
exports.BackupSelectionConditionStringLikeOutputReference = BackupSelectionConditionStringLikeOutputReference;
_c = JSII_RTTI_SYMBOL_1;
BackupSelectionConditionStringLikeOutputReference[_c] = { fqn: "@cdktf/provider-aws.backupSelection.BackupSelectionConditionStringLikeOutputReference", version: "21.22.1" };
class BackupSelectionConditionStringLikeList 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 BackupSelectionConditionStringLikeOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.BackupSelectionConditionStringLikeList = BackupSelectionConditionStringLikeList;
_d = JSII_RTTI_SYMBOL_1;
BackupSelectionConditionStringLikeList[_d] = { fqn: "@cdktf/provider-aws.backupSelection.BackupSelectionConditionStringLikeList", version: "21.22.1" };
function backupSelectionConditionStringNotEqualsToTerraform(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 {
key: cdktf.stringToTerraform(struct.key),
value: cdktf.stringToTerraform(struct.value),
};
}
function backupSelectionConditionStringNotEqualsToHclTerraform(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 = {
key: {
value: cdktf.stringToHclTerraform(struct.key),
isBlock: false,
type: "simple",
storageClassType: "string",
},
value: {
value: cdktf.stringToHclTerraform(struct.value),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class BackupSelectionConditionStringNotEqualsOutputReference 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._key !== undefined) {
hasAnyValues = true;
internalValueResult.key = this._key;
}
if (this._value !== undefined) {
hasAnyValues = true;
internalValueResult.value = this._value;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._key = undefined;
this._value = 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._key = value.key;
this._value = value.value;
}
}
get key() {
return this.getStringAttribute('key');
}
set key(value) {
this._key = value;
}
// Temporarily expose input value. Use with caution.
get keyInput() {
return this._key;
}
get value() {
return this.getStringAttribute('value');
}
set value(value) {
this._value = value;
}
// Temporarily expose input value. Use with caution.
get valueInput() {
return this._value;
}
}
exports.BackupSelectionConditionStringNotEqualsOutputReference = BackupSelectionConditionStringNotEqualsOutputReference;
_e = JSII_RTTI_SYMBOL_1;
BackupSelectionConditionStringNotEqualsOutputReference[_e] = { fqn: "@cdktf/provider-aws.backupSelection.BackupSelectionConditionStringNotEqualsOutputReference", version: "21.22.1" };
class BackupSelectionConditionStringNotEqualsList 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 BackupSelectionConditionStringNotEqualsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.BackupSelectionConditionStringNotEqualsList = BackupSelectionConditionStringNotEqualsList;
_f = JSII_RTTI_SYMBOL_1;
BackupSelectionConditionStringNotEqualsList[_f] = { fqn: "@cdktf/provider-aws.backupSelection.BackupSelectionConditionStringNotEqualsList", version: "21.22.1" };
function backupSelectionConditionStringNotLikeToTerraform(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 {
key: cdktf.stringToTerraform(struct.key),
value: cdktf.stringToTerraform(struct.value),
};
}
function backupSelectionConditionStringNotLikeToHclTerraform(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 = {
key: {
value: cdktf.stringToHclTerraform(struct.key),
isBlock: false,
type: "simple",
storageClassType: "string",
},
value: {
value: cdktf.stringToHclTerraform(struct.value),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class BackupSelectionConditionStringNotLikeOutputReference 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._key !== undefined) {
hasAnyValues = true;
internalValueResult.key = this._key;
}
if (this._value !== undefined) {
hasAnyValues = true;
internalValueResult.value = this._value;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._key = undefined;
this._value = 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._key = value.key;
this._value = value.value;
}
}
get key() {
return this.getStringAttribute('key');
}
set key(value) {
this._key = value;
}
// Temporarily expose input value. Use with caution.
get keyInput() {
return this._key;
}
get value() {
return this.getStringAttribute('value');
}
set value(value) {
this._value = value;
}
// Temporarily expose input value. Use with caution.
get valueInput() {
return this._value;
}
}
exports.BackupSelectionConditionStringNotLikeOutputReference = BackupSelectionConditionStringNotLikeOutputReference;
_g = JSII_RTTI_SYMBOL_1;
BackupSelectionConditionStringNotLikeOutputReference[_g] = { fqn: "@cdktf/provider-aws.backupSelection.BackupSelectionConditionStringNotLikeOutputReference", version: "21.22.1" };
class BackupSelectionConditionStringNotLikeList 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 BackupSelectionConditionStringNotLikeOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.BackupSelectionConditionStringNotLikeList = BackupSelectionConditionStringNotLikeList;
_h = JSII_RTTI_SYMBOL_1;
BackupSelectionConditionStringNotLikeList[_h] = { fqn: "@cdktf/provider-aws.backupSelection.BackupSelectionConditionStringNotLikeList", version: "21.22.1" };
function backupSelectionConditionToTerraform(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 {
string_equals: cdktf.listMapper(backupSelectionConditionStringEqualsToTerraform, true)(struct.stringEquals),
string_like: cdktf.listMapper(backupSelectionConditionStringLikeToTerraform, true)(struct.stringLike),
string_not_equals: cdktf.listMapper(backupSelectionConditionStringNotEqualsToTerraform, true)(struct.stringNotEquals),
string_not_like: cdktf.listMapper(backupSelectionConditionStringNotLikeToTerraform, true)(struct.stringNotLike),
};
}
function backupSelectionConditionToHclTerraform(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 = {
string_equals: {
value: cdktf.listMapperHcl(backupSelectionConditionStringEqualsToHclTerraform, true)(struct.stringEquals),
isBlock: true,
type: "set",
storageClassType: "BackupSelectionConditionStringEqualsList",
},
string_like: {
value: cdktf.listMapperHcl(backupSelectionConditionStringLikeToHclTerraform, true)(struct.stringLike),
isBlock: true,
type: "set",
storageClassType: "BackupSelectionConditionStringLikeList",
},
string_not_equals: {
value: cdktf.listMapperHcl(backupSelectionConditionStringNotEqualsToHclTerraform, true)(struct.stringNotEquals),
isBlock: true,
type: "set",
storageClassType: "BackupSelectionConditionStringNotEqualsList",
},
string_not_like: {
value: cdktf.listMapperHcl(backupSelectionConditionStringNotLikeToHclTerraform, true)(struct.stringNotLike),
isBlock: true,
type: "set",
storageClassType: "BackupSelectionConditionStringNotLikeList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class BackupSelectionConditionOutputReference 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;
// string_equals - computed: false, optional: true, required: false
this._stringEquals = new BackupSelectionConditionStringEqualsList(this, "string_equals", true);
// string_like - computed: false, optional: true, required: false
this._stringLike = new BackupSelectionConditionStringLikeList(this, "string_like", true);
// string_not_equals - computed: false, optional: true, required: false
this._stringNotEquals = new BackupSelectionConditionStringNotEqualsList(this, "string_not_equals", true);
// string_not_like - computed: false, optional: true, required: false
this._stringNotLike = new BackupSelectionConditionStringNotLikeList(this, "string_not_like", true);
}
get internalValue() {
if (this.resolvableValue) {
return this.resolvableValue;
}
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._stringEquals?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.stringEquals = this._stringEquals?.internalValue;
}
if (this._stringLike?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.stringLike = this._stringLike?.internalValue;
}
if (this._stringNotEquals?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.stringNotEquals = this._stringNotEquals?.internalValue;
}
if (this._stringNotLike?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.stringNotLike = this._stringNotLike?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._stringEquals.internalValue = undefined;
this._stringLike.internalValue = undefined;
this._stringNotEquals.internalValue = undefined;
this._stringNotLike.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._stringEquals.internalValue = value.stringEquals;
this._stringLike.internalValue = value.stringLike;
this._stringNotEquals.internalValue = value.stringNotEquals;
this._stringNotLike.internalValue = value.stringNotLike;
}
}
get stringEquals() {
return this._stringEquals;
}
putStringEquals(value) {
this._stringEquals.internalValue = value;
}
resetStringEquals() {
this._stringEquals.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get stringEqualsInput() {
return this._stringEquals.internalValue;
}
get stringLike() {
return this._stringLike;
}
putStringLike(value) {
this._stringLike.internalValue = value;
}
resetStringLike() {
this._stringLike.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get stringLikeInput() {
return this._stringLike.internalValue;
}
get stringNotEquals() {
return this._stringNotEquals;
}
putStringNotEquals(value) {
this._stringNotEquals.internalValue = value;
}
resetStringNotEquals() {
this._stringNotEquals.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get stringNotEqualsInput() {
return this._stringNotEquals.internalValue;
}
get stringNotLike() {
return this._stringNotLike;
}
putStringNotLike(value) {
this._stringNotLike.internalValue = value;
}
resetStringNotLike() {
this._stringNotLike.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get stringNotLikeInput() {
return this._stringNotLike.internalValue;
}
}
exports.BackupSelectionConditionOutputReference = BackupSelectionConditionOutputReference;
_j = JSII_RTTI_SYMBOL_1;
BackupSelectionConditionOutputReference[_j] = { fqn: "@cdktf/provider-aws.backupSelection.BackupSelectionConditionOutputReference", version: "21.22.1" };
class BackupSelectionConditionList 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 BackupSelectionConditionOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.BackupSelectionConditionList = BackupSelectionConditionList;
_k = JSII_RTTI_SYMBOL_1;
BackupSelectionConditionList[_k] = { fqn: "@cdktf/provider-aws.backupSelection.BackupSelectionConditionList", version: "21.22.1" };
function backupSelectionSelectionTagToTerraform(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 {
key: cdktf.stringToTerraform(struct.key),
type: cdktf.stringToTerraform(struct.type),
value: cdktf.stringToTerraform(struct.value),
};
}
function backupSelectionSelectionTagToHclTerraform(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 = {
key: {
value: cdktf.stringToHclTerraform(struct.key),
isBlock: false,
type: "simple",
storageClassType: "string",
},
type: {
value: cdktf.stringToHclTerraform(struct.type),
isBlock: false,
type: "simple",
storageClassType: "string",
},
value: {
value: cdktf.stringToHclTerraform(struct.value),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class BackupSelectionSelectionTagOutputReference 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._key !== undefined) {
hasAnyValues = true;
internalValueResult.key = this._key;
}
if (this._type !== undefined) {
hasAnyValues = true;
internalValueResult.type = this._type;
}
if (this._value !== undefined) {
hasAnyValues = true;
internalValueResult.value = this._value;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._key = undefined;
this._type = undefined;
this._value = 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._key = value.key;
this._type = value.type;
this._value = value.value;
}
}
get key() {
return this.getStringAttribute('key');
}
set key(value) {
this._key = value;
}
// Temporarily expose input value. Use with caution.
get keyInput() {
return this._key;
}
get type() {
return this.getStringAttribute('type');
}
set type(value) {
this._type = value;
}
// Temporarily expose input value. Use with caution.
get typeInput() {
return this._type;
}
get value() {
return this.getStringAttribute('value');
}
set value(value) {
this._value = value;
}
// Temporarily expose input value. Use with caution.
get valueInput() {
return this._value;
}
}
exports.BackupSelectionSelectionTagOutputReference = BackupSelectionSelectionTagOutputReference;
_l = JSII_RTTI_SYMBOL_1;
BackupSelectionSelectionTagOutputReference[_l] = { fqn: "@cdktf/provider-aws.backupSelection.BackupSelectionSelectionTagOutputReference", version: "21.22.1" };
class BackupSelectionSelectionTagList 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 BackupSelectionSelectionTagOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.BackupSelectionSelectionTagList = BackupSelectionSelectionTagList;
_m = JSII_RTTI_SYMBOL_1;
BackupSelectionSelectionTagList[_m] = { fqn: "@cdktf/provider-aws.backupSelection.BackupSelectionSelectionTagList", version: "21.22.1" };
/**
* Represents a {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/backup_selection aws_backup_selection}
*/
class BackupSelection extends cdktf.TerraformResource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a BackupSelection 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 BackupSelection to import
* @param importFromId The id of the existing BackupSelection that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/backup_selection#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the BackupSelection to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "aws_backup_selection", importId: importFromId, provider });
}
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/backup_selection aws_backup_selection} 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 BackupSelectionConfig
*/
constructor(scope, id, config) {
super(scope, id, {
terraformResourceType: 'aws_backup_selection',
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
});
// condition - computed: false, optional: true, required: false
this._condition = new BackupSelectionConditionList(this, "condition", true);
// selection_tag - computed: false, optional: true, required: false
this._selectionTag = new BackupSelectionSelectionTagList(this, "selection_tag", true);
this._iamRoleArn = config.iamRoleArn;
this._id = config.id;
this._name = config.name;
this._notResources = config.notResources;
this._planId = config.planId;
this._region = config.region;
this._resources = config.resources;
this._condition.internalValue = config.condition;
this._selectionTag.internalValue = config.selectionTag;
}
get iamRoleArn() {
return this.getStringAttribute('iam_role_arn');
}
set iamRoleArn(value) {
this._iamRoleArn = value;
}
// Temporarily expose input value. Use with caution.
get iamRoleArnInput() {
return this._iamRoleArn;
}
get id() {
return this.getStringAttribute('id');
}
set id(value) {
this._id = value;
}
resetId() {
this._id = undefined;
}
// Temporarily expose input value. Use with caution.
get idInput() {
return this._id;
}
get name() {
return this.getStringAttribute('name');
}
set name(value) {
this._name = value;
}
// Temporarily expose input value. Use with caution.
get nameInput() {
return this._name;
}
get notResources() {
return cdktf.Fn.tolist(this.getListAttribute('not_resources'));
}
set notResources(value) {
this._notResources = value;
}
resetNotResources() {
this._notResources = undefined;
}
// Temporarily expose input value. Use with caution.
get notResourcesInput() {
return this._notResources;
}
get planId() {
return this.getStringAttribute('plan_id');
}
set planId(value) {
this._planId = value;
}
// Temporarily expose input value. Use with caution.
get planIdInput() {
return this._planId;
}
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 resources() {
return cdktf.Fn.tolist(this.getListAttribute('resources'));
}
set resources(value) {
this._resources = value;
}
resetResources() {
this._resources = undefined;
}
// Temporarily expose input value. Use with caution.
get resourcesInput() {
return this._resources;
}
get condition() {
return this._condition;
}
putCondition(value) {
this._condition.internalValue = value;
}
resetCondition() {
this._condition.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get conditionInput() {
return this._condition.internalValue;
}
get selectionTag() {
return this._selectionTag;
}
putSelectionTag(value) {
this._selectionTag.internalValue = value;
}
resetSelectionTag() {
this._selectionTag.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get selectionTagInput() {
return this._selectionTag.internalValue;
}
// =========
// SYNTHESIS
// =========
synthesizeAttributes() {
return {
iam_role_arn: cdktf.stringToTerraform(this._iamRoleArn),
id: cdktf.stringToTerraform(this._id),
name: cdktf.stringToTerraform(this._name),
not_resources: cdktf.listMapper(cdktf.stringToTerraform, false)(this._notResources),
plan_id: cdktf.stringToTerraform(this._planId),
region: cdktf.stringToTerraform(this._region),
resources: cdktf.listMapper(cdktf.stringToTerraform, false)(this._resources),
condition: cdktf.listMapper(backupSelectionConditionToTerraform, true)(this._condition.internalValue),
selection_tag: cdktf.listMapper(backupSelectionSelectionTagToTerraform, true)(this._selectionTag.internalValue),
};
}
synthesizeHclAttributes() {
const attrs = {
iam_role_arn: {
value: cdktf.stringToHclTerraform(this._iamRoleArn),
isBlock: false,
type: "simple",
storageClassType: "string",
},
id: {
value: cdktf.stringToHclTerraform(this._id),
isBlock: false,
type: "simple",
storageClassType: "string",
},
name: {
value: cdktf.stringToHclTerraform(this._name),
isBlock: false,
type: "simple",
storageClassType: "string",
},
not_resources: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(this._notResources),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
plan_id: {
value: cdktf.stringToHclTerraform(this._planId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
region: {
value: cdktf.stringToHclTerraform(this._region),
isBlock: false,
type: "simple",
storageClassType: "string",
},
resources: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(this._resources),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
condition: {
value: cdktf.listMapperHcl(backupSelectionConditionToHclTerraform, true)(this._condition.internalValue),
isBlock: true,
type: "set",
storageClassType: "BackupSelectionConditionList",
},
selection_tag: {
value: cdktf.listMapperHcl(backupSelectionSelectionTagToHclTerraform, true)(this._selectionTag.internalValue),
isBlock: true,
type: "set",
storageClassType: "BackupSelectionSelectionTagList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
}
exports.BackupSelection = BackupSelection;
_o = JSII_RTTI_SYMBOL_1;
BackupSelection[_o] = { fqn: "@cdktf/provider-aws.backupSelection.BackupSelection", version: "21.22.1" };
// =================
// STATIC PROPERTIES
// =================
BackupSelection.tfResourceType = "aws_backup_selection";
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvYmFja3VwLXNlbGVjdGlvbi9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBdUVBLDBHQVNDO0FBR0QsZ0hBc0JDO0FBNkdELHNHQVNDO0FBR0QsNEdBc0JDO0FBNkdELGdIQVNDO0FBR0Qsc0hBc0JDO0FBNkdELDRHQVNDO0FBR0Qsa0hBc0JDO0FBNkhELGtGQVdDO0FBR0Qsd0ZBa0NDO0FBbUtELHdGQVVDO0FBR0QsOEZBNEJDOztBQXQ0QkQsK0JBQStCO0FBOEQvQixTQUFnQiwrQ0FBK0MsQ0FBQyxNQUFpRTtJQUMvSCxJQUFJLENBQUMsS0FBSyxDQUFDLFVBQVUsQ0FBQyxNQUFNLENBQUMsSUFBSSxLQUFLLENBQUMsWUFBWSxDQUFDLFlBQVksQ0FBQyxNQUFNLENBQUMsRUFBRSxDQUFDO1FBQUMsT0FBTyxNQUFNLENBQUM7SUFBQyxDQUFDO0lBQzVGLElBQUksS0FBSyxDQUFDLGdCQUFnQixDQUFDLE1BQU0sQ0FBQyxFQUFFLENBQUM7UUFDbkMsTUFBTSxJQUFJLEtBQUssQ0FBQyxvSEFBb0gsQ0FBQyxDQUFDO0lBQ3hJLENBQUM7SUFDRCxPQUFPO1FBQ0wsR0FBRyxFQUFFLEtBQUssQ0FBQyxpQkFBaUIsQ0FBQyxNQUFPLENBQUMsR0FBRyxDQUFDO1FBQ3pDLEtBQUssRUFBRSxLQUFLLENBQU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