Container Class
- java.
lang. Object - com.
azure. resourcemanager. containerinstance. models. Container
- com.
Implements
public final class Container
implements JsonSerializable<Container>
A container instance.
Constructor Summary
Constructor | Description |
---|---|
Container() |
Creates an instance of Container class. |
Method Summary
Modifier and Type | Method and Description |
---|---|
List<String> |
command()
Get the command property: The commands to execute within the container instance in exec form. |
List<Environment |
environmentVariables()
Get the environment |
static Container |
fromJson(JsonReader jsonReader)
Reads an instance of Container from the Json |
String |
image()
Get the image property: The name of the image used to create the container instance. |
Container |
instanceView()
Get the instance |
Container |
livenessProbe()
Get the liveness |
String |
name()
Get the name property: The user-provided name of the container instance. |
List<Container |
ports()
Get the ports property: The exposed ports on the container instance. |
Container |
readinessProbe()
Get the readiness |
Resource |
resources()
Get the resources property: The resource requirements of the container instance. |
Security |
securityContext()
Get the security |
Json |
toJson(JsonWriter jsonWriter) |
void |
validate()
Validates the instance. |
List<Volume |
volumeMounts()
Get the volume |
Container |
withCommand(List<String> command)
Set the command property: The commands to execute within the container instance in exec form. |
Container |
withEnvironmentVariables(List<EnvironmentVariable> environmentVariables)
Set the environment |
Container |
withImage(String image)
Set the image property: The name of the image used to create the container instance. |
Container |
withLivenessProbe(ContainerProbe livenessProbe)
Set the liveness |
Container |
withName(String name)
Set the name property: The user-provided name of the container instance. |
Container |
withPorts(List<ContainerPort> ports)
Set the ports property: The exposed ports on the container instance. |
Container |
withReadinessProbe(ContainerProbe readinessProbe)
Set the readiness |
Container |
withResources(ResourceRequirements resources)
Set the resources property: The resource requirements of the container instance. |
Container |
withSecurityContext(SecurityContextDefinition securityContext)
Set the security |
Container |
withVolumeMounts(List<VolumeMount> volumeMounts)
Set the volume |
Methods inherited from java.lang.Object
Constructor Details
Container
public Container()
Creates an instance of Container class.
Method Details
command
public List
Get the command property: The commands to execute within the container instance in exec form.
Returns:
environmentVariables
public List
Get the environmentVariables property: The environment variables to set in the container instance.
Returns:
fromJson
public static Container fromJson(JsonReader jsonReader)
Reads an instance of Container from the JsonReader.
Parameters:
Returns:
Throws:
image
public String image()
Get the image property: The name of the image used to create the container instance.
Returns:
instanceView
public ContainerPropertiesInstanceView instanceView()
Get the instanceView property: The instance view of the container instance. Only valid in response.
Returns:
livenessProbe
public ContainerProbe livenessProbe()
Get the livenessProbe property: The liveness probe.
Returns:
name
public String name()
Get the name property: The user-provided name of the container instance.
Returns:
ports
public List
Get the ports property: The exposed ports on the container instance.
Returns:
readinessProbe
public ContainerProbe readinessProbe()
Get the readinessProbe property: The readiness probe.
Returns:
resources
public ResourceRequirements resources()
Get the resources property: The resource requirements of the container instance.
Returns:
securityContext
public SecurityContextDefinition securityContext()
Get the securityContext property: The container security properties.
Returns:
toJson
validate
public void validate()
Validates the instance.
volumeMounts
public List
Get the volumeMounts property: The volume mounts available to the container instance.
Returns:
withCommand
public Container withCommand(List
Set the command property: The commands to execute within the container instance in exec form.
Parameters:
Returns:
withEnvironmentVariables
public Container withEnvironmentVariables(List
Set the environmentVariables property: The environment variables to set in the container instance.
Parameters:
Returns:
withImage
public Container withImage(String image)
Set the image property: The name of the image used to create the container instance.
Parameters:
Returns:
withLivenessProbe
public Container withLivenessProbe(ContainerProbe livenessProbe)
Set the livenessProbe property: The liveness probe.
Parameters:
Returns:
withName
public Container withName(String name)
Set the name property: The user-provided name of the container instance.
Parameters:
Returns:
withPorts
public Container withPorts(List
Set the ports property: The exposed ports on the container instance.
Parameters:
Returns:
withReadinessProbe
public Container withReadinessProbe(ContainerProbe readinessProbe)
Set the readinessProbe property: The readiness probe.
Parameters:
Returns:
withResources
public Container withResources(ResourceRequirements resources)
Set the resources property: The resource requirements of the container instance.
Parameters:
Returns:
withSecurityContext
public Container withSecurityContext(SecurityContextDefinition securityContext)
Set the securityContext property: The container security properties.
Parameters:
Returns:
withVolumeMounts
public Container withVolumeMounts(List
Set the volumeMounts property: The volume mounts available to the container instance.
Parameters:
Returns:
Applies to
Azure SDK for Java