Class PodSpec

  • All Implemented Interfaces:
    IPodSpec, software.amazon.jsii.JsiiSerializable
    Direct Known Subclasses:
    PodTemplate

    @Generated(value="jsii-pacmak/1.52.1 (build 5ccc8f6)",
               date="2022-02-08T00:13:45.277Z")
    @Stability(Stable)
    public class PodSpec
    extends software.amazon.jsii.JsiiObject
    implements IPodSpec
    Provides read/write capabilities ontop of a `PodSpecProps`.
    • Constructor Detail

      • PodSpec

        protected PodSpec​(software.amazon.jsii.JsiiObjectRef objRef)
      • PodSpec

        protected PodSpec​(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
      • PodSpec

        @Stability(Stable)
        public PodSpec​(@Nullable
                       PodSpecProps props)
        Parameters:
        props -
      • PodSpec

        @Stability(Stable)
        public PodSpec()
    • Method Detail

      • addContainer

        @Stability(Stable)
        @NotNull
        public Container addContainer​(@NotNull
                                      ContainerProps container)
        Add a container to the pod.

        Specified by:
        addContainer in interface IPodSpec
        Parameters:
        container - This parameter is required.
      • addVolume

        @Stability(Stable)
        public void addVolume​(@NotNull
                              Volume volume)
        Add a volume to the pod.

        Specified by:
        addVolume in interface IPodSpec
        Parameters:
        volume - This parameter is required.
      • getContainers

        @Stability(Stable)
        @NotNull
        public List<Container> getContainers()
        The containers belonging to the pod.

        Use addContainer to add containers.

        Specified by:
        getContainers in interface IPodSpec
      • getVolumes

        @Stability(Stable)
        @NotNull
        public List<Volume> getVolumes()
        The volumes associated with this pod.

        Use addVolume to add volumes.

        Specified by:
        getVolumes in interface IPodSpec
      • getRestartPolicy

        @Stability(Stable)
        @Nullable
        public RestartPolicy getRestartPolicy()
        Restart policy for all containers within the pod.
        Specified by:
        getRestartPolicy in interface IPodSpec