Class ServiceAccount.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ServiceAccount>
- Enclosing class:
ServiceAccount
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.BuilderidentityType(IdentityType identityType) The identity type to use for the service account.Additional labels of the service account.The name of the service account.The namespace of the service account.overwriteServiceAccount(Boolean overwriteServiceAccount) Overwrite existing service account.removalPolicy(RemovalPolicy removalPolicy) The removal policy applied to the service account resources.
-
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
-
identityType
The identity type to use for the service account.Default: IdentityType.IRSA
- Parameters:
identityType- The identity type to use for 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
-
overwriteServiceAccount
@Stability(Stable) public ServiceAccount.Builder overwriteServiceAccount(Boolean overwriteServiceAccount) Overwrite existing service account.If this is set, we will use
kubectl 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.Default: false
- Parameters:
overwriteServiceAccount- Overwrite existing service account. This parameter is required.- Returns:
this
-
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
Default: RemovalPolicy.DESTROY
- Parameters:
removalPolicy- The removal policy applied to the service account resources. 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:
buildin interfacesoftware.amazon.jsii.Builder<ServiceAccount>- Returns:
- a newly built instance of
ServiceAccount.
-