Partager via


ResourceConfig Class

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

Implements

public final class ResourceConfig
implements JsonSerializable<ResourceConfig>

Function app resource requirements.

Constructor Summary

Constructor Description
ResourceConfig()

Creates an instance of ResourceConfig class.

Method Summary

Modifier and Type Method and Description
Double cpu()

Get the cpu property: Required CPU in cores, e.g.

static ResourceConfig fromJson(JsonReader jsonReader)

Reads an instance of ResourceConfig from the JsonReader.

String memory()

Get the memory property: Required memory, e.g.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

ResourceConfig withCpu(Double cpu)

Set the cpu property: Required CPU in cores, e.g.

ResourceConfig withMemory(String memory)

Set the memory property: Required memory, e.g.

Methods inherited from java.lang.Object

Constructor Details

ResourceConfig

public ResourceConfig()

Creates an instance of ResourceConfig class.

Method Details

cpu

public Double cpu()

Get the cpu property: Required CPU in cores, e.g. 0.5.

Returns:

the cpu value.

fromJson

public static ResourceConfig fromJson(JsonReader jsonReader)

Reads an instance of ResourceConfig from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

memory

public String memory()

Get the memory property: Required memory, e.g. "1Gi".

Returns:

the memory value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withCpu

public ResourceConfig withCpu(Double cpu)

Set the cpu property: Required CPU in cores, e.g. 0.5.

Parameters:

cpu - the cpu value to set.

Returns:

the ResourceConfig object itself.

withMemory

public ResourceConfig withMemory(String memory)

Set the memory property: Required memory, e.g. "1Gi".

Parameters:

memory - the memory value to set.

Returns:

the ResourceConfig object itself.

Applies to