CloudFileClient Class
- java.
lang. Object - ServiceClient
- com.
microsoft. azure. storage. file. CloudFileClient
- com.
public class CloudFileClient extends ServiceClient
Provides a client for accessing the Microsoft Azure File service.
This class provides a point of access to the File service. The service client encapsulates the base URI for the File service. It also encapsulates the credentials for accessing the storage account.
Constructor Summary
Constructor | Description |
---|---|
CloudFileClient(final URI baseUri, StorageCredentials credentials) |
Creates an instance of the class using the specified File service endpoint and account credentials. |
CloudFileClient(StorageUri storageUri, StorageCredentials credentials) |
Creates an instance of the class using the specified File service endpoint and account credentials. |
Method Summary
Modifier and Type | Method and Description |
---|---|
final File |
downloadServiceProperties()
Retrieves the current FileServiceProperties for the given storage service. This encapsulates the CORS configurations. |
final File |
downloadServiceProperties(FileRequestOptions options, OperationContext opContext)
Retrieves the current FileServiceProperties for the given storage service. This encapsulates the CORS configurations. |
File |
getDefaultRequestOptions()
Gets the FileRequestOptions that is used for requests associated with this |
Cloud |
getShareReference(final String shareName)
Gets a CloudFileShare object with the specified name. |
Cloud |
getShareReference(final String shareName, String snapshotID)
Gets a CloudFileShare object with the specified name. |
boolean |
isUsePathStyleUris()
Indicates whether path-style URIs are being used. |
Iterable<Cloud |
listShares()
Returns an enumerable collection of shares for this File service client. |
Iterable<Cloud |
listShares(final String prefix)
Returns an enumerable collection of shares whose names begin with the specified prefix for this File service client. |
Iterable<Cloud |
listShares(final String prefix, final EnumSet<ShareListingDetails> detailsIncluded, final FileRequestOptions options, final OperationContext opContext)
Returns an enumerable collection of shares whose names begin with the specified prefix for this File service client, using the specified details settings, request options, and operation context. |
Result |
listSharesSegmented()
Returns a result segment of an enumerable collection of shares for this File service client. |
Result |
listSharesSegmented(final String prefix)
Returns a result segment of an enumerable collection of shares whose names begin with the specified prefix for this File service client. |
Result |
listSharesSegmented(final String prefix, final EnumSet<ShareListingDetails> detailsIncluded, final Integer maxResults, final ResultContinuation continuationToken, final FileRequestOptions options, final OperationContext opContext)
Returns a result segment of an enumerable collection of shares whose names begin with the specified prefix, using the specified listing details options, request options, and operation context. |
void |
setDefaultRequestOptions(FileRequestOptions defaultRequestOptions)
Sets the FileRequestOptions that is used for any requests associated with this object. |
void |
uploadServiceProperties(final FileServiceProperties properties)
Uploads a new FileServiceProperties configuration to the given storage service. This encapsulates the CORS configurations. |
void |
uploadServiceProperties(final FileServiceProperties properties, FileRequestOptions options, OperationContext opContext)
Uploads a new FileServiceProperties configuration to the given storage service. This encapsulates the CORS configurations. |
Inherited Members
Constructor Details
CloudFileClient
public CloudFileClient(final URI baseUri, StorageCredentials credentials)
Creates an instance of the class using the specified File service endpoint and account credentials.
Parameters:
java.net.URI
object that represents the File service endpoint used to create the client.
CloudFileClient
public CloudFileClient(StorageUri storageUri, StorageCredentials credentials)
Creates an instance of the class using the specified File service endpoint and account credentials.
Parameters:
Method Details
downloadServiceProperties
public final FileServiceProperties downloadServiceProperties()
Retrieves the current FileServiceProperties for the given storage service. This encapsulates the CORS configurations.
Returns:
Throws:
downloadServiceProperties
public final FileServiceProperties downloadServiceProperties(FileRequestOptions options, OperationContext opContext)
Retrieves the current FileServiceProperties for the given storage service. This encapsulates the CORS configurations.
Parameters:
null
will use the default request options from the associated service client (CloudFileClient).
Returns:
Throws:
getDefaultRequestOptions
public FileRequestOptions getDefaultRequestOptions()
Gets the FileRequestOptions that is used for requests associated with this
Returns:
CloudFileClient
getShareReference
public CloudFileShare getShareReference(final String shareName)
Gets a CloudFileShare object with the specified name.
Parameters:
Returns:
Throws:
getShareReference
public CloudFileShare getShareReference(final String shareName, String snapshotID)
Gets a CloudFileShare object with the specified name.
Parameters:
String
that represents the snapshot ID of the share.
Returns:
Throws:
isUsePathStyleUris
protected boolean isUsePathStyleUris()
Indicates whether path-style URIs are being used.
Returns:
true
if using path-style URIs; otherwise, false
.
listShares
public Iterable
Returns an enumerable collection of shares for this File service client.
Returns:
listShares
public Iterable
Returns an enumerable collection of shares whose names begin with the specified prefix for this File service client.
Parameters:
String
that represents the share name prefix.
Returns:
listShares
public Iterable
Returns an enumerable collection of shares whose names begin with the specified prefix for this File service client, using the specified details settings, request options, and operation context.
Parameters:
String
that represents the share name prefix.
java.util.EnumSet
object that contains ShareListingDetails values that indicate whether share snapshots and/or metadata will be returned.
null
will use the default request options from the associated service client ( CloudFileClient).
Returns:
listSharesSegmented
public ResultSegment
Returns a result segment of an enumerable collection of shares for this File service client.
Returns:
Throws:
listSharesSegmented
public ResultSegment
Returns a result segment of an enumerable collection of shares whose names begin with the specified prefix for this File service client.
Parameters:
String
that represents the prefix of the share name.
Returns:
Throws:
listSharesSegmented
public ResultSegment
Returns a result segment of an enumerable collection of shares whose names begin with the specified prefix, using the specified listing details options, request options, and operation context.
Parameters:
String
that represents the prefix of the share name.
java.util.EnumSet
object that contains ShareListingDetails values that indicate whether share snapshots and/or metadata will be returned.
null
or greater than 5000, the server will return up to 5,000 items. Must be at least 1.
null
will use the default request options from the associated service client ( CloudFileClient).
Returns:
Throws:
setDefaultRequestOptions
public void setDefaultRequestOptions(FileRequestOptions defaultRequestOptions)
Sets the FileRequestOptions that is used for any requests associated with this object.
Parameters:
uploadServiceProperties
public void uploadServiceProperties(final FileServiceProperties properties)
Uploads a new FileServiceProperties configuration to the given storage service. This encapsulates the CORS configurations.
Parameters:
Throws:
uploadServiceProperties
public void uploadServiceProperties(final FileServiceProperties properties, FileRequestOptions options, OperationContext opContext)
Uploads a new FileServiceProperties configuration to the given storage service. This encapsulates the CORS configurations.
Parameters:
null
will use the default request options from the associated service client (CloudFileClient).
Throws: