class AssetCode
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Glue.AssetCode |
Java | software.amazon.awscdk.services.glue.AssetCode |
Python | aws_cdk.aws_glue.AssetCode |
TypeScript (source) | @aws-cdk/aws-glue » AssetCode |
Extends
Code
Job Code from a local file.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as assets from '@aws-cdk/assets';
import * as glue from '@aws-cdk/aws-glue';
import * as iam from '@aws-cdk/aws-iam';
import * as cdk from '@aws-cdk/core';
declare const dockerImage: cdk.DockerImage;
declare const grantable: iam.IGrantable;
declare const localBundling: cdk.ILocalBundling;
const assetCode = new glue.AssetCode('path', /* all optional props */ {
assetHash: 'assetHash',
assetHashType: cdk.AssetHashType.SOURCE,
bundling: {
image: dockerImage,
// the properties below are optional
command: ['command'],
entrypoint: ['entrypoint'],
environment: {
environmentKey: 'environment',
},
local: localBundling,
outputType: cdk.BundlingOutput.ARCHIVED,
securityOpt: 'securityOpt',
user: 'user',
volumes: [{
containerPath: 'containerPath',
hostPath: 'hostPath',
// the properties below are optional
consistency: cdk.DockerVolumeConsistency.CONSISTENT,
}],
workingDirectory: 'workingDirectory',
},
exclude: ['exclude'],
follow: assets.FollowMode.NEVER,
followSymlinks: cdk.SymlinkFollowMode.NEVER,
ignoreMode: cdk.IgnoreMode.GLOB,
readers: [grantable],
sourceHash: 'sourceHash',
});
Initializer
new AssetCode(path: string, options?: AssetOptions)
Parameters
- path
string
— The path to the Code file. - options
Asset
Options
Methods
Name | Description |
---|---|
bind(scope, grantable) | Called when the Job is initialized to allow this object to bind. |
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.