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 * as glue_alpha from '@aws-cdk/aws-glue-alpha';
import { aws_s3 as s3 } from 'aws-cdk-lib';
declare const bucket: s3.Bucket;
const s3Code = new glue_alpha.S3Code(bucket, 'key');
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_glue_alpha as glue_alpha
from aws_cdk import aws_s3 as s3
# bucket: s3.Bucket
s3_code = glue_alpha.S3Code(bucket, "key")
csharp
// Install: dotnet add package Amazon.CDK.AWS.Glue.Alpha
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Glue.Alpha;
using Amazon.CDK.AWS.S3;
Bucket bucket;
var s3Code = new S3Code(bucket, "key");
go
// Install: go get github.com/aws/aws-cdk-go/awscdkgluealpha/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import glue_alpha "github.com/aws/aws-cdk-go/awscdkgluealpha"
import "github.com/aws/aws-cdk-go/awscdk"
var bucket Bucket
s3Code := glue_alpha.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.