Class Code
(experimental) Represents a Glue Job's Code assets (an asset can be a scripts, a jar, a python file or any other file).
Namespace: Amazon.CDK.AWS.Glue.Alpha
Assembly: Amazon.CDK.AWS.Glue.Alpha.dll
Syntax (csharp)
public abstract class Code : DeputyBase
Syntax (vb)
Public MustInherit Class Code Inherits DeputyBase
Remarks
Stability: Experimental
ExampleMetadata: infused
Examples
using Amazon.CDK;
using Amazon.CDK.AWS.IAM;
Stack stack;
IRole role;
Code script;
// Disable both metrics for cost optimization
// Disable both metrics for cost optimization
new PySparkEtlJob(stack, "CostOptimizedJob", new PySparkEtlJobProps {
Role = role,
Script = script,
EnableMetrics = false,
EnableObservabilityMetrics = false
});
// Selective control - keep observability, disable profiling
// Selective control - keep observability, disable profiling
new PySparkEtlJob(stack, "SelectiveJob", new PySparkEtlJobProps {
Role = role,
Script = script,
EnableMetrics = false
});
Synopsis
Constructors
| Code() | (experimental) Represents a Glue Job's Code assets (an asset can be a scripts, a jar, a python file or any other file). |
Methods
| Bind(Construct, IGrantable) | (experimental) Called when the Job is initialized to allow this object to bind. |
| FromAsset(string, IAssetOptions?) | (experimental) Job code from a local disk path. |
| FromBucket(IBucket, string) | (experimental) Job code as an S3 object. |
Constructors
Code()
(experimental) Represents a Glue Job's Code assets (an asset can be a scripts, a jar, a python file or any other file).
protected Code()
Remarks
Stability: Experimental
Methods
Bind(Construct, IGrantable)
(experimental) Called when the Job is initialized to allow this object to bind.
public abstract ICodeConfig Bind(Construct scope, IGrantable grantable)
Parameters
- scope Construct
- grantable IGrantable
Returns
Remarks
Stability: Experimental
FromAsset(string, IAssetOptions?)
(experimental) Job code from a local disk path.
public static AssetCode FromAsset(string path, IAssetOptions? options = null)
Parameters
- path string
code file (not a directory).
- options IAssetOptions
code file (not a directory).
Returns
Remarks
Stability: Experimental