@cdktf/provider-azurerm
Version:
Prebuilt azurerm Provider for Terraform CDK (cdktf)
1,159 lines • 195 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.SubscriptionPolicyAssignment = exports.SubscriptionPolicyAssignmentTimeoutsOutputReference = exports.subscriptionPolicyAssignmentTimeoutsToHclTerraform = exports.subscriptionPolicyAssignmentTimeoutsToTerraform = exports.SubscriptionPolicyAssignmentResourceSelectorsList = exports.SubscriptionPolicyAssignmentResourceSelectorsOutputReference = exports.subscriptionPolicyAssignmentResourceSelectorsToHclTerraform = exports.subscriptionPolicyAssignmentResourceSelectorsToTerraform = exports.SubscriptionPolicyAssignmentResourceSelectorsSelectorsList = exports.SubscriptionPolicyAssignmentResourceSelectorsSelectorsOutputReference = exports.subscriptionPolicyAssignmentResourceSelectorsSelectorsToHclTerraform = exports.subscriptionPolicyAssignmentResourceSelectorsSelectorsToTerraform = exports.SubscriptionPolicyAssignmentOverridesList = exports.SubscriptionPolicyAssignmentOverridesOutputReference = exports.subscriptionPolicyAssignmentOverridesToHclTerraform = exports.subscriptionPolicyAssignmentOverridesToTerraform = exports.SubscriptionPolicyAssignmentOverridesSelectorsList = exports.SubscriptionPolicyAssignmentOverridesSelectorsOutputReference = exports.subscriptionPolicyAssignmentOverridesSelectorsToHclTerraform = exports.subscriptionPolicyAssignmentOverridesSelectorsToTerraform = exports.SubscriptionPolicyAssignmentNonComplianceMessageList = exports.SubscriptionPolicyAssignmentNonComplianceMessageOutputReference = exports.subscriptionPolicyAssignmentNonComplianceMessageToHclTerraform = exports.subscriptionPolicyAssignmentNonComplianceMessageToTerraform = exports.SubscriptionPolicyAssignmentIdentityOutputReference = exports.subscriptionPolicyAssignmentIdentityToHclTerraform = exports.subscriptionPolicyAssignmentIdentityToTerraform = void 0;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function subscriptionPolicyAssignmentIdentityToTerraform(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.subscriptionPolicyAssignmentIdentityToTerraform = subscriptionPolicyAssignmentIdentityToTerraform;
function subscriptionPolicyAssignmentIdentityToHclTerraform(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.subscriptionPolicyAssignmentIdentityToHclTerraform = subscriptionPolicyAssignmentIdentityToHclTerraform;
class SubscriptionPolicyAssignmentIdentityOutputReference 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.SubscriptionPolicyAssignmentIdentityOutputReference = SubscriptionPolicyAssignmentIdentityOutputReference;
_a = JSII_RTTI_SYMBOL_1;
SubscriptionPolicyAssignmentIdentityOutputReference[_a] = { fqn: "@cdktf/provider-azurerm.subscriptionPolicyAssignment.SubscriptionPolicyAssignmentIdentityOutputReference", version: "12.27.0" };
function subscriptionPolicyAssignmentNonComplianceMessageToTerraform(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),
policy_definition_reference_id: cdktf.stringToTerraform(struct.policyDefinitionReferenceId),
};
}
exports.subscriptionPolicyAssignmentNonComplianceMessageToTerraform = subscriptionPolicyAssignmentNonComplianceMessageToTerraform;
function subscriptionPolicyAssignmentNonComplianceMessageToHclTerraform(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",
},
policy_definition_reference_id: {
value: cdktf.stringToHclTerraform(struct.policyDefinitionReferenceId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.subscriptionPolicyAssignmentNonComplianceMessageToHclTerraform = subscriptionPolicyAssignmentNonComplianceMessageToHclTerraform;
class SubscriptionPolicyAssignmentNonComplianceMessageOutputReference 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._policyDefinitionReferenceId !== undefined) {
hasAnyValues = true;
internalValueResult.policyDefinitionReferenceId = this._policyDefinitionReferenceId;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._content = undefined;
this._policyDefinitionReferenceId = 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._policyDefinitionReferenceId = value.policyDefinitionReferenceId;
}
}
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 policyDefinitionReferenceId() {
return this.getStringAttribute('policy_definition_reference_id');
}
set policyDefinitionReferenceId(value) {
this._policyDefinitionReferenceId = value;
}
resetPolicyDefinitionReferenceId() {
this._policyDefinitionReferenceId = undefined;
}
// Temporarily expose input value. Use with caution.
get policyDefinitionReferenceIdInput() {
return this._policyDefinitionReferenceId;
}
}
exports.SubscriptionPolicyAssignmentNonComplianceMessageOutputReference = SubscriptionPolicyAssignmentNonComplianceMessageOutputReference;
_b = JSII_RTTI_SYMBOL_1;
SubscriptionPolicyAssignmentNonComplianceMessageOutputReference[_b] = { fqn: "@cdktf/provider-azurerm.subscriptionPolicyAssignment.SubscriptionPolicyAssignmentNonComplianceMessageOutputReference", version: "12.27.0" };
class SubscriptionPolicyAssignmentNonComplianceMessageList 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 SubscriptionPolicyAssignmentNonComplianceMessageOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.SubscriptionPolicyAssignmentNonComplianceMessageList = SubscriptionPolicyAssignmentNonComplianceMessageList;
_c = JSII_RTTI_SYMBOL_1;
SubscriptionPolicyAssignmentNonComplianceMessageList[_c] = { fqn: "@cdktf/provider-azurerm.subscriptionPolicyAssignment.SubscriptionPolicyAssignmentNonComplianceMessageList", version: "12.27.0" };
function subscriptionPolicyAssignmentOverridesSelectorsToTerraform(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 {
in: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.in),
not_in: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.notIn),
};
}
exports.subscriptionPolicyAssignmentOverridesSelectorsToTerraform = subscriptionPolicyAssignmentOverridesSelectorsToTerraform;
function subscriptionPolicyAssignmentOverridesSelectorsToHclTerraform(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 = {
in: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.in),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
not_in: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.notIn),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.subscriptionPolicyAssignmentOverridesSelectorsToHclTerraform = subscriptionPolicyAssignmentOverridesSelectorsToHclTerraform;
class SubscriptionPolicyAssignmentOverridesSelectorsOutputReference 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._in !== undefined) {
hasAnyValues = true;
internalValueResult.in = this._in;
}
if (this._notIn !== undefined) {
hasAnyValues = true;
internalValueResult.notIn = this._notIn;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._in = undefined;
this._notIn = 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._in = value.in;
this._notIn = value.notIn;
}
}
get in() {
return this.getListAttribute('in');
}
set in(value) {
this._in = value;
}
resetIn() {
this._in = undefined;
}
// Temporarily expose input value. Use with caution.
get inInput() {
return this._in;
}
// kind - computed: true, optional: false, required: false
get kind() {
return this.getStringAttribute('kind');
}
get notIn() {
return this.getListAttribute('not_in');
}
set notIn(value) {
this._notIn = value;
}
resetNotIn() {
this._notIn = undefined;
}
// Temporarily expose input value. Use with caution.
get notInInput() {
return this._notIn;
}
}
exports.SubscriptionPolicyAssignmentOverridesSelectorsOutputReference = SubscriptionPolicyAssignmentOverridesSelectorsOutputReference;
_d = JSII_RTTI_SYMBOL_1;
SubscriptionPolicyAssignmentOverridesSelectorsOutputReference[_d] = { fqn: "@cdktf/provider-azurerm.subscriptionPolicyAssignment.SubscriptionPolicyAssignmentOverridesSelectorsOutputReference", version: "12.27.0" };
class SubscriptionPolicyAssignmentOverridesSelectorsList 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 SubscriptionPolicyAssignmentOverridesSelectorsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.SubscriptionPolicyAssignmentOverridesSelectorsList = SubscriptionPolicyAssignmentOverridesSelectorsList;
_e = JSII_RTTI_SYMBOL_1;
SubscriptionPolicyAssignmentOverridesSelectorsList[_e] = { fqn: "@cdktf/provider-azurerm.subscriptionPolicyAssignment.SubscriptionPolicyAssignmentOverridesSelectorsList", version: "12.27.0" };
function subscriptionPolicyAssignmentOverridesToTerraform(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 {
value: cdktf.stringToTerraform(struct.value),
selectors: cdktf.listMapper(subscriptionPolicyAssignmentOverridesSelectorsToTerraform, true)(struct.selectors),
};
}
exports.subscriptionPolicyAssignmentOverridesToTerraform = subscriptionPolicyAssignmentOverridesToTerraform;
function subscriptionPolicyAssignmentOverridesToHclTerraform(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 = {
value: {
value: cdktf.stringToHclTerraform(struct.value),
isBlock: false,
type: "simple",
storageClassType: "string",
},
selectors: {
value: cdktf.listMapperHcl(subscriptionPolicyAssignmentOverridesSelectorsToHclTerraform, true)(struct.selectors),
isBlock: true,
type: "list",
storageClassType: "SubscriptionPolicyAssignmentOverridesSelectorsList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.subscriptionPolicyAssignmentOverridesToHclTerraform = subscriptionPolicyAssignmentOverridesToHclTerraform;
class SubscriptionPolicyAssignmentOverridesOutputReference 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;
// selectors - computed: false, optional: true, required: false
this._selectors = new SubscriptionPolicyAssignmentOverridesSelectorsList(this, "selectors", false);
}
get internalValue() {
if (this.resolvableValue) {
return this.resolvableValue;
}
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._value !== undefined) {
hasAnyValues = true;
internalValueResult.value = this._value;
}
if (this._selectors?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.selectors = this._selectors?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._value = undefined;
this._selectors.internalValue = undefined;
}
else if (cdktf.Tokenization.isResolvable(value)) {
this.isEmptyObject = false;
this.resolvableValue = value;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this.resolvableValue = undefined;
this._value = value.value;
this._selectors.internalValue = value.selectors;
}
}
get value() {
return this.getStringAttribute('value');
}
set value(value) {
this._value = value;
}
// Temporarily expose input value. Use with caution.
get valueInput() {
return this._value;
}
get selectors() {
return this._selectors;
}
putSelectors(value) {
this._selectors.internalValue = value;
}
resetSelectors() {
this._selectors.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get selectorsInput() {
return this._selectors.internalValue;
}
}
exports.SubscriptionPolicyAssignmentOverridesOutputReference = SubscriptionPolicyAssignmentOverridesOutputReference;
_f = JSII_RTTI_SYMBOL_1;
SubscriptionPolicyAssignmentOverridesOutputReference[_f] = { fqn: "@cdktf/provider-azurerm.subscriptionPolicyAssignment.SubscriptionPolicyAssignmentOverridesOutputReference", version: "12.27.0" };
class SubscriptionPolicyAssignmentOverridesList 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 SubscriptionPolicyAssignmentOverridesOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.SubscriptionPolicyAssignmentOverridesList = SubscriptionPolicyAssignmentOverridesList;
_g = JSII_RTTI_SYMBOL_1;
SubscriptionPolicyAssignmentOverridesList[_g] = { fqn: "@cdktf/provider-azurerm.subscriptionPolicyAssignment.SubscriptionPolicyAssignmentOverridesList", version: "12.27.0" };
function subscriptionPolicyAssignmentResourceSelectorsSelectorsToTerraform(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 {
in: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.in),
kind: cdktf.stringToTerraform(struct.kind),
not_in: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.notIn),
};
}
exports.subscriptionPolicyAssignmentResourceSelectorsSelectorsToTerraform = subscriptionPolicyAssignmentResourceSelectorsSelectorsToTerraform;
function subscriptionPolicyAssignmentResourceSelectorsSelectorsToHclTerraform(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 = {
in: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.in),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
kind: {
value: cdktf.stringToHclTerraform(struct.kind),
isBlock: false,
type: "simple",
storageClassType: "string",
},
not_in: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.notIn),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.subscriptionPolicyAssignmentResourceSelectorsSelectorsToHclTerraform = subscriptionPolicyAssignmentResourceSelectorsSelectorsToHclTerraform;
class SubscriptionPolicyAssignmentResourceSelectorsSelectorsOutputReference 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._in !== undefined) {
hasAnyValues = true;
internalValueResult.in = this._in;
}
if (this._kind !== undefined) {
hasAnyValues = true;
internalValueResult.kind = this._kind;
}
if (this._notIn !== undefined) {
hasAnyValues = true;
internalValueResult.notIn = this._notIn;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._in = undefined;
this._kind = undefined;
this._notIn = 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._in = value.in;
this._kind = value.kind;
this._notIn = value.notIn;
}
}
get in() {
return this.getListAttribute('in');
}
set in(value) {
this._in = value;
}
resetIn() {
this._in = undefined;
}
// Temporarily expose input value. Use with caution.
get inInput() {
return this._in;
}
get kind() {
return this.getStringAttribute('kind');
}
set kind(value) {
this._kind = value;
}
// Temporarily expose input value. Use with caution.
get kindInput() {
return this._kind;
}
get notIn() {
return this.getListAttribute('not_in');
}
set notIn(value) {
this._notIn = value;
}
resetNotIn() {
this._notIn = undefined;
}
// Temporarily expose input value. Use with caution.
get notInInput() {
return this._notIn;
}
}
exports.SubscriptionPolicyAssignmentResourceSelectorsSelectorsOutputReference = SubscriptionPolicyAssignmentResourceSelectorsSelectorsOutputReference;
_h = JSII_RTTI_SYMBOL_1;
SubscriptionPolicyAssignmentResourceSelectorsSelectorsOutputReference[_h] = { fqn: "@cdktf/provider-azurerm.subscriptionPolicyAssignment.SubscriptionPolicyAssignmentResourceSelectorsSelectorsOutputReference", version: "12.27.0" };
class SubscriptionPolicyAssignmentResourceSelectorsSelectorsList 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 SubscriptionPolicyAssignmentResourceSelectorsSelectorsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.SubscriptionPolicyAssignmentResourceSelectorsSelectorsList = SubscriptionPolicyAssignmentResourceSelectorsSelectorsList;
_j = JSII_RTTI_SYMBOL_1;
SubscriptionPolicyAssignmentResourceSelectorsSelectorsList[_j] = { fqn: "@cdktf/provider-azurerm.subscriptionPolicyAssignment.SubscriptionPolicyAssignmentResourceSelectorsSelectorsList", version: "12.27.0" };
function subscriptionPolicyAssignmentResourceSelectorsToTerraform(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),
selectors: cdktf.listMapper(subscriptionPolicyAssignmentResourceSelectorsSelectorsToTerraform, true)(struct.selectors),
};
}
exports.subscriptionPolicyAssignmentResourceSelectorsToTerraform = subscriptionPolicyAssignmentResourceSelectorsToTerraform;
function subscriptionPolicyAssignmentResourceSelectorsToHclTerraform(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",
},
selectors: {
value: cdktf.listMapperHcl(subscriptionPolicyAssignmentResourceSelectorsSelectorsToHclTerraform, true)(struct.selectors),
isBlock: true,
type: "list",
storageClassType: "SubscriptionPolicyAssignmentResourceSelectorsSelectorsList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.subscriptionPolicyAssignmentResourceSelectorsToHclTerraform = subscriptionPolicyAssignmentResourceSelectorsToHclTerraform;
class SubscriptionPolicyAssignmentResourceSelectorsOutputReference 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;
// selectors - computed: false, optional: false, required: true
this._selectors = new SubscriptionPolicyAssignmentResourceSelectorsSelectorsList(this, "selectors", 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._selectors?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.selectors = this._selectors?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._name = undefined;
this._selectors.internalValue = undefined;
}
else if (cdktf.Tokenization.isResolvable(value)) {
this.isEmptyObject = false;
this.resolvableValue = value;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this.resolvableValue = undefined;
this._name = value.name;
this._selectors.internalValue = value.selectors;
}
}
get name() {
return this.getStringAttribute('name');
}
set name(value) {
this._name = value;
}
resetName() {
this._name = undefined;
}
// Temporarily expose input value. Use with caution.
get nameInput() {
return this._name;
}
get selectors() {
return this._selectors;
}
putSelectors(value) {
this._selectors.internalValue = value;
}
// Temporarily expose input value. Use with caution.
get selectorsInput() {
return this._selectors.internalValue;
}
}
exports.SubscriptionPolicyAssignmentResourceSelectorsOutputReference = SubscriptionPolicyAssignmentResourceSelectorsOutputReference;
_k = JSII_RTTI_SYMBOL_1;
SubscriptionPolicyAssignmentResourceSelectorsOutputReference[_k] = { fqn: "@cdktf/provider-azurerm.subscriptionPolicyAssignment.SubscriptionPolicyAssignmentResourceSelectorsOutputReference", version: "12.27.0" };
class SubscriptionPolicyAssignmentResourceSelectorsList 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 SubscriptionPolicyAssignmentResourceSelectorsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.SubscriptionPolicyAssignmentResourceSelectorsList = SubscriptionPolicyAssignmentResourceSelectorsList;
_l = JSII_RTTI_SYMBOL_1;
SubscriptionPolicyAssignmentResourceSelectorsList[_l] = { fqn: "@cdktf/provider-azurerm.subscriptionPolicyAssignment.SubscriptionPolicyAssignmentResourceSelectorsList", version: "12.27.0" };
function subscriptionPolicyAssignmentTimeoutsToTerraform(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.subscriptionPolicyAssignmentTimeoutsToTerraform = subscriptionPolicyAssignmentTimeoutsToTerraform;
function subscriptionPolicyAssignmentTimeoutsToHclTerraform(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.subscriptionPolicyAssignmentTimeoutsToHclTerraform = subscriptionPolicyAssignmentTimeoutsToHclTerraform;
class SubscriptionPolicyAssignmentTimeoutsOutputReference 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.SubscriptionPolicyAssignmentTimeoutsOutputReference = SubscriptionPolicyAssignmentTimeoutsOutputReference;
_m = JSII_RTTI_SYMBOL_1;
SubscriptionPolicyAssignmentTimeoutsOutputReference[_m] = { fqn: "@cdktf/provider-azurerm.subscriptionPolicyAssignment.SubscriptionPolicyAssignmentTimeoutsOutputReference", version: "12.27.0" };
/**
* Represents a {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/subscription_policy_assignment azurerm_subscription_policy_assignment}
*/
class SubscriptionPolicyAssignment extends cdktf.TerraformResource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a SubscriptionPolicyAssignment 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 SubscriptionPolicyAssignment to import
* @param importFromId The id of the existing SubscriptionPolicyAssignment that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/subscription_policy_assignment#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the SubscriptionPolicyAssignment to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "azurerm_subscription_policy_assignment", importId: importFromId, provider });
}
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/subscription_policy_assignment azurerm_subscription_policy_assignment} 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 SubscriptionPolicyAssignmentConfig
*/
constructor(scope, id, config) {
super(scope, id, {
terraformResourceType: 'azurerm_subscription_policy_assignment',
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
});
// identity - computed: false, optional: true, required: false
this._identity = new SubscriptionPolicyAssignmentIdentityOutputReference(this, "identity");
// non_compliance_message - computed: false, optional: true, required: false
this._nonComplianceMessage = new SubscriptionPolicyAssignmentNonComplianceMessageList(this, "non_compliance_message", false);
// overrides - computed: false, optional: true, required: false
this._overrides = new SubscriptionPolicyAssignmentOverridesList(this, "overrides", false);
// resource_selectors - computed: false, optional: true, required: false
this._resourceSelectors = new SubscriptionPolicyAssignmentResourceSelectorsList(this, "resource_selectors", false);
// timeouts - computed: false, optional: true, required: false
this._timeouts = new SubscriptionPolicyAssignmentTimeoutsOutputReference(this, "timeouts");
this._description = config.description;
this._displayName = config.displayName;
this._enforce = config.enforce;
this._id = config.id;
this._location = config.location;
this._metadata = config.metadata;
this._name = config.name;
this._notScopes = config.notScopes;
this._parameters = config.parameters;
this._policyDefinitionId = config.policyDefinitionId;
this._subscriptionId = config.subscriptionId;
this._identity.internalValue = config.identity;
this._nonComplianceMessage.internalValue = config.nonComplianceMessage;
this._overrides.internalValue = config.overrides;
this._resourceSelectors.internalValue = config.resourceSelectors;
this._timeouts.internalValue = config.timeouts;
}
get description() {
return this.getStringAttribute('description');
}
set description(value) {
this._description = value;
}
resetDescription() {
this._description = undefined;
}
// Temporarily expose input value. Use with caution.
get descriptionInput() {
return this._description;
}
get displayName() {
return this.getStringAttribute('display_name');
}
set displayName(value) {
this._displayName = value;
}
resetDisplayName() {
this._displayName = undefined;
}
// Temporarily expose input value. Use with caution.
get displayNameInput() {
return this._displayName;
}
get enforce() {
return this.getBooleanAttribute('enforce');
}
set enforce(value) {
this._enforce = value;
}
resetEnforce() {
this._enforce = undefined;
}
// Temporarily expose input value. Use with caution.
get enforceInput() {
return this._enforce;
}
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 location() {
return this.getStringAttribute('location');
}
set location(value) {
this._location = value;
}
resetLocation() {
this._location = undefined;
}
// Temporarily expose input value. Use with caution.
get locationInput() {
return this._location;
}
get metadata() {
return this.getStringAttribute('metadata');
}
set metadata(value) {
this._metadata = value;
}
resetMetadata() {
this._metadata = undefined;
}
// Temporarily expose input value. Use with caution.
get metadataInput() {
return this._metadata;
}
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 notScopes() {
return this.getListAttribute('not_scopes');
}
set notScopes(value) {
this._notScopes = value;
}
resetNotScopes() {
this._notScopes = undefined;
}
// Temporarily expose input value. Use with caution.
get notScopesInput() {
return this._notScopes;
}
get parameters() {
return this.getStringAttribute('parameters');
}
set parameters(value) {
this._parameters = value;
}
resetParameters() {
this._parameters = undefined;
}
// Temporarily expose input value. Use with caution.
get parametersInput() {
return this._parameters;
}
get policyDefinitionId() {
return this.getStringAttribute('policy_defi