// generated from terraform resource schema import { Construct } from 'constructs'; import * as cdktf from 'cdktf'; /** * AWS Neptune */ export interface NeptuneClusterSnapshotConfig extends cdktf.TerraformMetaArguments { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/neptune_cluster_snapshot.html#db_cluster_identifier NeptuneClusterSnapshot#db_cluster_identifier} */ readonly dbClusterIdentifier: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/neptune_cluster_snapshot.html#db_cluster_snapshot_identifier NeptuneClusterSnapshot#db_cluster_snapshot_identifier} */ readonly dbClusterSnapshotIdentifier: string; /** * timeouts block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/neptune_cluster_snapshot.html#timeouts NeptuneClusterSnapshot#timeouts} */ readonly timeouts?: NeptuneClusterSnapshotTimeouts; } export interface NeptuneClusterSnapshotTimeouts { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/neptune_cluster_snapshot.html#create NeptuneClusterSnapshot#create} */ readonly create?: string; } export function neptuneClusterSnapshotTimeoutsToTerraform(struct?: NeptuneClusterSnapshotTimeoutsOutputReference | NeptuneClusterSnapshotTimeouts): 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), } } export class NeptuneClusterSnapshotTimeoutsOutputReference 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(): NeptuneClusterSnapshotTimeouts | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._create !== undefined) { hasAnyValues = true; internalValueResult.create = this._create; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: NeptuneClusterSnapshotTimeouts | undefined) { if (value === undefined) { this.isEmptyObject = false; this._create = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._create = value.create; } } // 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; } } /** * Represents a {@link https://www.terraform.io/docs/providers/aws/r/neptune_cluster_snapshot.html aws_neptune_cluster_snapshot} */ export class NeptuneClusterSnapshot extends cdktf.TerraformResource { // ================= // STATIC PROPERTIES // ================= public static readonly tfResourceType: string = "aws_neptune_cluster_snapshot"; // =========== // INITIALIZER // =========== /** * Create a new {@link https://www.terraform.io/docs/providers/aws/r/neptune_cluster_snapshot.html aws_neptune_cluster_snapshot} 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 NeptuneClusterSnapshotConfig */ public constructor(scope: Construct, id: string, config: NeptuneClusterSnapshotConfig) { super(scope, id, { terraformResourceType: 'aws_neptune_cluster_snapshot', terraformGeneratorMetadata: { providerName: 'aws' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle }); this._dbClusterIdentifier = config.dbClusterIdentifier; this._dbClusterSnapshotIdentifier = config.dbClusterSnapshotIdentifier; this._timeouts.internalValue = config.timeouts; } // ========== // ATTRIBUTES // ========== // allocated_storage - computed: true, optional: false, required: false public get allocatedStorage() { return this.getNumberAttribute('allocated_storage'); } // availability_zones - computed: true, optional: false, required: false public get availabilityZones() { return this.getListAttribute('availability_zones'); } // db_cluster_identifier - computed: false, optional: false, required: true private _dbClusterIdentifier?: string; public get dbClusterIdentifier() { return this.getStringAttribute('db_cluster_identifier'); } public set dbClusterIdentifier(value: string) { this._dbClusterIdentifier = value; } // Temporarily expose input value. Use with caution. public get dbClusterIdentifierInput() { return this._dbClusterIdentifier; } // db_cluster_snapshot_arn - computed: true, optional: false, required: false public get dbClusterSnapshotArn() { return this.getStringAttribute('db_cluster_snapshot_arn'); } // db_cluster_snapshot_identifier - computed: false, optional: false, required: true private _dbClusterSnapshotIdentifier?: string; public get dbClusterSnapshotIdentifier() { return this.getStringAttribute('db_cluster_snapshot_identifier'); } public set dbClusterSnapshotIdentifier(value: string) { this._dbClusterSnapshotIdentifier = value; } // Temporarily expose input value. Use with caution. public get dbClusterSnapshotIdentifierInput() { return this._dbClusterSnapshotIdentifier; } // engine - computed: true, optional: false, required: false public get engine() { return this.getStringAttribute('engine'); } // engine_version - computed: true, optional: false, required: false public get engineVersion() { return this.getStringAttribute('engine_version'); } // id - computed: true, optional: true, required: false public get id() { return this.getStringAttribute('id'); } // kms_key_id - computed: true, optional: false, required: false public get kmsKeyId() { return this.getStringAttribute('kms_key_id'); } // license_model - computed: true, optional: false, required: false public get licenseModel() { return this.getStringAttribute('license_model'); } // port - computed: true, optional: false, required: false public get port() { return this.getNumberAttribute('port'); } // snapshot_type - computed: true, optional: false, required: false public get snapshotType() { return this.getStringAttribute('snapshot_type'); } // source_db_cluster_snapshot_arn - computed: true, optional: false, required: false public get sourceDbClusterSnapshotArn() { return this.getStringAttribute('source_db_cluster_snapshot_arn'); } // status - computed: true, optional: false, required: false public get status() { return this.getStringAttribute('status'); } // storage_encrypted - computed: true, optional: false, required: false public get storageEncrypted() { return this.getBooleanAttribute('storage_encrypted') as any; } // vpc_id - computed: true, optional: false, required: false public get vpcId() { return this.getStringAttribute('vpc_id'); } // timeouts - computed: false, optional: true, required: false private _timeouts = new NeptuneClusterSnapshotTimeoutsOutputReference(this as any, "timeouts", true); public get timeouts() { return this._timeouts; } public putTimeouts(value: NeptuneClusterSnapshotTimeouts) { 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 { db_cluster_identifier: cdktf.stringToTerraform(this._dbClusterIdentifier), db_cluster_snapshot_identifier: cdktf.stringToTerraform(this._dbClusterSnapshotIdentifier), timeouts: neptuneClusterSnapshotTimeoutsToTerraform(this._timeouts.internalValue), }; } }