InitContainerPropertiesDefinition Class

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

Implements

public final class InitContainerPropertiesDefinition
implements JsonSerializable<InitContainerPropertiesDefinition>

The init container definition properties.

Constructor Summary

Constructor Description
InitContainerPropertiesDefinition()

Creates an instance of InitContainerPropertiesDefinition 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 InitContainerPropertiesDefinition fromJson(JsonReader jsonReader)

Reads an instance of InitContainerPropertiesDefinition 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.

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.

InitContainerPropertiesDefinition withCommand(List<String> command)

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

InitContainerPropertiesDefinition withEnvironmentVariables(List<EnvironmentVariable> environmentVariables)

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

InitContainerPropertiesDefinition withImage(String image)

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

InitContainerPropertiesDefinition withSecurityContext(SecurityContextDefinition securityContext)

Set the securityContext property: The container security properties.

InitContainerPropertiesDefinition withVolumeMounts(List<VolumeMount> volumeMounts)

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

Methods inherited from java.lang.Object

Constructor Details

InitContainerPropertiesDefinition

public InitContainerPropertiesDefinition()

Creates an instance of InitContainerPropertiesDefinition class.

Method Details

command

public List<String> command()

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

Returns:

the command value.

environmentVariables

public List<EnvironmentVariable> environmentVariables()

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

Returns:

the environmentVariables value.

fromJson

public static InitContainerPropertiesDefinition fromJson(JsonReader jsonReader)

Reads an instance of InitContainerPropertiesDefinition from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of InitContainerPropertiesDefinition 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 InitContainerPropertiesDefinition.

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.

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

Returns:

the volumeMounts value.

withCommand

public InitContainerPropertiesDefinition withCommand(List<String> 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 InitContainerPropertiesDefinition object itself.

withEnvironmentVariables

public InitContainerPropertiesDefinition withEnvironmentVariables(List<EnvironmentVariable> environmentVariables)

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

Parameters:

environmentVariables - the environmentVariables value to set.

Returns:

the InitContainerPropertiesDefinition object itself.

withImage

public InitContainerPropertiesDefinition withImage(String image)

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

Parameters:

image - the image value to set.

Returns:

the InitContainerPropertiesDefinition object itself.

withSecurityContext

public InitContainerPropertiesDefinition withSecurityContext(SecurityContextDefinition securityContext)

Set the securityContext property: The container security properties.

Parameters:

securityContext - the securityContext value to set.

Returns:

the InitContainerPropertiesDefinition object itself.

withVolumeMounts

public InitContainerPropertiesDefinition withVolumeMounts(List<VolumeMount> volumeMounts)

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

Parameters:

volumeMounts - the volumeMounts value to set.

Returns:

the InitContainerPropertiesDefinition object itself.

Applies to