# EksSecretProperty

Specifies the configuration of a Kubernetes `secret` volume.

For more information, see [secret](https://docs.aws.amazon.com/https://kubernetes.io/docs/concepts/storage/volumes/#secret) in the *Kubernetes documentation* .

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```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 eksSecretProperty: batch.CfnJobDefinition.EksSecretProperty = {
  secretName: 'secretName',

  // the properties below are optional
  optional: false,
};
```

Python:

```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

eks_secret_property = batch.CfnJobDefinition.EksSecretProperty(
    secret_name="secretName",

    # the properties below are optional
    optional=False
)
```

Java:

```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.*;

EksSecretProperty eksSecretProperty = EksSecretProperty.builder()
        .secretName("secretName")

        // the properties below are optional
        .optional(false)
        .build();
```

C# / .NET:

```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 eksSecretProperty = new EksSecretProperty {
    SecretName = "secretName",

    // the properties below are optional
    Optional = false
};
```

Golang:

```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"

eksSecretProperty := &EksSecretProperty{
	SecretName: jsii.String("secretName"),

	// the properties below are optional
	Optional: jsii.Boolean(false),
}
```

## Properties

- `optional`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Specifies whether the secret or the secret's keys must be defined.

- `secretName`: string (required) — The name of the secret.

  The name must be allowed as a DNS subdomain name. For more information, see [DNS subdomain names](https://docs.aws.amazon.com/https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-subdomain-names) in the *Kubernetes documentation* .
