Freigeben über


FileUploadSasUriResponse Class

  • java.lang.Object
    • com.microsoft.azure.sdk.iot.deps.serializer.FileUploadSasUriResponse

public class FileUploadSasUriResponse

The information provided from IoT Hub that can be used with the Azure Storage SDK to upload a file from your device, including authentication.

Constructor Summary

Constructor Description
FileUploadSasUriResponse(String json)

Create an instance of the FileUploadSasUriResponse using the information in the provided json.

Method Summary

Modifier and Type Method and Description
java.lang.String getBlobName()

Getter for the blob name (aka file name) in Azure storage that this file upload SAS URI allows uploading to.

java.net.URI getBlobUri()

Get the full Azure Storage blob uri to upload a file to.

java.lang.String getContainerName()

Getter for the container name in Azure storage that this file upload SAS URI allows uploading to.

java.lang.String getCorrelationId()

Getter for the Azure storage correlation identification.

java.lang.String getHostName()

Getter for the Azure storage host name that this file upload SAS URI allows uploading to.

java.lang.String getSasToken()

Getter for the file sasToken for authenticating with Azure storage while uploading.

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

FileUploadSasUriResponse

public FileUploadSasUriResponse(String json)

Create an instance of the FileUploadSasUriResponse using the information in the provided json.

Parameters:

json - is the string that contains a valid json with the FileUpload response.

Throws:

java.lang.IllegalArgumentException - if the json is null, empty, or not valid.

Method Details

getBlobName

public String getBlobName()

Getter for the blob name (aka file name) in Azure storage that this file upload SAS URI allows uploading to.

Returns:

The blob name.

getBlobUri

public URI getBlobUri()

Get the full Azure Storage blob uri to upload a file to. This uri includes authentication information

Returns:

The full Azure Storage blob uri to upload a file to.

Throws:

java.io.UnsupportedEncodingException - if UTF-8 encoding is not supported on this device.
java.net.URISyntaxException - if UTF-8 encoding is not supported on this device.

getContainerName

public String getContainerName()

Getter for the container name in Azure storage that this file upload SAS URI allows uploading to.

Returns:

The container name.

getCorrelationId

public String getCorrelationId()

Getter for the Azure storage correlation identification. This correlation id should be used when notifying IoT Hub that this file upload has completed.

Returns:

The correlation identification.

getHostName

public String getHostName()

Getter for the Azure storage host name that this file upload SAS URI allows uploading to.

Returns:

The host name.

getSasToken

public String getSasToken()

Getter for the file sasToken for authenticating with Azure storage while uploading.

Returns:

String with the file sasToken.

Applies to