S3Code Class
Glue job Code from an S3 bucket.
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_glue as glue } from 'aws-cdk-lib';
import { aws_s3 as s3 } from 'aws-cdk-lib';
declare const bucket: s3.Bucket;
const s3Code = new glue.S3Code(bucket, 'key');
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_glue as glue
from aws_cdk import aws_s3 as s3
# bucket: s3.Bucket
s3_code = glue.S3Code(bucket, "key")
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.glue.*;
import software.amazon.awscdk.services.s3.*;
Bucket bucket;
S3Code s3Code = new S3Code(bucket, "key");
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
var bucket Bucket
s3Code := awscdk.Aws_glue.NewS3Code(bucket, jsii.String("key"))
Initializer
Methods
bind(_scope: Construct, grantable: IGrantable): CodeConfigdef bind(self, _scope: Construct, grantable: IGrantable) -> CodeConfigpublic CodeConfig bind(Construct _scope, IGrantable grantable)public CodeConfig Bind(Construct _scope, IGrantable grantable)func Bind(_scope Construct, Grantable IGrantable) CodeConfig#Called when the Job is initialized to allow this object to bind.
fromAsset(path: string, options?: AssetOptions): AssetCode@staticmethod def from_asset(path: str, options: typing.Optional[AssetOptions] = None) -> AssetCodepublic static AssetCode fromAsset(String path, AssetOptions options)public static AssetCode FromAsset(string path, AssetOptions? options = null)func FromAsset(Path *string, Options AssetOptions) AssetCodestatic#Job code from a local disk path.
1 parameter
Parameters
pathpathpathpathPath— code file (not a directory).
fromBucket(bucket: IBucket, key: string): S3Code // chainable@staticmethod def from_bucket(bucket: IBucket, key: str) -> S3Codepublic static S3Code fromBucket(IBucket bucket, String key)public static S3Code FromBucket(IBucket bucket, string key)func FromBucket(Bucket IBucket, Key *string) S3Codestatic#Job code as an S3 object.
2 parameters
Parameters
bucketbucketbucketbucketBucket— The S3 bucket.keykeykeykeyKey— The object key.