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

      @Stability(Stable) public ServiceAccount.Builder annotations(Map<String,String> 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

      @Stability(Stable) public ServiceAccount.Builder labels(Map<String,String> 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

      @Stability(Stable) public ServiceAccount.Builder name(String 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

      @Stability(Stable) public ServiceAccount.Builder namespace(String 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

      @Stability(Stable) public ServiceAccount.Builder cluster(ICluster cluster)
      The cluster to apply the patch to.

      Parameters:
      cluster - The cluster to apply the patch to. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public ServiceAccount build()
      Specified by:
      build in interface software.amazon.jsii.Builder<ServiceAccount>
      Returns:
      a newly built instance of ServiceAccount.