Class ContainerProperties
java.lang.Object
com.azure.resourcemanager.containerinstance.fluent.models.ContainerProperties
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ContainerProperties>
public final class ContainerProperties
extends Object
implements com.azure.json.JsonSerializable<ContainerProperties>
The container instance properties.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncommand()Get the command property: The commands to execute within the container instance in exec form.Get the environmentVariables property: The environment variables to set in the container instance.static ContainerPropertiesfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ContainerProperties from the JsonReader.image()Get the image property: The name of the image used to create the container instance.Get the instanceView property: The instance view of the container instance.Get the livenessProbe property: The liveness probe.ports()Get the ports property: The exposed ports on the container instance.Get the readinessProbe property: The readiness probe.Get the resources property: The resource requirements of the container instance.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 container instance.withCommand(List<String> command) Set the command property: The commands to execute within the container instance in exec form.withEnvironmentVariables(List<EnvironmentVariable> environmentVariables) Set the environmentVariables property: The environment variables to set in the container instance.Set the image property: The name of the image used to create the container instance.withLivenessProbe(ContainerProbe livenessProbe) Set the livenessProbe property: The liveness probe.withPorts(List<ContainerPort> ports) Set the ports property: The exposed ports on the container instance.withReadinessProbe(ContainerProbe readinessProbe) Set the readinessProbe property: The readiness probe.withResources(ResourceRequirements resources) Set the resources property: The resource requirements of the container instance.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 container instance.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
-
ContainerProperties
public ContainerProperties()Creates an instance of ContainerProperties class.
-
-
Method Details
-
image
Get the image property: The name of the image used to create the container instance.- Returns:
- the image value.
-
withImage
Set the image property: The name of the image used to create the container instance.- Parameters:
image- the image value to set.- Returns:
- the ContainerProperties object itself.
-
command
Get the command property: The commands to execute within the container instance in exec form.- Returns:
- the command value.
-
withCommand
Set the command property: The commands to execute within the container instance in exec form.- Parameters:
command- the command value to set.- Returns:
- the ContainerProperties object itself.
-
ports
Get the ports property: The exposed ports on the container instance.- Returns:
- the ports value.
-
withPorts
Set the ports property: The exposed ports on the container instance.- Parameters:
ports- the ports value to set.- Returns:
- the ContainerProperties object itself.
-
environmentVariables
Get the environmentVariables property: The environment variables to set in the container instance.- Returns:
- the environmentVariables value.
-
withEnvironmentVariables
Set the environmentVariables property: The environment variables to set in the container instance.- Parameters:
environmentVariables- the environmentVariables value to set.- Returns:
- the ContainerProperties object itself.
-
instanceView
Get the instanceView property: The instance view of the container instance. Only valid in response.- Returns:
- the instanceView value.
-
resources
Get the resources property: The resource requirements of the container instance.- Returns:
- the resources value.
-
withResources
Set the resources property: The resource requirements of the container instance.- Parameters:
resources- the resources value to set.- Returns:
- the ContainerProperties object itself.
-
volumeMounts
Get the volumeMounts property: The volume mounts available to the container instance.- Returns:
- the volumeMounts value.
-
withVolumeMounts
Set the volumeMounts property: The volume mounts available to the container instance.- Parameters:
volumeMounts- the volumeMounts value to set.- Returns:
- the ContainerProperties object itself.
-
livenessProbe
Get the livenessProbe property: The liveness probe.- Returns:
- the livenessProbe value.
-
withLivenessProbe
Set the livenessProbe property: The liveness probe.- Parameters:
livenessProbe- the livenessProbe value to set.- Returns:
- the ContainerProperties object itself.
-
readinessProbe
Get the readinessProbe property: The readiness probe.- Returns:
- the readinessProbe value.
-
withReadinessProbe
Set the readinessProbe property: The readiness probe.- Parameters:
readinessProbe- the readinessProbe value to set.- Returns:
- the ContainerProperties object itself.
-
securityContext
Get the securityContext property: The container security properties.- Returns:
- the securityContext value.
-
withSecurityContext
Set the securityContext property: The container security properties.- Parameters:
securityContext- the securityContext value to set.- Returns:
- the ContainerProperties 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<ContainerProperties>- Throws:
IOException
-
fromJson
Reads an instance of ContainerProperties from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ContainerProperties if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the ContainerProperties.
-