@aws-cdk_aws-batch-alpha.HostVolume
static is
class HostVolume
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Batch.Alpha.HostVolume |
![]() | github.com/aws/aws-cdk-go/awscdkbatchalpha/v2#HostVolume |
![]() | software.amazon.awscdk.services.batch.alpha.HostVolume |
![]() | aws_cdk.aws_batch_alpha.HostVolume |
![]() | @aws-cdk/aws-batch-alpha ยป HostVolume |
Extends
Ecs
Creates a Host volume.
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.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as batch_alpha from '@aws-cdk/aws-batch-alpha';
const hostVolume = new batch_alpha.HostVolume({
containerPath: 'containerPath',
name: 'name',
// the properties below are optional
hostPath: 'hostPath',
readonly: false,
});
Initializer
new HostVolume(options: HostVolumeOptions)
Parameters
- options
Host
Volume Options
Properties
Name | Type | Description |
---|---|---|
container | string | The path on the container that this volume will be mounted to. |
name | string | The name of this volume. |
host | string | The path on the host machine this container will have access to. |
readonly? | boolean | Whether or not the container has readonly access to this volume. |
containerPath
Type:
string
The path on the container that this volume will be mounted to.
name
Type:
string
The name of this volume.
hostPath?
Type:
string
(optional)
The path on the host machine this container will have access to.
readonly?
Type:
boolean
(optional, default: false)
Whether or not the container has readonly access to this volume.
Methods
Name | Description |
---|---|
static is | returns true if x is a HostVolume , false otherwise. |
HostVolume(x)
static ispublic static isHostVolume(x: any): boolean
Parameters
- x
any
Returns
boolean
returns true
if x
is a HostVolume
, false
otherwise.