@cdktf/provider-azurerm
Version:
Prebuilt azurerm Provider for Terraform CDK (cdktf)
1,185 lines • 193 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.ResourcePolicyAssignment = exports.ResourcePolicyAssignmentTimeoutsOutputReference = exports.resourcePolicyAssignmentTimeoutsToHclTerraform = exports.resourcePolicyAssignmentTimeoutsToTerraform = exports.ResourcePolicyAssignmentResourceSelectorsList = exports.ResourcePolicyAssignmentResourceSelectorsOutputReference = exports.resourcePolicyAssignmentResourceSelectorsToHclTerraform = exports.resourcePolicyAssignmentResourceSelectorsToTerraform = exports.ResourcePolicyAssignmentResourceSelectorsSelectorsList = exports.ResourcePolicyAssignmentResourceSelectorsSelectorsOutputReference = exports.resourcePolicyAssignmentResourceSelectorsSelectorsToHclTerraform = exports.resourcePolicyAssignmentResourceSelectorsSelectorsToTerraform = exports.ResourcePolicyAssignmentOverridesList = exports.ResourcePolicyAssignmentOverridesOutputReference = exports.resourcePolicyAssignmentOverridesToHclTerraform = exports.resourcePolicyAssignmentOverridesToTerraform = exports.ResourcePolicyAssignmentOverridesSelectorsList = exports.ResourcePolicyAssignmentOverridesSelectorsOutputReference = exports.resourcePolicyAssignmentOverridesSelectorsToHclTerraform = exports.resourcePolicyAssignmentOverridesSelectorsToTerraform = exports.ResourcePolicyAssignmentNonComplianceMessageList = exports.ResourcePolicyAssignmentNonComplianceMessageOutputReference = exports.resourcePolicyAssignmentNonComplianceMessageToHclTerraform = exports.resourcePolicyAssignmentNonComplianceMessageToTerraform = exports.ResourcePolicyAssignmentIdentityOutputReference = exports.resourcePolicyAssignmentIdentityToHclTerraform = exports.resourcePolicyAssignmentIdentityToTerraform = void 0;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function resourcePolicyAssignmentIdentityToTerraform(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.resourcePolicyAssignmentIdentityToTerraform = resourcePolicyAssignmentIdentityToTerraform;
function resourcePolicyAssignmentIdentityToHclTerraform(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.resourcePolicyAssignmentIdentityToHclTerraform = resourcePolicyAssignmentIdentityToHclTerraform;
class ResourcePolicyAssignmentIdentityOutputReference 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.ResourcePolicyAssignmentIdentityOutputReference = ResourcePolicyAssignmentIdentityOutputReference;
_a = JSII_RTTI_SYMBOL_1;
ResourcePolicyAssignmentIdentityOutputReference[_a] = { fqn: "@cdktf/provider-azurerm.resourcePolicyAssignment.ResourcePolicyAssignmentIdentityOutputReference", version: "12.27.0" };
function resourcePolicyAssignmentNonComplianceMessageToTerraform(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.resourcePolicyAssignmentNonComplianceMessageToTerraform = resourcePolicyAssignmentNonComplianceMessageToTerraform;
function resourcePolicyAssignmentNonComplianceMessageToHclTerraform(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.resourcePolicyAssignmentNonComplianceMessageToHclTerraform = resourcePolicyAssignmentNonComplianceMessageToHclTerraform;
class ResourcePolicyAssignmentNonComplianceMessageOutputReference 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.ResourcePolicyAssignmentNonComplianceMessageOutputReference = ResourcePolicyAssignmentNonComplianceMessageOutputReference;
_b = JSII_RTTI_SYMBOL_1;
ResourcePolicyAssignmentNonComplianceMessageOutputReference[_b] = { fqn: "@cdktf/provider-azurerm.resourcePolicyAssignment.ResourcePolicyAssignmentNonComplianceMessageOutputReference", version: "12.27.0" };
class ResourcePolicyAssignmentNonComplianceMessageList 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 ResourcePolicyAssignmentNonComplianceMessageOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.ResourcePolicyAssignmentNonComplianceMessageList = ResourcePolicyAssignmentNonComplianceMessageList;
_c = JSII_RTTI_SYMBOL_1;
ResourcePolicyAssignmentNonComplianceMessageList[_c] = { fqn: "@cdktf/provider-azurerm.resourcePolicyAssignment.ResourcePolicyAssignmentNonComplianceMessageList", version: "12.27.0" };
function resourcePolicyAssignmentOverridesSelectorsToTerraform(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.resourcePolicyAssignmentOverridesSelectorsToTerraform = resourcePolicyAssignmentOverridesSelectorsToTerraform;
function resourcePolicyAssignmentOverridesSelectorsToHclTerraform(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.resourcePolicyAssignmentOverridesSelectorsToHclTerraform = resourcePolicyAssignmentOverridesSelectorsToHclTerraform;
class ResourcePolicyAssignmentOverridesSelectorsOutputReference 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.ResourcePolicyAssignmentOverridesSelectorsOutputReference = ResourcePolicyAssignmentOverridesSelectorsOutputReference;
_d = JSII_RTTI_SYMBOL_1;
ResourcePolicyAssignmentOverridesSelectorsOutputReference[_d] = { fqn: "@cdktf/provider-azurerm.resourcePolicyAssignment.ResourcePolicyAssignmentOverridesSelectorsOutputReference", version: "12.27.0" };
class ResourcePolicyAssignmentOverridesSelectorsList 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 ResourcePolicyAssignmentOverridesSelectorsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.ResourcePolicyAssignmentOverridesSelectorsList = ResourcePolicyAssignmentOverridesSelectorsList;
_e = JSII_RTTI_SYMBOL_1;
ResourcePolicyAssignmentOverridesSelectorsList[_e] = { fqn: "@cdktf/provider-azurerm.resourcePolicyAssignment.ResourcePolicyAssignmentOverridesSelectorsList", version: "12.27.0" };
function resourcePolicyAssignmentOverridesToTerraform(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(resourcePolicyAssignmentOverridesSelectorsToTerraform, true)(struct.selectors),
};
}
exports.resourcePolicyAssignmentOverridesToTerraform = resourcePolicyAssignmentOverridesToTerraform;
function resourcePolicyAssignmentOverridesToHclTerraform(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(resourcePolicyAssignmentOverridesSelectorsToHclTerraform, true)(struct.selectors),
isBlock: true,
type: "list",
storageClassType: "ResourcePolicyAssignmentOverridesSelectorsList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.resourcePolicyAssignmentOverridesToHclTerraform = resourcePolicyAssignmentOverridesToHclTerraform;
class ResourcePolicyAssignmentOverridesOutputReference 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 ResourcePolicyAssignmentOverridesSelectorsList(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.ResourcePolicyAssignmentOverridesOutputReference = ResourcePolicyAssignmentOverridesOutputReference;
_f = JSII_RTTI_SYMBOL_1;
ResourcePolicyAssignmentOverridesOutputReference[_f] = { fqn: "@cdktf/provider-azurerm.resourcePolicyAssignment.ResourcePolicyAssignmentOverridesOutputReference", version: "12.27.0" };
class ResourcePolicyAssignmentOverridesList 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 ResourcePolicyAssignmentOverridesOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.ResourcePolicyAssignmentOverridesList = ResourcePolicyAssignmentOverridesList;
_g = JSII_RTTI_SYMBOL_1;
ResourcePolicyAssignmentOverridesList[_g] = { fqn: "@cdktf/provider-azurerm.resourcePolicyAssignment.ResourcePolicyAssignmentOverridesList", version: "12.27.0" };
function resourcePolicyAssignmentResourceSelectorsSelectorsToTerraform(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.resourcePolicyAssignmentResourceSelectorsSelectorsToTerraform = resourcePolicyAssignmentResourceSelectorsSelectorsToTerraform;
function resourcePolicyAssignmentResourceSelectorsSelectorsToHclTerraform(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.resourcePolicyAssignmentResourceSelectorsSelectorsToHclTerraform = resourcePolicyAssignmentResourceSelectorsSelectorsToHclTerraform;
class ResourcePolicyAssignmentResourceSelectorsSelectorsOutputReference 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.ResourcePolicyAssignmentResourceSelectorsSelectorsOutputReference = ResourcePolicyAssignmentResourceSelectorsSelectorsOutputReference;
_h = JSII_RTTI_SYMBOL_1;
ResourcePolicyAssignmentResourceSelectorsSelectorsOutputReference[_h] = { fqn: "@cdktf/provider-azurerm.resourcePolicyAssignment.ResourcePolicyAssignmentResourceSelectorsSelectorsOutputReference", version: "12.27.0" };
class ResourcePolicyAssignmentResourceSelectorsSelectorsList 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 ResourcePolicyAssignmentResourceSelectorsSelectorsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.ResourcePolicyAssignmentResourceSelectorsSelectorsList = ResourcePolicyAssignmentResourceSelectorsSelectorsList;
_j = JSII_RTTI_SYMBOL_1;
ResourcePolicyAssignmentResourceSelectorsSelectorsList[_j] = { fqn: "@cdktf/provider-azurerm.resourcePolicyAssignment.ResourcePolicyAssignmentResourceSelectorsSelectorsList", version: "12.27.0" };
function resourcePolicyAssignmentResourceSelectorsToTerraform(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(resourcePolicyAssignmentResourceSelectorsSelectorsToTerraform, true)(struct.selectors),
};
}
exports.resourcePolicyAssignmentResourceSelectorsToTerraform = resourcePolicyAssignmentResourceSelectorsToTerraform;
function resourcePolicyAssignmentResourceSelectorsToHclTerraform(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(resourcePolicyAssignmentResourceSelectorsSelectorsToHclTerraform, true)(struct.selectors),
isBlock: true,
type: "list",
storageClassType: "ResourcePolicyAssignmentResourceSelectorsSelectorsList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.resourcePolicyAssignmentResourceSelectorsToHclTerraform = resourcePolicyAssignmentResourceSelectorsToHclTerraform;
class ResourcePolicyAssignmentResourceSelectorsOutputReference 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 ResourcePolicyAssignmentResourceSelectorsSelectorsList(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.ResourcePolicyAssignmentResourceSelectorsOutputReference = ResourcePolicyAssignmentResourceSelectorsOutputReference;
_k = JSII_RTTI_SYMBOL_1;
ResourcePolicyAssignmentResourceSelectorsOutputReference[_k] = { fqn: "@cdktf/provider-azurerm.resourcePolicyAssignment.ResourcePolicyAssignmentResourceSelectorsOutputReference", version: "12.27.0" };
class ResourcePolicyAssignmentResourceSelectorsList 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 ResourcePolicyAssignmentResourceSelectorsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.ResourcePolicyAssignmentResourceSelectorsList = ResourcePolicyAssignmentResourceSelectorsList;
_l = JSII_RTTI_SYMBOL_1;
ResourcePolicyAssignmentResourceSelectorsList[_l] = { fqn: "@cdktf/provider-azurerm.resourcePolicyAssignment.ResourcePolicyAssignmentResourceSelectorsList", version: "12.27.0" };
function resourcePolicyAssignmentTimeoutsToTerraform(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.resourcePolicyAssignmentTimeoutsToTerraform = resourcePolicyAssignmentTimeoutsToTerraform;
function resourcePolicyAssignmentTimeoutsToHclTerraform(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.resourcePolicyAssignmentTimeoutsToHclTerraform = resourcePolicyAssignmentTimeoutsToHclTerraform;
class ResourcePolicyAssignmentTimeoutsOutputReference 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.ResourcePolicyAssignmentTimeoutsOutputReference = ResourcePolicyAssignmentTimeoutsOutputReference;
_m = JSII_RTTI_SYMBOL_1;
ResourcePolicyAssignmentTimeoutsOutputReference[_m] = { fqn: "@cdktf/provider-azurerm.resourcePolicyAssignment.ResourcePolicyAssignmentTimeoutsOutputReference", version: "12.27.0" };
/**
* Represents a {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/resource_policy_assignment azurerm_resource_policy_assignment}
*/
class ResourcePolicyAssignment extends cdktf.TerraformResource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a ResourcePolicyAssignment 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 ResourcePolicyAssignment to import
* @param importFromId The id of the existing ResourcePolicyAssignment that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/resource_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 ResourcePolicyAssignment to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "azurerm_resource_policy_assignment", importId: importFromId, provider });
}
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/resource_policy_assignment azurerm_resource_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 ResourcePolicyAssignmentConfig
*/
constructor(scope, id, config) {
super(scope, id, {
terraformResourceType: 'azurerm_resource_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 ResourcePolicyAssignmentIdentityOutputReference(this, "identity");
// non_compliance_message - computed: false, optional: true, required: false
this._nonComplianceMessage = new ResourcePolicyAssignmentNonComplianceMessageList(this, "non_compliance_message", false);
// overrides - computed: false, optional: true, required: false
this._overrides = new ResourcePolicyAssignmentOverridesList(this, "overrides", false);
// resource_selectors - computed: false, optional: true, required: false
this._resourceSelectors = new ResourcePolicyAssignmentResourceSelectorsList(this, "resource_selectors", false);
// timeouts - computed: false, optional: true, required: false
this._timeouts = new ResourcePolicyAssignmentTimeoutsOutputReference(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._resourceId = config.resourceId;
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_definition_id');
}
set policyDefinitionId(value) {
this._policyDefinitionId = value;
}
// Temporarily expose input value. Use with caution.
get policyDefinitionIdInput() {
return this._policyDefinitionId;
}
get resourceId() {
return this.getStringAttribute('resource_id');
}
set resourceId(value) {
this._resourceId = value;
}
// Temporarily expose input value. Use with caution.
get resourceIdInput() {
return this._resourceId;
}
get identity() {
return this._identity;
}
putIdentity(value) {
this._identity.internalValue = value;
}
resetIdentity() {
this._identi