// generated from terraform resource schema import { Construct } from 'constructs'; import * as cdktf from 'cdktf'; /** * AWS File System FSx */ export interface FsxOntapVolumeConfig extends cdktf.TerraformMetaArguments { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/fsx_ontap_volume.html#junction_path FsxOntapVolume#junction_path} */ readonly junctionPath: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/fsx_ontap_volume.html#name FsxOntapVolume#name} */ readonly name: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/fsx_ontap_volume.html#security_style FsxOntapVolume#security_style} */ readonly securityStyle?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/fsx_ontap_volume.html#size_in_megabytes FsxOntapVolume#size_in_megabytes} */ readonly sizeInMegabytes: number; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/fsx_ontap_volume.html#storage_efficiency_enabled FsxOntapVolume#storage_efficiency_enabled} */ readonly storageEfficiencyEnabled: boolean | cdktf.IResolvable; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/fsx_ontap_volume.html#storage_virtual_machine_id FsxOntapVolume#storage_virtual_machine_id} */ readonly storageVirtualMachineId: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/fsx_ontap_volume.html#tags FsxOntapVolume#tags} */ readonly tags?: { [key: string]: string } | cdktf.IResolvable; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/fsx_ontap_volume.html#tags_all FsxOntapVolume#tags_all} */ readonly tagsAll?: { [key: string]: string } | cdktf.IResolvable; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/fsx_ontap_volume.html#volume_type FsxOntapVolume#volume_type} */ readonly volumeType?: string; /** * tiering_policy block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/fsx_ontap_volume.html#tiering_policy FsxOntapVolume#tiering_policy} */ readonly tieringPolicy?: FsxOntapVolumeTieringPolicy; /** * timeouts block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/fsx_ontap_volume.html#timeouts FsxOntapVolume#timeouts} */ readonly timeouts?: FsxOntapVolumeTimeouts; } export interface FsxOntapVolumeTieringPolicy { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/fsx_ontap_volume.html#cooling_period FsxOntapVolume#cooling_period} */ readonly coolingPeriod?: number; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/fsx_ontap_volume.html#name FsxOntapVolume#name} */ readonly name?: string; } export function fsxOntapVolumeTieringPolicyToTerraform(struct?: FsxOntapVolumeTieringPolicyOutputReference | FsxOntapVolumeTieringPolicy): any { if (!cdktf.canInspect(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 { cooling_period: cdktf.numberToTerraform(struct!.coolingPeriod), name: cdktf.stringToTerraform(struct!.name), } } export class FsxOntapVolumeTieringPolicyOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): FsxOntapVolumeTieringPolicy | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._coolingPeriod !== undefined) { hasAnyValues = true; internalValueResult.coolingPeriod = this._coolingPeriod; } if (this._name !== undefined) { hasAnyValues = true; internalValueResult.name = this._name; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: FsxOntapVolumeTieringPolicy | undefined) { if (value === undefined) { this.isEmptyObject = false; this._coolingPeriod = undefined; this._name = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._coolingPeriod = value.coolingPeriod; this._name = value.name; } } // cooling_period - computed: false, optional: true, required: false private _coolingPeriod?: number; public get coolingPeriod() { return this.getNumberAttribute('cooling_period'); } public set coolingPeriod(value: number) { this._coolingPeriod = value; } public resetCoolingPeriod() { this._coolingPeriod = undefined; } // Temporarily expose input value. Use with caution. public get coolingPeriodInput() { return this._coolingPeriod; } // name - computed: true, optional: true, required: false private _name?: string; public get name() { return this.getStringAttribute('name'); } public set name(value: string) { this._name = value; } public resetName() { this._name = undefined; } // Temporarily expose input value. Use with caution. public get nameInput() { return this._name; } } export interface FsxOntapVolumeTimeouts { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/fsx_ontap_volume.html#create FsxOntapVolume#create} */ readonly create?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/fsx_ontap_volume.html#delete FsxOntapVolume#delete} */ readonly delete?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/fsx_ontap_volume.html#update FsxOntapVolume#update} */ readonly update?: string; } export function fsxOntapVolumeTimeoutsToTerraform(struct?: FsxOntapVolumeTimeoutsOutputReference | FsxOntapVolumeTimeouts): any { if (!cdktf.canInspect(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { create: cdktf.stringToTerraform(struct!.create), delete: cdktf.stringToTerraform(struct!.delete), update: cdktf.stringToTerraform(struct!.update), } } export class FsxOntapVolumeTimeoutsOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): FsxOntapVolumeTimeouts | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._create !== undefined) { hasAnyValues = true; internalValueResult.create = this._create; } if (this._delete !== undefined) { hasAnyValues = true; internalValueResult.delete = this._delete; } if (this._update !== undefined) { hasAnyValues = true; internalValueResult.update = this._update; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: FsxOntapVolumeTimeouts | undefined) { if (value === undefined) { this.isEmptyObject = false; this._create = undefined; this._delete = undefined; this._update = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._create = value.create; this._delete = value.delete; this._update = value.update; } } // create - computed: false, optional: true, required: false private _create?: string; public get create() { return this.getStringAttribute('create'); } public set create(value: string) { this._create = value; } public resetCreate() { this._create = undefined; } // Temporarily expose input value. Use with caution. public get createInput() { return this._create; } // delete - computed: false, optional: true, required: false private _delete?: string; public get delete() { return this.getStringAttribute('delete'); } public set delete(value: string) { this._delete = value; } public resetDelete() { this._delete = undefined; } // Temporarily expose input value. Use with caution. public get deleteInput() { return this._delete; } // update - computed: false, optional: true, required: false private _update?: string; public get update() { return this.getStringAttribute('update'); } public set update(value: string) { this._update = value; } public resetUpdate() { this._update = undefined; } // Temporarily expose input value. Use with caution. public get updateInput() { return this._update; } } /** * Represents a {@link https://www.terraform.io/docs/providers/aws/r/fsx_ontap_volume.html aws_fsx_ontap_volume} */ export class FsxOntapVolume extends cdktf.TerraformResource { // ================= // STATIC PROPERTIES // ================= public static readonly tfResourceType: string = "aws_fsx_ontap_volume"; // =========== // INITIALIZER // =========== /** * Create a new {@link https://www.terraform.io/docs/providers/aws/r/fsx_ontap_volume.html aws_fsx_ontap_volume} 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 FsxOntapVolumeConfig */ public constructor(scope: Construct, id: string, config: FsxOntapVolumeConfig) { super(scope, id, { terraformResourceType: 'aws_fsx_ontap_volume', terraformGeneratorMetadata: { providerName: 'aws' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle }); this._junctionPath = config.junctionPath; this._name = config.name; this._securityStyle = config.securityStyle; this._sizeInMegabytes = config.sizeInMegabytes; this._storageEfficiencyEnabled = config.storageEfficiencyEnabled; this._storageVirtualMachineId = config.storageVirtualMachineId; this._tags = config.tags; this._tagsAll = config.tagsAll; this._volumeType = config.volumeType; this._tieringPolicy.internalValue = config.tieringPolicy; this._timeouts.internalValue = config.timeouts; } // ========== // ATTRIBUTES // ========== // arn - computed: true, optional: false, required: false public get arn() { return this.getStringAttribute('arn'); } // file_system_id - computed: true, optional: false, required: false public get fileSystemId() { return this.getStringAttribute('file_system_id'); } // flexcache_endpoint_type - computed: true, optional: false, required: false public get flexcacheEndpointType() { return this.getStringAttribute('flexcache_endpoint_type'); } // id - computed: true, optional: true, required: false public get id() { return this.getStringAttribute('id'); } // junction_path - computed: false, optional: false, required: true private _junctionPath?: string; public get junctionPath() { return this.getStringAttribute('junction_path'); } public set junctionPath(value: string) { this._junctionPath = value; } // Temporarily expose input value. Use with caution. public get junctionPathInput() { return this._junctionPath; } // name - computed: false, optional: false, required: true private _name?: string; public get name() { return this.getStringAttribute('name'); } public set name(value: string) { this._name = value; } // Temporarily expose input value. Use with caution. public get nameInput() { return this._name; } // ontap_volume_type - computed: true, optional: false, required: false public get ontapVolumeType() { return this.getStringAttribute('ontap_volume_type'); } // security_style - computed: false, optional: true, required: false private _securityStyle?: string; public get securityStyle() { return this.getStringAttribute('security_style'); } public set securityStyle(value: string) { this._securityStyle = value; } public resetSecurityStyle() { this._securityStyle = undefined; } // Temporarily expose input value. Use with caution. public get securityStyleInput() { return this._securityStyle; } // size_in_megabytes - computed: false, optional: false, required: true private _sizeInMegabytes?: number; public get sizeInMegabytes() { return this.getNumberAttribute('size_in_megabytes'); } public set sizeInMegabytes(value: number) { this._sizeInMegabytes = value; } // Temporarily expose input value. Use with caution. public get sizeInMegabytesInput() { return this._sizeInMegabytes; } // storage_efficiency_enabled - computed: false, optional: false, required: true private _storageEfficiencyEnabled?: boolean | cdktf.IResolvable; public get storageEfficiencyEnabled() { return this.getBooleanAttribute('storage_efficiency_enabled') as any; } public set storageEfficiencyEnabled(value: boolean | cdktf.IResolvable) { this._storageEfficiencyEnabled = value; } // Temporarily expose input value. Use with caution. public get storageEfficiencyEnabledInput() { return this._storageEfficiencyEnabled; } // storage_virtual_machine_id - computed: false, optional: false, required: true private _storageVirtualMachineId?: string; public get storageVirtualMachineId() { return this.getStringAttribute('storage_virtual_machine_id'); } public set storageVirtualMachineId(value: string) { this._storageVirtualMachineId = value; } // Temporarily expose input value. Use with caution. public get storageVirtualMachineIdInput() { return this._storageVirtualMachineId; } // tags - computed: false, optional: true, required: false private _tags?: { [key: string]: string } | cdktf.IResolvable; public get tags() { // Getting the computed value is not yet implemented return this.interpolationForAttribute('tags') as any; } public set tags(value: { [key: string]: string } | cdktf.IResolvable) { this._tags = value; } public resetTags() { this._tags = undefined; } // Temporarily expose input value. Use with caution. public get tagsInput() { return this._tags; } // tags_all - computed: true, optional: true, required: false private _tagsAll?: { [key: string]: string } | cdktf.IResolvable; public get tagsAll() { // Getting the computed value is not yet implemented return this.interpolationForAttribute('tags_all') as any; } public set tagsAll(value: { [key: string]: string } | cdktf.IResolvable) { this._tagsAll = value; } public resetTagsAll() { this._tagsAll = undefined; } // Temporarily expose input value. Use with caution. public get tagsAllInput() { return this._tagsAll; } // uuid - computed: true, optional: false, required: false public get uuid() { return this.getStringAttribute('uuid'); } // volume_type - computed: false, optional: true, required: false private _volumeType?: string; public get volumeType() { return this.getStringAttribute('volume_type'); } public set volumeType(value: string) { this._volumeType = value; } public resetVolumeType() { this._volumeType = undefined; } // Temporarily expose input value. Use with caution. public get volumeTypeInput() { return this._volumeType; } // tiering_policy - computed: false, optional: true, required: false private _tieringPolicy = new FsxOntapVolumeTieringPolicyOutputReference(this as any, "tiering_policy", true); public get tieringPolicy() { return this._tieringPolicy; } public putTieringPolicy(value: FsxOntapVolumeTieringPolicy) { this._tieringPolicy.internalValue = value; } public resetTieringPolicy() { this._tieringPolicy.internalValue = undefined; } // Temporarily expose input value. Use with caution. public get tieringPolicyInput() { return this._tieringPolicy.internalValue; } // timeouts - computed: false, optional: true, required: false private _timeouts = new FsxOntapVolumeTimeoutsOutputReference(this as any, "timeouts", true); public get timeouts() { return this._timeouts; } public putTimeouts(value: FsxOntapVolumeTimeouts) { this._timeouts.internalValue = value; } public resetTimeouts() { this._timeouts.internalValue = undefined; } // Temporarily expose input value. Use with caution. public get timeoutsInput() { return this._timeouts.internalValue; } // ========= // SYNTHESIS // ========= protected synthesizeAttributes(): { [name: string]: any } { return { junction_path: cdktf.stringToTerraform(this._junctionPath), name: cdktf.stringToTerraform(this._name), security_style: cdktf.stringToTerraform(this._securityStyle), size_in_megabytes: cdktf.numberToTerraform(this._sizeInMegabytes), storage_efficiency_enabled: cdktf.booleanToTerraform(this._storageEfficiencyEnabled), storage_virtual_machine_id: cdktf.stringToTerraform(this._storageVirtualMachineId), tags: cdktf.hashMapper(cdktf.anyToTerraform)(this._tags), tags_all: cdktf.hashMapper(cdktf.anyToTerraform)(this._tagsAll), volume_type: cdktf.stringToTerraform(this._volumeType), tiering_policy: fsxOntapVolumeTieringPolicyToTerraform(this._tieringPolicy.internalValue), timeouts: fsxOntapVolumeTimeoutsToTerraform(this._timeouts.internalValue), }; } }