Class AssetApiDefinition
OpenAPI specification from a local file.
Inherited Members
Namespace: Amazon.CDK.AWS.APIGateway
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class AssetApiDefinition : ApiDefinition
Syntax (vb)
Public Class AssetApiDefinition
Inherits ApiDefinition
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.APIGateway;
using Amazon.CDK.AWS.IAM;
DockerImage dockerImage;
IGrantable grantable;
ILocalBundling localBundling;
var assetApiDefinition = new AssetApiDefinition("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,
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"
},
Exclude = new [] { "exclude" },
FollowSymlinks = SymlinkFollowMode.NEVER,
IgnoreMode = IgnoreMode.GLOB,
Readers = new [] { grantable }
});
Synopsis
Constructors
AssetApiDefinition(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
AssetApiDefinition(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
AssetApiDefinition(String, IAssetOptions) |
Methods
Bind(Construct) | Called when the specification is initialized to allow this object to bind to the stack, add resources and have fun. |
BindAfterCreate(Construct, IRestApi) | Called after the CFN RestApi resource has been created to allow the Api Definition to bind to it. |
Constructors
AssetApiDefinition(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected AssetApiDefinition(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
AssetApiDefinition(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected AssetApiDefinition(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
AssetApiDefinition(String, IAssetOptions)
public AssetApiDefinition(string path, IAssetOptions options = null)
Parameters
- path System.String
- options IAssetOptions
Methods
Bind(Construct)
Called when the specification is initialized to allow this object to bind to the stack, add resources and have fun.
public override IApiDefinitionConfig Bind(Construct scope)
Parameters
- scope Constructs.Construct
Returns
Overrides
BindAfterCreate(Construct, IRestApi)
Called after the CFN RestApi resource has been created to allow the Api Definition to bind to it.
public override void BindAfterCreate(Construct scope, IRestApi restApi)
Parameters
- scope Constructs.Construct
- restApi IRestApi
Overrides
Remarks
Specifically it's required to allow assets to add metadata for tooling like SAM CLI to be able to find their origins.