Class InitContainerPropertiesDefinition
java.lang.Object
com.azure.resourcemanager.containerinstance.fluent.models.InitContainerPropertiesDefinition
- All Implemented Interfaces:
com.azure.json.JsonSerializable<InitContainerPropertiesDefinition>
public final class InitContainerPropertiesDefinition
extends Object
implements com.azure.json.JsonSerializable<InitContainerPropertiesDefinition>
The init container definition properties.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of InitContainerPropertiesDefinition class. -
Method Summary
Modifier and TypeMethodDescriptioncommand()Get the command property: The command to execute within the init container in exec form.Get the environmentVariables property: The environment variables to set in the init container.fromJson(com.azure.json.JsonReader jsonReader) Reads an instance of InitContainerPropertiesDefinition from the JsonReader.image()Get the image property: The image of the init container.Get the instanceView property: The instance view of the init container.Get the securityContext property: The container security properties.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.Get the volumeMounts property: The volume mounts available to the init container.withCommand(List<String> command) Set the command property: The command to execute within the init container in exec form.withEnvironmentVariables(List<EnvironmentVariable> environmentVariables) Set the environmentVariables property: The environment variables to set in the init container.Set the image property: The image of the init container.withSecurityContext(SecurityContextDefinition securityContext) Set the securityContext property: The container security properties.withVolumeMounts(List<VolumeMount> volumeMounts) Set the volumeMounts property: The volume mounts available to the init container.Methods 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
-
InitContainerPropertiesDefinition
public InitContainerPropertiesDefinition()Creates an instance of InitContainerPropertiesDefinition class.
-
-
Method Details
-
image
Get the image property: The image of the init container.- Returns:
- the image value.
-
withImage
Set the image property: The image of the init container.- Parameters:
image- the image value to set.- Returns:
- the InitContainerPropertiesDefinition object itself.
-
command
Get the command property: The command to execute within the init container in exec form.- Returns:
- the command value.
-
withCommand
Set the command property: The command to execute within the init container in exec form.- Parameters:
command- the command value to set.- Returns:
- the InitContainerPropertiesDefinition object itself.
-
environmentVariables
Get the environmentVariables property: The environment variables to set in the init container.- Returns:
- the environmentVariables value.
-
withEnvironmentVariables
public InitContainerPropertiesDefinition withEnvironmentVariables(List<EnvironmentVariable> environmentVariables) Set the environmentVariables property: The environment variables to set in the init container.- Parameters:
environmentVariables- the environmentVariables value to set.- Returns:
- the InitContainerPropertiesDefinition object itself.
-
instanceView
Get the instanceView property: The instance view of the init container. Only valid in response.- Returns:
- the instanceView value.
-
volumeMounts
Get the volumeMounts property: The volume mounts available to the init container.- Returns:
- the volumeMounts value.
-
withVolumeMounts
Set the volumeMounts property: The volume mounts available to the init container.- Parameters:
volumeMounts- the volumeMounts value to set.- Returns:
- the InitContainerPropertiesDefinition object itself.
-
securityContext
Get the securityContext property: The container security properties.- Returns:
- the securityContext value.
-
withSecurityContext
public InitContainerPropertiesDefinition withSecurityContext(SecurityContextDefinition securityContext) Set the securityContext property: The container security properties.- Parameters:
securityContext- the securityContext value to set.- Returns:
- the InitContainerPropertiesDefinition object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<InitContainerPropertiesDefinition>- Throws:
IOException
-
fromJson
public static InitContainerPropertiesDefinition fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of InitContainerPropertiesDefinition from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of InitContainerPropertiesDefinition 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 InitContainerPropertiesDefinition.
-