Class ServiceAccountOptions.Builder
java.lang.Object
software.amazon.awscdk.services.eks.ServiceAccountOptions.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ServiceAccountOptions>
- Enclosing interface:
ServiceAccountOptions
@Stability(Stable)
public static final class ServiceAccountOptions.Builder
extends Object
implements software.amazon.jsii.Builder<ServiceAccountOptions>
A builder for
ServiceAccountOptions-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionannotations(Map<String, String> annotations) Sets the value ofServiceAccountOptions.getAnnotations()build()Builds the configured instance.identityType(IdentityType identityType) Sets the value ofServiceAccountOptions.getIdentityType()Sets the value ofServiceAccountOptions.getLabels()Sets the value ofServiceAccountOptions.getName()Sets the value ofServiceAccountOptions.getNamespace()overwriteServiceAccount(Boolean overwriteServiceAccount) Sets the value ofServiceAccountOptions.getOverwriteServiceAccount()removalPolicy(RemovalPolicy removalPolicy) Sets the value ofServiceAccountOptions.getRemovalPolicy()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
annotations
Sets the value ofServiceAccountOptions.getAnnotations()- Parameters:
annotations- Additional annotations of the service account.- Returns:
this
-
identityType
Sets the value ofServiceAccountOptions.getIdentityType()- Parameters:
identityType- The identity type to use for the service account.- Returns:
this
-
labels
Sets the value ofServiceAccountOptions.getLabels()- Parameters:
labels- Additional labels of the service account.- Returns:
this
-
name
Sets the value ofServiceAccountOptions.getName()- Parameters:
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/- Returns:
this
-
namespace
Sets the value ofServiceAccountOptions.getNamespace()- Parameters:
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- Returns:
this
-
overwriteServiceAccount
@Stability(Stable) public ServiceAccountOptions.Builder overwriteServiceAccount(Boolean overwriteServiceAccount) Sets the value ofServiceAccountOptions.getOverwriteServiceAccount()- Parameters:
overwriteServiceAccount- Overwrite existing service account. If this is set, we will usekubectl applyinstead ofkubectl createwhen the service account is created. Otherwise, if there is already a service account in the cluster with the same name, the operation will fail.- Returns:
this
-
removalPolicy
Sets the value ofServiceAccountOptions.getRemovalPolicy()- Parameters:
removalPolicy- The removal policy applied to the service account resources. The removal policy controls what happens to the resources if they stop being managed by CloudFormation. This can happen in one of three situations:- The resource is removed from the template, so CloudFormation stops managing it
- A change to the resource is made that requires it to be replaced, so CloudFormation stops managing it
- The stack is deleted, so CloudFormation stops managing all resources in it
- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ServiceAccountOptions>- Returns:
- a new instance of
ServiceAccountOptions - Throws:
NullPointerException- if any required attribute was not provided
-