Show / Hide Table of Contents

Class AssetCode

Represents a local file with source code used for an AppSync Function or Resolver.

Inheritance
object
Code
AssetCode
Inherited Members
Code.FromAsset(string, IAssetOptions)
Code.FromInline(string)
Namespace: Amazon.CDK.AWS.AppSync
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.AppSync;
            using Amazon.CDK.AWS.IAM;
            using Amazon.CDK.Interfaces.KMS;

            DockerImage dockerImage;
            IGrantable grantable;
            IKeyRef keyRef;
            ILocalBundling localBundling;

            var assetCode = new AssetCode("path", 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,
                DisplayName = "displayName",
                Exclude = new [] { "exclude" },
                FollowSymlinks = SymlinkFollowMode.NEVER,
                IgnoreMode = IgnoreMode.GLOB,
                Readers = new [] { grantable },
                SourceKMSKey = keyRef
            });

Synopsis

Constructors

AssetCode(string, IAssetOptions?)

Represents a local file with source code used for an AppSync Function or Resolver.

Properties

Path

The path to the asset file.

Methods

Bind(Construct)

Bind source code to an AppSync Function or resolver.

Constructors

AssetCode(string, IAssetOptions?)

Represents a local file with source code used for an AppSync Function or Resolver.

public AssetCode(string path, IAssetOptions? options = null)
Parameters
path string

The path to the asset file.

options IAssetOptions

The path to the asset file.

Remarks

ExampleMetadata: fixture=_generated

Properties

Path

The path to the asset file.

public virtual string Path { get; }
Property Value

string

Remarks

ExampleMetadata: fixture=_generated

Methods

Bind(Construct)

Bind source code to an AppSync Function or resolver.

public override ICodeConfig Bind(Construct scope)
Parameters
scope Construct
Returns

ICodeConfig

Overrides
Code.Bind(Construct)
Remarks

ExampleMetadata: fixture=_generated

Back to top Generated by DocFX