@cdktf/provider-aws
Version:
Prebuilt aws Provider for Terraform CDK (cdktf)
1,203 lines • 170 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
Object.defineProperty(exports, "__esModule", { value: true });
exports.BudgetsBudgetAction = exports.BudgetsBudgetActionTimeoutsOutputReference = exports.BudgetsBudgetActionSubscriberList = exports.BudgetsBudgetActionSubscriberOutputReference = exports.BudgetsBudgetActionDefinitionOutputReference = exports.BudgetsBudgetActionDefinitionSsmActionDefinitionOutputReference = exports.BudgetsBudgetActionDefinitionScpActionDefinitionOutputReference = exports.BudgetsBudgetActionDefinitionIamActionDefinitionOutputReference = exports.BudgetsBudgetActionActionThresholdOutputReference = void 0;
exports.budgetsBudgetActionActionThresholdToTerraform = budgetsBudgetActionActionThresholdToTerraform;
exports.budgetsBudgetActionActionThresholdToHclTerraform = budgetsBudgetActionActionThresholdToHclTerraform;
exports.budgetsBudgetActionDefinitionIamActionDefinitionToTerraform = budgetsBudgetActionDefinitionIamActionDefinitionToTerraform;
exports.budgetsBudgetActionDefinitionIamActionDefinitionToHclTerraform = budgetsBudgetActionDefinitionIamActionDefinitionToHclTerraform;
exports.budgetsBudgetActionDefinitionScpActionDefinitionToTerraform = budgetsBudgetActionDefinitionScpActionDefinitionToTerraform;
exports.budgetsBudgetActionDefinitionScpActionDefinitionToHclTerraform = budgetsBudgetActionDefinitionScpActionDefinitionToHclTerraform;
exports.budgetsBudgetActionDefinitionSsmActionDefinitionToTerraform = budgetsBudgetActionDefinitionSsmActionDefinitionToTerraform;
exports.budgetsBudgetActionDefinitionSsmActionDefinitionToHclTerraform = budgetsBudgetActionDefinitionSsmActionDefinitionToHclTerraform;
exports.budgetsBudgetActionDefinitionToTerraform = budgetsBudgetActionDefinitionToTerraform;
exports.budgetsBudgetActionDefinitionToHclTerraform = budgetsBudgetActionDefinitionToHclTerraform;
exports.budgetsBudgetActionSubscriberToTerraform = budgetsBudgetActionSubscriberToTerraform;
exports.budgetsBudgetActionSubscriberToHclTerraform = budgetsBudgetActionSubscriberToHclTerraform;
exports.budgetsBudgetActionTimeoutsToTerraform = budgetsBudgetActionTimeoutsToTerraform;
exports.budgetsBudgetActionTimeoutsToHclTerraform = budgetsBudgetActionTimeoutsToHclTerraform;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function budgetsBudgetActionActionThresholdToTerraform(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 {
action_threshold_type: cdktf.stringToTerraform(struct.actionThresholdType),
action_threshold_value: cdktf.numberToTerraform(struct.actionThresholdValue),
};
}
function budgetsBudgetActionActionThresholdToHclTerraform(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 = {
action_threshold_type: {
value: cdktf.stringToHclTerraform(struct.actionThresholdType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
action_threshold_value: {
value: cdktf.numberToHclTerraform(struct.actionThresholdValue),
isBlock: false,
type: "simple",
storageClassType: "number",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class BudgetsBudgetActionActionThresholdOutputReference 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._actionThresholdType !== undefined) {
hasAnyValues = true;
internalValueResult.actionThresholdType = this._actionThresholdType;
}
if (this._actionThresholdValue !== undefined) {
hasAnyValues = true;
internalValueResult.actionThresholdValue = this._actionThresholdValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._actionThresholdType = undefined;
this._actionThresholdValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._actionThresholdType = value.actionThresholdType;
this._actionThresholdValue = value.actionThresholdValue;
}
}
get actionThresholdType() {
return this.getStringAttribute('action_threshold_type');
}
set actionThresholdType(value) {
this._actionThresholdType = value;
}
// Temporarily expose input value. Use with caution.
get actionThresholdTypeInput() {
return this._actionThresholdType;
}
get actionThresholdValue() {
return this.getNumberAttribute('action_threshold_value');
}
set actionThresholdValue(value) {
this._actionThresholdValue = value;
}
// Temporarily expose input value. Use with caution.
get actionThresholdValueInput() {
return this._actionThresholdValue;
}
}
exports.BudgetsBudgetActionActionThresholdOutputReference = BudgetsBudgetActionActionThresholdOutputReference;
_a = JSII_RTTI_SYMBOL_1;
BudgetsBudgetActionActionThresholdOutputReference[_a] = { fqn: "@cdktf/provider-aws.budgetsBudgetAction.BudgetsBudgetActionActionThresholdOutputReference", version: "21.22.1" };
function budgetsBudgetActionDefinitionIamActionDefinitionToTerraform(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 {
groups: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.groups),
policy_arn: cdktf.stringToTerraform(struct.policyArn),
roles: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.roles),
users: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.users),
};
}
function budgetsBudgetActionDefinitionIamActionDefinitionToHclTerraform(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 = {
groups: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.groups),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
policy_arn: {
value: cdktf.stringToHclTerraform(struct.policyArn),
isBlock: false,
type: "simple",
storageClassType: "string",
},
roles: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.roles),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
users: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.users),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class BudgetsBudgetActionDefinitionIamActionDefinitionOutputReference 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._groups !== undefined) {
hasAnyValues = true;
internalValueResult.groups = this._groups;
}
if (this._policyArn !== undefined) {
hasAnyValues = true;
internalValueResult.policyArn = this._policyArn;
}
if (this._roles !== undefined) {
hasAnyValues = true;
internalValueResult.roles = this._roles;
}
if (this._users !== undefined) {
hasAnyValues = true;
internalValueResult.users = this._users;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._groups = undefined;
this._policyArn = undefined;
this._roles = undefined;
this._users = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._groups = value.groups;
this._policyArn = value.policyArn;
this._roles = value.roles;
this._users = value.users;
}
}
get groups() {
return cdktf.Fn.tolist(this.getListAttribute('groups'));
}
set groups(value) {
this._groups = value;
}
resetGroups() {
this._groups = undefined;
}
// Temporarily expose input value. Use with caution.
get groupsInput() {
return this._groups;
}
get policyArn() {
return this.getStringAttribute('policy_arn');
}
set policyArn(value) {
this._policyArn = value;
}
// Temporarily expose input value. Use with caution.
get policyArnInput() {
return this._policyArn;
}
get roles() {
return cdktf.Fn.tolist(this.getListAttribute('roles'));
}
set roles(value) {
this._roles = value;
}
resetRoles() {
this._roles = undefined;
}
// Temporarily expose input value. Use with caution.
get rolesInput() {
return this._roles;
}
get users() {
return cdktf.Fn.tolist(this.getListAttribute('users'));
}
set users(value) {
this._users = value;
}
resetUsers() {
this._users = undefined;
}
// Temporarily expose input value. Use with caution.
get usersInput() {
return this._users;
}
}
exports.BudgetsBudgetActionDefinitionIamActionDefinitionOutputReference = BudgetsBudgetActionDefinitionIamActionDefinitionOutputReference;
_b = JSII_RTTI_SYMBOL_1;
BudgetsBudgetActionDefinitionIamActionDefinitionOutputReference[_b] = { fqn: "@cdktf/provider-aws.budgetsBudgetAction.BudgetsBudgetActionDefinitionIamActionDefinitionOutputReference", version: "21.22.1" };
function budgetsBudgetActionDefinitionScpActionDefinitionToTerraform(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 {
policy_id: cdktf.stringToTerraform(struct.policyId),
target_ids: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.targetIds),
};
}
function budgetsBudgetActionDefinitionScpActionDefinitionToHclTerraform(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 = {
policy_id: {
value: cdktf.stringToHclTerraform(struct.policyId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
target_ids: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.targetIds),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class BudgetsBudgetActionDefinitionScpActionDefinitionOutputReference 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._policyId !== undefined) {
hasAnyValues = true;
internalValueResult.policyId = this._policyId;
}
if (this._targetIds !== undefined) {
hasAnyValues = true;
internalValueResult.targetIds = this._targetIds;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._policyId = undefined;
this._targetIds = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._policyId = value.policyId;
this._targetIds = value.targetIds;
}
}
get policyId() {
return this.getStringAttribute('policy_id');
}
set policyId(value) {
this._policyId = value;
}
// Temporarily expose input value. Use with caution.
get policyIdInput() {
return this._policyId;
}
get targetIds() {
return cdktf.Fn.tolist(this.getListAttribute('target_ids'));
}
set targetIds(value) {
this._targetIds = value;
}
// Temporarily expose input value. Use with caution.
get targetIdsInput() {
return this._targetIds;
}
}
exports.BudgetsBudgetActionDefinitionScpActionDefinitionOutputReference = BudgetsBudgetActionDefinitionScpActionDefinitionOutputReference;
_c = JSII_RTTI_SYMBOL_1;
BudgetsBudgetActionDefinitionScpActionDefinitionOutputReference[_c] = { fqn: "@cdktf/provider-aws.budgetsBudgetAction.BudgetsBudgetActionDefinitionScpActionDefinitionOutputReference", version: "21.22.1" };
function budgetsBudgetActionDefinitionSsmActionDefinitionToTerraform(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 {
action_sub_type: cdktf.stringToTerraform(struct.actionSubType),
instance_ids: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.instanceIds),
region: cdktf.stringToTerraform(struct.region),
};
}
function budgetsBudgetActionDefinitionSsmActionDefinitionToHclTerraform(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 = {
action_sub_type: {
value: cdktf.stringToHclTerraform(struct.actionSubType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
instance_ids: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.instanceIds),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
region: {
value: cdktf.stringToHclTerraform(struct.region),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class BudgetsBudgetActionDefinitionSsmActionDefinitionOutputReference 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._actionSubType !== undefined) {
hasAnyValues = true;
internalValueResult.actionSubType = this._actionSubType;
}
if (this._instanceIds !== undefined) {
hasAnyValues = true;
internalValueResult.instanceIds = this._instanceIds;
}
if (this._region !== undefined) {
hasAnyValues = true;
internalValueResult.region = this._region;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._actionSubType = undefined;
this._instanceIds = undefined;
this._region = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._actionSubType = value.actionSubType;
this._instanceIds = value.instanceIds;
this._region = value.region;
}
}
get actionSubType() {
return this.getStringAttribute('action_sub_type');
}
set actionSubType(value) {
this._actionSubType = value;
}
// Temporarily expose input value. Use with caution.
get actionSubTypeInput() {
return this._actionSubType;
}
get instanceIds() {
return cdktf.Fn.tolist(this.getListAttribute('instance_ids'));
}
set instanceIds(value) {
this._instanceIds = value;
}
// Temporarily expose input value. Use with caution.
get instanceIdsInput() {
return this._instanceIds;
}
get region() {
return this.getStringAttribute('region');
}
set region(value) {
this._region = value;
}
// Temporarily expose input value. Use with caution.
get regionInput() {
return this._region;
}
}
exports.BudgetsBudgetActionDefinitionSsmActionDefinitionOutputReference = BudgetsBudgetActionDefinitionSsmActionDefinitionOutputReference;
_d = JSII_RTTI_SYMBOL_1;
BudgetsBudgetActionDefinitionSsmActionDefinitionOutputReference[_d] = { fqn: "@cdktf/provider-aws.budgetsBudgetAction.BudgetsBudgetActionDefinitionSsmActionDefinitionOutputReference", version: "21.22.1" };
function budgetsBudgetActionDefinitionToTerraform(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 {
iam_action_definition: budgetsBudgetActionDefinitionIamActionDefinitionToTerraform(struct.iamActionDefinition),
scp_action_definition: budgetsBudgetActionDefinitionScpActionDefinitionToTerraform(struct.scpActionDefinition),
ssm_action_definition: budgetsBudgetActionDefinitionSsmActionDefinitionToTerraform(struct.ssmActionDefinition),
};
}
function budgetsBudgetActionDefinitionToHclTerraform(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 = {
iam_action_definition: {
value: budgetsBudgetActionDefinitionIamActionDefinitionToHclTerraform(struct.iamActionDefinition),
isBlock: true,
type: "list",
storageClassType: "BudgetsBudgetActionDefinitionIamActionDefinitionList",
},
scp_action_definition: {
value: budgetsBudgetActionDefinitionScpActionDefinitionToHclTerraform(struct.scpActionDefinition),
isBlock: true,
type: "list",
storageClassType: "BudgetsBudgetActionDefinitionScpActionDefinitionList",
},
ssm_action_definition: {
value: budgetsBudgetActionDefinitionSsmActionDefinitionToHclTerraform(struct.ssmActionDefinition),
isBlock: true,
type: "list",
storageClassType: "BudgetsBudgetActionDefinitionSsmActionDefinitionList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class BudgetsBudgetActionDefinitionOutputReference 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;
// iam_action_definition - computed: false, optional: true, required: false
this._iamActionDefinition = new BudgetsBudgetActionDefinitionIamActionDefinitionOutputReference(this, "iam_action_definition");
// scp_action_definition - computed: false, optional: true, required: false
this._scpActionDefinition = new BudgetsBudgetActionDefinitionScpActionDefinitionOutputReference(this, "scp_action_definition");
// ssm_action_definition - computed: false, optional: true, required: false
this._ssmActionDefinition = new BudgetsBudgetActionDefinitionSsmActionDefinitionOutputReference(this, "ssm_action_definition");
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._iamActionDefinition?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.iamActionDefinition = this._iamActionDefinition?.internalValue;
}
if (this._scpActionDefinition?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.scpActionDefinition = this._scpActionDefinition?.internalValue;
}
if (this._ssmActionDefinition?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.ssmActionDefinition = this._ssmActionDefinition?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._iamActionDefinition.internalValue = undefined;
this._scpActionDefinition.internalValue = undefined;
this._ssmActionDefinition.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._iamActionDefinition.internalValue = value.iamActionDefinition;
this._scpActionDefinition.internalValue = value.scpActionDefinition;
this._ssmActionDefinition.internalValue = value.ssmActionDefinition;
}
}
get iamActionDefinition() {
return this._iamActionDefinition;
}
putIamActionDefinition(value) {
this._iamActionDefinition.internalValue = value;
}
resetIamActionDefinition() {
this._iamActionDefinition.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get iamActionDefinitionInput() {
return this._iamActionDefinition.internalValue;
}
get scpActionDefinition() {
return this._scpActionDefinition;
}
putScpActionDefinition(value) {
this._scpActionDefinition.internalValue = value;
}
resetScpActionDefinition() {
this._scpActionDefinition.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get scpActionDefinitionInput() {
return this._scpActionDefinition.internalValue;
}
get ssmActionDefinition() {
return this._ssmActionDefinition;
}
putSsmActionDefinition(value) {
this._ssmActionDefinition.internalValue = value;
}
resetSsmActionDefinition() {
this._ssmActionDefinition.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get ssmActionDefinitionInput() {
return this._ssmActionDefinition.internalValue;
}
}
exports.BudgetsBudgetActionDefinitionOutputReference = BudgetsBudgetActionDefinitionOutputReference;
_e = JSII_RTTI_SYMBOL_1;
BudgetsBudgetActionDefinitionOutputReference[_e] = { fqn: "@cdktf/provider-aws.budgetsBudgetAction.BudgetsBudgetActionDefinitionOutputReference", version: "21.22.1" };
function budgetsBudgetActionSubscriberToTerraform(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 {
address: cdktf.stringToTerraform(struct.address),
subscription_type: cdktf.stringToTerraform(struct.subscriptionType),
};
}
function budgetsBudgetActionSubscriberToHclTerraform(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 = {
address: {
value: cdktf.stringToHclTerraform(struct.address),
isBlock: false,
type: "simple",
storageClassType: "string",
},
subscription_type: {
value: cdktf.stringToHclTerraform(struct.subscriptionType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class BudgetsBudgetActionSubscriberOutputReference 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._address !== undefined) {
hasAnyValues = true;
internalValueResult.address = this._address;
}
if (this._subscriptionType !== undefined) {
hasAnyValues = true;
internalValueResult.subscriptionType = this._subscriptionType;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._address = undefined;
this._subscriptionType = 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._address = value.address;
this._subscriptionType = value.subscriptionType;
}
}
get address() {
return this.getStringAttribute('address');
}
set address(value) {
this._address = value;
}
// Temporarily expose input value. Use with caution.
get addressInput() {
return this._address;
}
get subscriptionType() {
return this.getStringAttribute('subscription_type');
}
set subscriptionType(value) {
this._subscriptionType = value;
}
// Temporarily expose input value. Use with caution.
get subscriptionTypeInput() {
return this._subscriptionType;
}
}
exports.BudgetsBudgetActionSubscriberOutputReference = BudgetsBudgetActionSubscriberOutputReference;
_f = JSII_RTTI_SYMBOL_1;
BudgetsBudgetActionSubscriberOutputReference[_f] = { fqn: "@cdktf/provider-aws.budgetsBudgetAction.BudgetsBudgetActionSubscriberOutputReference", version: "21.22.1" };
class BudgetsBudgetActionSubscriberList 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 BudgetsBudgetActionSubscriberOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.BudgetsBudgetActionSubscriberList = BudgetsBudgetActionSubscriberList;
_g = JSII_RTTI_SYMBOL_1;
BudgetsBudgetActionSubscriberList[_g] = { fqn: "@cdktf/provider-aws.budgetsBudgetAction.BudgetsBudgetActionSubscriberList", version: "21.22.1" };
function budgetsBudgetActionTimeoutsToTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
return {
create: cdktf.stringToTerraform(struct.create),
delete: cdktf.stringToTerraform(struct.delete),
update: cdktf.stringToTerraform(struct.update),
};
}
function budgetsBudgetActionTimeoutsToHclTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
const attrs = {
create: {
value: cdktf.stringToHclTerraform(struct.create),
isBlock: false,
type: "simple",
storageClassType: "string",
},
delete: {
value: cdktf.stringToHclTerraform(struct.delete),
isBlock: false,
type: "simple",
storageClassType: "string",
},
update: {
value: cdktf.stringToHclTerraform(struct.update),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class BudgetsBudgetActionTimeoutsOutputReference extends cdktf.ComplexObject {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
*/
constructor(terraformResource, terraformAttribute) {
super(terraformResource, terraformAttribute, false);
this.isEmptyObject = false;
}
get internalValue() {
if (this.resolvableValue) {
return this.resolvableValue;
}
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._create !== undefined) {
hasAnyValues = true;
internalValueResult.create = this._create;
}
if (this._delete !== undefined) {
hasAnyValues = true;
internalValueResult.delete = this._delete;
}
if (this._update !== undefined) {
hasAnyValues = true;
internalValueResult.update = this._update;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._create = undefined;
this._delete = undefined;
this._update = undefined;
}
else if (cdktf.Tokenization.isResolvable(value)) {
this.isEmptyObject = false;
this.resolvableValue = value;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this.resolvableValue = undefined;
this._create = value.create;
this._delete = value.delete;
this._update = value.update;
}
}
get create() {
return this.getStringAttribute('create');
}
set create(value) {
this._create = value;
}
resetCreate() {
this._create = undefined;
}
// Temporarily expose input value. Use with caution.
get createInput() {
return this._create;
}
get delete() {
return this.getStringAttribute('delete');
}
set delete(value) {
this._delete = value;
}
resetDelete() {
this._delete = undefined;
}
// Temporarily expose input value. Use with caution.
get deleteInput() {
return this._delete;
}
get update() {
return this.getStringAttribute('update');
}
set update(value) {
this._update = value;
}
resetUpdate() {
this._update = undefined;
}
// Temporarily expose input value. Use with caution.
get updateInput() {
return this._update;
}
}
exports.BudgetsBudgetActionTimeoutsOutputReference = BudgetsBudgetActionTimeoutsOutputReference;
_h = JSII_RTTI_SYMBOL_1;
BudgetsBudgetActionTimeoutsOutputReference[_h] = { fqn: "@cdktf/provider-aws.budgetsBudgetAction.BudgetsBudgetActionTimeoutsOutputReference", version: "21.22.1" };
/**
* Represents a {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/budgets_budget_action aws_budgets_budget_action}
*/
class BudgetsBudgetAction extends cdktf.TerraformResource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a BudgetsBudgetAction 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 BudgetsBudgetAction to import
* @param importFromId The id of the existing BudgetsBudgetAction that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/budgets_budget_action#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the BudgetsBudgetAction to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "aws_budgets_budget_action", importId: importFromId, provider });
}
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/budgets_budget_action aws_budgets_budget_action} 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 BudgetsBudgetActionConfig
*/
constructor(scope, id, config) {
super(scope, id, {
terraformResourceType: 'aws_budgets_budget_action',
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
});
// action_threshold - computed: false, optional: false, required: true
this._actionThreshold = new BudgetsBudgetActionActionThresholdOutputReference(this, "action_threshold");
// definition - computed: false, optional: false, required: true
this._definition = new BudgetsBudgetActionDefinitionOutputReference(this, "definition");
// subscriber - computed: false, optional: false, required: true
this._subscriber = new BudgetsBudgetActionSubscriberList(this, "subscriber", true);
// timeouts - computed: false, optional: true, required: false
this._timeouts = new BudgetsBudgetActionTimeoutsOutputReference(this, "timeouts");
this._accountId = config.accountId;
this._actionType = config.actionType;
this._approvalModel = config.approvalModel;
this._budgetName = config.budgetName;
this._executionRoleArn = config.executionRoleArn;
this._id = config.id;
this._notificationType = config.notificationType;
this._tags = config.tags;
this._tagsAll = config.tagsAll;
this._actionThreshold.internalValue = config.actionThreshold;
this._definition.internalValue = config.definition;
this._subscriber.internalValue = config.subscriber;
this._timeouts.internalValue = config.timeouts;
}
get accountId() {
return this.getStringAttribute('account_id');
}
set accountId(value) {
this._accountId = value;
}
resetAccountId() {
this._accountId = undefined;
}
// Temporarily expose input value. Use with caution.
get accountIdInput() {
return this._accountId;
}
// action_id - computed: true, optional: false, required: false
get actionId() {
return this.getStringAttribute('action_id');
}
get actionType() {
return this.getStringAttribute('action_type');
}
set actionType(value) {
this._actionType = value;
}
// Temporarily expose input value. Use with caution.
get actionTypeInput() {
return this._actionType;
}
get approvalModel() {
return this.getStringAttribute('approval_model');
}
set approvalModel(value) {
this._approvalModel = value;
}
// Temporarily expose input value. Use with caution.
get approvalModelInput() {
return this._approvalModel;
}
// arn - computed: true, optional: false, required: false
get arn() {
return this.getStringAttribute('arn');
}
get budgetName() {
return this.getStringAttribute('budget_name');
}
set budgetName(value) {
this._budgetName = value;
}
// Temporarily expose input value. Use with caution.
get budgetNameInput() {
return this._budgetName;
}
get executionRoleArn() {
return this.getStringAttribute('execution_role_arn');
}
set executionRoleArn(value) {
this._executionRoleArn = value;
}
// Temporarily expose input value. Use with caution.
get executionRoleArnInput() {
return this._executionRoleArn;
}
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 notificationType() {
return this.getStringAttribute('notification_type');
}
set notificationType(value) {
this._notificationType = value;
}
// Temporarily expose input value. Use with caution.
get notificationTypeInput() {
return this._notificationType;
}
// status - computed: true, optional: false, required: false
get status() {
return this.getStringAttribute('status');
}
get tags() {
return this.getStringMapAttribute('tags');
}
set tags(value) {
this._tags = value;
}
resetTags() {
this._tags = undefined;
}
// Temporarily expose input value. Use with caution.
get tagsInput() {
return this._tags;
}
get tagsAll() {
return this.getStringMapAttribute('tags_all');
}
set tagsAll(value) {
this._tagsAll = value;
}
resetTagsAll() {
this._tagsAll = undefined;
}
// Temporarily expose input value. Use with caution.
get tagsAllInput() {
return this._tagsAll;
}
get actionThreshold() {
return this._actionThreshold;
}
putActionThreshold(value) {
this._actionThreshold.internalValue = value;
}
// Temporarily expose input value. Use with caution.
get actionThresholdInput() {
return this._actionThreshold.internalValue;
}
get definition() {
return this._definition;
}
putDefinition(value) {
this._definition.internalValue = value;
}
// Temporarily expose input value. Use with caution.
get definitionInput() {
return this._definition.internalValue;
}
get subscriber() {
return this._subscriber;
}
putSubscriber(value) {
this._subscriber.internalValue = value;
}
// Temporarily expose input value. Use with caution.
get subscriberInput() {
return this._subscriber.internalValue;
}
get timeouts() {
return this._timeouts;
}
putTimeouts(value) {
this._timeouts.internalValue = value;
}
resetTimeouts() {
this._timeouts.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get timeoutsInput() {
return this._timeouts.internalValue;
}
// =========
// SYNTHESIS
// =========
synthesizeAttributes() {
return {
account_id: cdktf.stringToTerraform(this._accountId),
action_type: cdktf.stringToTerraform(this._actionType),
approval_model: cdktf.stringToTerraform(this._approvalModel),
budget_name: cdktf.stringToTerraform(this._budgetName),
execution_role_arn: cdktf.stringToTerraform(this._executionRoleArn),
id: cdktf.stringToTerraform(this._id),
notification_type: cdktf.stringToTerraform(this._notificationType),
tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags),
tags_all: cdktf.hashMapper(cdktf.stringToTerraform)(this._tagsAll),
action_threshold: budgetsBudgetActionActionThresholdToTerraform(this._actionThreshold.internalValue),
definition: budgetsBudgetActionDefinitionToTerraform(this._definition.internalValue),
subscriber: cdktf.listMapper(budgetsBudgetActionSubscriberToTerraform, true)(this._subscriber.internalValue),
timeouts: budgetsBudgetActionTimeoutsToTerraform(this._timeouts.internalValue),
};
}
synthesizeHclAttributes() {
const attrs = {
account_id: {
value: cdktf.stringToHclTerraform(this._accountId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
action_type: {
value: cdktf.stringToHclTerraform(this._actionType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
approval_model: {
value: cdktf.stringToHclTerraform(this._approvalModel),
isBlock: false,
type: "simple",
storageClassType: "string",
},
budget_name: {
value: cdktf.stringToHclTerraform(this._budgetName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
execution_role_arn: {
value: cdktf.stringToHclTerraform(this._executionRoleArn),
isBlock: false,
type: "simple",
storageClassType: "string",
},
id: {
value: cdktf.stringToHclTerraform(this._id),
isBlock: false,
type: "simple",
storageClassType: "string",
},
notification_type: {
value: cdktf.stringToHclTerraform(this._notificationType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
tags: {
value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(this._tags),
isBlock: false,
type: "map",
storageClassType: "stringMap",
},
tags_all: {
value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(this._tagsAll),
isBlock: false,
type: "map",
storageClassType: "stringMap",
},
action_threshold: {
value: budgetsBudgetActionActionThresholdToHclTerraform(this._actionThreshold.internalValue),
isBlock: true,
type: "list",
storageClassType: "BudgetsBudgetActionActionThresholdList",
},
definition: {
value: budgetsBudgetActionDefinitionToHclTerraform(this._definition.internalValue),
isBlock: true,
type: "list",
storageClassType: "BudgetsBudgetActionDefinitionList",
},
subscriber: {
value: cdktf.listMapperHcl(budgetsBudgetActionSubscriberToHclTerraform, true)(this._subscriber.internalValue),
isBlock: true,
type: "set",
storageClassType: "BudgetsBudgetActionSubscriberList",
},
timeouts: {
value: budgetsBudgetActionTimeoutsToHclTerraform(this._timeouts.internalValue),
isBlock: true,
type: "struct",
storageClassType: "BudgetsBudgetActionTimeouts",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
}
exports.BudgetsBudgetAction = BudgetsBudgetAction;
_j = JSII_RTTI_SYMBOL_1;
BudgetsBudgetAction[_j] = { fqn: "@cdktf/provider-aws.budgetsBudgetAction.BudgetsBudgetAction", version: "21.22.1" };
// =================
// STATIC PROPERTIES
// =================
BudgetsBudgetAction.tfResourceType = "aws_budgets_budget_action";
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvYnVkZ2V0cy1idWRnZXQtYWN0aW9uL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUF5RkEsc0dBU0M7QUFHRCw0R0FzQkM7QUFxRkQsa0lBV0M7QUFHRCx3SUFrQ0M7QUE0SEQsa0lBU0M7QUFHRCx3SUFzQkM7QUFpRkQsa0lBVUM7QUFHRCx3SUE0QkM7QUEwR0QsNEZBVUM7QUFHRCxrR0E0QkM7QUF5R0QsNEZBU0M7QUFHRCxrR0FzQkM7QUFpSEQsd0ZBVUM7QUFHRCw4RkE0QkM7O0FBdjhCRCwrQkFBK0I7QUFnRi9CLFNBQWdCLDZDQUE2QyxDQUFDLE1BQStGO0lBQzNKLElBQUksQ0FBQyxLQUFLLENBQUMsVUFBVSxDQUFDLE1BQU0sQ0FBQyxJQUFJLEtBQUssQ0FBQyxZQUFZLENBQUMsWUFBWSxDQUFDLE1BQU0sQ0FBQyxFQUFFLENBQUM7UUFBQyxPQUFPLE1BQU0sQ0FBQztJQUFDLENBQUM7SUFDNUYsSUFBSSxLQUFLLENBQUMsZ0JBQWdCLENBQUMsTUFBTSxDQUFDLEVBQUUsQ0FBQztRQUNuQyxNQUFNLElBQUksS0FBSyxDQUFDLG9IQUFvSCxDQUFDLENBQUM7SUFDeEksQ0FBQztJQUNELE9BQU87UUFDTCxxQkFBcUIsRU