ContainerProperties Class

  • java.lang.Object
    • com.azure.resourcemanager.containerinstance.fluent.models.ContainerProperties

Implements

public final class ContainerProperties
implements JsonSerializable<ContainerProperties>

The container instance properties.

Constructor Summary

Constructor Description
ContainerProperties()

Creates an instance of ContainerProperties 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<EnvironmentVariable> environmentVariables()

Get the environmentVariables property: The environment variables to set in the container instance.

static ContainerProperties fromJson(JsonReader jsonReader)

Reads an instance of ContainerProperties from the JsonReader.

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.

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.

SecurityContextDefinition securityContext()

Get the securityContext property: The container security properties.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

List<VolumeMount> volumeMounts()

Get the volumeMounts property: The volume mounts available to the container instance.

ContainerProperties withCommand(List<String> command)

Set the command property: The commands to execute within the container instance in exec form.

ContainerProperties withEnvironmentVariables(List<EnvironmentVariable> environmentVariables)

Set the environmentVariables property: The environment variables to set in the container instance.

ContainerProperties withImage(String image)

Set the image property: The name of the image used to create the container instance.

ContainerProperties withLivenessProbe(ContainerProbe livenessProbe)

Set the livenessProbe property: The liveness probe.

ContainerProperties withPorts(List<ContainerPort> ports)

Set the ports property: The exposed ports on the container instance.

ContainerProperties withReadinessProbe(ContainerProbe readinessProbe)

Set the readinessProbe property: The readiness probe.

ContainerProperties withResources(ResourceRequirements resources)

Set the resources property: The resource requirements of the container instance.

ContainerProperties withSecurityContext(SecurityContextDefinition securityContext)

Set the securityContext property: The container security properties.

ContainerProperties withVolumeMounts(List<VolumeMount> volumeMounts)

Set the volumeMounts property: The volume mounts available to the container instance.

Methods inherited from java.lang.Object

Constructor Details

ContainerProperties

public ContainerProperties()

Creates an instance of ContainerProperties class.

Method Details

command

public List<String> command()

Get the command property: The commands to execute within the container instance in exec form.

Returns:

the command value.

environmentVariables

public List<EnvironmentVariable> environmentVariables()

Get the environmentVariables property: The environment variables to set in the container instance.

Returns:

the environmentVariables value.

fromJson

public static ContainerProperties fromJson(JsonReader jsonReader)

Reads an instance of ContainerProperties from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of ContainerProperties if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

image

public String image()

Get the image property: The name of the image used to create the container instance.

Returns:

the image value.

instanceView

public ContainerPropertiesInstanceView instanceView()

Get the instanceView property: The instance view of the container instance. Only valid in response.

Returns:

the instanceView value.

livenessProbe

public ContainerProbe livenessProbe()

Get the livenessProbe property: The liveness probe.

Returns:

the livenessProbe value.

ports

public List<ContainerPort> ports()

Get the ports property: The exposed ports on the container instance.

Returns:

the ports value.

readinessProbe

public ContainerProbe readinessProbe()

Get the readinessProbe property: The readiness probe.

Returns:

the readinessProbe value.

resources

public ResourceRequirements resources()

Get the resources property: The resource requirements of the container instance.

Returns:

the resources value.

securityContext

public SecurityContextDefinition securityContext()

Get the securityContext property: The container security properties.

Returns:

the securityContext value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

volumeMounts

public List<VolumeMount> volumeMounts()

Get the volumeMounts property: The volume mounts available to the container instance.

Returns:

the volumeMounts value.

withCommand

public ContainerProperties withCommand(List<String> command)

Set the command property: The commands to execute within the container instance in exec form.

Parameters:

command - the command value to set.

Returns:

the ContainerProperties object itself.

withEnvironmentVariables

public ContainerProperties withEnvironmentVariables(List<EnvironmentVariable> environmentVariables)

Set the environmentVariables property: The environment variables to set in the container instance.

Parameters:

environmentVariables - the environmentVariables value to set.

Returns:

the ContainerProperties object itself.

withImage

public ContainerProperties withImage(String image)

Set the image property: The name of the image used to create the container instance.

Parameters:

image - the image value to set.

Returns:

the ContainerProperties object itself.

withLivenessProbe

public ContainerProperties withLivenessProbe(ContainerProbe livenessProbe)

Set the livenessProbe property: The liveness probe.

Parameters:

livenessProbe - the livenessProbe value to set.

Returns:

the ContainerProperties object itself.

withPorts

public ContainerProperties withPorts(List<ContainerPort> ports)

Set the ports property: The exposed ports on the container instance.

Parameters:

ports - the ports value to set.

Returns:

the ContainerProperties object itself.

withReadinessProbe

public ContainerProperties withReadinessProbe(ContainerProbe readinessProbe)

Set the readinessProbe property: The readiness probe.

Parameters:

readinessProbe - the readinessProbe value to set.

Returns:

the ContainerProperties object itself.

withResources

public ContainerProperties withResources(ResourceRequirements resources)

Set the resources property: The resource requirements of the container instance.

Parameters:

resources - the resources value to set.

Returns:

the ContainerProperties object itself.

withSecurityContext

public ContainerProperties withSecurityContext(SecurityContextDefinition securityContext)

Set the securityContext property: The container security properties.

Parameters:

securityContext - the securityContext value to set.

Returns:

the ContainerProperties object itself.

withVolumeMounts

public ContainerProperties withVolumeMounts(List<VolumeMount> volumeMounts)

Set the volumeMounts property: The volume mounts available to the container instance.

Parameters:

volumeMounts - the volumeMounts value to set.

Returns:

the ContainerProperties object itself.

Applies to