Package org.cdk8s.plus20
Class ServiceAccount
- java.lang.Object
-
- software.amazon.jsii.JsiiObject
-
- software.constructs.Construct
-
- org.cdk8s.plus20.Resource
-
- org.cdk8s.plus20.ServiceAccount
-
- All Implemented Interfaces:
IResource,IServiceAccount,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct
@Generated(value="jsii-pacmak/1.57.0 (build f614666)", date="2022-04-26T09:02:10.552Z") @Stability(Stable) public class ServiceAccount extends Resource implements IServiceAccount
A service account provides an identity for processes that run in a Pod.When you (a human) access the cluster (for example, using kubectl), you are authenticated by the apiserver as a particular User Account (currently this is usually admin, unless your cluster administrator has customized your cluster). Processes in containers inside pods can also contact the apiserver. When they do, they are authenticated as a particular Service Account (for example, default).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classServiceAccount.BuilderA fluent builder forServiceAccount.-
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
-
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
-
Nested classes/interfaces inherited from interface org.cdk8s.plus20.IResource
IResource.Jsii$Default
-
Nested classes/interfaces inherited from interface org.cdk8s.plus20.IServiceAccount
IServiceAccount.Jsii$Default, IServiceAccount.Jsii$Proxy
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedServiceAccount(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)protectedServiceAccount(software.amazon.jsii.JsiiObjectRef objRef)ServiceAccount(software.constructs.Construct scope, String id)ServiceAccount(software.constructs.Construct scope, String id, ServiceAccountProps props)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSecret(ISecret secr)Allow a secret to be accessed by pods using this service account.static IServiceAccountfromServiceAccountName(String name)Imports a service account from the cluster as a reference.protected org.cdk8s.ApiObjectgetApiObject()The underlying cdk8s API object.List<ISecret>getSecrets()List of secrets allowed to be used by pods running using this service account.-
Methods inherited from class org.cdk8s.plus20.Resource
getMetadata, getName
-
Methods inherited from class software.constructs.Construct
onPrepare, onSynthesize, onValidate, toString
-
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
-
-
-
-
Constructor Detail
-
ServiceAccount
protected ServiceAccount(software.amazon.jsii.JsiiObjectRef objRef)
-
ServiceAccount
protected ServiceAccount(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
ServiceAccount
@Stability(Stable) public ServiceAccount(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable ServiceAccountProps props)- Parameters:
scope- This parameter is required.id- This parameter is required.props-
-
ServiceAccount
@Stability(Stable) public ServiceAccount(@NotNull software.constructs.Construct scope, @NotNull String id)- Parameters:
scope- This parameter is required.id- This parameter is required.
-
-
Method Detail
-
fromServiceAccountName
@Stability(Stable) @NotNull public static IServiceAccount fromServiceAccountName(@NotNull String name)
Imports a service account from the cluster as a reference.- Parameters:
name- The name of the service account resource. This parameter is required.
-
addSecret
@Stability(Stable) public void addSecret(@NotNull ISecret secr)Allow a secret to be accessed by pods using this service account.- Parameters:
secr- The secret. This parameter is required.
-
getApiObject
@Stability(Stable) @NotNull protected org.cdk8s.ApiObject getApiObject()
The underlying cdk8s API object.- Specified by:
getApiObjectin classResource- See Also:
base.Resource.apiObject
-
-