Skip to content
v2.274.0

SecretPathVolume Class ​

Specifies the configuration of a Kubernetes secret volume.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_batch as batch } from 'aws-cdk-lib';
const secretPathVolume = new batch.SecretPathVolume({
  name: 'name',
  secretName: 'secretName',

  // the properties below are optional
  mountPath: 'mountPath',
  optional: false,
  readonly: false,
});
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_batch as batch

secret_path_volume = batch.SecretPathVolume(
    name="name",
    secret_name="secretName",

    # the properties below are optional
    mount_path="mountPath",
    optional=False,
    readonly=False
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.batch.*;

SecretPathVolume secretPathVolume = SecretPathVolume.Builder.create()
        .name("name")
        .secretName("secretName")

        // the properties below are optional
        .mountPath("mountPath")
        .optional(false)
        .readonly(false)
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// 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 secretPathVolume = new SecretPathVolume(new SecretPathVolumeOptions {
    Name = "name",
    SecretName = "secretName",

    // the properties below are optional
    MountPath = "mountPath",
    Optional = false,
    Readonly = false
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

secretPathVolume := awscdk.Aws_batch.NewSecretPathVolume(&SecretPathVolumeOptions{
	Name: jsii.String("name"),
	SecretName: jsii.String("secretName"),

	// the properties below are optional
	MountPath: jsii.String("mountPath"),
	Optional: jsii.Boolean(false),
	Readonly: jsii.Boolean(false),
})

Initializer ​

ts
new SecretPathVolume(options: SecretPathVolumeOptions)
python
SecretPathVolume(options: SecretPathVolumeOptions)
java
new SecretPathVolume(SecretPathVolumeOptions options)
csharp
new SecretPathVolume(SecretPathVolumeOptions options)
go
NewSecretPathVolume(Options SecretPathVolumeOptions)

Properties ​

containerPathstringcontainer_pathstrcontainerPathStringContainerPathstringContainerPath*string#
The path on the container where the container is mounted.

Default: the container is not mounted

namestringnamestrnameStringNamestringName*stringrequired#
The name of this volume.

The name must be a valid DNS subdomain name.

optionalbooleanoptionalbooloptionalBooleanOptionalboolOptional*bool= true#
Specifies whether the secret or the secret's keys must be defined.
readonlybooleanreadonlyboolreadonlyBooleanReadonlyboolReadonly*bool= false#
If specified, the container has readonly access to the volume.

Otherwise, the container has read/write access.

secretNamestringsecret_namestrsecretNameStringSecretNamestringSecretName*stringrequired#
The name of the secret.

Must be a valid DNS subdomain name.

Methods ​

emptyDir(options: EmptyDirVolumeOptions): EmptyDirVolume@staticmethod def empty_dir(options: EmptyDirVolumeOptions) -> EmptyDirVolumepublic static EmptyDirVolume emptyDir(EmptyDirVolumeOptions options)public static EmptyDirVolume EmptyDir(EmptyDirVolumeOptions options)func EmptyDir(Options EmptyDirVolumeOptions) EmptyDirVolumestatic#
Creates a Kubernetes EmptyDir volume.
hostPath(options: HostPathVolumeOptions): HostPathVolume@staticmethod def host_path(options: HostPathVolumeOptions) -> HostPathVolumepublic static HostPathVolume hostPath(HostPathVolumeOptions options)public static HostPathVolume HostPath(HostPathVolumeOptions options)func HostPath(Options HostPathVolumeOptions) HostPathVolumestatic#
Creates a Kubernetes HostPath volume.
isSecretPathVolume(x: any): boolean@staticmethod def is_secret_path_volume(x: Any) -> boolpublic static Boolean isSecretPathVolume(Object x)public static bool IsSecretPathVolume(object x)func IsSecretPathVolume(X interface{}) *boolstatic#
returns `true` if `x` is a `SecretPathVolume` and `false` otherwise.
secret(options: SecretPathVolumeOptions): SecretPathVolume // chainable@staticmethod def secret(options: SecretPathVolumeOptions) -> SecretPathVolumepublic static SecretPathVolume secret(SecretPathVolumeOptions options)public static SecretPathVolume Secret(SecretPathVolumeOptions options)func Secret(Options SecretPathVolumeOptions) SecretPathVolumestatic#
Creates a Kubernetes Secret volume.