StaticWebsite Class

  • java.lang.Object
    • com.azure.resourcemanager.storage.models.StaticWebsite

Implements

public final class StaticWebsite
implements JsonSerializable<StaticWebsite>

The static website properties for blob storage.

Constructor Summary

Constructor Description
StaticWebsite()

Creates an instance of StaticWebsite class.

Method Summary

Modifier and Type Method and Description
String defaultIndexDocumentPath()

Get the defaultIndexDocumentPath property: The absolute path where the default index file is present.

boolean enabled()

Get the enabled property: Indicates whether static website support is enabled for the specified account.

String errorDocument404Path()

Get the errorDocument404Path property: The absolute path to a webpage that Azure Storage serves for requests that don't correspond to an existing file.

static StaticWebsite fromJson(JsonReader jsonReader)

Reads an instance of StaticWebsite from the JsonReader.

String indexDocument()

Get the indexDocument property: The webpage that Azure Storage serves for requests to the root of a website or any subfolder (for example, index.html).

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

StaticWebsite withDefaultIndexDocumentPath(String defaultIndexDocumentPath)

Set the defaultIndexDocumentPath property: The absolute path where the default index file is present.

StaticWebsite withEnabled(boolean enabled)

Set the enabled property: Indicates whether static website support is enabled for the specified account.

StaticWebsite withErrorDocument404Path(String errorDocument404Path)

Set the errorDocument404Path property: The absolute path to a webpage that Azure Storage serves for requests that don't correspond to an existing file.

StaticWebsite withIndexDocument(String indexDocument)

Set the indexDocument property: The webpage that Azure Storage serves for requests to the root of a website or any subfolder (for example, index.html).

Methods inherited from java.lang.Object

Constructor Details

StaticWebsite

public StaticWebsite()

Creates an instance of StaticWebsite class.

Method Details

defaultIndexDocumentPath

public String defaultIndexDocumentPath()

Get the defaultIndexDocumentPath property: The absolute path where the default index file is present. This absolute path is mutually exclusive to "indexDocument" and it is case-sensitive.

Returns:

the defaultIndexDocumentPath value.

enabled

public boolean enabled()

Get the enabled property: Indicates whether static website support is enabled for the specified account.

Returns:

the enabled value.

errorDocument404Path

public String errorDocument404Path()

Get the errorDocument404Path property: The absolute path to a webpage that Azure Storage serves for requests that don't correspond to an existing file. The contents of the page are returned with HTTP 404 Not Found. Only a single custom 404 page is supported in each static website.

Returns:

the errorDocument404Path value.

fromJson

public static StaticWebsite fromJson(JsonReader jsonReader)

Reads an instance of StaticWebsite from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

indexDocument

public String indexDocument()

Get the indexDocument property: The webpage that Azure Storage serves for requests to the root of a website or any subfolder (for example, index.html). The value is case-sensitive.

Returns:

the indexDocument value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withDefaultIndexDocumentPath

public StaticWebsite withDefaultIndexDocumentPath(String defaultIndexDocumentPath)

Set the defaultIndexDocumentPath property: The absolute path where the default index file is present. This absolute path is mutually exclusive to "indexDocument" and it is case-sensitive.

Parameters:

defaultIndexDocumentPath - the defaultIndexDocumentPath value to set.

Returns:

the StaticWebsite object itself.

withEnabled

public StaticWebsite withEnabled(boolean enabled)

Set the enabled property: Indicates whether static website support is enabled for the specified account.

Parameters:

enabled - the enabled value to set.

Returns:

the StaticWebsite object itself.

withErrorDocument404Path

public StaticWebsite withErrorDocument404Path(String errorDocument404Path)

Set the errorDocument404Path property: The absolute path to a webpage that Azure Storage serves for requests that don't correspond to an existing file. The contents of the page are returned with HTTP 404 Not Found. Only a single custom 404 page is supported in each static website.

Parameters:

errorDocument404Path - the errorDocument404Path value to set.

Returns:

the StaticWebsite object itself.

withIndexDocument

public StaticWebsite withIndexDocument(String indexDocument)

Set the indexDocument property: The webpage that Azure Storage serves for requests to the root of a website or any subfolder (for example, index.html). The value is case-sensitive.

Parameters:

indexDocument - the indexDocument value to set.

Returns:

the StaticWebsite object itself.

Applies to