Class InitContainer

java.lang.Object
com.azure.resourcemanager.appcontainers.models.BaseContainer
com.azure.resourcemanager.appcontainers.models.InitContainer

public final class InitContainer extends BaseContainer
Container App init container definition.
  • Constructor Details

    • InitContainer

      public InitContainer()
      Creates an instance of InitContainer class.
  • Method Details

    • withImage

      public InitContainer withImage(String image)
      Set the image property: Container image tag.
      Overrides:
      withImage in class BaseContainer
      Parameters:
      image - the image value to set.
      Returns:
      the BaseContainer object itself.
    • withName

      public InitContainer withName(String name)
      Set the name property: Custom container name.
      Overrides:
      withName in class BaseContainer
      Parameters:
      name - the name value to set.
      Returns:
      the BaseContainer object itself.
    • withCommand

      public InitContainer withCommand(List<String> command)
      Set the command property: Container start command.
      Overrides:
      withCommand in class BaseContainer
      Parameters:
      command - the command value to set.
      Returns:
      the BaseContainer object itself.
    • withArgs

      public InitContainer withArgs(List<String> args)
      Set the args property: Container start command arguments.
      Overrides:
      withArgs in class BaseContainer
      Parameters:
      args - the args value to set.
      Returns:
      the BaseContainer object itself.
    • withEnv

      public InitContainer withEnv(List<EnvironmentVar> env)
      Set the env property: Container environment variables.
      Overrides:
      withEnv in class BaseContainer
      Parameters:
      env - the env value to set.
      Returns:
      the BaseContainer object itself.
    • withResources

      public InitContainer withResources(ContainerResources resources)
      Set the resources property: Container resource requirements.
      Overrides:
      withResources in class BaseContainer
      Parameters:
      resources - the resources value to set.
      Returns:
      the BaseContainer object itself.
    • withVolumeMounts

      public InitContainer withVolumeMounts(List<VolumeMount> volumeMounts)
      Set the volumeMounts property: Container volume mounts.
      Overrides:
      withVolumeMounts in class BaseContainer
      Parameters:
      volumeMounts - the volumeMounts value to set.
      Returns:
      the BaseContainer object itself.
    • validate

      public void validate()
      Validates the instance.
      Overrides:
      validate in class BaseContainer
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.