Class AssetCode
Canary code from an Asset.
Inherited Members
Namespace: Amazon.CDK.AWS.Synthetics
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class AssetCode : Code
Syntax (vb)
Public Class AssetCode
Inherits Code
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
using Amazon.CDK.AWS.IAM;
using Amazon.CDK.AWS.Synthetics;
DockerImage dockerImage;
IGrantable grantable;
ILocalBundling localBundling;
var assetCode = new AssetCode("assetPath", new AssetOptions {
AssetHash = "assetHash",
AssetHashType = AssetHashType.SOURCE,
Bundling = new BundlingOptions {
Image = dockerImage,
// the properties below are optional
BundlingFileAccess = BundlingFileAccess.VOLUME_COPY,
Command = new [] { "command" },
Entrypoint = new [] { "entrypoint" },
Environment = new Dictionary<string, string> {
{ "environmentKey", "environment" }
},
Local = localBundling,
Network = "network",
OutputType = BundlingOutput.ARCHIVED,
Platform = "platform",
SecurityOpt = "securityOpt",
User = "user",
Volumes = new [] { new DockerVolume {
ContainerPath = "containerPath",
HostPath = "hostPath",
// the properties below are optional
Consistency = DockerVolumeConsistency.CONSISTENT
} },
VolumesFrom = new [] { "volumesFrom" },
WorkingDirectory = "workingDirectory"
},
DeployTime = false,
Exclude = new [] { "exclude" },
FollowSymlinks = SymlinkFollowMode.NEVER,
IgnoreMode = IgnoreMode.GLOB,
Readers = new [] { grantable }
});
Synopsis
Constructors
AssetCode(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
AssetCode(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
AssetCode(String, IAssetOptions) |
Methods
Bind(Construct, String, RuntimeFamily) | Called when the canary is initialized to allow this object to bind to the stack, add resources and have fun. |
Constructors
AssetCode(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected AssetCode(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
AssetCode(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected AssetCode(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
AssetCode(String, IAssetOptions)
public AssetCode(string assetPath, IAssetOptions options = null)
Parameters
- assetPath System.String
The path to the asset file or directory.
- options IAssetOptions
The path to the asset file or directory.
Methods
Bind(Construct, String, RuntimeFamily)
Called when the canary is initialized to allow this object to bind to the stack, add resources and have fun.
public override ICodeConfig Bind(Construct scope, string handler, RuntimeFamily family)
Parameters
- scope Constructs.Construct
- handler System.String
- family RuntimeFamily
Returns