Class InitContainer
java.lang.Object
com.azure.resourcemanager.appcontainers.models.BaseContainer
com.azure.resourcemanager.appcontainers.models.InitContainer
- All Implemented Interfaces:
com.azure.json.JsonSerializable<BaseContainer>
Container App init container definition.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic InitContainerfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of InitContainer from the JsonReader.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.Set the args property: Container start command arguments.withCommand(List<String> command) Set the command property: Container start command.withEnv(List<EnvironmentVar> env) Set the env property: Container environment variables.Set the image property: Container image tag.Set the name property: Custom container name.withResources(ContainerResources resources) Set the resources property: Container resource requirements.withVolumeMounts(List<VolumeMount> volumeMounts) Set the volumeMounts property: Container volume mounts.Methods inherited from class com.azure.resourcemanager.appcontainers.models.BaseContainer
args, command, env, image, name, resources, volumeMountsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
InitContainer
public InitContainer()Creates an instance of InitContainer class.
-
-
Method Details
-
withImage
Set the image property: Container image tag.- Overrides:
withImagein classBaseContainer- Parameters:
image- the image value to set.- Returns:
- the BaseContainer object itself.
-
withName
Set the name property: Custom container name.- Overrides:
withNamein classBaseContainer- Parameters:
name- the name value to set.- Returns:
- the BaseContainer object itself.
-
withCommand
Set the command property: Container start command.- Overrides:
withCommandin classBaseContainer- Parameters:
command- the command value to set.- Returns:
- the BaseContainer object itself.
-
withArgs
Set the args property: Container start command arguments.- Overrides:
withArgsin classBaseContainer- Parameters:
args- the args value to set.- Returns:
- the BaseContainer object itself.
-
withEnv
Set the env property: Container environment variables.- Overrides:
withEnvin classBaseContainer- Parameters:
env- the env value to set.- Returns:
- the BaseContainer object itself.
-
withResources
Set the resources property: Container resource requirements.- Overrides:
withResourcesin classBaseContainer- Parameters:
resources- the resources value to set.- Returns:
- the BaseContainer object itself.
-
withVolumeMounts
Set the volumeMounts property: Container volume mounts.- Overrides:
withVolumeMountsin classBaseContainer- Parameters:
volumeMounts- the volumeMounts value to set.- Returns:
- the BaseContainer object itself.
-
validate
public void validate()Validates the instance.- Overrides:
validatein classBaseContainer- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<BaseContainer>- Overrides:
toJsonin classBaseContainer- Throws:
IOException
-
fromJson
Reads an instance of InitContainer from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of InitContainer if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IOException- If an error occurs while reading the InitContainer.
-