// generated from terraform resource schema import { Construct } from 'constructs'; import * as cdktf from 'cdktf'; /** * AWS Glue */ export interface GlueJobConfig extends cdktf.TerraformMetaArguments { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/glue_job.html#connections GlueJob#connections} */ readonly connections?: string[]; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/glue_job.html#default_arguments GlueJob#default_arguments} */ readonly defaultArguments?: { [key: string]: string } | cdktf.IResolvable; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/glue_job.html#description GlueJob#description} */ readonly description?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/glue_job.html#glue_version GlueJob#glue_version} */ readonly glueVersion?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/glue_job.html#max_capacity GlueJob#max_capacity} */ readonly maxCapacity?: number; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/glue_job.html#max_retries GlueJob#max_retries} */ readonly maxRetries?: number; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/glue_job.html#name GlueJob#name} */ readonly name: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/glue_job.html#non_overridable_arguments GlueJob#non_overridable_arguments} */ readonly nonOverridableArguments?: { [key: string]: string } | cdktf.IResolvable; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/glue_job.html#number_of_workers GlueJob#number_of_workers} */ readonly numberOfWorkers?: number; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/glue_job.html#role_arn GlueJob#role_arn} */ readonly roleArn: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/glue_job.html#security_configuration GlueJob#security_configuration} */ readonly securityConfiguration?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/glue_job.html#tags GlueJob#tags} */ readonly tags?: { [key: string]: string } | cdktf.IResolvable; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/glue_job.html#tags_all GlueJob#tags_all} */ readonly tagsAll?: { [key: string]: string } | cdktf.IResolvable; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/glue_job.html#timeout GlueJob#timeout} */ readonly timeout?: number; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/glue_job.html#worker_type GlueJob#worker_type} */ readonly workerType?: string; /** * command block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/glue_job.html#command GlueJob#command} */ readonly command: GlueJobCommand; /** * execution_property block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/glue_job.html#execution_property GlueJob#execution_property} */ readonly executionProperty?: GlueJobExecutionProperty; /** * notification_property block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/glue_job.html#notification_property GlueJob#notification_property} */ readonly notificationProperty?: GlueJobNotificationProperty; } export interface GlueJobCommand { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/glue_job.html#name GlueJob#name} */ readonly name?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/glue_job.html#python_version GlueJob#python_version} */ readonly pythonVersion?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/glue_job.html#script_location GlueJob#script_location} */ readonly scriptLocation: string; } export function glueJobCommandToTerraform(struct?: GlueJobCommandOutputReference | GlueJobCommand): 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 { name: cdktf.stringToTerraform(struct!.name), python_version: cdktf.stringToTerraform(struct!.pythonVersion), script_location: cdktf.stringToTerraform(struct!.scriptLocation), } } export class GlueJobCommandOutputReference 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(): GlueJobCommand | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._name !== undefined) { hasAnyValues = true; internalValueResult.name = this._name; } if (this._pythonVersion !== undefined) { hasAnyValues = true; internalValueResult.pythonVersion = this._pythonVersion; } if (this._scriptLocation !== undefined) { hasAnyValues = true; internalValueResult.scriptLocation = this._scriptLocation; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: GlueJobCommand | undefined) { if (value === undefined) { this.isEmptyObject = false; this._name = undefined; this._pythonVersion = undefined; this._scriptLocation = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._name = value.name; this._pythonVersion = value.pythonVersion; this._scriptLocation = value.scriptLocation; } } // name - computed: false, 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; } // python_version - computed: true, optional: true, required: false private _pythonVersion?: string; public get pythonVersion() { return this.getStringAttribute('python_version'); } public set pythonVersion(value: string) { this._pythonVersion = value; } public resetPythonVersion() { this._pythonVersion = undefined; } // Temporarily expose input value. Use with caution. public get pythonVersionInput() { return this._pythonVersion; } // script_location - computed: false, optional: false, required: true private _scriptLocation?: string; public get scriptLocation() { return this.getStringAttribute('script_location'); } public set scriptLocation(value: string) { this._scriptLocation = value; } // Temporarily expose input value. Use with caution. public get scriptLocationInput() { return this._scriptLocation; } } export interface GlueJobExecutionProperty { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/glue_job.html#max_concurrent_runs GlueJob#max_concurrent_runs} */ readonly maxConcurrentRuns?: number; } export function glueJobExecutionPropertyToTerraform(struct?: GlueJobExecutionPropertyOutputReference | GlueJobExecutionProperty): 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 { max_concurrent_runs: cdktf.numberToTerraform(struct!.maxConcurrentRuns), } } export class GlueJobExecutionPropertyOutputReference 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(): GlueJobExecutionProperty | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._maxConcurrentRuns !== undefined) { hasAnyValues = true; internalValueResult.maxConcurrentRuns = this._maxConcurrentRuns; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: GlueJobExecutionProperty | undefined) { if (value === undefined) { this.isEmptyObject = false; this._maxConcurrentRuns = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._maxConcurrentRuns = value.maxConcurrentRuns; } } // max_concurrent_runs - computed: false, optional: true, required: false private _maxConcurrentRuns?: number; public get maxConcurrentRuns() { return this.getNumberAttribute('max_concurrent_runs'); } public set maxConcurrentRuns(value: number) { this._maxConcurrentRuns = value; } public resetMaxConcurrentRuns() { this._maxConcurrentRuns = undefined; } // Temporarily expose input value. Use with caution. public get maxConcurrentRunsInput() { return this._maxConcurrentRuns; } } export interface GlueJobNotificationProperty { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/glue_job.html#notify_delay_after GlueJob#notify_delay_after} */ readonly notifyDelayAfter?: number; } export function glueJobNotificationPropertyToTerraform(struct?: GlueJobNotificationPropertyOutputReference | GlueJobNotificationProperty): 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 { notify_delay_after: cdktf.numberToTerraform(struct!.notifyDelayAfter), } } export class GlueJobNotificationPropertyOutputReference 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(): GlueJobNotificationProperty | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._notifyDelayAfter !== undefined) { hasAnyValues = true; internalValueResult.notifyDelayAfter = this._notifyDelayAfter; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: GlueJobNotificationProperty | undefined) { if (value === undefined) { this.isEmptyObject = false; this._notifyDelayAfter = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._notifyDelayAfter = value.notifyDelayAfter; } } // notify_delay_after - computed: false, optional: true, required: false private _notifyDelayAfter?: number; public get notifyDelayAfter() { return this.getNumberAttribute('notify_delay_after'); } public set notifyDelayAfter(value: number) { this._notifyDelayAfter = value; } public resetNotifyDelayAfter() { this._notifyDelayAfter = undefined; } // Temporarily expose input value. Use with caution. public get notifyDelayAfterInput() { return this._notifyDelayAfter; } } /** * Represents a {@link https://www.terraform.io/docs/providers/aws/r/glue_job.html aws_glue_job} */ export class GlueJob extends cdktf.TerraformResource { // ================= // STATIC PROPERTIES // ================= public static readonly tfResourceType: string = "aws_glue_job"; // =========== // INITIALIZER // =========== /** * Create a new {@link https://www.terraform.io/docs/providers/aws/r/glue_job.html aws_glue_job} 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 GlueJobConfig */ public constructor(scope: Construct, id: string, config: GlueJobConfig) { super(scope, id, { terraformResourceType: 'aws_glue_job', terraformGeneratorMetadata: { providerName: 'aws' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle }); this._connections = config.connections; this._defaultArguments = config.defaultArguments; this._description = config.description; this._glueVersion = config.glueVersion; this._maxCapacity = config.maxCapacity; this._maxRetries = config.maxRetries; this._name = config.name; this._nonOverridableArguments = config.nonOverridableArguments; this._numberOfWorkers = config.numberOfWorkers; this._roleArn = config.roleArn; this._securityConfiguration = config.securityConfiguration; this._tags = config.tags; this._tagsAll = config.tagsAll; this._timeout = config.timeout; this._workerType = config.workerType; this._command.internalValue = config.command; this._executionProperty.internalValue = config.executionProperty; this._notificationProperty.internalValue = config.notificationProperty; } // ========== // ATTRIBUTES // ========== // arn - computed: true, optional: false, required: false public get arn() { return this.getStringAttribute('arn'); } // connections - computed: false, optional: true, required: false private _connections?: string[]; public get connections() { return this.getListAttribute('connections'); } public set connections(value: string[]) { this._connections = value; } public resetConnections() { this._connections = undefined; } // Temporarily expose input value. Use with caution. public get connectionsInput() { return this._connections; } // default_arguments - computed: false, optional: true, required: false private _defaultArguments?: { [key: string]: string } | cdktf.IResolvable; public get defaultArguments() { // Getting the computed value is not yet implemented return this.interpolationForAttribute('default_arguments') as any; } public set defaultArguments(value: { [key: string]: string } | cdktf.IResolvable) { this._defaultArguments = value; } public resetDefaultArguments() { this._defaultArguments = undefined; } // Temporarily expose input value. Use with caution. public get defaultArgumentsInput() { return this._defaultArguments; } // description - computed: false, optional: true, required: false private _description?: string; public get description() { return this.getStringAttribute('description'); } public set description(value: string) { this._description = value; } public resetDescription() { this._description = undefined; } // Temporarily expose input value. Use with caution. public get descriptionInput() { return this._description; } // glue_version - computed: true, optional: true, required: false private _glueVersion?: string; public get glueVersion() { return this.getStringAttribute('glue_version'); } public set glueVersion(value: string) { this._glueVersion = value; } public resetGlueVersion() { this._glueVersion = undefined; } // Temporarily expose input value. Use with caution. public get glueVersionInput() { return this._glueVersion; } // id - computed: true, optional: true, required: false public get id() { return this.getStringAttribute('id'); } // max_capacity - computed: true, optional: true, required: false private _maxCapacity?: number; public get maxCapacity() { return this.getNumberAttribute('max_capacity'); } public set maxCapacity(value: number) { this._maxCapacity = value; } public resetMaxCapacity() { this._maxCapacity = undefined; } // Temporarily expose input value. Use with caution. public get maxCapacityInput() { return this._maxCapacity; } // max_retries - computed: false, optional: true, required: false private _maxRetries?: number; public get maxRetries() { return this.getNumberAttribute('max_retries'); } public set maxRetries(value: number) { this._maxRetries = value; } public resetMaxRetries() { this._maxRetries = undefined; } // Temporarily expose input value. Use with caution. public get maxRetriesInput() { return this._maxRetries; } // 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; } // non_overridable_arguments - computed: false, optional: true, required: false private _nonOverridableArguments?: { [key: string]: string } | cdktf.IResolvable; public get nonOverridableArguments() { // Getting the computed value is not yet implemented return this.interpolationForAttribute('non_overridable_arguments') as any; } public set nonOverridableArguments(value: { [key: string]: string } | cdktf.IResolvable) { this._nonOverridableArguments = value; } public resetNonOverridableArguments() { this._nonOverridableArguments = undefined; } // Temporarily expose input value. Use with caution. public get nonOverridableArgumentsInput() { return this._nonOverridableArguments; } // number_of_workers - computed: false, optional: true, required: false private _numberOfWorkers?: number; public get numberOfWorkers() { return this.getNumberAttribute('number_of_workers'); } public set numberOfWorkers(value: number) { this._numberOfWorkers = value; } public resetNumberOfWorkers() { this._numberOfWorkers = undefined; } // Temporarily expose input value. Use with caution. public get numberOfWorkersInput() { return this._numberOfWorkers; } // role_arn - computed: false, optional: false, required: true private _roleArn?: string; public get roleArn() { return this.getStringAttribute('role_arn'); } public set roleArn(value: string) { this._roleArn = value; } // Temporarily expose input value. Use with caution. public get roleArnInput() { return this._roleArn; } // security_configuration - computed: false, optional: true, required: false private _securityConfiguration?: string; public get securityConfiguration() { return this.getStringAttribute('security_configuration'); } public set securityConfiguration(value: string) { this._securityConfiguration = value; } public resetSecurityConfiguration() { this._securityConfiguration = undefined; } // Temporarily expose input value. Use with caution. public get securityConfigurationInput() { return this._securityConfiguration; } // 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; } // timeout - computed: false, optional: true, required: false private _timeout?: number; public get timeout() { return this.getNumberAttribute('timeout'); } public set timeout(value: number) { this._timeout = value; } public resetTimeout() { this._timeout = undefined; } // Temporarily expose input value. Use with caution. public get timeoutInput() { return this._timeout; } // worker_type - computed: false, optional: true, required: false private _workerType?: string; public get workerType() { return this.getStringAttribute('worker_type'); } public set workerType(value: string) { this._workerType = value; } public resetWorkerType() { this._workerType = undefined; } // Temporarily expose input value. Use with caution. public get workerTypeInput() { return this._workerType; } // command - computed: false, optional: false, required: true private _command = new GlueJobCommandOutputReference(this as any, "command", true); public get command() { return this._command; } public putCommand(value: GlueJobCommand) { this._command.internalValue = value; } // Temporarily expose input value. Use with caution. public get commandInput() { return this._command.internalValue; } // execution_property - computed: false, optional: true, required: false private _executionProperty = new GlueJobExecutionPropertyOutputReference(this as any, "execution_property", true); public get executionProperty() { return this._executionProperty; } public putExecutionProperty(value: GlueJobExecutionProperty) { this._executionProperty.internalValue = value; } public resetExecutionProperty() { this._executionProperty.internalValue = undefined; } // Temporarily expose input value. Use with caution. public get executionPropertyInput() { return this._executionProperty.internalValue; } // notification_property - computed: false, optional: true, required: false private _notificationProperty = new GlueJobNotificationPropertyOutputReference(this as any, "notification_property", true); public get notificationProperty() { return this._notificationProperty; } public putNotificationProperty(value: GlueJobNotificationProperty) { this._notificationProperty.internalValue = value; } public resetNotificationProperty() { this._notificationProperty.internalValue = undefined; } // Temporarily expose input value. Use with caution. public get notificationPropertyInput() { return this._notificationProperty.internalValue; } // ========= // SYNTHESIS // ========= protected synthesizeAttributes(): { [name: string]: any } { return { connections: cdktf.listMapper(cdktf.stringToTerraform)(this._connections), default_arguments: cdktf.hashMapper(cdktf.anyToTerraform)(this._defaultArguments), description: cdktf.stringToTerraform(this._description), glue_version: cdktf.stringToTerraform(this._glueVersion), max_capacity: cdktf.numberToTerraform(this._maxCapacity), max_retries: cdktf.numberToTerraform(this._maxRetries), name: cdktf.stringToTerraform(this._name), non_overridable_arguments: cdktf.hashMapper(cdktf.anyToTerraform)(this._nonOverridableArguments), number_of_workers: cdktf.numberToTerraform(this._numberOfWorkers), role_arn: cdktf.stringToTerraform(this._roleArn), security_configuration: cdktf.stringToTerraform(this._securityConfiguration), tags: cdktf.hashMapper(cdktf.anyToTerraform)(this._tags), tags_all: cdktf.hashMapper(cdktf.anyToTerraform)(this._tagsAll), timeout: cdktf.numberToTerraform(this._timeout), worker_type: cdktf.stringToTerraform(this._workerType), command: glueJobCommandToTerraform(this._command.internalValue), execution_property: glueJobExecutionPropertyToTerraform(this._executionProperty.internalValue), notification_property: glueJobNotificationPropertyToTerraform(this._notificationProperty.internalValue), }; } }