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 Container
fromJson
(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.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
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, volumeMounts
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
withImage
in classBaseContainer
- Parameters:
image
- the image value to set.- Returns:
- the BaseContainer object itself.
-
withName
Set the name property: Custom container name.- Overrides:
withName
in classBaseContainer
- Parameters:
name
- the name value to set.- Returns:
- the BaseContainer object itself.
-
withCommand
Set the command property: Container start command.- Overrides:
withCommand
in classBaseContainer
- Parameters:
command
- the command value to set.- Returns:
- the BaseContainer object itself.
-
withArgs
Set the args property: Container start command arguments.- Overrides:
withArgs
in classBaseContainer
- Parameters:
args
- the args value to set.- Returns:
- the BaseContainer object itself.
-
withEnv
Set the env property: Container environment variables.- Overrides:
withEnv
in classBaseContainer
- Parameters:
env
- the env value to set.- Returns:
- the BaseContainer object itself.
-
withResources
Set the resources property: Container resource requirements.- Overrides:
withResources
in classBaseContainer
- Parameters:
resources
- the resources value to set.- Returns:
- the BaseContainer object itself.
-
withVolumeMounts
Set the volumeMounts property: Container volume mounts.- Overrides:
withVolumeMounts
in classBaseContainer
- Parameters:
volumeMounts
- the volumeMounts value to set.- Returns:
- the BaseContainer object itself.
-
validate
public void validate()Validates the instance.- Overrides:
validate
in classBaseContainer
- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<BaseContainer>
- Overrides:
toJson
in 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.
-