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:
IApiEndpoint,IApiResource,IResource,IServiceAccount,ISubject,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.59.0 (build eb02c92)", date="2022-05-18T23:19:48.660Z") @Stability(Stable) public class ServiceAccount extends Resource implements IServiceAccount, ISubject
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 org.cdk8s.plus20.IApiEndpoint
IApiEndpoint.Jsii$Default
-
Nested classes/interfaces inherited from interface org.cdk8s.plus20.IApiResource
IApiResource.Jsii$Default
-
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
-
Nested classes/interfaces inherited from interface org.cdk8s.plus20.ISubject
ISubject.Jsii$Default, ISubject.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.BooleangetAutomountToken()Whether or not a token is automatically mounted for this service account.StringgetResourceType()The name of a resource type as it appears in the relevant API endpoint.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
asApiResource, asNonApiResource, getApiGroup, getApiVersion, getKind, getMetadata, getName, getResourceName
-
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.cdk8s.plus20.IResource
getApiGroup, getApiVersion, getKind, getName
-
Methods inherited from interface org.cdk8s.plus20.ISubject
getApiGroup, getKind, getName, getNamespace
-
-
-
-
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
-
getAutomountToken
@Stability(Stable) @NotNull public Boolean getAutomountToken()
Whether or not a token is automatically mounted for this service account.
-
getResourceType
@Stability(Stable) @NotNull public String getResourceType()
The name of a resource type as it appears in the relevant API endpoint.- Specified by:
getResourceTypein interfaceIApiResource- Specified by:
getResourceTypein classResource
-
-