@cdktf/provider-aws
Version:
Prebuilt aws Provider for Terraform CDK (cdktf)
991 lines • 419 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, _0, _1, _2, _3, _4, _5, _6, _7;
Object.defineProperty(exports, "__esModule", { value: true });
exports.wafv2RuleGroupRuleActionCountCustomRequestHandlingToHclTerraform = exports.wafv2RuleGroupRuleActionCountCustomRequestHandlingToTerraform = exports.Wafv2RuleGroupRuleActionCountCustomRequestHandlingInsertHeaderList = exports.Wafv2RuleGroupRuleActionCountCustomRequestHandlingInsertHeaderOutputReference = exports.wafv2RuleGroupRuleActionCountCustomRequestHandlingInsertHeaderToHclTerraform = exports.wafv2RuleGroupRuleActionCountCustomRequestHandlingInsertHeaderToTerraform = exports.Wafv2RuleGroupRuleActionChallengeOutputReference = exports.wafv2RuleGroupRuleActionChallengeToHclTerraform = exports.wafv2RuleGroupRuleActionChallengeToTerraform = exports.Wafv2RuleGroupRuleActionChallengeCustomRequestHandlingOutputReference = exports.wafv2RuleGroupRuleActionChallengeCustomRequestHandlingToHclTerraform = exports.wafv2RuleGroupRuleActionChallengeCustomRequestHandlingToTerraform = exports.Wafv2RuleGroupRuleActionChallengeCustomRequestHandlingInsertHeaderList = exports.Wafv2RuleGroupRuleActionChallengeCustomRequestHandlingInsertHeaderOutputReference = exports.wafv2RuleGroupRuleActionChallengeCustomRequestHandlingInsertHeaderToHclTerraform = exports.wafv2RuleGroupRuleActionChallengeCustomRequestHandlingInsertHeaderToTerraform = exports.Wafv2RuleGroupRuleActionCaptchaOutputReference = exports.wafv2RuleGroupRuleActionCaptchaToHclTerraform = exports.wafv2RuleGroupRuleActionCaptchaToTerraform = exports.Wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingOutputReference = exports.wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingToHclTerraform = exports.wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingToTerraform = exports.Wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingInsertHeaderList = exports.Wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingInsertHeaderOutputReference = exports.wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingInsertHeaderToHclTerraform = exports.wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingInsertHeaderToTerraform = exports.Wafv2RuleGroupRuleActionBlockOutputReference = exports.wafv2RuleGroupRuleActionBlockToHclTerraform = exports.wafv2RuleGroupRuleActionBlockToTerraform = exports.Wafv2RuleGroupRuleActionBlockCustomResponseOutputReference = exports.wafv2RuleGroupRuleActionBlockCustomResponseToHclTerraform = exports.wafv2RuleGroupRuleActionBlockCustomResponseToTerraform = exports.Wafv2RuleGroupRuleActionBlockCustomResponseResponseHeaderList = exports.Wafv2RuleGroupRuleActionBlockCustomResponseResponseHeaderOutputReference = exports.wafv2RuleGroupRuleActionBlockCustomResponseResponseHeaderToHclTerraform = exports.wafv2RuleGroupRuleActionBlockCustomResponseResponseHeaderToTerraform = exports.Wafv2RuleGroupRuleActionAllowOutputReference = exports.wafv2RuleGroupRuleActionAllowToHclTerraform = exports.wafv2RuleGroupRuleActionAllowToTerraform = exports.Wafv2RuleGroupRuleActionAllowCustomRequestHandlingOutputReference = exports.wafv2RuleGroupRuleActionAllowCustomRequestHandlingToHclTerraform = exports.wafv2RuleGroupRuleActionAllowCustomRequestHandlingToTerraform = exports.Wafv2RuleGroupRuleActionAllowCustomRequestHandlingInsertHeaderList = exports.Wafv2RuleGroupRuleActionAllowCustomRequestHandlingInsertHeaderOutputReference = exports.wafv2RuleGroupRuleActionAllowCustomRequestHandlingInsertHeaderToHclTerraform = exports.wafv2RuleGroupRuleActionAllowCustomRequestHandlingInsertHeaderToTerraform = exports.Wafv2RuleGroupCustomResponseBodyList = exports.Wafv2RuleGroupCustomResponseBodyOutputReference = exports.wafv2RuleGroupCustomResponseBodyToHclTerraform = exports.wafv2RuleGroupCustomResponseBodyToTerraform = void 0;
exports.Wafv2RuleGroup = exports.Wafv2RuleGroupVisibilityConfigOutputReference = exports.wafv2RuleGroupVisibilityConfigToHclTerraform = exports.wafv2RuleGroupVisibilityConfigToTerraform = exports.Wafv2RuleGroupRuleList = exports.Wafv2RuleGroupRuleOutputReference = exports.wafv2RuleGroupRuleToHclTerraform = exports.wafv2RuleGroupRuleToTerraform = exports.Wafv2RuleGroupRuleVisibilityConfigOutputReference = exports.wafv2RuleGroupRuleVisibilityConfigToHclTerraform = exports.wafv2RuleGroupRuleVisibilityConfigToTerraform = exports.Wafv2RuleGroupRuleRuleLabelList = exports.Wafv2RuleGroupRuleRuleLabelOutputReference = exports.wafv2RuleGroupRuleRuleLabelToHclTerraform = exports.wafv2RuleGroupRuleRuleLabelToTerraform = exports.Wafv2RuleGroupRuleCaptchaConfigOutputReference = exports.wafv2RuleGroupRuleCaptchaConfigToHclTerraform = exports.wafv2RuleGroupRuleCaptchaConfigToTerraform = exports.Wafv2RuleGroupRuleCaptchaConfigImmunityTimePropertyOutputReference = exports.wafv2RuleGroupRuleCaptchaConfigImmunityTimePropertyToHclTerraform = exports.wafv2RuleGroupRuleCaptchaConfigImmunityTimePropertyToTerraform = exports.Wafv2RuleGroupRuleActionOutputReference = exports.wafv2RuleGroupRuleActionToHclTerraform = exports.wafv2RuleGroupRuleActionToTerraform = exports.Wafv2RuleGroupRuleActionCountOutputReference = exports.wafv2RuleGroupRuleActionCountToHclTerraform = exports.wafv2RuleGroupRuleActionCountToTerraform = exports.Wafv2RuleGroupRuleActionCountCustomRequestHandlingOutputReference = void 0;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function wafv2RuleGroupCustomResponseBodyToTerraform(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 {
content: cdktf.stringToTerraform(struct.content),
content_type: cdktf.stringToTerraform(struct.contentType),
key: cdktf.stringToTerraform(struct.key),
};
}
exports.wafv2RuleGroupCustomResponseBodyToTerraform = wafv2RuleGroupCustomResponseBodyToTerraform;
function wafv2RuleGroupCustomResponseBodyToHclTerraform(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 = {
content: {
value: cdktf.stringToHclTerraform(struct.content),
isBlock: false,
type: "simple",
storageClassType: "string",
},
content_type: {
value: cdktf.stringToHclTerraform(struct.contentType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
key: {
value: cdktf.stringToHclTerraform(struct.key),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.wafv2RuleGroupCustomResponseBodyToHclTerraform = wafv2RuleGroupCustomResponseBodyToHclTerraform;
class Wafv2RuleGroupCustomResponseBodyOutputReference 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._content !== undefined) {
hasAnyValues = true;
internalValueResult.content = this._content;
}
if (this._contentType !== undefined) {
hasAnyValues = true;
internalValueResult.contentType = this._contentType;
}
if (this._key !== undefined) {
hasAnyValues = true;
internalValueResult.key = this._key;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._content = undefined;
this._contentType = undefined;
this._key = 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._content = value.content;
this._contentType = value.contentType;
this._key = value.key;
}
}
get content() {
return this.getStringAttribute('content');
}
set content(value) {
this._content = value;
}
// Temporarily expose input value. Use with caution.
get contentInput() {
return this._content;
}
get contentType() {
return this.getStringAttribute('content_type');
}
set contentType(value) {
this._contentType = value;
}
// Temporarily expose input value. Use with caution.
get contentTypeInput() {
return this._contentType;
}
get key() {
return this.getStringAttribute('key');
}
set key(value) {
this._key = value;
}
// Temporarily expose input value. Use with caution.
get keyInput() {
return this._key;
}
}
exports.Wafv2RuleGroupCustomResponseBodyOutputReference = Wafv2RuleGroupCustomResponseBodyOutputReference;
_a = JSII_RTTI_SYMBOL_1;
Wafv2RuleGroupCustomResponseBodyOutputReference[_a] = { fqn: "@cdktf/provider-aws.wafv2RuleGroup.Wafv2RuleGroupCustomResponseBodyOutputReference", version: "19.50.0" };
class Wafv2RuleGroupCustomResponseBodyList 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 Wafv2RuleGroupCustomResponseBodyOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.Wafv2RuleGroupCustomResponseBodyList = Wafv2RuleGroupCustomResponseBodyList;
_b = JSII_RTTI_SYMBOL_1;
Wafv2RuleGroupCustomResponseBodyList[_b] = { fqn: "@cdktf/provider-aws.wafv2RuleGroup.Wafv2RuleGroupCustomResponseBodyList", version: "19.50.0" };
function wafv2RuleGroupRuleActionAllowCustomRequestHandlingInsertHeaderToTerraform(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 {
name: cdktf.stringToTerraform(struct.name),
value: cdktf.stringToTerraform(struct.value),
};
}
exports.wafv2RuleGroupRuleActionAllowCustomRequestHandlingInsertHeaderToTerraform = wafv2RuleGroupRuleActionAllowCustomRequestHandlingInsertHeaderToTerraform;
function wafv2RuleGroupRuleActionAllowCustomRequestHandlingInsertHeaderToHclTerraform(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 = {
name: {
value: cdktf.stringToHclTerraform(struct.name),
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));
}
exports.wafv2RuleGroupRuleActionAllowCustomRequestHandlingInsertHeaderToHclTerraform = wafv2RuleGroupRuleActionAllowCustomRequestHandlingInsertHeaderToHclTerraform;
class Wafv2RuleGroupRuleActionAllowCustomRequestHandlingInsertHeaderOutputReference 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._name !== undefined) {
hasAnyValues = true;
internalValueResult.name = this._name;
}
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._name = 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._name = value.name;
this._value = value.value;
}
}
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 value() {
return this.getStringAttribute('value');
}
set value(value) {
this._value = value;
}
// Temporarily expose input value. Use with caution.
get valueInput() {
return this._value;
}
}
exports.Wafv2RuleGroupRuleActionAllowCustomRequestHandlingInsertHeaderOutputReference = Wafv2RuleGroupRuleActionAllowCustomRequestHandlingInsertHeaderOutputReference;
_c = JSII_RTTI_SYMBOL_1;
Wafv2RuleGroupRuleActionAllowCustomRequestHandlingInsertHeaderOutputReference[_c] = { fqn: "@cdktf/provider-aws.wafv2RuleGroup.Wafv2RuleGroupRuleActionAllowCustomRequestHandlingInsertHeaderOutputReference", version: "19.50.0" };
class Wafv2RuleGroupRuleActionAllowCustomRequestHandlingInsertHeaderList 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 Wafv2RuleGroupRuleActionAllowCustomRequestHandlingInsertHeaderOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.Wafv2RuleGroupRuleActionAllowCustomRequestHandlingInsertHeaderList = Wafv2RuleGroupRuleActionAllowCustomRequestHandlingInsertHeaderList;
_d = JSII_RTTI_SYMBOL_1;
Wafv2RuleGroupRuleActionAllowCustomRequestHandlingInsertHeaderList[_d] = { fqn: "@cdktf/provider-aws.wafv2RuleGroup.Wafv2RuleGroupRuleActionAllowCustomRequestHandlingInsertHeaderList", version: "19.50.0" };
function wafv2RuleGroupRuleActionAllowCustomRequestHandlingToTerraform(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 {
insert_header: cdktf.listMapper(wafv2RuleGroupRuleActionAllowCustomRequestHandlingInsertHeaderToTerraform, true)(struct.insertHeader),
};
}
exports.wafv2RuleGroupRuleActionAllowCustomRequestHandlingToTerraform = wafv2RuleGroupRuleActionAllowCustomRequestHandlingToTerraform;
function wafv2RuleGroupRuleActionAllowCustomRequestHandlingToHclTerraform(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 = {
insert_header: {
value: cdktf.listMapperHcl(wafv2RuleGroupRuleActionAllowCustomRequestHandlingInsertHeaderToHclTerraform, true)(struct.insertHeader),
isBlock: true,
type: "set",
storageClassType: "Wafv2RuleGroupRuleActionAllowCustomRequestHandlingInsertHeaderList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.wafv2RuleGroupRuleActionAllowCustomRequestHandlingToHclTerraform = wafv2RuleGroupRuleActionAllowCustomRequestHandlingToHclTerraform;
class Wafv2RuleGroupRuleActionAllowCustomRequestHandlingOutputReference 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;
// insert_header - computed: false, optional: false, required: true
this._insertHeader = new Wafv2RuleGroupRuleActionAllowCustomRequestHandlingInsertHeaderList(this, "insert_header", true);
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._insertHeader?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.insertHeader = this._insertHeader?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._insertHeader.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._insertHeader.internalValue = value.insertHeader;
}
}
get insertHeader() {
return this._insertHeader;
}
putInsertHeader(value) {
this._insertHeader.internalValue = value;
}
// Temporarily expose input value. Use with caution.
get insertHeaderInput() {
return this._insertHeader.internalValue;
}
}
exports.Wafv2RuleGroupRuleActionAllowCustomRequestHandlingOutputReference = Wafv2RuleGroupRuleActionAllowCustomRequestHandlingOutputReference;
_e = JSII_RTTI_SYMBOL_1;
Wafv2RuleGroupRuleActionAllowCustomRequestHandlingOutputReference[_e] = { fqn: "@cdktf/provider-aws.wafv2RuleGroup.Wafv2RuleGroupRuleActionAllowCustomRequestHandlingOutputReference", version: "19.50.0" };
function wafv2RuleGroupRuleActionAllowToTerraform(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 {
custom_request_handling: wafv2RuleGroupRuleActionAllowCustomRequestHandlingToTerraform(struct.customRequestHandling),
};
}
exports.wafv2RuleGroupRuleActionAllowToTerraform = wafv2RuleGroupRuleActionAllowToTerraform;
function wafv2RuleGroupRuleActionAllowToHclTerraform(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 = {
custom_request_handling: {
value: wafv2RuleGroupRuleActionAllowCustomRequestHandlingToHclTerraform(struct.customRequestHandling),
isBlock: true,
type: "list",
storageClassType: "Wafv2RuleGroupRuleActionAllowCustomRequestHandlingList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.wafv2RuleGroupRuleActionAllowToHclTerraform = wafv2RuleGroupRuleActionAllowToHclTerraform;
class Wafv2RuleGroupRuleActionAllowOutputReference 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;
// custom_request_handling - computed: false, optional: true, required: false
this._customRequestHandling = new Wafv2RuleGroupRuleActionAllowCustomRequestHandlingOutputReference(this, "custom_request_handling");
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._customRequestHandling?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.customRequestHandling = this._customRequestHandling?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._customRequestHandling.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._customRequestHandling.internalValue = value.customRequestHandling;
}
}
get customRequestHandling() {
return this._customRequestHandling;
}
putCustomRequestHandling(value) {
this._customRequestHandling.internalValue = value;
}
resetCustomRequestHandling() {
this._customRequestHandling.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get customRequestHandlingInput() {
return this._customRequestHandling.internalValue;
}
}
exports.Wafv2RuleGroupRuleActionAllowOutputReference = Wafv2RuleGroupRuleActionAllowOutputReference;
_f = JSII_RTTI_SYMBOL_1;
Wafv2RuleGroupRuleActionAllowOutputReference[_f] = { fqn: "@cdktf/provider-aws.wafv2RuleGroup.Wafv2RuleGroupRuleActionAllowOutputReference", version: "19.50.0" };
function wafv2RuleGroupRuleActionBlockCustomResponseResponseHeaderToTerraform(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 {
name: cdktf.stringToTerraform(struct.name),
value: cdktf.stringToTerraform(struct.value),
};
}
exports.wafv2RuleGroupRuleActionBlockCustomResponseResponseHeaderToTerraform = wafv2RuleGroupRuleActionBlockCustomResponseResponseHeaderToTerraform;
function wafv2RuleGroupRuleActionBlockCustomResponseResponseHeaderToHclTerraform(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 = {
name: {
value: cdktf.stringToHclTerraform(struct.name),
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));
}
exports.wafv2RuleGroupRuleActionBlockCustomResponseResponseHeaderToHclTerraform = wafv2RuleGroupRuleActionBlockCustomResponseResponseHeaderToHclTerraform;
class Wafv2RuleGroupRuleActionBlockCustomResponseResponseHeaderOutputReference 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._name !== undefined) {
hasAnyValues = true;
internalValueResult.name = this._name;
}
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._name = 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._name = value.name;
this._value = value.value;
}
}
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 value() {
return this.getStringAttribute('value');
}
set value(value) {
this._value = value;
}
// Temporarily expose input value. Use with caution.
get valueInput() {
return this._value;
}
}
exports.Wafv2RuleGroupRuleActionBlockCustomResponseResponseHeaderOutputReference = Wafv2RuleGroupRuleActionBlockCustomResponseResponseHeaderOutputReference;
_g = JSII_RTTI_SYMBOL_1;
Wafv2RuleGroupRuleActionBlockCustomResponseResponseHeaderOutputReference[_g] = { fqn: "@cdktf/provider-aws.wafv2RuleGroup.Wafv2RuleGroupRuleActionBlockCustomResponseResponseHeaderOutputReference", version: "19.50.0" };
class Wafv2RuleGroupRuleActionBlockCustomResponseResponseHeaderList 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 Wafv2RuleGroupRuleActionBlockCustomResponseResponseHeaderOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.Wafv2RuleGroupRuleActionBlockCustomResponseResponseHeaderList = Wafv2RuleGroupRuleActionBlockCustomResponseResponseHeaderList;
_h = JSII_RTTI_SYMBOL_1;
Wafv2RuleGroupRuleActionBlockCustomResponseResponseHeaderList[_h] = { fqn: "@cdktf/provider-aws.wafv2RuleGroup.Wafv2RuleGroupRuleActionBlockCustomResponseResponseHeaderList", version: "19.50.0" };
function wafv2RuleGroupRuleActionBlockCustomResponseToTerraform(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 {
custom_response_body_key: cdktf.stringToTerraform(struct.customResponseBodyKey),
response_code: cdktf.numberToTerraform(struct.responseCode),
response_header: cdktf.listMapper(wafv2RuleGroupRuleActionBlockCustomResponseResponseHeaderToTerraform, true)(struct.responseHeader),
};
}
exports.wafv2RuleGroupRuleActionBlockCustomResponseToTerraform = wafv2RuleGroupRuleActionBlockCustomResponseToTerraform;
function wafv2RuleGroupRuleActionBlockCustomResponseToHclTerraform(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 = {
custom_response_body_key: {
value: cdktf.stringToHclTerraform(struct.customResponseBodyKey),
isBlock: false,
type: "simple",
storageClassType: "string",
},
response_code: {
value: cdktf.numberToHclTerraform(struct.responseCode),
isBlock: false,
type: "simple",
storageClassType: "number",
},
response_header: {
value: cdktf.listMapperHcl(wafv2RuleGroupRuleActionBlockCustomResponseResponseHeaderToHclTerraform, true)(struct.responseHeader),
isBlock: true,
type: "set",
storageClassType: "Wafv2RuleGroupRuleActionBlockCustomResponseResponseHeaderList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.wafv2RuleGroupRuleActionBlockCustomResponseToHclTerraform = wafv2RuleGroupRuleActionBlockCustomResponseToHclTerraform;
class Wafv2RuleGroupRuleActionBlockCustomResponseOutputReference 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;
// response_header - computed: false, optional: true, required: false
this._responseHeader = new Wafv2RuleGroupRuleActionBlockCustomResponseResponseHeaderList(this, "response_header", true);
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._customResponseBodyKey !== undefined) {
hasAnyValues = true;
internalValueResult.customResponseBodyKey = this._customResponseBodyKey;
}
if (this._responseCode !== undefined) {
hasAnyValues = true;
internalValueResult.responseCode = this._responseCode;
}
if (this._responseHeader?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.responseHeader = this._responseHeader?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._customResponseBodyKey = undefined;
this._responseCode = undefined;
this._responseHeader.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._customResponseBodyKey = value.customResponseBodyKey;
this._responseCode = value.responseCode;
this._responseHeader.internalValue = value.responseHeader;
}
}
get customResponseBodyKey() {
return this.getStringAttribute('custom_response_body_key');
}
set customResponseBodyKey(value) {
this._customResponseBodyKey = value;
}
resetCustomResponseBodyKey() {
this._customResponseBodyKey = undefined;
}
// Temporarily expose input value. Use with caution.
get customResponseBodyKeyInput() {
return this._customResponseBodyKey;
}
get responseCode() {
return this.getNumberAttribute('response_code');
}
set responseCode(value) {
this._responseCode = value;
}
// Temporarily expose input value. Use with caution.
get responseCodeInput() {
return this._responseCode;
}
get responseHeader() {
return this._responseHeader;
}
putResponseHeader(value) {
this._responseHeader.internalValue = value;
}
resetResponseHeader() {
this._responseHeader.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get responseHeaderInput() {
return this._responseHeader.internalValue;
}
}
exports.Wafv2RuleGroupRuleActionBlockCustomResponseOutputReference = Wafv2RuleGroupRuleActionBlockCustomResponseOutputReference;
_j = JSII_RTTI_SYMBOL_1;
Wafv2RuleGroupRuleActionBlockCustomResponseOutputReference[_j] = { fqn: "@cdktf/provider-aws.wafv2RuleGroup.Wafv2RuleGroupRuleActionBlockCustomResponseOutputReference", version: "19.50.0" };
function wafv2RuleGroupRuleActionBlockToTerraform(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 {
custom_response: wafv2RuleGroupRuleActionBlockCustomResponseToTerraform(struct.customResponse),
};
}
exports.wafv2RuleGroupRuleActionBlockToTerraform = wafv2RuleGroupRuleActionBlockToTerraform;
function wafv2RuleGroupRuleActionBlockToHclTerraform(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 = {
custom_response: {
value: wafv2RuleGroupRuleActionBlockCustomResponseToHclTerraform(struct.customResponse),
isBlock: true,
type: "list",
storageClassType: "Wafv2RuleGroupRuleActionBlockCustomResponseList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.wafv2RuleGroupRuleActionBlockToHclTerraform = wafv2RuleGroupRuleActionBlockToHclTerraform;
class Wafv2RuleGroupRuleActionBlockOutputReference 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;
// custom_response - computed: false, optional: true, required: false
this._customResponse = new Wafv2RuleGroupRuleActionBlockCustomResponseOutputReference(this, "custom_response");
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._customResponse?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.customResponse = this._customResponse?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._customResponse.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._customResponse.internalValue = value.customResponse;
}
}
get customResponse() {
return this._customResponse;
}
putCustomResponse(value) {
this._customResponse.internalValue = value;
}
resetCustomResponse() {
this._customResponse.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get customResponseInput() {
return this._customResponse.internalValue;
}
}
exports.Wafv2RuleGroupRuleActionBlockOutputReference = Wafv2RuleGroupRuleActionBlockOutputReference;
_k = JSII_RTTI_SYMBOL_1;
Wafv2RuleGroupRuleActionBlockOutputReference[_k] = { fqn: "@cdktf/provider-aws.wafv2RuleGroup.Wafv2RuleGroupRuleActionBlockOutputReference", version: "19.50.0" };
function wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingInsertHeaderToTerraform(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 {
name: cdktf.stringToTerraform(struct.name),
value: cdktf.stringToTerraform(struct.value),
};
}
exports.wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingInsertHeaderToTerraform = wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingInsertHeaderToTerraform;
function wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingInsertHeaderToHclTerraform(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 = {
name: {
value: cdktf.stringToHclTerraform(struct.name),
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));
}
exports.wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingInsertHeaderToHclTerraform = wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingInsertHeaderToHclTerraform;
class Wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingInsertHeaderOutputReference 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._name !== undefined) {
hasAnyValues = true;
internalValueResult.name = this._name;
}
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._name = 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._name = value.name;
this._value = value.value;
}
}
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 value() {
return this.getStringAttribute('value');
}
set value(value) {
this._value = value;
}
// Temporarily expose input value. Use with caution.
get valueInput() {
return this._value;
}
}
exports.Wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingInsertHeaderOutputReference = Wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingInsertHeaderOutputReference;
_l = JSII_RTTI_SYMBOL_1;
Wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingInsertHeaderOutputReference[_l] = { fqn: "@cdktf/provider-aws.wafv2RuleGroup.Wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingInsertHeaderOutputReference", version: "19.50.0" };
class Wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingInsertHeaderList 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 Wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingInsertHeaderOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.Wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingInsertHeaderList = Wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingInsertHeaderList;
_m = JSII_RTTI_SYMBOL_1;
Wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingInsertHeaderList[_m] = { fqn: "@cdktf/provider-aws.wafv2RuleGroup.Wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingInsertHeaderList", version: "19.50.0" };
function wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingToTerraform(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 {
insert_header: cdktf.listMapper(wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingInsertHeaderToTerraform, true)(struct.insertHeader),
};
}
exports.wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingToTerraform = wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingToTerraform;
function wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingToHclTerraform(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 = {
insert_header: {
value: cdktf.listMapperHcl(wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingInsertHeaderToHclTerraform, true)(struct.insertHeader),
isBlock: true,
type: "set",
storageClassType: "Wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingInsertHeaderList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingToHclTerraform = wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingToHclTerraform;
class Wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingOutputReference 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;
// insert_header - computed: false, optional: false, required: true
this._insertHeader = new Wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingInsertHeaderList(this, "insert_header", true);
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._insertHeader?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.insertHeader = this._insertHeader?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._insertHeader.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._insertHeader.internalValue = value.insertHeader;
}
}
get insertHeader() {
return this._insertHeader;
}
putInsertHeader(value) {
this._insertHeader.internalValue = value;
}
// Temporarily expose input value. Use with caution.
get insertHeaderInput() {
return this._insertHeader.internalValue;
}
}
exports.Wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingOutputReference = Wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingOutputReference;
_o = JSII_RTTI_SYMBOL_1;
Wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingOutputReference[_o] = { fqn: "@cdktf/provider-aws.wafv2RuleGroup.Wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingOutputReference", version: "19.50.0" };
function wafv2RuleGroupRuleActionCaptchaToTerraform(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 {
custom_request_handling: wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingToTerraform(struct.customRequestHandling),
};
}
exports.wafv2RuleGroupRuleActionCaptchaToTer