azure-storage-files-shares
Public Member Functions | Static Public Member Functions | Friends | List of all members
Azure::Storage::Files::Shares::ShareClient Class Referencefinal

Public Member Functions

 ShareClient (const std::string &shareUrl, std::shared_ptr< StorageSharedKeyCredential > credential, const ShareClientOptions &options=ShareClientOptions())
 Initialize a new instance of ShareClient using shared key authentication. More...
 
 ShareClient (const std::string &shareUrl, const ShareClientOptions &options=ShareClientOptions())
 Initialize a new instance of ShareClient using anonymous access or shared access signature. More...
 
std::string GetUrl () const
 Gets the share's primary URL endpoint. More...
 
ShareClient WithSnapshot (const std::string &snapshot) const
 Initializes a new instance of the ShareClient class with an identical URL source but the specified share snapshot timestamp. More...
 
ShareDirectoryClient GetRootDirectoryClient () const
 Gets the ShareDirectoryClient that's pointing to the root directory of current ShareClient. More...
 
Azure::Response< Models::CreateShareResultCreate (const CreateShareOptions &options=CreateShareOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
 Creates the file share. More...
 
Azure::Response< Models::CreateShareResultCreateIfNotExists (const CreateShareOptions &options=CreateShareOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
 Creates the file share if it does not exist, nothing will happen if the file share already exists. More...
 
Azure::Response< Models::DeleteShareResultDelete (const DeleteShareOptions &options=DeleteShareOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
 Deletes the file share. More...
 
Azure::Response< Models::DeleteShareResultDeleteIfExists (const DeleteShareOptions &options=DeleteShareOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
 Deletes the file share if it exists. More...
 
Azure::Response< Models::CreateShareSnapshotResultCreateSnapshot (const CreateShareSnapshotOptions &options=CreateShareSnapshotOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
 Creates a snapshot for the share. More...
 
Azure::Response< Models::SetSharePropertiesResultSetProperties (const SetSharePropertiesOptions &options=SetSharePropertiesOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
 Sets the properties of the share. More...
 
Azure::Response< Models::SharePropertiesGetProperties (const GetSharePropertiesOptions &options=GetSharePropertiesOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
 Gets the properties of the share. More...
 
Azure::Response< Models::SetShareMetadataResultSetMetadata (Storage::Metadata metadata, const SetShareMetadataOptions &options=SetShareMetadataOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
 Sets the metadata to the share. More...
 
Azure::Response< Models::ShareAccessPolicyGetAccessPolicy (const GetShareAccessPolicyOptions &options=GetShareAccessPolicyOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
 Gets the access policy of the share. More...
 
Azure::Response< Models::SetShareAccessPolicyResultSetAccessPolicy (const std::vector< Models::SignedIdentifier > &accessPolicy, const SetShareAccessPolicyOptions &options=SetShareAccessPolicyOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
 Sets the access policy of the share. More...
 
Azure::Response< Models::ShareStatisticsGetStatistics (const GetShareStatisticsOptions &options=GetShareStatisticsOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
 Gets the stats of the share. More...
 
Azure::Response< Models::CreateSharePermissionResultCreatePermission (const std::string &permission, const CreateSharePermissionOptions &options=CreateSharePermissionOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
 Creates a permission on the share. More...
 
Azure::Response< std::string > GetPermission (const std::string &permissionKey, const GetSharePermissionOptions &options=GetSharePermissionOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
 Gets the permission of the share using the specific key. More...
 

Static Public Member Functions

static ShareClient CreateFromConnectionString (const std::string &connectionString, const std::string &shareName, const ShareClientOptions &options=ShareClientOptions())
 Create A ShareClient from connection string to manage a File Share resource. More...
 

Friends

class ShareLeaseClient
 
class ShareServiceClient
 

Constructor & Destructor Documentation

◆ ShareClient() [1/2]

Azure::Storage::Files::Shares::ShareClient::ShareClient ( const std::string &  shareUrl,
std::shared_ptr< StorageSharedKeyCredential >  credential,
const ShareClientOptions options = ShareClientOptions() 
)
explicit
Parameters
shareUrlThe URL of the file share this client's request targets.
credentialThe shared key credential used to initialize the client.
optionsOptional parameters used to initialize the client.

◆ ShareClient() [2/2]

Azure::Storage::Files::Shares::ShareClient::ShareClient ( const std::string &  shareUrl,
const ShareClientOptions options = ShareClientOptions() 
)
explicit
Parameters
shareUrlThe URL of the file share this client's request targets.
optionsOptional parameters used to initialize the client.

Member Function Documentation

◆ Create()

Azure::Response< Models::CreateShareResult > Azure::Storage::Files::Shares::ShareClient::Create ( const CreateShareOptions options = CreateShareOptions(),
const Azure::Core::Context &  context = Azure::Core::Context() 
) const
Parameters
optionsOptional parameters to create this file share.
contextContext for cancelling long running operations.
Returns
Azure::Response<Models::CreateShareResult> containing the information including the version and modified time of a share.

◆ CreateFromConnectionString()

ShareClient Azure::Storage::Files::Shares::ShareClient::CreateFromConnectionString ( const std::string &  connectionString,
const std::string &  shareName,
const ShareClientOptions options = ShareClientOptions() 
)
static
Parameters
connectionStringAzure Storage connection string.
shareNameThe name of a file share.
optionsOptional parameters used to initialize the client.
Returns
ShareClient The client that can be used to manage a share resource.

◆ CreateIfNotExists()

Azure::Response< Models::CreateShareResult > Azure::Storage::Files::Shares::ShareClient::CreateIfNotExists ( const CreateShareOptions options = CreateShareOptions(),
const Azure::Core::Context &  context = Azure::Core::Context() 
) const
Parameters
optionsOptional parameters to create this file share.
contextContext for cancelling long running operations.
Returns
Azure::Response<Models::CreateShareResult> containing the information including the version and modified time of a share if it is successfully created.

◆ CreatePermission()

Azure::Response< Models::CreateSharePermissionResult > Azure::Storage::Files::Shares::ShareClient::CreatePermission ( const std::string &  permission,
const CreateSharePermissionOptions options = CreateSharePermissionOptions(),
const Azure::Core::Context &  context = Azure::Core::Context() 
) const
Parameters
permissionSpecifies the permission to be created on the share.
optionsOptional parameters to create the share's permission.
contextContext for cancelling long running operations.
Returns
Azure::Response<Models::CreateSharePermissionResult> containing the information including the permission key of the permission.

◆ CreateSnapshot()

Azure::Response< Models::CreateShareSnapshotResult > Azure::Storage::Files::Shares::ShareClient::CreateSnapshot ( const CreateShareSnapshotOptions options = CreateShareSnapshotOptions(),
const Azure::Core::Context &  context = Azure::Core::Context() 
) const
Parameters
optionsOptional parameters to create the share snapshot.
contextContext for cancelling long running operations.
Returns
Azure::Response<Models::CreateShareSnapshotResult> containing the information for ths snapshot.

◆ Delete()

Azure::Response< Models::DeleteShareResult > Azure::Storage::Files::Shares::ShareClient::Delete ( const DeleteShareOptions options = DeleteShareOptions(),
const Azure::Core::Context &  context = Azure::Core::Context() 
) const
Parameters
optionsOptional parameters to delete this file share.
contextContext for cancelling long running operations.
Returns
Azure::Response<Models::DeleteShareResult> currently empty and reserved for future usage.

◆ DeleteIfExists()

Azure::Response< Models::DeleteShareResult > Azure::Storage::Files::Shares::ShareClient::DeleteIfExists ( const DeleteShareOptions options = DeleteShareOptions(),
const Azure::Core::Context &  context = Azure::Core::Context() 
) const
Parameters
optionsOptional parameters to delete this file share.
contextContext for cancelling long running operations.
Returns
Azure::Response<Models::DeleteShareResult> currently empty and reserved for future usage.

◆ GetAccessPolicy()

Azure::Response< Models::ShareAccessPolicy > Azure::Storage::Files::Shares::ShareClient::GetAccessPolicy ( const GetShareAccessPolicyOptions options = GetShareAccessPolicyOptions(),
const Azure::Core::Context &  context = Azure::Core::Context() 
) const
Parameters
optionsOptional parameters to get the share's access policy.
contextContext for cancelling long running operations.
Returns
Azure::Response<Models::ShareAccessPolicy> containing the access policy of the share.

◆ GetPermission()

Azure::Response< std::string > Azure::Storage::Files::Shares::ShareClient::GetPermission ( const std::string &  permissionKey,
const GetSharePermissionOptions options = GetSharePermissionOptions(),
const Azure::Core::Context &  context = Azure::Core::Context() 
) const
Parameters
permissionKeyThe permission key of a permission.
optionsOptional parameters to get share's permission.
contextContext for cancelling long running operations.
Returns
Azure::Response<std::string> containing the permission string with specified key.

◆ GetProperties()

Azure::Response< Models::ShareProperties > Azure::Storage::Files::Shares::ShareClient::GetProperties ( const GetSharePropertiesOptions options = GetSharePropertiesOptions(),
const Azure::Core::Context &  context = Azure::Core::Context() 
) const
Parameters
optionsOptional parameters to get the share properties.
contextContext for cancelling long running operations.
Returns
Azure::Response<Models::ShareProperties> containing the properties for ths share or one of its snapshot.

◆ GetRootDirectoryClient()

ShareDirectoryClient Azure::Storage::Files::Shares::ShareClient::GetRootDirectoryClient ( ) const
Returns
ShareDirectoryClient The root directory of the share.

◆ GetStatistics()

Azure::Response< Models::ShareStatistics > Azure::Storage::Files::Shares::ShareClient::GetStatistics ( const GetShareStatisticsOptions options = GetShareStatisticsOptions(),
const Azure::Core::Context &  context = Azure::Core::Context() 
) const
Parameters
optionsOptional parameters to get share's statistics.
contextContext for cancelling long running operations.
Returns
Azure::Response<Models::ShareStatistics> containing the information including the bytes used in by the share, the version and modified time of a share.

◆ GetUrl()

std::string Azure::Storage::Files::Shares::ShareClient::GetUrl ( ) const
inline
Returns
The share's primary URL endpoint.

◆ SetAccessPolicy()

Azure::Response< Models::SetShareAccessPolicyResult > Azure::Storage::Files::Shares::ShareClient::SetAccessPolicy ( const std::vector< Models::SignedIdentifier > &  accessPolicy,
const SetShareAccessPolicyOptions options = SetShareAccessPolicyOptions(),
const Azure::Core::Context &  context = Azure::Core::Context() 
) const
Parameters
accessPolicySpecifies the access policy to be set to the share.
optionsOptional parameters to Set the share's access policy.
contextContext for cancelling long running operations.
Returns
Azure::Response<Models::SetShareAccessPolicyResult> containing the information including the version and modified time of a share.

◆ SetMetadata()

Azure::Response< Models::SetShareMetadataResult > Azure::Storage::Files::Shares::ShareClient::SetMetadata ( Storage::Metadata  metadata,
const SetShareMetadataOptions options = SetShareMetadataOptions(),
const Azure::Core::Context &  context = Azure::Core::Context() 
) const
Parameters
metadataA name-value pair to associate with a file storage 'Share' object..
optionsOptional parameters to set the share metadata.
contextContext for cancelling long running operations.
Returns
Azure::Response<Models::SetShareMetadataResult> containing the information including the version and modified time of a share.

◆ SetProperties()

Azure::Response< Models::SetSharePropertiesResult > Azure::Storage::Files::Shares::ShareClient::SetProperties ( const SetSharePropertiesOptions options = SetSharePropertiesOptions(),
const Azure::Core::Context &  context = Azure::Core::Context() 
) const
Parameters
optionsOptional parameters to set the share properties.
contextContext for cancelling long running operations.
Returns
Azure::Response<Models::SetSharePropertiesResult> containing the information including the version and modified time of a share.

◆ WithSnapshot()

ShareClient Azure::Storage::Files::Shares::ShareClient::WithSnapshot ( const std::string &  snapshot) const
Parameters
snapshotThe snapshot identifier.
Returns
A new ShareClient instance.
Remarks
Pass empty string to remove the snapshot returning the base share.

The documentation for this class was generated from the following files: