Class Container
java.lang.Object
com.azure.resourcemanager.containerinstance.models.Container
- All Implemented Interfaces:
com.azure.json.JsonSerializable<Container>
A container instance.
-
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 ContainerfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of Container 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.name()Get the name property: The user-provided name of the container instance.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.Set the name property: The user-provided name of the container instance.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
-
Container
public Container()Creates an instance of Container class.
-
-
Method Details
-
name
Get the name property: The user-provided name of the container instance.- Returns:
- the name value.
-
withName
Set the name property: The user-provided name of the container instance.- Parameters:
name- the name value to set.- Returns:
- the Container object itself.
-
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 Container 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 Container 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 Container 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 Container 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 Container 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 Container 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 Container 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 Container 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 Container 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<Container>- Throws:
IOException
-
fromJson
Reads an instance of Container from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of Container 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 Container.
-