public final class CloudFileClient extends ServiceClient
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.
authenticationScheme, credentials| Constructor and Description |
|---|
CloudFileClient(StorageUri storageUri,
StorageCredentials credentials)
Creates an instance of the
CloudFileClient class using the specified File service endpoint and
account credentials. |
CloudFileClient(URI baseUri,
StorageCredentials credentials)
Creates an instance of the
CloudFileClient class using the specified File service endpoint and
account credentials. |
| Modifier and Type | Method and Description |
|---|---|
FileRequestOptions |
getDefaultRequestOptions()
Gets the
FileRequestOptions that is used for requests associated with this CloudFileClient |
CloudFileShare |
getShareReference(String shareName)
Gets a
CloudFileShare object with the specified name. |
protected boolean |
isUsePathStyleUris()
Indicates whether path-style URIs are being used.
|
Iterable<CloudFileShare> |
listShares()
Returns an enumerable collection of shares for this File service client.
|
Iterable<CloudFileShare> |
listShares(String prefix)
Returns an enumerable collection of shares whose names begin with the specified prefix for this File service
client.
|
Iterable<CloudFileShare> |
listShares(String prefix,
ShareListingDetails detailsIncluded,
FileRequestOptions options,
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.
|
ResultSegment<CloudFileShare> |
listSharesSegmented()
Returns a result segment of an enumerable collection of shares for this File service client.
|
ResultSegment<CloudFileShare> |
listSharesSegmented(String prefix)
Returns a result segment of an enumerable collection of shares whose names begin with the specified
prefix for this File service client.
|
ResultSegment<CloudFileShare> |
listSharesSegmented(String prefix,
ShareListingDetails detailsIncluded,
Integer maxResults,
ResultContinuation continuationToken,
FileRequestOptions options,
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
CloudFileClient object. |
downloadServicePropertiesImpl, getAuthenticationScheme, getCredentials, getEndpoint, getLocationMode, getMaximumExecutionTimeInMs, getRetryPolicyFactory, getServiceStatsImpl, getStorageUri, getTimeoutInMs, setAuthenticationScheme, setCredentials, setLocationMode, setMaximumExecutionTimeInMs, setRetryPolicyFactory, setStorageUri, setTimeoutInMs, uploadServicePropertiesImplpublic CloudFileClient(URI baseUri, StorageCredentials credentials)
CloudFileClient class using the specified File service endpoint and
account credentials.baseUri - A java.net.URI object that represents the File service endpoint used to create the
client.credentials - A StorageCredentials object that represents the account credentials.public CloudFileClient(StorageUri storageUri, StorageCredentials credentials)
CloudFileClient class using the specified File service endpoint and
account credentials.storageUri - A StorageUri object that represents the File service endpoint used to create the
client.credentials - A StorageCredentials object that represents the account credentials.public CloudFileShare getShareReference(String shareName) throws URISyntaxException, StorageException
CloudFileShare object with the specified name.shareName - The name of the share, which must adhere to share naming rules. The share name should not
include any path separator characters (/).
Share names must be lowercase, between 3-63 characters long and must start with a letter or
number. Share names may contain only letters, numbers, and the dash (-) character.CloudFileShare object.StorageExceptionURISyntaxException@DoesServiceRequest public Iterable<CloudFileShare> listShares()
CloudFileShare objects retrieved lazily that represent the
shares for this client.@DoesServiceRequest public Iterable<CloudFileShare> listShares(String prefix)
prefix - A String that represents the share name prefix.CloudFileShare objects retrieved lazily that represent the
shares for this client whose names begin with the specified prefix.@DoesServiceRequest public Iterable<CloudFileShare> listShares(String prefix, ShareListingDetails detailsIncluded, FileRequestOptions options, OperationContext opContext)
prefix - A String that represents the share name prefix.detailsIncluded - A ShareListingDetails value that indicates whether share metadata will be returned.options - A FileRequestOptions object that specifies any additional options for the request. Specifying
null will use the default request options from the associated service client (
CloudFileClient).opContext - An OperationContext object that represents the context for the current operation. This object
is used to track requests to the storage service, and to provide additional runtime information about
the operation.CloudFileShare objects retrieved lazily that represents the
shares for this client.@DoesServiceRequest public ResultSegment<CloudFileShare> listSharesSegmented() throws StorageException
ResultSegment object that contains a segment of the enumerable collection of
CloudFileShare objects that represent the shares for this client.StorageException - If a storage service error occurred.@DoesServiceRequest public ResultSegment<CloudFileShare> listSharesSegmented(String prefix) throws StorageException
prefix - A String that represents the prefix of the share name.ResultSegment object that contains a segment of the enumerable collection of
CloudFileShare objects that represent the shares whose names begin with the specified
prefix.StorageException - If a storage service error occurred.@DoesServiceRequest public ResultSegment<CloudFileShare> listSharesSegmented(String prefix, ShareListingDetails detailsIncluded, Integer maxResults, ResultContinuation continuationToken, FileRequestOptions options, OperationContext opContext) throws StorageException
prefix - A String that represents the prefix of the share name.detailsIncluded - A ShareListingDetails value that indicates whether share metadata will be returned.maxResults - The maximum number of results to retrieve. If null or greater
than 5000, the server will return up to 5,000 items. Must be at least 1.continuationToken - A ResultContinuation object that represents a continuation token returned
by a previous listing operation.options - A FileRequestOptions object that specifies any additional options for
the request. Specifying null will use the default request options
from the associated service client ( CloudFileClient).opContext - An OperationContext object that represents the context for the current
operation. This object is used to track requests to the storage service,
and to provide additional runtime information about the operation.ResultSegment object that contains a segment of the enumerable collection
of CloudFileShare objects that represent the shares for this client.StorageException - If a storage service error occurred.public FileRequestOptions getDefaultRequestOptions()
FileRequestOptions that is used for requests associated with this CloudFileClientgetDefaultRequestOptions in class ServiceClientFileRequestOptions object containing the values used by this CloudFileClientpublic void setDefaultRequestOptions(FileRequestOptions defaultRequestOptions)
FileRequestOptions that is used for any requests associated with this
CloudFileClient object.defaultRequestOptions - A FileRequestOptions object which specifies the options to use.protected boolean isUsePathStyleUris()
isUsePathStyleUris in class ServiceClienttrue if using path-style URIs; otherwise, false./**
* Copyright Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/