All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.cdk8s.plus31.k8s.KubeServiceAccount Maven / Gradle / Ivy

package org.cdk8s.plus31.k8s;

/**
 * ServiceAccount binds together: * a name, understood by users, and perhaps by peripheral systems, for an identity * a principal that can be authenticated and authorized * a set of secrets.
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.105.0 (build 0a2adcb)", date = "2024-11-15T12:15:25.075Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Jsii(module = org.cdk8s.plus31.$Module.class, fqn = "cdk8s-plus-31.k8s.KubeServiceAccount")
public class KubeServiceAccount extends org.cdk8s.ApiObject {

    protected KubeServiceAccount(final software.amazon.jsii.JsiiObjectRef objRef) {
        super(objRef);
    }

    protected KubeServiceAccount(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
        super(initializationMode);
    }

    static {
        GVK = software.amazon.jsii.JsiiObject.jsiiStaticGet(org.cdk8s.plus31.k8s.KubeServiceAccount.class, "GVK", software.amazon.jsii.NativeType.forClass(org.cdk8s.GroupVersionKind.class));
    }

    /**
     * Defines a "io.k8s.api.core.v1.ServiceAccount" API object.
     * 

* @param scope the scope in which to define this object. This parameter is required. * @param id a scope-local name for the object. This parameter is required. * @param props initialization props. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public KubeServiceAccount(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.Nullable org.cdk8s.plus31.k8s.KubeServiceAccountProps props) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), props }); } /** * Defines a "io.k8s.api.core.v1.ServiceAccount" API object. *

* @param scope the scope in which to define this object. This parameter is required. * @param id a scope-local name for the object. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public KubeServiceAccount(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required") }); } /** * Renders a Kubernetes manifest for "io.k8s.api.core.v1.ServiceAccount". *

* This can be used to inline resource manifests inside other objects (e.g. as templates). *

* @param props initialization props. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull java.lang.Object manifest(final @org.jetbrains.annotations.Nullable org.cdk8s.plus31.k8s.KubeServiceAccountProps props) { return software.amazon.jsii.JsiiObject.jsiiStaticCall(org.cdk8s.plus31.k8s.KubeServiceAccount.class, "manifest", software.amazon.jsii.NativeType.forClass(java.lang.Object.class), new Object[] { props }); } /** * Renders a Kubernetes manifest for "io.k8s.api.core.v1.ServiceAccount". *

* This can be used to inline resource manifests inside other objects (e.g. as templates). */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull java.lang.Object manifest() { return software.amazon.jsii.JsiiObject.jsiiStaticCall(org.cdk8s.plus31.k8s.KubeServiceAccount.class, "manifest", software.amazon.jsii.NativeType.forClass(java.lang.Object.class)); } /** * Renders the object to Kubernetes JSON. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public @org.jetbrains.annotations.NotNull java.lang.Object toJson() { return software.amazon.jsii.Kernel.call(this, "toJson", software.amazon.jsii.NativeType.forClass(java.lang.Object.class)); } /** * Returns the apiVersion and kind for "io.k8s.api.core.v1.ServiceAccount". */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public final static org.cdk8s.GroupVersionKind GVK; /** * A fluent builder for {@link org.cdk8s.plus31.k8s.KubeServiceAccount}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static final class Builder implements software.amazon.jsii.Builder { /** * @return a new instance of {@link Builder}. * @param scope the scope in which to define this object. This parameter is required. * @param id a scope-local name for the object. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static Builder create(final software.constructs.Construct scope, final java.lang.String id) { return new Builder(scope, id); } private final software.constructs.Construct scope; private final java.lang.String id; private org.cdk8s.plus31.k8s.KubeServiceAccountProps.Builder props; private Builder(final software.constructs.Construct scope, final java.lang.String id) { this.scope = scope; this.id = id; } /** * AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted. *

* Can be overridden at the pod level. *

* @return {@code this} * @param automountServiceAccountToken AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder automountServiceAccountToken(final java.lang.Boolean automountServiceAccountToken) { this.props().automountServiceAccountToken(automountServiceAccountToken); return this; } /** * ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images in pods that reference this ServiceAccount. *

* ImagePullSecrets are distinct from Secrets because Secrets can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet. More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod *

* @return {@code this} * @param imagePullSecrets ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images in pods that reference this ServiceAccount. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder imagePullSecrets(final java.util.List imagePullSecrets) { this.props().imagePullSecrets(imagePullSecrets); return this; } /** * Standard object's metadata. *

* More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *

* @return {@code this} * @param metadata Standard object's metadata. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder metadata(final org.cdk8s.plus31.k8s.ObjectMeta metadata) { this.props().metadata(metadata); return this; } /** * Secrets is a list of the secrets in the same namespace that pods running using this ServiceAccount are allowed to use. *

* Pods are only limited to this list if this service account has a "kubernetes.io/enforce-mountable-secrets" annotation set to "true". This field should not be used to find auto-generated service account token secrets for use outside of pods. Instead, tokens can be requested directly using the TokenRequest API, or service account token secrets can be manually created. More info: https://kubernetes.io/docs/concepts/configuration/secret *

* @return {@code this} * @param secrets Secrets is a list of the secrets in the same namespace that pods running using this ServiceAccount are allowed to use. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder secrets(final java.util.List secrets) { this.props().secrets(secrets); return this; } /** * @return a newly built instance of {@link org.cdk8s.plus31.k8s.KubeServiceAccount}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public org.cdk8s.plus31.k8s.KubeServiceAccount build() { return new org.cdk8s.plus31.k8s.KubeServiceAccount( this.scope, this.id, this.props != null ? this.props.build() : null ); } private org.cdk8s.plus31.k8s.KubeServiceAccountProps.Builder props() { if (this.props == null) { this.props = new org.cdk8s.plus31.k8s.KubeServiceAccountProps.Builder(); } return this.props; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy