@cdktf/provider-azurerm
Version:
Prebuilt azurerm Provider for Terraform CDK (cdktf)
1,234 lines (1,233 loc) • 213 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
Object.defineProperty(exports, "__esModule", { value: true });
exports.AutomationRunbook = exports.AutomationRunbookTimeoutsOutputReference = exports.automationRunbookTimeoutsToHclTerraform = exports.automationRunbookTimeoutsToTerraform = exports.AutomationRunbookPublishContentLinkOutputReference = exports.automationRunbookPublishContentLinkToHclTerraform = exports.automationRunbookPublishContentLinkToTerraform = exports.AutomationRunbookPublishContentLinkHashOutputReference = exports.automationRunbookPublishContentLinkHashToHclTerraform = exports.automationRunbookPublishContentLinkHashToTerraform = exports.AutomationRunbookDraftOutputReference = exports.automationRunbookDraftToHclTerraform = exports.automationRunbookDraftToTerraform = exports.AutomationRunbookDraftParametersList = exports.AutomationRunbookDraftParametersOutputReference = exports.automationRunbookDraftParametersToHclTerraform = exports.automationRunbookDraftParametersToTerraform = exports.AutomationRunbookDraftContentLinkOutputReference = exports.automationRunbookDraftContentLinkToHclTerraform = exports.automationRunbookDraftContentLinkToTerraform = exports.AutomationRunbookDraftContentLinkHashOutputReference = exports.automationRunbookDraftContentLinkHashToHclTerraform = exports.automationRunbookDraftContentLinkHashToTerraform = exports.AutomationRunbookJobScheduleList = exports.AutomationRunbookJobScheduleOutputReference = exports.automationRunbookJobScheduleToHclTerraform = exports.automationRunbookJobScheduleToTerraform = void 0;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function automationRunbookJobScheduleToTerraform(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 {
job_schedule_id: struct.jobScheduleId === undefined ? null : cdktf.stringToTerraform(struct.jobScheduleId),
parameters: struct.parameters === undefined ? null : cdktf.hashMapper(cdktf.stringToTerraform)(struct.parameters),
run_on: struct.runOn === undefined ? null : cdktf.stringToTerraform(struct.runOn),
schedule_name: struct.scheduleName === undefined ? null : cdktf.stringToTerraform(struct.scheduleName),
};
}
exports.automationRunbookJobScheduleToTerraform = automationRunbookJobScheduleToTerraform;
function automationRunbookJobScheduleToHclTerraform(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 = {
job_schedule_id: {
value: struct.jobScheduleId === undefined ? null : cdktf.stringToHclTerraform(struct.jobScheduleId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
parameters: {
value: struct.parameters === undefined ? null : cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(struct.parameters),
isBlock: false,
type: "map",
storageClassType: "stringMap",
},
run_on: {
value: struct.runOn === undefined ? null : cdktf.stringToHclTerraform(struct.runOn),
isBlock: false,
type: "simple",
storageClassType: "string",
},
schedule_name: {
value: struct.scheduleName === undefined ? null : cdktf.stringToHclTerraform(struct.scheduleName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.automationRunbookJobScheduleToHclTerraform = automationRunbookJobScheduleToHclTerraform;
class AutomationRunbookJobScheduleOutputReference 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._jobScheduleId !== undefined) {
hasAnyValues = true;
internalValueResult.jobScheduleId = this._jobScheduleId;
}
if (this._parameters !== undefined) {
hasAnyValues = true;
internalValueResult.parameters = this._parameters;
}
if (this._runOn !== undefined) {
hasAnyValues = true;
internalValueResult.runOn = this._runOn;
}
if (this._scheduleName !== undefined) {
hasAnyValues = true;
internalValueResult.scheduleName = this._scheduleName;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._jobScheduleId = undefined;
this._parameters = undefined;
this._runOn = undefined;
this._scheduleName = 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._jobScheduleId = value.jobScheduleId;
this._parameters = value.parameters;
this._runOn = value.runOn;
this._scheduleName = value.scheduleName;
}
}
get jobScheduleId() {
return this.getStringAttribute('job_schedule_id');
}
set jobScheduleId(value) {
this._jobScheduleId = value;
}
resetJobScheduleId() {
this._jobScheduleId = undefined;
}
// Temporarily expose input value. Use with caution.
get jobScheduleIdInput() {
return this._jobScheduleId;
}
get parameters() {
return this.getStringMapAttribute('parameters');
}
set parameters(value) {
this._parameters = value;
}
resetParameters() {
this._parameters = undefined;
}
// Temporarily expose input value. Use with caution.
get parametersInput() {
return this._parameters;
}
get runOn() {
return this.getStringAttribute('run_on');
}
set runOn(value) {
this._runOn = value;
}
resetRunOn() {
this._runOn = undefined;
}
// Temporarily expose input value. Use with caution.
get runOnInput() {
return this._runOn;
}
get scheduleName() {
return this.getStringAttribute('schedule_name');
}
set scheduleName(value) {
this._scheduleName = value;
}
resetScheduleName() {
this._scheduleName = undefined;
}
// Temporarily expose input value. Use with caution.
get scheduleNameInput() {
return this._scheduleName;
}
}
exports.AutomationRunbookJobScheduleOutputReference = AutomationRunbookJobScheduleOutputReference;
_a = JSII_RTTI_SYMBOL_1;
AutomationRunbookJobScheduleOutputReference[_a] = { fqn: "@cdktf/provider-azurerm.automationRunbook.AutomationRunbookJobScheduleOutputReference", version: "12.27.0" };
class AutomationRunbookJobScheduleList 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 AutomationRunbookJobScheduleOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.AutomationRunbookJobScheduleList = AutomationRunbookJobScheduleList;
_b = JSII_RTTI_SYMBOL_1;
AutomationRunbookJobScheduleList[_b] = { fqn: "@cdktf/provider-azurerm.automationRunbook.AutomationRunbookJobScheduleList", version: "12.27.0" };
function automationRunbookDraftContentLinkHashToTerraform(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 {
algorithm: cdktf.stringToTerraform(struct.algorithm),
value: cdktf.stringToTerraform(struct.value),
};
}
exports.automationRunbookDraftContentLinkHashToTerraform = automationRunbookDraftContentLinkHashToTerraform;
function automationRunbookDraftContentLinkHashToHclTerraform(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 = {
algorithm: {
value: cdktf.stringToHclTerraform(struct.algorithm),
isBlock: false,
type: "simple",
storageClassType: "string",
},
value: {
value: cdktf.stringToHclTerraform(struct.value),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.automationRunbookDraftContentLinkHashToHclTerraform = automationRunbookDraftContentLinkHashToHclTerraform;
class AutomationRunbookDraftContentLinkHashOutputReference 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._algorithm !== undefined) {
hasAnyValues = true;
internalValueResult.algorithm = this._algorithm;
}
if (this._value !== undefined) {
hasAnyValues = true;
internalValueResult.value = this._value;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._algorithm = undefined;
this._value = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._algorithm = value.algorithm;
this._value = value.value;
}
}
get algorithm() {
return this.getStringAttribute('algorithm');
}
set algorithm(value) {
this._algorithm = value;
}
// Temporarily expose input value. Use with caution.
get algorithmInput() {
return this._algorithm;
}
get value() {
return this.getStringAttribute('value');
}
set value(value) {
this._value = value;
}
// Temporarily expose input value. Use with caution.
get valueInput() {
return this._value;
}
}
exports.AutomationRunbookDraftContentLinkHashOutputReference = AutomationRunbookDraftContentLinkHashOutputReference;
_c = JSII_RTTI_SYMBOL_1;
AutomationRunbookDraftContentLinkHashOutputReference[_c] = { fqn: "@cdktf/provider-azurerm.automationRunbook.AutomationRunbookDraftContentLinkHashOutputReference", version: "12.27.0" };
function automationRunbookDraftContentLinkToTerraform(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 {
uri: cdktf.stringToTerraform(struct.uri),
version: cdktf.stringToTerraform(struct.version),
hash: automationRunbookDraftContentLinkHashToTerraform(struct.hash),
};
}
exports.automationRunbookDraftContentLinkToTerraform = automationRunbookDraftContentLinkToTerraform;
function automationRunbookDraftContentLinkToHclTerraform(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 = {
uri: {
value: cdktf.stringToHclTerraform(struct.uri),
isBlock: false,
type: "simple",
storageClassType: "string",
},
version: {
value: cdktf.stringToHclTerraform(struct.version),
isBlock: false,
type: "simple",
storageClassType: "string",
},
hash: {
value: automationRunbookDraftContentLinkHashToHclTerraform(struct.hash),
isBlock: true,
type: "list",
storageClassType: "AutomationRunbookDraftContentLinkHashList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.automationRunbookDraftContentLinkToHclTerraform = automationRunbookDraftContentLinkToHclTerraform;
class AutomationRunbookDraftContentLinkOutputReference 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;
// hash - computed: false, optional: true, required: false
this._hash = new AutomationRunbookDraftContentLinkHashOutputReference(this, "hash");
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._uri !== undefined) {
hasAnyValues = true;
internalValueResult.uri = this._uri;
}
if (this._version !== undefined) {
hasAnyValues = true;
internalValueResult.version = this._version;
}
if (this._hash?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.hash = this._hash?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._uri = undefined;
this._version = undefined;
this._hash.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._uri = value.uri;
this._version = value.version;
this._hash.internalValue = value.hash;
}
}
get uri() {
return this.getStringAttribute('uri');
}
set uri(value) {
this._uri = value;
}
// Temporarily expose input value. Use with caution.
get uriInput() {
return this._uri;
}
get version() {
return this.getStringAttribute('version');
}
set version(value) {
this._version = value;
}
resetVersion() {
this._version = undefined;
}
// Temporarily expose input value. Use with caution.
get versionInput() {
return this._version;
}
get hash() {
return this._hash;
}
putHash(value) {
this._hash.internalValue = value;
}
resetHash() {
this._hash.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get hashInput() {
return this._hash.internalValue;
}
}
exports.AutomationRunbookDraftContentLinkOutputReference = AutomationRunbookDraftContentLinkOutputReference;
_d = JSII_RTTI_SYMBOL_1;
AutomationRunbookDraftContentLinkOutputReference[_d] = { fqn: "@cdktf/provider-azurerm.automationRunbook.AutomationRunbookDraftContentLinkOutputReference", version: "12.27.0" };
function automationRunbookDraftParametersToTerraform(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_value: cdktf.stringToTerraform(struct.defaultValue),
key: cdktf.stringToTerraform(struct.key),
mandatory: cdktf.booleanToTerraform(struct.mandatory),
position: cdktf.numberToTerraform(struct.position),
type: cdktf.stringToTerraform(struct.type),
};
}
exports.automationRunbookDraftParametersToTerraform = automationRunbookDraftParametersToTerraform;
function automationRunbookDraftParametersToHclTerraform(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_value: {
value: cdktf.stringToHclTerraform(struct.defaultValue),
isBlock: false,
type: "simple",
storageClassType: "string",
},
key: {
value: cdktf.stringToHclTerraform(struct.key),
isBlock: false,
type: "simple",
storageClassType: "string",
},
mandatory: {
value: cdktf.booleanToHclTerraform(struct.mandatory),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
position: {
value: cdktf.numberToHclTerraform(struct.position),
isBlock: false,
type: "simple",
storageClassType: "number",
},
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.automationRunbookDraftParametersToHclTerraform = automationRunbookDraftParametersToHclTerraform;
class AutomationRunbookDraftParametersOutputReference 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._defaultValue !== undefined) {
hasAnyValues = true;
internalValueResult.defaultValue = this._defaultValue;
}
if (this._key !== undefined) {
hasAnyValues = true;
internalValueResult.key = this._key;
}
if (this._mandatory !== undefined) {
hasAnyValues = true;
internalValueResult.mandatory = this._mandatory;
}
if (this._position !== undefined) {
hasAnyValues = true;
internalValueResult.position = this._position;
}
if (this._type !== undefined) {
hasAnyValues = true;
internalValueResult.type = this._type;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._defaultValue = undefined;
this._key = undefined;
this._mandatory = undefined;
this._position = undefined;
this._type = 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._defaultValue = value.defaultValue;
this._key = value.key;
this._mandatory = value.mandatory;
this._position = value.position;
this._type = value.type;
}
}
get defaultValue() {
return this.getStringAttribute('default_value');
}
set defaultValue(value) {
this._defaultValue = value;
}
resetDefaultValue() {
this._defaultValue = undefined;
}
// Temporarily expose input value. Use with caution.
get defaultValueInput() {
return this._defaultValue;
}
get key() {
return this.getStringAttribute('key');
}
set key(value) {
this._key = value;
}
// Temporarily expose input value. Use with caution.
get keyInput() {
return this._key;
}
get mandatory() {
return this.getBooleanAttribute('mandatory');
}
set mandatory(value) {
this._mandatory = value;
}
resetMandatory() {
this._mandatory = undefined;
}
// Temporarily expose input value. Use with caution.
get mandatoryInput() {
return this._mandatory;
}
get position() {
return this.getNumberAttribute('position');
}
set position(value) {
this._position = value;
}
resetPosition() {
this._position = undefined;
}
// Temporarily expose input value. Use with caution.
get positionInput() {
return this._position;
}
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.AutomationRunbookDraftParametersOutputReference = AutomationRunbookDraftParametersOutputReference;
_e = JSII_RTTI_SYMBOL_1;
AutomationRunbookDraftParametersOutputReference[_e] = { fqn: "@cdktf/provider-azurerm.automationRunbook.AutomationRunbookDraftParametersOutputReference", version: "12.27.0" };
class AutomationRunbookDraftParametersList 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 AutomationRunbookDraftParametersOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.AutomationRunbookDraftParametersList = AutomationRunbookDraftParametersList;
_f = JSII_RTTI_SYMBOL_1;
AutomationRunbookDraftParametersList[_f] = { fqn: "@cdktf/provider-azurerm.automationRunbook.AutomationRunbookDraftParametersList", version: "12.27.0" };
function automationRunbookDraftToTerraform(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 {
edit_mode_enabled: cdktf.booleanToTerraform(struct.editModeEnabled),
output_types: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.outputTypes),
content_link: automationRunbookDraftContentLinkToTerraform(struct.contentLink),
parameters: cdktf.listMapper(automationRunbookDraftParametersToTerraform, true)(struct.parameters),
};
}
exports.automationRunbookDraftToTerraform = automationRunbookDraftToTerraform;
function automationRunbookDraftToHclTerraform(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 = {
edit_mode_enabled: {
value: cdktf.booleanToHclTerraform(struct.editModeEnabled),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
output_types: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.outputTypes),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
content_link: {
value: automationRunbookDraftContentLinkToHclTerraform(struct.contentLink),
isBlock: true,
type: "list",
storageClassType: "AutomationRunbookDraftContentLinkList",
},
parameters: {
value: cdktf.listMapperHcl(automationRunbookDraftParametersToHclTerraform, true)(struct.parameters),
isBlock: true,
type: "list",
storageClassType: "AutomationRunbookDraftParametersList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.automationRunbookDraftToHclTerraform = automationRunbookDraftToHclTerraform;
class AutomationRunbookDraftOutputReference 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;
// content_link - computed: false, optional: true, required: false
this._contentLink = new AutomationRunbookDraftContentLinkOutputReference(this, "content_link");
// parameters - computed: false, optional: true, required: false
this._parameters = new AutomationRunbookDraftParametersList(this, "parameters", false);
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._editModeEnabled !== undefined) {
hasAnyValues = true;
internalValueResult.editModeEnabled = this._editModeEnabled;
}
if (this._outputTypes !== undefined) {
hasAnyValues = true;
internalValueResult.outputTypes = this._outputTypes;
}
if (this._contentLink?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.contentLink = this._contentLink?.internalValue;
}
if (this._parameters?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.parameters = this._parameters?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._editModeEnabled = undefined;
this._outputTypes = undefined;
this._contentLink.internalValue = undefined;
this._parameters.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._editModeEnabled = value.editModeEnabled;
this._outputTypes = value.outputTypes;
this._contentLink.internalValue = value.contentLink;
this._parameters.internalValue = value.parameters;
}
}
// creation_time - computed: true, optional: false, required: false
get creationTime() {
return this.getStringAttribute('creation_time');
}
get editModeEnabled() {
return this.getBooleanAttribute('edit_mode_enabled');
}
set editModeEnabled(value) {
this._editModeEnabled = value;
}
resetEditModeEnabled() {
this._editModeEnabled = undefined;
}
// Temporarily expose input value. Use with caution.
get editModeEnabledInput() {
return this._editModeEnabled;
}
// last_modified_time - computed: true, optional: false, required: false
get lastModifiedTime() {
return this.getStringAttribute('last_modified_time');
}
get outputTypes() {
return this.getListAttribute('output_types');
}
set outputTypes(value) {
this._outputTypes = value;
}
resetOutputTypes() {
this._outputTypes = undefined;
}
// Temporarily expose input value. Use with caution.
get outputTypesInput() {
return this._outputTypes;
}
get contentLink() {
return this._contentLink;
}
putContentLink(value) {
this._contentLink.internalValue = value;
}
resetContentLink() {
this._contentLink.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get contentLinkInput() {
return this._contentLink.internalValue;
}
get parameters() {
return this._parameters;
}
putParameters(value) {
this._parameters.internalValue = value;
}
resetParameters() {
this._parameters.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get parametersInput() {
return this._parameters.internalValue;
}
}
exports.AutomationRunbookDraftOutputReference = AutomationRunbookDraftOutputReference;
_g = JSII_RTTI_SYMBOL_1;
AutomationRunbookDraftOutputReference[_g] = { fqn: "@cdktf/provider-azurerm.automationRunbook.AutomationRunbookDraftOutputReference", version: "12.27.0" };
function automationRunbookPublishContentLinkHashToTerraform(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 {
algorithm: cdktf.stringToTerraform(struct.algorithm),
value: cdktf.stringToTerraform(struct.value),
};
}
exports.automationRunbookPublishContentLinkHashToTerraform = automationRunbookPublishContentLinkHashToTerraform;
function automationRunbookPublishContentLinkHashToHclTerraform(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 = {
algorithm: {
value: cdktf.stringToHclTerraform(struct.algorithm),
isBlock: false,
type: "simple",
storageClassType: "string",
},
value: {
value: cdktf.stringToHclTerraform(struct.value),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.automationRunbookPublishContentLinkHashToHclTerraform = automationRunbookPublishContentLinkHashToHclTerraform;
class AutomationRunbookPublishContentLinkHashOutputReference 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._algorithm !== undefined) {
hasAnyValues = true;
internalValueResult.algorithm = this._algorithm;
}
if (this._value !== undefined) {
hasAnyValues = true;
internalValueResult.value = this._value;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._algorithm = undefined;
this._value = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._algorithm = value.algorithm;
this._value = value.value;
}
}
get algorithm() {
return this.getStringAttribute('algorithm');
}
set algorithm(value) {
this._algorithm = value;
}
// Temporarily expose input value. Use with caution.
get algorithmInput() {
return this._algorithm;
}
get value() {
return this.getStringAttribute('value');
}
set value(value) {
this._value = value;
}
// Temporarily expose input value. Use with caution.
get valueInput() {
return this._value;
}
}
exports.AutomationRunbookPublishContentLinkHashOutputReference = AutomationRunbookPublishContentLinkHashOutputReference;
_h = JSII_RTTI_SYMBOL_1;
AutomationRunbookPublishContentLinkHashOutputReference[_h] = { fqn: "@cdktf/provider-azurerm.automationRunbook.AutomationRunbookPublishContentLinkHashOutputReference", version: "12.27.0" };
function automationRunbookPublishContentLinkToTerraform(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 {
uri: cdktf.stringToTerraform(struct.uri),
version: cdktf.stringToTerraform(struct.version),
hash: automationRunbookPublishContentLinkHashToTerraform(struct.hash),
};
}
exports.automationRunbookPublishContentLinkToTerraform = automationRunbookPublishContentLinkToTerraform;
function automationRunbookPublishContentLinkToHclTerraform(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 = {
uri: {
value: cdktf.stringToHclTerraform(struct.uri),
isBlock: false,
type: "simple",
storageClassType: "string",
},
version: {
value: cdktf.stringToHclTerraform(struct.version),
isBlock: false,
type: "simple",
storageClassType: "string",
},
hash: {
value: automationRunbookPublishContentLinkHashToHclTerraform(struct.hash),
isBlock: true,
type: "list",
storageClassType: "AutomationRunbookPublishContentLinkHashList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.automationRunbookPublishContentLinkToHclTerraform = automationRunbookPublishContentLinkToHclTerraform;
class AutomationRunbookPublishContentLinkOutputReference 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;
// hash - computed: false, optional: true, required: false
this._hash = new AutomationRunbookPublishContentLinkHashOutputReference(this, "hash");
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._uri !== undefined) {
hasAnyValues = true;
internalValueResult.uri = this._uri;
}
if (this._version !== undefined) {
hasAnyValues = true;
internalValueResult.version = this._version;
}
if (this._hash?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.hash = this._hash?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._uri = undefined;
this._version = undefined;
this._hash.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._uri = value.uri;
this._version = value.version;
this._hash.internalValue = value.hash;
}
}
get uri() {
return this.getStringAttribute('uri');
}
set uri(value) {
this._uri = value;
}
// Temporarily expose input value. Use with caution.
get uriInput() {
return this._uri;
}
get version() {
return this.getStringAttribute('version');
}
set version(value) {
this._version = value;
}
resetVersion() {
this._version = undefined;
}
// Temporarily expose input value. Use with caution.
get versionInput() {
return this._version;
}
get hash() {
return this._hash;
}
putHash(value) {
this._hash.internalValue = value;
}
resetHash() {
this._hash.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get hashInput() {
return this._hash.internalValue;
}
}
exports.AutomationRunbookPublishContentLinkOutputReference = AutomationRunbookPublishContentLinkOutputReference;
_j = JSII_RTTI_SYMBOL_1;
AutomationRunbookPublishContentLinkOutputReference[_j] = { fqn: "@cdktf/provider-azurerm.automationRunbook.AutomationRunbookPublishContentLinkOutputReference", version: "12.27.0" };
function automationRunbookTimeoutsToTerraform(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.automationRunbookTimeoutsToTerraform = automationRunbookTimeoutsToTerraform;
function automationRunbookTimeoutsToHclTerraform(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.automationRunbookTimeoutsToHclTerraform = automationRunbookTimeoutsToHclTerraform;
class AutomationRunbookTimeoutsOutputReference 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.AutomationRunbookTimeoutsOutputReference = AutomationRunbookTimeoutsOutputReference;
_k = JSII_RTTI_SYMBOL_1;
AutomationRunbookTimeoutsOutputReference[_k] = { fqn: "@cdktf/provider-azurerm.automationRunbook.AutomationRunbookTimeoutsOutputReference", version: "12.27.0" };
/**
* Represents a {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/automation_runbook azurerm_automation_runbook}
*/
class AutomationRunbook extends cdktf.TerraformResource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a AutomationRunbook 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 AutomationRunbook to import
* @param importFromId The id of the existing AutomationRunbook that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/automation_runbook#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the AutomationRunbook to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "azurerm_automation_runbook", importId: importFromId, provider });
}
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/automation_runbook azurerm_automation_runbook} 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 AutomationRunbookConfig
*/
constructor(scope, id, config) {
super(scope, id, {
terraformResourceType: 'azurerm_automation_runbook',
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
});
// job_schedule - computed: true, optional: true, required: false
this._jobSchedule = new AutomationRunbookJobScheduleList(this, "job_schedule", true);
// draft - computed: false, optional: true, required: false
this._draft = new AutomationRunbookDraftOutputReference(this, "draft");
// publish_content_link - computed: false, optional: true, required: false
this._publishContentLink = new AutomationRunbookPublishContentLinkOutputReference(this, "publish_content_link");
// timeouts - computed: false, optional: true, required: false
this._timeouts = new AutomationRunbookTimeoutsOutputReference(this, "timeouts");
this._automationAccountName = config.automationAccountName;
this._content = config.content;
this._description = config.description;
this._id = config.id;
this._jobSchedule.internalValue = config.jobSchedule;
this._location = config.location;
this._logActivityTraceLevel = config.logActivityTraceLevel;