Partager via


Container Class

  • java.lang.Object
    • com.azure.resourcemanager.appservice.models.Container

Implements

public final class Container
implements JsonSerializable<Container>

Container App container definition.

Constructor Summary

Constructor Description
Container()

Creates an instance of Container class.

Method Summary

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

Get the args property: Container start command arguments.

List<String> command()

Get the command property: Container start command.

List<EnvironmentVar> env()

Get the env property: Container environment variables.

static Container fromJson(JsonReader jsonReader)

Reads an instance of Container from the JsonReader.

String image()

Get the image property: Container image tag.

String name()

Get the name property: Custom container name.

ContainerResources resources()

Get the resources property: Container resource requirements.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

Container withArgs(List<String> args)

Set the args property: Container start command arguments.

Container withCommand(List<String> command)

Set the command property: Container start command.

Container withEnv(List<EnvironmentVar> env)

Set the env property: Container environment variables.

Container withImage(String image)

Set the image property: Container image tag.

Container withName(String name)

Set the name property: Custom container name.

Container withResources(ContainerResources resources)

Set the resources property: Container resource requirements.

Methods inherited from java.lang.Object

Constructor Details

Container

public Container()

Creates an instance of Container class.

Method Details

args

public List args()

Get the args property: Container start command arguments.

Returns:

the args value.

command

public List command()

Get the command property: Container start command.

Returns:

the command value.

env

public List env()

Get the env property: Container environment variables.

Returns:

the env value.

fromJson

public static Container fromJson(JsonReader jsonReader)

Reads an instance of Container from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

image

public String image()

Get the image property: Container image tag.

Returns:

the image value.

name

public String name()

Get the name property: Custom container name.

Returns:

the name value.

resources

public ContainerResources resources()

Get the resources property: Container resource requirements.

Returns:

the resources value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withArgs

public Container withArgs(List args)

Set the args property: Container start command arguments.

Parameters:

args - the args value to set.

Returns:

the Container object itself.

withCommand

public Container withCommand(List command)

Set the command property: Container start command.

Parameters:

command - the command value to set.

Returns:

the Container object itself.

withEnv

public Container withEnv(List env)

Set the env property: Container environment variables.

Parameters:

env - the env value to set.

Returns:

the Container object itself.

withImage

public Container withImage(String image)

Set the image property: Container image tag.

Parameters:

image - the image value to set.

Returns:

the Container object itself.

withName

public Container withName(String name)

Set the name property: Custom container name.

Parameters:

name - the name value to set.

Returns:

the Container object itself.

withResources

public Container withResources(ContainerResources resources)

Set the resources property: Container resource requirements.

Parameters:

resources - the resources value to set.

Returns:

the Container object itself.

Applies to