Class Container
java.lang.Object
com.azure.resourcemanager.appcontainers.models.BaseContainer
com.azure.resourcemanager.appcontainers.models.Container
- All Implemented Interfaces:
com.azure.json.JsonSerializable<BaseContainer>
Container App container definition.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ContainerfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of Container from the JsonReader.probes()Get the probes property: List of probes for the container.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.withProbes(List<ContainerAppProbe> probes) Set the probes property: List of probes for the container.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
-
Container
public Container()Creates an instance of Container class.
-
-
Method Details
-
probes
Get the probes property: List of probes for the container.- Returns:
- the probes value.
-
withProbes
Set the probes property: List of probes for the container.- Parameters:
probes- the probes value to set.- Returns:
- the Container object itself.
-
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 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:
IOException- If an error occurs while reading the Container.
-