class Code
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Glue.Alpha.Code |
![]() | github.com/aws/aws-cdk-go/awscdkgluealpha/v2#Code |
![]() | software.amazon.awscdk.services.glue.alpha.Code |
![]() | aws_cdk.aws_glue_alpha.Code |
![]() | @aws-cdk/aws-glue-alpha ยป Code |
Implemented by
Asset
, S3
Represents a Glue Job's Code assets (an asset can be a scripts, a jar, a python file or any other file).
Example
import * as cdk from 'aws-cdk-lib';
import * as iam from 'aws-cdk-lib/aws-iam';
declare const stack: cdk.Stack;
declare const role: iam.IRole;
declare const script: glue.Code;
new glue.PySparkEtlJob(stack, 'PySparkETLJob', {
role,
script,
jobName: 'PySparkETLJob',
jobRunQueuingEnabled: true
});
Initializer
new Code()
Methods
Name | Description |
---|---|
bind(scope, grantable) | Called when the Job is initialized to allow this object to bind. |
static from | Job code from a local disk path. |
static from | Job code as an S3 object. |
bind(scope, grantable)
public bind(scope: Construct, grantable: IGrantable): CodeConfig
Parameters
- scope
Construct
- grantable
IGrantable
Returns
Called when the Job is initialized to allow this object to bind.
static fromAsset(path, options?)
public static fromAsset(path: string, options?: AssetOptions): AssetCode
Parameters
- path
string
โ code file (not a directory). - options
Asset
Options
Returns
Job code from a local disk path.
static fromBucket(bucket, key)
public static fromBucket(bucket: IBucket, key: string): S3Code
Parameters
- bucket
IBucket
โ The S3 bucket. - key
string
โ The object key.
Returns
Job code as an S3 object.