@cdktf/provider-azurerm
Version:
Prebuilt azurerm Provider for Terraform CDK (cdktf)
1,156 lines • 207 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.BatchAccount = exports.BatchAccountTimeoutsOutputReference = exports.batchAccountTimeoutsToHclTerraform = exports.batchAccountTimeoutsToTerraform = exports.BatchAccountNetworkProfileOutputReference = exports.batchAccountNetworkProfileToHclTerraform = exports.batchAccountNetworkProfileToTerraform = exports.BatchAccountNetworkProfileNodeManagementAccessOutputReference = exports.batchAccountNetworkProfileNodeManagementAccessToHclTerraform = exports.batchAccountNetworkProfileNodeManagementAccessToTerraform = exports.BatchAccountNetworkProfileNodeManagementAccessIpRuleList = exports.BatchAccountNetworkProfileNodeManagementAccessIpRuleOutputReference = exports.batchAccountNetworkProfileNodeManagementAccessIpRuleToHclTerraform = exports.batchAccountNetworkProfileNodeManagementAccessIpRuleToTerraform = exports.BatchAccountNetworkProfileAccountAccessOutputReference = exports.batchAccountNetworkProfileAccountAccessToHclTerraform = exports.batchAccountNetworkProfileAccountAccessToTerraform = exports.BatchAccountNetworkProfileAccountAccessIpRuleList = exports.BatchAccountNetworkProfileAccountAccessIpRuleOutputReference = exports.batchAccountNetworkProfileAccountAccessIpRuleToHclTerraform = exports.batchAccountNetworkProfileAccountAccessIpRuleToTerraform = exports.BatchAccountKeyVaultReferenceOutputReference = exports.batchAccountKeyVaultReferenceToHclTerraform = exports.batchAccountKeyVaultReferenceToTerraform = exports.BatchAccountIdentityOutputReference = exports.batchAccountIdentityToHclTerraform = exports.batchAccountIdentityToTerraform = exports.BatchAccountEncryptionList = exports.BatchAccountEncryptionOutputReference = exports.batchAccountEncryptionToHclTerraform = exports.batchAccountEncryptionToTerraform = void 0;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function batchAccountEncryptionToTerraform(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_vault_key_id: cdktf.stringToTerraform(struct.keyVaultKeyId),
};
}
exports.batchAccountEncryptionToTerraform = batchAccountEncryptionToTerraform;
function batchAccountEncryptionToHclTerraform(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_vault_key_id: {
value: cdktf.stringToHclTerraform(struct.keyVaultKeyId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.batchAccountEncryptionToHclTerraform = batchAccountEncryptionToHclTerraform;
class BatchAccountEncryptionOutputReference 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._keyVaultKeyId !== undefined) {
hasAnyValues = true;
internalValueResult.keyVaultKeyId = this._keyVaultKeyId;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._keyVaultKeyId = 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._keyVaultKeyId = value.keyVaultKeyId;
}
}
get keyVaultKeyId() {
return this.getStringAttribute('key_vault_key_id');
}
set keyVaultKeyId(value) {
this._keyVaultKeyId = value;
}
resetKeyVaultKeyId() {
this._keyVaultKeyId = undefined;
}
// Temporarily expose input value. Use with caution.
get keyVaultKeyIdInput() {
return this._keyVaultKeyId;
}
}
exports.BatchAccountEncryptionOutputReference = BatchAccountEncryptionOutputReference;
_a = JSII_RTTI_SYMBOL_1;
BatchAccountEncryptionOutputReference[_a] = { fqn: "@cdktf/provider-azurerm.batchAccount.BatchAccountEncryptionOutputReference", version: "12.27.0" };
class BatchAccountEncryptionList 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 BatchAccountEncryptionOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.BatchAccountEncryptionList = BatchAccountEncryptionList;
_b = JSII_RTTI_SYMBOL_1;
BatchAccountEncryptionList[_b] = { fqn: "@cdktf/provider-azurerm.batchAccount.BatchAccountEncryptionList", version: "12.27.0" };
function batchAccountIdentityToTerraform(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 {
identity_ids: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.identityIds),
type: cdktf.stringToTerraform(struct.type),
};
}
exports.batchAccountIdentityToTerraform = batchAccountIdentityToTerraform;
function batchAccountIdentityToHclTerraform(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 = {
identity_ids: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.identityIds),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
type: {
value: cdktf.stringToHclTerraform(struct.type),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.batchAccountIdentityToHclTerraform = batchAccountIdentityToHclTerraform;
class BatchAccountIdentityOutputReference 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._identityIds !== undefined) {
hasAnyValues = true;
internalValueResult.identityIds = this._identityIds;
}
if (this._type !== undefined) {
hasAnyValues = true;
internalValueResult.type = this._type;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._identityIds = undefined;
this._type = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._identityIds = value.identityIds;
this._type = value.type;
}
}
get identityIds() {
return cdktf.Fn.tolist(this.getListAttribute('identity_ids'));
}
set identityIds(value) {
this._identityIds = value;
}
resetIdentityIds() {
this._identityIds = undefined;
}
// Temporarily expose input value. Use with caution.
get identityIdsInput() {
return this._identityIds;
}
// principal_id - computed: true, optional: false, required: false
get principalId() {
return this.getStringAttribute('principal_id');
}
// tenant_id - computed: true, optional: false, required: false
get tenantId() {
return this.getStringAttribute('tenant_id');
}
get type() {
return this.getStringAttribute('type');
}
set type(value) {
this._type = value;
}
// Temporarily expose input value. Use with caution.
get typeInput() {
return this._type;
}
}
exports.BatchAccountIdentityOutputReference = BatchAccountIdentityOutputReference;
_c = JSII_RTTI_SYMBOL_1;
BatchAccountIdentityOutputReference[_c] = { fqn: "@cdktf/provider-azurerm.batchAccount.BatchAccountIdentityOutputReference", version: "12.27.0" };
function batchAccountKeyVaultReferenceToTerraform(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 {
id: cdktf.stringToTerraform(struct.id),
url: cdktf.stringToTerraform(struct.url),
};
}
exports.batchAccountKeyVaultReferenceToTerraform = batchAccountKeyVaultReferenceToTerraform;
function batchAccountKeyVaultReferenceToHclTerraform(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 = {
id: {
value: cdktf.stringToHclTerraform(struct.id),
isBlock: false,
type: "simple",
storageClassType: "string",
},
url: {
value: cdktf.stringToHclTerraform(struct.url),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.batchAccountKeyVaultReferenceToHclTerraform = batchAccountKeyVaultReferenceToHclTerraform;
class BatchAccountKeyVaultReferenceOutputReference 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._id !== undefined) {
hasAnyValues = true;
internalValueResult.id = this._id;
}
if (this._url !== undefined) {
hasAnyValues = true;
internalValueResult.url = this._url;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._id = undefined;
this._url = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._id = value.id;
this._url = value.url;
}
}
get id() {
return this.getStringAttribute('id');
}
set id(value) {
this._id = value;
}
// Temporarily expose input value. Use with caution.
get idInput() {
return this._id;
}
get url() {
return this.getStringAttribute('url');
}
set url(value) {
this._url = value;
}
// Temporarily expose input value. Use with caution.
get urlInput() {
return this._url;
}
}
exports.BatchAccountKeyVaultReferenceOutputReference = BatchAccountKeyVaultReferenceOutputReference;
_d = JSII_RTTI_SYMBOL_1;
BatchAccountKeyVaultReferenceOutputReference[_d] = { fqn: "@cdktf/provider-azurerm.batchAccount.BatchAccountKeyVaultReferenceOutputReference", version: "12.27.0" };
function batchAccountNetworkProfileAccountAccessIpRuleToTerraform(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: cdktf.stringToTerraform(struct.action),
ip_range: cdktf.stringToTerraform(struct.ipRange),
};
}
exports.batchAccountNetworkProfileAccountAccessIpRuleToTerraform = batchAccountNetworkProfileAccountAccessIpRuleToTerraform;
function batchAccountNetworkProfileAccountAccessIpRuleToHclTerraform(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: {
value: cdktf.stringToHclTerraform(struct.action),
isBlock: false,
type: "simple",
storageClassType: "string",
},
ip_range: {
value: cdktf.stringToHclTerraform(struct.ipRange),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.batchAccountNetworkProfileAccountAccessIpRuleToHclTerraform = batchAccountNetworkProfileAccountAccessIpRuleToHclTerraform;
class BatchAccountNetworkProfileAccountAccessIpRuleOutputReference 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._action !== undefined) {
hasAnyValues = true;
internalValueResult.action = this._action;
}
if (this._ipRange !== undefined) {
hasAnyValues = true;
internalValueResult.ipRange = this._ipRange;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._action = undefined;
this._ipRange = 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._action = value.action;
this._ipRange = value.ipRange;
}
}
get action() {
return this.getStringAttribute('action');
}
set action(value) {
this._action = value;
}
resetAction() {
this._action = undefined;
}
// Temporarily expose input value. Use with caution.
get actionInput() {
return this._action;
}
get ipRange() {
return this.getStringAttribute('ip_range');
}
set ipRange(value) {
this._ipRange = value;
}
// Temporarily expose input value. Use with caution.
get ipRangeInput() {
return this._ipRange;
}
}
exports.BatchAccountNetworkProfileAccountAccessIpRuleOutputReference = BatchAccountNetworkProfileAccountAccessIpRuleOutputReference;
_e = JSII_RTTI_SYMBOL_1;
BatchAccountNetworkProfileAccountAccessIpRuleOutputReference[_e] = { fqn: "@cdktf/provider-azurerm.batchAccount.BatchAccountNetworkProfileAccountAccessIpRuleOutputReference", version: "12.27.0" };
class BatchAccountNetworkProfileAccountAccessIpRuleList 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 BatchAccountNetworkProfileAccountAccessIpRuleOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.BatchAccountNetworkProfileAccountAccessIpRuleList = BatchAccountNetworkProfileAccountAccessIpRuleList;
_f = JSII_RTTI_SYMBOL_1;
BatchAccountNetworkProfileAccountAccessIpRuleList[_f] = { fqn: "@cdktf/provider-azurerm.batchAccount.BatchAccountNetworkProfileAccountAccessIpRuleList", version: "12.27.0" };
function batchAccountNetworkProfileAccountAccessToTerraform(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 {
default_action: cdktf.stringToTerraform(struct.defaultAction),
ip_rule: cdktf.listMapper(batchAccountNetworkProfileAccountAccessIpRuleToTerraform, true)(struct.ipRule),
};
}
exports.batchAccountNetworkProfileAccountAccessToTerraform = batchAccountNetworkProfileAccountAccessToTerraform;
function batchAccountNetworkProfileAccountAccessToHclTerraform(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 = {
default_action: {
value: cdktf.stringToHclTerraform(struct.defaultAction),
isBlock: false,
type: "simple",
storageClassType: "string",
},
ip_rule: {
value: cdktf.listMapperHcl(batchAccountNetworkProfileAccountAccessIpRuleToHclTerraform, true)(struct.ipRule),
isBlock: true,
type: "list",
storageClassType: "BatchAccountNetworkProfileAccountAccessIpRuleList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.batchAccountNetworkProfileAccountAccessToHclTerraform = batchAccountNetworkProfileAccountAccessToHclTerraform;
class BatchAccountNetworkProfileAccountAccessOutputReference 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;
// ip_rule - computed: false, optional: true, required: false
this._ipRule = new BatchAccountNetworkProfileAccountAccessIpRuleList(this, "ip_rule", false);
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._defaultAction !== undefined) {
hasAnyValues = true;
internalValueResult.defaultAction = this._defaultAction;
}
if (this._ipRule?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.ipRule = this._ipRule?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._defaultAction = undefined;
this._ipRule.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._defaultAction = value.defaultAction;
this._ipRule.internalValue = value.ipRule;
}
}
get defaultAction() {
return this.getStringAttribute('default_action');
}
set defaultAction(value) {
this._defaultAction = value;
}
resetDefaultAction() {
this._defaultAction = undefined;
}
// Temporarily expose input value. Use with caution.
get defaultActionInput() {
return this._defaultAction;
}
get ipRule() {
return this._ipRule;
}
putIpRule(value) {
this._ipRule.internalValue = value;
}
resetIpRule() {
this._ipRule.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get ipRuleInput() {
return this._ipRule.internalValue;
}
}
exports.BatchAccountNetworkProfileAccountAccessOutputReference = BatchAccountNetworkProfileAccountAccessOutputReference;
_g = JSII_RTTI_SYMBOL_1;
BatchAccountNetworkProfileAccountAccessOutputReference[_g] = { fqn: "@cdktf/provider-azurerm.batchAccount.BatchAccountNetworkProfileAccountAccessOutputReference", version: "12.27.0" };
function batchAccountNetworkProfileNodeManagementAccessIpRuleToTerraform(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: cdktf.stringToTerraform(struct.action),
ip_range: cdktf.stringToTerraform(struct.ipRange),
};
}
exports.batchAccountNetworkProfileNodeManagementAccessIpRuleToTerraform = batchAccountNetworkProfileNodeManagementAccessIpRuleToTerraform;
function batchAccountNetworkProfileNodeManagementAccessIpRuleToHclTerraform(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: {
value: cdktf.stringToHclTerraform(struct.action),
isBlock: false,
type: "simple",
storageClassType: "string",
},
ip_range: {
value: cdktf.stringToHclTerraform(struct.ipRange),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.batchAccountNetworkProfileNodeManagementAccessIpRuleToHclTerraform = batchAccountNetworkProfileNodeManagementAccessIpRuleToHclTerraform;
class BatchAccountNetworkProfileNodeManagementAccessIpRuleOutputReference 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._action !== undefined) {
hasAnyValues = true;
internalValueResult.action = this._action;
}
if (this._ipRange !== undefined) {
hasAnyValues = true;
internalValueResult.ipRange = this._ipRange;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._action = undefined;
this._ipRange = 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._action = value.action;
this._ipRange = value.ipRange;
}
}
get action() {
return this.getStringAttribute('action');
}
set action(value) {
this._action = value;
}
resetAction() {
this._action = undefined;
}
// Temporarily expose input value. Use with caution.
get actionInput() {
return this._action;
}
get ipRange() {
return this.getStringAttribute('ip_range');
}
set ipRange(value) {
this._ipRange = value;
}
// Temporarily expose input value. Use with caution.
get ipRangeInput() {
return this._ipRange;
}
}
exports.BatchAccountNetworkProfileNodeManagementAccessIpRuleOutputReference = BatchAccountNetworkProfileNodeManagementAccessIpRuleOutputReference;
_h = JSII_RTTI_SYMBOL_1;
BatchAccountNetworkProfileNodeManagementAccessIpRuleOutputReference[_h] = { fqn: "@cdktf/provider-azurerm.batchAccount.BatchAccountNetworkProfileNodeManagementAccessIpRuleOutputReference", version: "12.27.0" };
class BatchAccountNetworkProfileNodeManagementAccessIpRuleList 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 BatchAccountNetworkProfileNodeManagementAccessIpRuleOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.BatchAccountNetworkProfileNodeManagementAccessIpRuleList = BatchAccountNetworkProfileNodeManagementAccessIpRuleList;
_j = JSII_RTTI_SYMBOL_1;
BatchAccountNetworkProfileNodeManagementAccessIpRuleList[_j] = { fqn: "@cdktf/provider-azurerm.batchAccount.BatchAccountNetworkProfileNodeManagementAccessIpRuleList", version: "12.27.0" };
function batchAccountNetworkProfileNodeManagementAccessToTerraform(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 {
default_action: cdktf.stringToTerraform(struct.defaultAction),
ip_rule: cdktf.listMapper(batchAccountNetworkProfileNodeManagementAccessIpRuleToTerraform, true)(struct.ipRule),
};
}
exports.batchAccountNetworkProfileNodeManagementAccessToTerraform = batchAccountNetworkProfileNodeManagementAccessToTerraform;
function batchAccountNetworkProfileNodeManagementAccessToHclTerraform(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 = {
default_action: {
value: cdktf.stringToHclTerraform(struct.defaultAction),
isBlock: false,
type: "simple",
storageClassType: "string",
},
ip_rule: {
value: cdktf.listMapperHcl(batchAccountNetworkProfileNodeManagementAccessIpRuleToHclTerraform, true)(struct.ipRule),
isBlock: true,
type: "list",
storageClassType: "BatchAccountNetworkProfileNodeManagementAccessIpRuleList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.batchAccountNetworkProfileNodeManagementAccessToHclTerraform = batchAccountNetworkProfileNodeManagementAccessToHclTerraform;
class BatchAccountNetworkProfileNodeManagementAccessOutputReference 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;
// ip_rule - computed: false, optional: true, required: false
this._ipRule = new BatchAccountNetworkProfileNodeManagementAccessIpRuleList(this, "ip_rule", false);
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._defaultAction !== undefined) {
hasAnyValues = true;
internalValueResult.defaultAction = this._defaultAction;
}
if (this._ipRule?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.ipRule = this._ipRule?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._defaultAction = undefined;
this._ipRule.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._defaultAction = value.defaultAction;
this._ipRule.internalValue = value.ipRule;
}
}
get defaultAction() {
return this.getStringAttribute('default_action');
}
set defaultAction(value) {
this._defaultAction = value;
}
resetDefaultAction() {
this._defaultAction = undefined;
}
// Temporarily expose input value. Use with caution.
get defaultActionInput() {
return this._defaultAction;
}
get ipRule() {
return this._ipRule;
}
putIpRule(value) {
this._ipRule.internalValue = value;
}
resetIpRule() {
this._ipRule.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get ipRuleInput() {
return this._ipRule.internalValue;
}
}
exports.BatchAccountNetworkProfileNodeManagementAccessOutputReference = BatchAccountNetworkProfileNodeManagementAccessOutputReference;
_k = JSII_RTTI_SYMBOL_1;
BatchAccountNetworkProfileNodeManagementAccessOutputReference[_k] = { fqn: "@cdktf/provider-azurerm.batchAccount.BatchAccountNetworkProfileNodeManagementAccessOutputReference", version: "12.27.0" };
function batchAccountNetworkProfileToTerraform(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 {
account_access: batchAccountNetworkProfileAccountAccessToTerraform(struct.accountAccess),
node_management_access: batchAccountNetworkProfileNodeManagementAccessToTerraform(struct.nodeManagementAccess),
};
}
exports.batchAccountNetworkProfileToTerraform = batchAccountNetworkProfileToTerraform;
function batchAccountNetworkProfileToHclTerraform(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 = {
account_access: {
value: batchAccountNetworkProfileAccountAccessToHclTerraform(struct.accountAccess),
isBlock: true,
type: "list",
storageClassType: "BatchAccountNetworkProfileAccountAccessList",
},
node_management_access: {
value: batchAccountNetworkProfileNodeManagementAccessToHclTerraform(struct.nodeManagementAccess),
isBlock: true,
type: "list",
storageClassType: "BatchAccountNetworkProfileNodeManagementAccessList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.batchAccountNetworkProfileToHclTerraform = batchAccountNetworkProfileToHclTerraform;
class BatchAccountNetworkProfileOutputReference 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;
// account_access - computed: false, optional: true, required: false
this._accountAccess = new BatchAccountNetworkProfileAccountAccessOutputReference(this, "account_access");
// node_management_access - computed: false, optional: true, required: false
this._nodeManagementAccess = new BatchAccountNetworkProfileNodeManagementAccessOutputReference(this, "node_management_access");
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._accountAccess?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.accountAccess = this._accountAccess?.internalValue;
}
if (this._nodeManagementAccess?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.nodeManagementAccess = this._nodeManagementAccess?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._accountAccess.internalValue = undefined;
this._nodeManagementAccess.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._accountAccess.internalValue = value.accountAccess;
this._nodeManagementAccess.internalValue = value.nodeManagementAccess;
}
}
get accountAccess() {
return this._accountAccess;
}
putAccountAccess(value) {
this._accountAccess.internalValue = value;
}
resetAccountAccess() {
this._accountAccess.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get accountAccessInput() {
return this._accountAccess.internalValue;
}
get nodeManagementAccess() {
return this._nodeManagementAccess;
}
putNodeManagementAccess(value) {
this._nodeManagementAccess.internalValue = value;
}
resetNodeManagementAccess() {
this._nodeManagementAccess.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get nodeManagementAccessInput() {
return this._nodeManagementAccess.internalValue;
}
}
exports.BatchAccountNetworkProfileOutputReference = BatchAccountNetworkProfileOutputReference;
_l = JSII_RTTI_SYMBOL_1;
BatchAccountNetworkProfileOutputReference[_l] = { fqn: "@cdktf/provider-azurerm.batchAccount.BatchAccountNetworkProfileOutputReference", version: "12.27.0" };
function batchAccountTimeoutsToTerraform(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),
read: cdktf.stringToTerraform(struct.read),
update: cdktf.stringToTerraform(struct.update),
};
}
exports.batchAccountTimeoutsToTerraform = batchAccountTimeoutsToTerraform;
function batchAccountTimeoutsToHclTerraform(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",
},
read: {
value: cdktf.stringToHclTerraform(struct.read),
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));
}
exports.batchAccountTimeoutsToHclTerraform = batchAccountTimeoutsToHclTerraform;
class BatchAccountTimeoutsOutputReference 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._read !== undefined) {
hasAnyValues = true;
internalValueResult.read = this._read;
}
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._read = 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._read = value.read;
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 read() {
return this.getStringAttribute('read');
}
set read(value) {
this._read = value;
}
resetRead() {
this._read = undefined;
}
// Temporarily expose input value. Use with caution.
get readInput() {
return this._read;
}
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.BatchAccountTimeoutsOutputReference = BatchAccountTimeoutsOutputReference;
_m = JSII_RTTI_SYMBOL_1;
BatchAccountTimeoutsOutputReference[_m] = { fqn: "@cdktf/provider-azurerm.batchAccount.BatchAccountTimeoutsOutputReference", version: "12.27.0" };
/**
* Represents a {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/batch_account azurerm_batch_account}
*/
class BatchAccount extends cdktf.TerraformResource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a BatchAccount 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 BatchAccount to import
* @param importFromId The id of the existing BatchAccount that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/batch_account#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the BatchAccount to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "azurerm_batch_account", importId: importFromId, provider });
}
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/batch_account azurerm_batch_account} 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 BatchAccountConfig
*/
constructor(scope, id, config) {
super(scope, id, {
terraformResourceType: 'azurerm_batch_account',
terraformGeneratorMetadata: {
providerName: 'azurerm',
providerVersion: '3.116.0',
providerVersionConstraint: '~> 3.10'
},
provider: config.provider,
dependsOn: config.dependsOn,
count: config.count,
lifecycle: config.lifecycle,
provisioners: config.provisioners,
connection: config.connection,
forEach: config.forEach
});
// encryption - computed: false, optional: true, required: false
this._encryption = new BatchAccountEncryptionList(this, "encryption", false);
// identity - computed: false, optional: true, required: false
this._identity = new BatchAccountIdentityOutputReference(this, "identity");
// key_vault_reference - computed: false, optional: true, required: false
this._keyVaultReference = new BatchAccountKeyVaultReferenceOutputReference(this, "key_vault_reference");
// network_profile - computed: false, optional: true, required: false
this._networkProfile = new BatchAccountNetworkProfileOutputReference(this, "network_profile");
// timeouts - computed: false, optional: true, required: false
this._timeouts = new BatchAccountTimeoutsOutputReference(this, "timeouts");
this._allowedAuthenticationModes = config.allowedAuthenticationModes;
this._encryption.internalValue = config.encryption;
this._id = config.id;
this._location = config.location;
this._name = config.name;
this._poolAllocationMode = config.poolAllocationMode;
this._publicNetworkAccessEnabled = config.publicNetworkAccessEnabled;
this._resourceGroupName = config.resourceGroupName;
this._storageAccountAuthenticationMode = config.storageAccountAuthenticationMode;
this._storageAccountId = config.storageAccountId;
this._storageAccountNodeIdentity = config.storageAccountNodeIdentity;
this._tags = config.tags;
this._identity.internalValue = config.identity;
this._keyVaultReference.internalValue = config.keyVaultReference;
this._networkProfile.internalValue = config.networkProfile;
this._timeouts.internalValue = config.timeouts;
}
// ==========
// ATTRIBUTES
// ==========
// account_endpoint - computed: true, optional: false, required: false
get accountEndpoint() {
return this.getStringAttribute('account_endpoint');
}
get allowedAuthenticationModes() {
return cdktf.Fn.tolist(this.getListAttribute('allowed_authentication_modes'));
}
set allowedAuthenticationModes(value) {
this._allowedAuthenticationModes = value;
}
resetAllowedAuthenticationModes() {
this._allowedAuthenticationModes = undefined;
}
// Temporarily expose input value. Use with caution.
get allowedAuthenticationModesInput() {
return this._allowedAuthenticationModes;
}
get encryption() {
return this._encryption;
}
putEncryption(value) {
this._encryption.internalValue = value;
}
resetEncryption() {