Class ServiceAccount.Builder
java.lang.Object
software.amazon.awscdk.services.eks.ServiceAccount.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ServiceAccount>
- Enclosing class:
ServiceAccount
@Stability(Stable)
public static final class ServiceAccount.Builder
extends Object
implements software.amazon.jsii.Builder<ServiceAccount>
A fluent builder for
ServiceAccount
.-
Method Summary
Modifier and TypeMethodDescriptionannotations
(Map<String, String> annotations) Additional annotations of the service account.build()
The cluster to apply the patch to.static ServiceAccount.Builder
Additional labels of the service account.The name of the service account.The namespace of the service account.
-
Method Details
-
create
@Stability(Stable) public static ServiceAccount.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- This parameter is required.id
- This parameter is required.- Returns:
- a new instance of
ServiceAccount.Builder
.
-
annotations
Additional annotations of the service account.Default: - no additional annotations
- Parameters:
annotations
- Additional annotations of the service account. This parameter is required.- Returns:
this
-
labels
Additional labels of the service account.Default: - no additional labels
- Parameters:
labels
- Additional labels of the service account. This parameter is required.- Returns:
this
-
name
The name of the service account.The name of a ServiceAccount object must be a valid DNS subdomain name. https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
Default: - If no name is given, it will use the id of the resource.
- Parameters:
name
- The name of the service account. This parameter is required.- Returns:
this
-
namespace
The namespace of the service account.All namespace names must be valid RFC 1123 DNS labels. https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/#namespaces-and-dns
Default: "default"
- Parameters:
namespace
- The namespace of the service account. This parameter is required.- Returns:
this
-
cluster
The cluster to apply the patch to.- Parameters:
cluster
- The cluster to apply the patch to. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<ServiceAccount>
- Returns:
- a newly built instance of
ServiceAccount
.
-