InitContainerDefinition Class

  • java.lang.Object
    • com.azure.resourcemanager.containerinstance.models.InitContainerDefinition

Implements

public final class InitContainerDefinition
implements JsonSerializable<InitContainerDefinition>

The init container definition.

Constructor Summary

Constructor Description
InitContainerDefinition()

Creates an instance of InitContainerDefinition class.

Method Summary

Modifier and Type Method and Description
List<String> command()

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

List<EnvironmentVariable> environmentVariables()

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

static InitContainerDefinition fromJson(JsonReader jsonReader)

Reads an instance of InitContainerDefinition from the JsonReader.

String image()

Get the image property: The image of the init container.

InitContainerPropertiesDefinitionInstanceView instanceView()

Get the instanceView property: The instance view of the init container.

String name()

Get the name property: The name for the init container.

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 init container.

InitContainerDefinition withCommand(List<String> command)

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

InitContainerDefinition withEnvironmentVariables(List<EnvironmentVariable> environmentVariables)

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

InitContainerDefinition withImage(String image)

Set the image property: The image of the init container.

InitContainerDefinition withName(String name)

Set the name property: The name for the init container.

InitContainerDefinition withSecurityContext(SecurityContextDefinition securityContext)

Set the securityContext property: The container security properties.

InitContainerDefinition withVolumeMounts(List<VolumeMount> volumeMounts)

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

Methods inherited from java.lang.Object

Constructor Details

InitContainerDefinition

public InitContainerDefinition()

Creates an instance of InitContainerDefinition class.

Method Details

command

public List command()

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

Returns:

the command value.

environmentVariables

public List environmentVariables()

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

Returns:

the environmentVariables value.

fromJson

public static InitContainerDefinition fromJson(JsonReader jsonReader)

Reads an instance of InitContainerDefinition from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of InitContainerDefinition 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 image of the init container.

Returns:

the image value.

instanceView

public InitContainerPropertiesDefinitionInstanceView instanceView()

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

Returns:

the instanceView value.

name

public String name()

Get the name property: The name for the init container.

Returns:

the name 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 volumeMounts()

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

Returns:

the volumeMounts value.

withCommand

public InitContainerDefinition withCommand(List command)

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

Parameters:

command - the command value to set.

Returns:

the InitContainerDefinition object itself.

withEnvironmentVariables

public InitContainerDefinition withEnvironmentVariables(List environmentVariables)

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

Parameters:

environmentVariables - the environmentVariables value to set.

Returns:

the InitContainerDefinition object itself.

withImage

public InitContainerDefinition withImage(String image)

Set the image property: The image of the init container.

Parameters:

image - the image value to set.

Returns:

the InitContainerDefinition object itself.

withName

public InitContainerDefinition withName(String name)

Set the name property: The name for the init container.

Parameters:

name - the name value to set.

Returns:

the InitContainerDefinition object itself.

withSecurityContext

public InitContainerDefinition withSecurityContext(SecurityContextDefinition securityContext)

Set the securityContext property: The container security properties.

Parameters:

securityContext - the securityContext value to set.

Returns:

the InitContainerDefinition object itself.

withVolumeMounts

public InitContainerDefinition withVolumeMounts(List volumeMounts)

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

Parameters:

volumeMounts - the volumeMounts value to set.

Returns:

the InitContainerDefinition object itself.

Applies to