public class Container extends Object
| Constructor and Description |
|---|
Container() |
| 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<EnvironmentVariable> |
environmentVariables()
Get the environmentVariables property: The environment variables to set in the container instance.
|
String |
image()
Get the image property: The name of the image used to create the container instance.
|
ContainerPropertiesInstanceView |
instanceView()
Get the instanceView property: The instance view of the container instance.
|
ContainerProbe |
livenessProbe()
Get the livenessProbe property: The liveness probe.
|
String |
name()
Get the name property: The user-provided name of the container instance.
|
List<ContainerPort> |
ports()
Get the ports property: The exposed ports on the container instance.
|
ContainerProbe |
readinessProbe()
Get the readinessProbe property: The readiness probe.
|
ResourceRequirements |
resources()
Get the resources property: The resource requirements of the container instance.
|
void |
validate()
Validates the instance.
|
List<VolumeMount> |
volumeMounts()
Get the volumeMounts property: The volume mounts available to the container instance.
|
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 environmentVariables property: The environment variables to set in the container instance.
|
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 livenessProbe property: The liveness probe.
|
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 readinessProbe property: The readiness probe.
|
Container |
withResources(ResourceRequirements resources)
Set the resources property: The resource requirements of the container instance.
|
Container |
withVolumeMounts(List<VolumeMount> volumeMounts)
Set the volumeMounts property: The volume mounts available to the container instance.
|
public String name()
public Container withName(String name)
name - the name value to set.public String image()
public Container withImage(String image)
image - the image value to set.public List<String> command()
public Container withCommand(List<String> command)
command - the command value to set.public List<ContainerPort> ports()
public Container withPorts(List<ContainerPort> ports)
ports - the ports value to set.public List<EnvironmentVariable> environmentVariables()
public Container withEnvironmentVariables(List<EnvironmentVariable> environmentVariables)
environmentVariables - the environmentVariables value to set.public ContainerPropertiesInstanceView instanceView()
public ResourceRequirements resources()
public Container withResources(ResourceRequirements resources)
resources - the resources value to set.public List<VolumeMount> volumeMounts()
public Container withVolumeMounts(List<VolumeMount> volumeMounts)
volumeMounts - the volumeMounts value to set.public ContainerProbe livenessProbe()
public Container withLivenessProbe(ContainerProbe livenessProbe)
livenessProbe - the livenessProbe value to set.public ContainerProbe readinessProbe()
public Container withReadinessProbe(ContainerProbe readinessProbe)
readinessProbe - the readinessProbe value to set.public void validate()
IllegalArgumentException - thrown if the instance is not valid.Copyright © 2021 Microsoft Corporation. All rights reserved.