Class HostVolume
Creates a Host volume.
Inherited Members
Namespace: Amazon.CDK.AWS.Batch
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class HostVolume : EcsVolume
Syntax (vb)
Public Class HostVolume
Inherits EcsVolume
Remarks
This volume will persist on the host at the specified hostPath
.
If the hostPath
is not specified, Docker will choose the host path. In this case,
the data may not persist after the containers that use it stop running.
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.AWS.Batch;
var hostVolume = new HostVolume(new HostVolumeOptions {
ContainerPath = "containerPath",
Name = "name",
// the properties below are optional
HostPath = "hostPath",
Readonly = false
});
Synopsis
Constructors
HostVolume(IHostVolumeOptions) | |
HostVolume(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
HostVolume(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
HostPath | The path on the host machine this container will have access to. |
Methods
IsHostVolume(Object) | returns |
Constructors
HostVolume(IHostVolumeOptions)
HostVolume(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected HostVolume(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
HostVolume(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected HostVolume(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
HostPath
The path on the host machine this container will have access to.
public virtual string HostPath { get; }
Property Value
System.String
Methods
IsHostVolume(Object)
returns true
if x
is a HostVolume
, false
otherwise.
public static bool IsHostVolume(object x)
Parameters
- x System.Object
Returns
System.Boolean