azure-docs-sdk-java/docs-ref-autogen/com.azure.storage.file.shar...

1081 строка
135 KiB
YAML

### YamlMime:JavaType
uid: "com.azure.storage.file.share.ShareClient"
fullName: "com.azure.storage.file.share.ShareClient"
name: "ShareClient"
nameWithType: "ShareClient"
summary: "This class provides a client that contains all the operations for interacting with a share in Azure Storage Share."
inheritances:
- "<xref href=\"java.lang.Object?displayProperty=fullName\" data-throw-if-not-resolved=\"False\" />"
inheritedMembers:
- "java.lang.Object.clone()"
- "java.lang.Object.equals(java.lang.Object)"
- "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(long)"
- "java.lang.Object.wait(long,int)"
syntax: "public class ShareClient"
methods:
- uid: "com.azure.storage.file.share.ShareClient.create()"
fullName: "com.azure.storage.file.share.ShareClient.create()"
name: "create()"
nameWithType: "ShareClient.create()"
summary: "Creates the share in the storage account."
syntax: "public ShareInfo create()"
desc: "Creates the share in the storage account.\n\n**Code Samples**\n\nCreate the share\n\n```java\nShareInfo response = shareClient.create();\n System.out.println(\"Complete creating the shares with status code: \" + response);\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/create-share"
returns:
description: "The <xref uid=\"com.azure.storage.file.share.models.ShareInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"information about the share\"></xref>."
type: "<xref href=\"com.azure.storage.file.share.models.ShareInfo?alt=com.azure.storage.file.share.models.ShareInfo&text=ShareInfo\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareClient.createDirectory(java.lang.String)"
fullName: "com.azure.storage.file.share.ShareClient.createDirectory(String directoryName)"
name: "createDirectory(String directoryName)"
nameWithType: "ShareClient.createDirectory(String directoryName)"
summary: "Creates the directory in the share with the given name."
parameters:
- description: "Name of the directory"
name: "directoryName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public ShareDirectoryClient createDirectory(String directoryName)"
desc: "Creates the directory in the share with the given name.\n\n**Code Samples**\n\nCreate the directory \"documents\"\n\n```java\nShareDirectoryClient response = shareClient.createDirectory(\"mydirectory\");\n System.out.println(\"Complete creating the directory.\");\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/create-directory"
returns:
description: "A response containing a <xref uid=\"com.azure.storage.file.share.ShareDirectoryClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareDirectoryClient\"></xref> to interact with the created directory."
type: "<xref href=\"com.azure.storage.file.share.ShareDirectoryClient?alt=com.azure.storage.file.share.ShareDirectoryClient&text=ShareDirectoryClient\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareClient.createDirectoryIfNotExists(java.lang.String)"
fullName: "com.azure.storage.file.share.ShareClient.createDirectoryIfNotExists(String directoryName)"
name: "createDirectoryIfNotExists(String directoryName)"
nameWithType: "ShareClient.createDirectoryIfNotExists(String directoryName)"
summary: "Creates the directory in the share with the given name if it does not exist."
parameters:
- description: "Name of the directory"
name: "directoryName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public ShareDirectoryClient createDirectoryIfNotExists(String directoryName)"
desc: "Creates the directory in the share with the given name if it does not exist.\n\n**Code Samples**\n\nCreate the directory \"documents\"\n\n```java\nShareDirectoryClient directoryClient = shareClient.createDirectoryIfNotExists(\"mydirectory\");\n System.out.println(\"Complete creating the directory.\");\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/create-directory"
returns:
description: "The <xref uid=\"com.azure.storage.file.share.ShareDirectoryClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareDirectoryClient\"></xref> used to interact with the directory created."
type: "<xref href=\"com.azure.storage.file.share.ShareDirectoryClient?alt=com.azure.storage.file.share.ShareDirectoryClient&text=ShareDirectoryClient\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareClient.createDirectoryIfNotExistsWithResponse(java.lang.String,com.azure.storage.file.share.options.ShareDirectoryCreateOptions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareClient.createDirectoryIfNotExistsWithResponse(String directoryName, ShareDirectoryCreateOptions options, Duration timeout, Context context)"
name: "createDirectoryIfNotExistsWithResponse(String directoryName, ShareDirectoryCreateOptions options, Duration timeout, Context context)"
nameWithType: "ShareClient.createDirectoryIfNotExistsWithResponse(String directoryName, ShareDirectoryCreateOptions options, Duration timeout, Context context)"
summary: "Creates the directory if it does not exist in the share with the given name and associates the passed metadata to it."
parameters:
- description: "Name of the directory"
name: "directoryName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "<xref uid=\"com.azure.storage.file.share.options.ShareDirectoryCreateOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareDirectoryCreateOptions\"></xref>"
name: "options"
type: "<xref href=\"com.azure.storage.file.share.options.ShareDirectoryCreateOptions?alt=com.azure.storage.file.share.options.ShareDirectoryCreateOptions&text=ShareDirectoryCreateOptions\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<ShareDirectoryClient> createDirectoryIfNotExistsWithResponse(String directoryName, ShareDirectoryCreateOptions options, Duration timeout, Context context)"
desc: "Creates the directory if it does not exist in the share with the given name and associates the passed metadata to it.\n\n**Code Samples**\n\nCreate the directory \"documents\" with metadata \"directory:metadata\"\n\n```java\nFileSmbProperties smbProperties = new FileSmbProperties();\n String filePermission = \"filePermission\";\n Map<String, String> metadata = Collections.singletonMap(\"directory\", \"metadata\");\n ShareDirectoryCreateOptions options = new ShareDirectoryCreateOptions().setSmbProperties(smbProperties).\n setFilePermission(filePermission).setMetadata(metadata);\n Response<ShareDirectoryClient> response = shareClient.createDirectoryIfNotExistsWithResponse(\"documents\",\n options, Duration.ofSeconds(1), new Context(key1, value1));\n\n if (response.getStatusCode() == 409) {\n System.out.println(\"Already existed.\");\n } else {\n System.out.printf(\"Create completed with status %d%n\", response.getStatusCode());\n }\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/create-directory"
returns:
description: "A <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Response\"></xref> whose <xref uid=\"com.azure.core.http.rest.Response.getValue*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"value\"></xref> contains the <xref uid=\"com.azure.storage.file.share.ShareDirectoryClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareDirectoryClient\"></xref>\n used to interact with the directory created. If <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Response\"></xref>'s status code is 201, a new directory was\n successfully created. If status code is 409, a directory with the same name already existed at this location."
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.ShareDirectoryClient?alt=com.azure.storage.file.share.ShareDirectoryClient&text=ShareDirectoryClient\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareClient.createDirectoryWithResponse(java.lang.String,com.azure.storage.file.share.FileSmbProperties,java.lang.String,java.util.Map<java.lang.String,java.lang.String>,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareClient.createDirectoryWithResponse(String directoryName, FileSmbProperties smbProperties, String filePermission, Map<String,String> metadata, Duration timeout, Context context)"
name: "createDirectoryWithResponse(String directoryName, FileSmbProperties smbProperties, String filePermission, Map<String,String> metadata, Duration timeout, Context context)"
nameWithType: "ShareClient.createDirectoryWithResponse(String directoryName, FileSmbProperties smbProperties, String filePermission, Map<String,String> metadata, Duration timeout, Context context)"
summary: "Creates the directory in the share with the given name and associates the passed metadata to it."
parameters:
- description: "Name of the directory"
name: "directoryName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The SMB properties of the directory."
name: "smbProperties"
type: "<xref href=\"com.azure.storage.file.share.FileSmbProperties?alt=com.azure.storage.file.share.FileSmbProperties&text=FileSmbProperties\" data-throw-if-not-resolved=\"False\" />"
- description: "The file permission of the directory."
name: "filePermission"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "Optional metadata to associate with the directory"
name: "metadata"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/Map.html\">Map</a>&lt;<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>,<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>&gt;"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<ShareDirectoryClient> createDirectoryWithResponse(String directoryName, FileSmbProperties smbProperties, String filePermission, Map<String,String> metadata, Duration timeout, Context context)"
desc: "Creates the directory in the share with the given name and associates the passed metadata to it.\n\n**Code Samples**\n\nCreate the directory \"documents\" with metadata \"directory:metadata\"\n\n```java\nFileSmbProperties smbProperties = new FileSmbProperties();\n String filePermission = \"filePermission\";\n Response<ShareDirectoryClient> response = shareClient.createDirectoryWithResponse(\"documents\",\n smbProperties, filePermission, Collections.singletonMap(\"directory\", \"metadata\"),\n Duration.ofSeconds(1), new Context(key1, value1));\n System.out.printf(\"Creating the directory completed with status code %d\", response.getStatusCode());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/create-directory"
returns:
description: "A response containing a <xref uid=\"com.azure.storage.file.share.ShareDirectoryAsyncClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareDirectoryAsyncClient\"></xref> to interact with the created directory and the\n status of its creation."
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.ShareDirectoryClient?alt=com.azure.storage.file.share.ShareDirectoryClient&text=ShareDirectoryClient\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareClient.createFile(java.lang.String,long)"
fullName: "com.azure.storage.file.share.ShareClient.createFile(String fileName, long maxSize)"
name: "createFile(String fileName, long maxSize)"
nameWithType: "ShareClient.createFile(String fileName, long maxSize)"
summary: "Creates the file in the share with the given name and file max size."
parameters:
- description: "Name of the file."
name: "fileName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The maximum size in bytes for the file."
name: "maxSize"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
syntax: "public ShareFileClient createFile(String fileName, long maxSize)"
desc: "Creates the file in the share with the given name and file max size.\n\n**Code Samples**\n\nCreate the file \"myfile\" with size of 1024 bytes.\n\n```java\nShareFileClient response = shareClient.createFile(\"myfile\", 1024);\n System.out.println(\"Complete creating the file with snapshot Id:\" + response.getShareSnapshotId());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/create-file"
returns:
description: "A response containing a <xref uid=\"com.azure.storage.file.share.ShareFileClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareFileClient\"></xref> to interact with the created file."
type: "<xref href=\"com.azure.storage.file.share.ShareFileClient?alt=com.azure.storage.file.share.ShareFileClient&text=ShareFileClient\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareClient.createFileWithResponse(java.lang.String,long,com.azure.storage.file.share.models.ShareFileHttpHeaders,com.azure.storage.file.share.FileSmbProperties,java.lang.String,java.util.Map<java.lang.String,java.lang.String>,com.azure.storage.file.share.models.ShareRequestConditions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareClient.createFileWithResponse(String fileName, long maxSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission, Map<String,String> metadata, ShareRequestConditions requestConditions, Duration timeout, Context context)"
name: "createFileWithResponse(String fileName, long maxSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission, Map<String,String> metadata, ShareRequestConditions requestConditions, Duration timeout, Context context)"
nameWithType: "ShareClient.createFileWithResponse(String fileName, long maxSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission, Map<String,String> metadata, ShareRequestConditions requestConditions, Duration timeout, Context context)"
summary: "Creates the file in the share with the given name, file max size and associates the passed properties to it."
parameters:
- description: "Name of the file."
name: "fileName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The maximum size in bytes for the file."
name: "maxSize"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
- description: "Additional parameters for the operation."
name: "httpHeaders"
type: "<xref href=\"com.azure.storage.file.share.models.ShareFileHttpHeaders?alt=com.azure.storage.file.share.models.ShareFileHttpHeaders&text=ShareFileHttpHeaders\" data-throw-if-not-resolved=\"False\" />"
- description: "The user settable file smb properties."
name: "smbProperties"
type: "<xref href=\"com.azure.storage.file.share.FileSmbProperties?alt=com.azure.storage.file.share.FileSmbProperties&text=FileSmbProperties\" data-throw-if-not-resolved=\"False\" />"
- description: "The file permission of the file"
name: "filePermission"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "Optional name-value pairs associated with the file as metadata."
name: "metadata"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/Map.html\">Map</a>&lt;<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>,<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>&gt;"
- description: "<xref uid=\"com.azure.storage.file.share.models.ShareRequestConditions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareRequestConditions\"></xref>"
name: "requestConditions"
type: "<xref href=\"com.azure.storage.file.share.models.ShareRequestConditions?alt=com.azure.storage.file.share.models.ShareRequestConditions&text=ShareRequestConditions\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<ShareFileClient> createFileWithResponse(String fileName, long maxSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission, Map<String,String> metadata, ShareRequestConditions requestConditions, Duration timeout, Context context)"
desc: "Creates the file in the share with the given name, file max size and associates the passed properties to it.\n\n**Code Samples**\n\nCreate the file \"myfile\" with length of 1024 bytes, some headers, file smb properties and metadata\n\n```java\nShareFileHttpHeaders httpHeaders = new ShareFileHttpHeaders()\n .setContentType(\"text/html\")\n .setContentEncoding(\"gzip\")\n .setContentLanguage(\"en\")\n .setCacheControl(\"no-transform\")\n .setContentDisposition(\"attachment\");\n FileSmbProperties smbProperties = new FileSmbProperties()\n .setNtfsFileAttributes(EnumSet.of(NtfsFileAttributes.READ_ONLY))\n .setFileCreationTime(OffsetDateTime.now())\n .setFileLastWriteTime(OffsetDateTime.now())\n .setFilePermissionKey(\"filePermissionKey\");\n String filePermission = \"filePermission\";\n // NOTE: filePermission and filePermissionKey should never be both set\n\n ShareRequestConditions requestConditions = new ShareRequestConditions().setLeaseId(leaseId);\n\n Response<ShareFileClient> response = shareClient.createFileWithResponse(\"myfile\", 1024,\n httpHeaders, smbProperties, filePermission, Collections.singletonMap(\"directory\", \"metadata\"),\n requestConditions, Duration.ofSeconds(1), new Context(key1, value1));\n System.out.printf(\"Creating the file completed with status code %d\", response.getStatusCode());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/create-file"
returns:
description: "A response containing a <xref uid=\"com.azure.storage.file.share.ShareFileClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareFileClient\"></xref> to interact with the created file and the status of its\n creation."
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.ShareFileClient?alt=com.azure.storage.file.share.ShareFileClient&text=ShareFileClient\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareClient.createFileWithResponse(java.lang.String,long,com.azure.storage.file.share.models.ShareFileHttpHeaders,com.azure.storage.file.share.FileSmbProperties,java.lang.String,java.util.Map<java.lang.String,java.lang.String>,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareClient.createFileWithResponse(String fileName, long maxSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission, Map<String,String> metadata, Duration timeout, Context context)"
name: "createFileWithResponse(String fileName, long maxSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission, Map<String,String> metadata, Duration timeout, Context context)"
nameWithType: "ShareClient.createFileWithResponse(String fileName, long maxSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission, Map<String,String> metadata, Duration timeout, Context context)"
summary: "Creates the file in the share with the given name, file max size and associates the passed properties to it."
parameters:
- description: "Name of the file."
name: "fileName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The maximum size in bytes for the file."
name: "maxSize"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
- description: "Additional parameters for the operation."
name: "httpHeaders"
type: "<xref href=\"com.azure.storage.file.share.models.ShareFileHttpHeaders?alt=com.azure.storage.file.share.models.ShareFileHttpHeaders&text=ShareFileHttpHeaders\" data-throw-if-not-resolved=\"False\" />"
- description: "The user settable file smb properties."
name: "smbProperties"
type: "<xref href=\"com.azure.storage.file.share.FileSmbProperties?alt=com.azure.storage.file.share.FileSmbProperties&text=FileSmbProperties\" data-throw-if-not-resolved=\"False\" />"
- description: "The file permission of the file"
name: "filePermission"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "Optional name-value pairs associated with the file as metadata."
name: "metadata"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/Map.html\">Map</a>&lt;<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>,<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>&gt;"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<ShareFileClient> createFileWithResponse(String fileName, long maxSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission, Map<String,String> metadata, Duration timeout, Context context)"
desc: "Creates the file in the share with the given name, file max size and associates the passed properties to it.\n\n**Code Samples**\n\nCreate the file \"myfile\" with length of 1024 bytes, some headers, file smb properties and metadata\n\n```java\nShareFileHttpHeaders httpHeaders = new ShareFileHttpHeaders()\n .setContentType(\"text/html\")\n .setContentEncoding(\"gzip\")\n .setContentLanguage(\"en\")\n .setCacheControl(\"no-transform\")\n .setContentDisposition(\"attachment\");\n FileSmbProperties smbProperties = new FileSmbProperties()\n .setNtfsFileAttributes(EnumSet.of(NtfsFileAttributes.READ_ONLY))\n .setFileCreationTime(OffsetDateTime.now())\n .setFileLastWriteTime(OffsetDateTime.now())\n .setFilePermissionKey(\"filePermissionKey\");\n String filePermission = \"filePermission\";\n // NOTE: filePermission and filePermissionKey should never be both set\n Response<ShareFileClient> response = shareClient.createFileWithResponse(\"myfile\", 1024,\n httpHeaders, smbProperties, filePermission, Collections.singletonMap(\"directory\", \"metadata\"),\n Duration.ofSeconds(1), new Context(key1, value1));\n System.out.printf(\"Creating the file completed with status code %d\", response.getStatusCode());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/create-file"
returns:
description: "A response containing a <xref uid=\"com.azure.storage.file.share.ShareFileClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareFileClient\"></xref> to interact with the created file and the status of its\n creation."
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.ShareFileClient?alt=com.azure.storage.file.share.ShareFileClient&text=ShareFileClient\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareClient.createIfNotExists()"
fullName: "com.azure.storage.file.share.ShareClient.createIfNotExists()"
name: "createIfNotExists()"
nameWithType: "ShareClient.createIfNotExists()"
summary: "Creates the share in the storage account if it does not exist."
syntax: "public ShareInfo createIfNotExists()"
desc: "Creates the share in the storage account if it does not exist.\n\n**Code Samples**\n\nCreate the share\n\n```java\nshareClient.createIfNotExists();\n System.out.println(\"Completed creating the share.\");\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/create-share"
returns:
description: "<xref uid=\"com.azure.storage.file.share.models.ShareInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareInfo\"></xref> that contains information about the created resource."
type: "<xref href=\"com.azure.storage.file.share.models.ShareInfo?alt=com.azure.storage.file.share.models.ShareInfo&text=ShareInfo\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareClient.createIfNotExistsWithResponse(com.azure.storage.file.share.options.ShareCreateOptions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareClient.createIfNotExistsWithResponse(ShareCreateOptions options, Duration timeout, Context context)"
name: "createIfNotExistsWithResponse(ShareCreateOptions options, Duration timeout, Context context)"
nameWithType: "ShareClient.createIfNotExistsWithResponse(ShareCreateOptions options, Duration timeout, Context context)"
summary: "Creates the share in the storage account with the specified options if it does not exist."
parameters:
- description: "<xref uid=\"com.azure.storage.file.share.options.ShareCreateOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareCreateOptions\"></xref>"
name: "options"
type: "<xref href=\"com.azure.storage.file.share.options.ShareCreateOptions?alt=com.azure.storage.file.share.options.ShareCreateOptions&text=ShareCreateOptions\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<ShareInfo> createIfNotExistsWithResponse(ShareCreateOptions options, Duration timeout, Context context)"
desc: "Creates the share in the storage account with the specified options if it does not exist.\n\n**Code Samples**\n\n```java\nResponse<ShareInfo> response = shareClient.createIfNotExistsWithResponse(new ShareCreateOptions()\n .setMetadata(Collections.singletonMap(\"share\", \"metadata\")).setQuotaInGb(1)\n .setAccessTier(ShareAccessTier.HOT), Duration.ofSeconds(1), new Context(key1, value1));\n\n if (response.getStatusCode() == 409) {\n System.out.println(\"Already existed.\");\n } else {\n System.out.printf(\"Create completed with status %d%n\", response.getStatusCode());\n }\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/create-share"
returns:
description: "A reactive <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Response\"></xref> signaling completion, whose <xref uid=\"com.azure.core.http.rest.Response.getValue*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"value\"></xref> contains a\n <xref uid=\"com.azure.storage.file.share.models.ShareInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareInfo\"></xref> containing information about the share. If <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Response\"></xref>'s status code is 201, a new\n share was successfully created. If status code is 409, a share already existed at this location."
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.models.ShareInfo?alt=com.azure.storage.file.share.models.ShareInfo&text=ShareInfo\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareClient.createPermission(java.lang.String)"
fullName: "com.azure.storage.file.share.ShareClient.createPermission(String filePermission)"
name: "createPermission(String filePermission)"
nameWithType: "ShareClient.createPermission(String filePermission)"
summary: "Creates a permission at the share level."
parameters:
- description: "The file permission to get/create."
name: "filePermission"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public String createPermission(String filePermission)"
desc: "Creates a permission at the share level. If a permission already exists, it returns the key of it, else creates a new permission and returns the key.\n\n**Code Samples**\n\n```java\nString response = shareClient.createPermission(\"filePermission\");\n System.out.printf(\"The file permission key is %s\", response);\n```"
returns:
description: "The file permission key associated with the file permission."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.storage.file.share.ShareClient.createPermissionWithResponse(java.lang.String,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareClient.createPermissionWithResponse(String filePermission, Context context)"
name: "createPermissionWithResponse(String filePermission, Context context)"
nameWithType: "ShareClient.createPermissionWithResponse(String filePermission, Context context)"
summary: "Creates a permission t the share level."
parameters:
- description: "The file permission to get/create."
name: "filePermission"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<String> createPermissionWithResponse(String filePermission, Context context)"
desc: "Creates a permission t the share level. If a permission already exists, it returns the key of it, else creates a new permission and returns the key.\n\n**Code Samples**\n\n```java\nResponse<String> response = shareClient.createPermissionWithResponse(\"filePermission\", Context.NONE);\n System.out.printf(\"The file permission key is %s\", response.getValue());\n```"
returns:
description: "A response that contains the file permission key associated with the file permission."
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>&gt;"
- uid: "com.azure.storage.file.share.ShareClient.createSnapshot()"
fullName: "com.azure.storage.file.share.ShareClient.createSnapshot()"
name: "createSnapshot()"
nameWithType: "ShareClient.createSnapshot()"
summary: "Creates a snapshot of the share with the same metadata associated to the share at the time of creation."
syntax: "public ShareSnapshotInfo createSnapshot()"
desc: "Creates a snapshot of the share with the same metadata associated to the share at the time of creation.\n\n**Code Samples**\n\nCreate a snapshot\n\n```java\nShareSnapshotInfo response = shareClient.createSnapshot();\n System.out.println(\"Complete creating the share snpashot with snapshot id: \" + response.getSnapshot());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/snapshot-share"
returns:
description: "The <xref uid=\"com.azure.storage.file.share.models.ShareSnapshotInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"information about snapshot of share\"></xref>"
type: "<xref href=\"com.azure.storage.file.share.models.ShareSnapshotInfo?alt=com.azure.storage.file.share.models.ShareSnapshotInfo&text=ShareSnapshotInfo\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareClient.createSnapshotWithResponse(java.util.Map<java.lang.String,java.lang.String>,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareClient.createSnapshotWithResponse(Map<String,String> metadata, Duration timeout, Context context)"
name: "createSnapshotWithResponse(Map<String,String> metadata, Duration timeout, Context context)"
nameWithType: "ShareClient.createSnapshotWithResponse(Map<String,String> metadata, Duration timeout, Context context)"
summary: "Creates a snapshot of the share with the metadata that was passed associated to the snapshot."
parameters:
- description: "Optional metadata to associate with the snapshot. If <code>null</code> the metadata of the share will\n be copied to the snapshot."
name: "metadata"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/Map.html\">Map</a>&lt;<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>,<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>&gt;"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<ShareSnapshotInfo> createSnapshotWithResponse(Map<String,String> metadata, Duration timeout, Context context)"
desc: "Creates a snapshot of the share with the metadata that was passed associated to the snapshot.\n\n**Code Samples**\n\nCreate a snapshot with metadata \"snapshot:metadata\"\n\n```java\nResponse<ShareSnapshotInfo> response =\n shareClient.createSnapshotWithResponse(Collections.singletonMap(\"snpashot\", \"metadata\"),\n Duration.ofSeconds(1), new Context(key1, value1));\n System.out.println(\"Complete creating the share snpashot with snapshot id: \" + response.getValue().getSnapshot());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/snapshot-share"
returns:
description: "A response containing the <xref uid=\"com.azure.storage.file.share.models.ShareSnapshotInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"information about snapshot of the share\"></xref> and status of\n creation."
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.models.ShareSnapshotInfo?alt=com.azure.storage.file.share.models.ShareSnapshotInfo&text=ShareSnapshotInfo\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareClient.createWithResponse(com.azure.storage.file.share.options.ShareCreateOptions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareClient.createWithResponse(ShareCreateOptions options, Duration timeout, Context context)"
name: "createWithResponse(ShareCreateOptions options, Duration timeout, Context context)"
nameWithType: "ShareClient.createWithResponse(ShareCreateOptions options, Duration timeout, Context context)"
summary: "Creates the share in the storage account with the specified options."
parameters:
- description: "<xref uid=\"com.azure.storage.file.share.options.ShareCreateOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareCreateOptions\"></xref>"
name: "options"
type: "<xref href=\"com.azure.storage.file.share.options.ShareCreateOptions?alt=com.azure.storage.file.share.options.ShareCreateOptions&text=ShareCreateOptions\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<ShareInfo> createWithResponse(ShareCreateOptions options, Duration timeout, Context context)"
desc: "Creates the share in the storage account with the specified options.\n\n**Code Samples**\n\n```java\nResponse<ShareInfo> response = shareClient.createWithResponse(new ShareCreateOptions()\n .setMetadata(Collections.singletonMap(\"share\", \"metadata\")).setQuotaInGb(1)\n .setAccessTier(ShareAccessTier.HOT), Duration.ofSeconds(1), new Context(key1, value1));\n System.out.println(\"Complete creating the shares with status code: \" + response.getStatusCode());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/create-share"
returns:
description: "A response containing the <xref uid=\"com.azure.storage.file.share.models.ShareInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"information about the share\"></xref> and the status its creation."
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.models.ShareInfo?alt=com.azure.storage.file.share.models.ShareInfo&text=ShareInfo\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareClient.createWithResponse(java.util.Map<java.lang.String,java.lang.String>,java.lang.Integer,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareClient.createWithResponse(Map<String,String> metadata, Integer quotaInGB, Duration timeout, Context context)"
name: "createWithResponse(Map<String,String> metadata, Integer quotaInGB, Duration timeout, Context context)"
nameWithType: "ShareClient.createWithResponse(Map<String,String> metadata, Integer quotaInGB, Duration timeout, Context context)"
summary: "Creates the share in the storage account with the specified metadata and quota."
parameters:
- description: "Optional metadata to associate with the share"
name: "metadata"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/Map.html\">Map</a>&lt;<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>,<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>&gt;"
- description: "Optional maximum size the share is allowed to grow to in GB. This must be greater than 0 and\n less than or equal to 5120. The default value is 5120."
name: "quotaInGB"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html\">Integer</a>"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<ShareInfo> createWithResponse(Map<String,String> metadata, Integer quotaInGB, Duration timeout, Context context)"
desc: "Creates the share in the storage account with the specified metadata and quota.\n\n**Code Samples**\n\nCreate the share with metadata \"share:metadata\"\n\n```java\nResponse<ShareInfo> response = shareClient.createWithResponse(Collections.singletonMap(\"share\", \"metadata\"),\n null, Duration.ofSeconds(1), new Context(key1, value1));\n System.out.println(\"Complete creating the shares with status code: \" + response.getStatusCode());\n```\n\nCreate the share with a quota of 10 GB\n\n```java\nResponse<ShareInfo> response = shareClient.createWithResponse(null, 10,\n Duration.ofSeconds(1), new Context(key1, value1));\n System.out.println(\"Complete creating the shares with status code: \" + response.getStatusCode());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/create-share"
returns:
description: "A response containing the <xref uid=\"com.azure.storage.file.share.models.ShareInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"information about the share\"></xref> and the status its creation."
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.models.ShareInfo?alt=com.azure.storage.file.share.models.ShareInfo&text=ShareInfo\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareClient.delete()"
fullName: "com.azure.storage.file.share.ShareClient.delete()"
name: "delete()"
nameWithType: "ShareClient.delete()"
summary: "Deletes the share in the storage account"
syntax: "public void delete()"
desc: "Deletes the share in the storage account\n\n**Code Samples**\n\nDelete the share\n\n```java\nshareClient.delete();\n System.out.println(\"Completed deleting the share.\");\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/delete-share"
- uid: "com.azure.storage.file.share.ShareClient.deleteDirectory(java.lang.String)"
fullName: "com.azure.storage.file.share.ShareClient.deleteDirectory(String directoryName)"
name: "deleteDirectory(String directoryName)"
nameWithType: "ShareClient.deleteDirectory(String directoryName)"
summary: "Deletes the specified directory in the share."
parameters:
- description: "Name of the directory"
name: "directoryName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public void deleteDirectory(String directoryName)"
desc: "Deletes the specified directory in the share.\n\n**Code Samples**\n\nDelete the directory \"mydirectory\"\n\n```java\nshareClient.deleteDirectory(\"mydirectory\");\n System.out.println(\"Completed deleting the directory.\");\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/delete-directory"
- uid: "com.azure.storage.file.share.ShareClient.deleteDirectoryIfExists(java.lang.String)"
fullName: "com.azure.storage.file.share.ShareClient.deleteDirectoryIfExists(String directoryName)"
name: "deleteDirectoryIfExists(String directoryName)"
nameWithType: "ShareClient.deleteDirectoryIfExists(String directoryName)"
summary: "Deletes the specified directory in the share if it exists."
parameters:
- description: "Name of the directory"
name: "directoryName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public boolean deleteDirectoryIfExists(String directoryName)"
desc: "Deletes the specified directory in the share if it exists.\n\n**Code Samples**\n\nDelete the directory \"mydirectory\"\n\n```java\nboolean result = shareClient.deleteDirectoryIfExists(\"mydirectory\");\n System.out.println(\"Directory deleted: \" + result);\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/delete-directory"
returns:
description: "<code>true</code> if the directory is successfully deleted, <code>false</code> if the directory does not exist."
type: "<xref href=\"boolean?alt=boolean&text=boolean\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareClient.deleteDirectoryIfExistsWithResponse(java.lang.String,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareClient.deleteDirectoryIfExistsWithResponse(String directoryName, Duration timeout, Context context)"
name: "deleteDirectoryIfExistsWithResponse(String directoryName, Duration timeout, Context context)"
nameWithType: "ShareClient.deleteDirectoryIfExistsWithResponse(String directoryName, Duration timeout, Context context)"
summary: "Deletes the specified directory in the share if it exists."
parameters:
- description: "Name of the directory"
name: "directoryName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<Boolean> deleteDirectoryIfExistsWithResponse(String directoryName, Duration timeout, Context context)"
desc: "Deletes the specified directory in the share if it exists.\n\n**Code Samples**\n\nDelete the directory \"mydirectory\"\n\n```java\nResponse<Boolean> response = shareClient.deleteDirectoryIfExistsWithResponse(\"mydirectory\",\n Duration.ofSeconds(1), new Context(key1, value1));\n if (response.getStatusCode() == 404) {\n System.out.println(\"Does not exist.\");\n } else {\n System.out.printf(\"Delete completed with status %d%n\", response.getStatusCode());\n }\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/delete-directory"
returns:
description: "A response containing status code and HTTP headers. If <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Response\"></xref>'s status code is 202, the directory\n was successfully deleted. If status code is 404, the directory does not exist."
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html\">Boolean</a>&gt;"
- uid: "com.azure.storage.file.share.ShareClient.deleteDirectoryWithResponse(java.lang.String,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareClient.deleteDirectoryWithResponse(String directoryName, Duration timeout, Context context)"
name: "deleteDirectoryWithResponse(String directoryName, Duration timeout, Context context)"
nameWithType: "ShareClient.deleteDirectoryWithResponse(String directoryName, Duration timeout, Context context)"
summary: "Deletes the specified directory in the share."
parameters:
- description: "Name of the directory"
name: "directoryName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<Void> deleteDirectoryWithResponse(String directoryName, Duration timeout, Context context)"
desc: "Deletes the specified directory in the share.\n\n**Code Samples**\n\nDelete the directory \"mydirectory\"\n\n```java\nResponse<Void> response = shareClient.deleteDirectoryWithResponse(\"mydirectory\",\n Duration.ofSeconds(1), new Context(key1, value1));\n System.out.println(\"Complete deleting the directory with status code: \" + response.getStatusCode());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/delete-directory"
returns:
description: "A response that only contains headers and response status code"
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Void.html\">Void</a>&gt;"
- uid: "com.azure.storage.file.share.ShareClient.deleteFile(java.lang.String)"
fullName: "com.azure.storage.file.share.ShareClient.deleteFile(String fileName)"
name: "deleteFile(String fileName)"
nameWithType: "ShareClient.deleteFile(String fileName)"
summary: "Deletes the specified file in the share."
parameters:
- description: "Name of the file"
name: "fileName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public void deleteFile(String fileName)"
desc: "Deletes the specified file in the share.\n\n**Code Samples**\n\nDelete the file \"myfile\"\n\n```java\nshareClient.deleteFile(\"myfile\");\n System.out.println(\"Complete deleting the file.\");\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/delete-file2"
- uid: "com.azure.storage.file.share.ShareClient.deleteFileIfExists(java.lang.String)"
fullName: "com.azure.storage.file.share.ShareClient.deleteFileIfExists(String fileName)"
name: "deleteFileIfExists(String fileName)"
nameWithType: "ShareClient.deleteFileIfExists(String fileName)"
summary: "Deletes the specified file in the share if it exists."
parameters:
- description: "Name of the file"
name: "fileName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public boolean deleteFileIfExists(String fileName)"
desc: "Deletes the specified file in the share if it exists.\n\n**Code Samples**\n\nDelete the file \"myfile\"\n\n```java\nboolean result = shareClient.deleteFileIfExists(\"myfile\");\n System.out.println(\"File deleted: \" + result);\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/delete-file2"
returns:
description: "<code>true</code> if the file is successfully deleted, <code>false</code> if the file does not exist."
type: "<xref href=\"boolean?alt=boolean&text=boolean\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareClient.deleteFileIfExistsWithResponse(java.lang.String,com.azure.storage.file.share.models.ShareRequestConditions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareClient.deleteFileIfExistsWithResponse(String fileName, ShareRequestConditions requestConditions, Duration timeout, Context context)"
name: "deleteFileIfExistsWithResponse(String fileName, ShareRequestConditions requestConditions, Duration timeout, Context context)"
nameWithType: "ShareClient.deleteFileIfExistsWithResponse(String fileName, ShareRequestConditions requestConditions, Duration timeout, Context context)"
summary: "Deletes the specified file in the share if it exists."
parameters:
- description: "Name of the file"
name: "fileName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "<xref uid=\"com.azure.storage.file.share.models.ShareRequestConditions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareRequestConditions\"></xref>"
name: "requestConditions"
type: "<xref href=\"com.azure.storage.file.share.models.ShareRequestConditions?alt=com.azure.storage.file.share.models.ShareRequestConditions&text=ShareRequestConditions\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<Boolean> deleteFileIfExistsWithResponse(String fileName, ShareRequestConditions requestConditions, Duration timeout, Context context)"
desc: "Deletes the specified file in the share if it exists.\n\n**Code Samples**\n\nDelete the file \"myfile\"\n\n```java\nShareRequestConditions requestConditions = new ShareRequestConditions().setLeaseId(leaseId);\n\n Response<Boolean> response = shareClient.deleteFileIfExistsWithResponse(\"myfile\", requestConditions,\n Duration.ofSeconds(1), new Context(key1, value1));\n if (response.getStatusCode() == 404) {\n System.out.println(\"Does not exist.\");\n } else {\n System.out.printf(\"Delete completed with status %d%n\", response.getStatusCode());\n }\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/delete-file2"
returns:
description: "A response containing status code and HTTP headers. If <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Response\"></xref>'s status code is 202, the file\n was successfully deleted. If status code is 404, the file does not exist."
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html\">Boolean</a>&gt;"
- uid: "com.azure.storage.file.share.ShareClient.deleteFileWithResponse(java.lang.String,com.azure.storage.file.share.models.ShareRequestConditions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareClient.deleteFileWithResponse(String fileName, ShareRequestConditions requestConditions, Duration timeout, Context context)"
name: "deleteFileWithResponse(String fileName, ShareRequestConditions requestConditions, Duration timeout, Context context)"
nameWithType: "ShareClient.deleteFileWithResponse(String fileName, ShareRequestConditions requestConditions, Duration timeout, Context context)"
summary: "Deletes the specified file in the share."
parameters:
- description: "Name of the file"
name: "fileName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "<xref uid=\"com.azure.storage.file.share.models.ShareRequestConditions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareRequestConditions\"></xref>"
name: "requestConditions"
type: "<xref href=\"com.azure.storage.file.share.models.ShareRequestConditions?alt=com.azure.storage.file.share.models.ShareRequestConditions&text=ShareRequestConditions\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<Void> deleteFileWithResponse(String fileName, ShareRequestConditions requestConditions, Duration timeout, Context context)"
desc: "Deletes the specified file in the share.\n\n**Code Samples**\n\nDelete the file \"myfile\"\n\n```java\nShareRequestConditions requestConditions = new ShareRequestConditions().setLeaseId(leaseId);\n Response<Void> response = shareClient.deleteFileWithResponse(\"myfile\", requestConditions,\n Duration.ofSeconds(1), new Context(key1, value1));\n System.out.println(\"Complete deleting the file with status code: \" + response.getStatusCode());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/delete-file2"
returns:
description: "A response that only contains headers and response status code"
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Void.html\">Void</a>&gt;"
- uid: "com.azure.storage.file.share.ShareClient.deleteFileWithResponse(java.lang.String,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareClient.deleteFileWithResponse(String fileName, Duration timeout, Context context)"
name: "deleteFileWithResponse(String fileName, Duration timeout, Context context)"
nameWithType: "ShareClient.deleteFileWithResponse(String fileName, Duration timeout, Context context)"
summary: "Deletes the specified file in the share."
parameters:
- description: "Name of the file"
name: "fileName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<Void> deleteFileWithResponse(String fileName, Duration timeout, Context context)"
desc: "Deletes the specified file in the share.\n\n**Code Samples**\n\nDelete the file \"myfile\"\n\n```java\nResponse<Void> response = shareClient.deleteFileWithResponse(\"myfile\",\n Duration.ofSeconds(1), new Context(key1, value1));\n System.out.println(\"Complete deleting the file with status code: \" + response.getStatusCode());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/delete-file2"
returns:
description: "A response that only contains headers and response status code"
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Void.html\">Void</a>&gt;"
- uid: "com.azure.storage.file.share.ShareClient.deleteIfExists()"
fullName: "com.azure.storage.file.share.ShareClient.deleteIfExists()"
name: "deleteIfExists()"
nameWithType: "ShareClient.deleteIfExists()"
summary: "Deletes the share in the storage account if it exists."
syntax: "public boolean deleteIfExists()"
desc: "Deletes the share in the storage account if it exists.\n\n**Code Samples**\n\nDelete the share\n\n```java\nboolean result = shareClient.deleteIfExists();\n System.out.println(\"Share deleted: \" + result);\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/delete-share"
returns:
description: "<code>true</code> if the share is successfully deleted, <code>false</code> if the share does not exist."
type: "<xref href=\"boolean?alt=boolean&text=boolean\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareClient.deleteIfExistsWithResponse(com.azure.storage.file.share.options.ShareDeleteOptions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareClient.deleteIfExistsWithResponse(ShareDeleteOptions options, Duration timeout, Context context)"
name: "deleteIfExistsWithResponse(ShareDeleteOptions options, Duration timeout, Context context)"
nameWithType: "ShareClient.deleteIfExistsWithResponse(ShareDeleteOptions options, Duration timeout, Context context)"
summary: "Deletes the share in the storage account if it exists."
parameters:
- description: "<xref uid=\"com.azure.storage.file.share.options.ShareDeleteOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareDeleteOptions\"></xref>"
name: "options"
type: "<xref href=\"com.azure.storage.file.share.options.ShareDeleteOptions?alt=com.azure.storage.file.share.options.ShareDeleteOptions&text=ShareDeleteOptions\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<Boolean> deleteIfExistsWithResponse(ShareDeleteOptions options, Duration timeout, Context context)"
desc: "Deletes the share in the storage account if it exists.\n\n**Code Samples**\n\nDelete the share\n\n```java\nResponse<Boolean> response = shareClient.deleteIfExistsWithResponse(new ShareDeleteOptions()\n .setRequestConditions(new ShareRequestConditions().setLeaseId(leaseId)),\n Duration.ofSeconds(1), new Context(key1, value1));\n if (response.getStatusCode() == 404) {\n System.out.println(\"Does not exist.\");\n } else {\n System.out.printf(\"Delete completed with status %d%n\", response.getStatusCode());\n }\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/delete-share"
returns:
description: "A response containing status code and HTTP headers. If <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Response\"></xref>'s status code is 202, the share\n was successfully deleted. If status code is 404, the share does not exist."
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html\">Boolean</a>&gt;"
- uid: "com.azure.storage.file.share.ShareClient.deleteWithResponse(com.azure.storage.file.share.options.ShareDeleteOptions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareClient.deleteWithResponse(ShareDeleteOptions options, Duration timeout, Context context)"
name: "deleteWithResponse(ShareDeleteOptions options, Duration timeout, Context context)"
nameWithType: "ShareClient.deleteWithResponse(ShareDeleteOptions options, Duration timeout, Context context)"
summary: "Deletes the share in the storage account"
parameters:
- description: "<xref uid=\"com.azure.storage.file.share.options.ShareDeleteOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareDeleteOptions\"></xref>"
name: "options"
type: "<xref href=\"com.azure.storage.file.share.options.ShareDeleteOptions?alt=com.azure.storage.file.share.options.ShareDeleteOptions&text=ShareDeleteOptions\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<Void> deleteWithResponse(ShareDeleteOptions options, Duration timeout, Context context)"
desc: "Deletes the share in the storage account\n\n**Code Samples**\n\nDelete the share\n\n```java\nResponse<Void> response = shareClient.deleteWithResponse(new ShareDeleteOptions()\n .setRequestConditions(new ShareRequestConditions().setLeaseId(leaseId)),\n Duration.ofSeconds(1), new Context(key1, value1));\n System.out.println(\"Complete deleting the share with status code: \" + response.getStatusCode());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/delete-share"
returns:
description: "A response that only contains headers and response status code"
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Void.html\">Void</a>&gt;"
- uid: "com.azure.storage.file.share.ShareClient.deleteWithResponse(java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareClient.deleteWithResponse(Duration timeout, Context context)"
name: "deleteWithResponse(Duration timeout, Context context)"
nameWithType: "ShareClient.deleteWithResponse(Duration timeout, Context context)"
summary: "Deletes the share in the storage account"
parameters:
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<Void> deleteWithResponse(Duration timeout, Context context)"
desc: "Deletes the share in the storage account\n\n**Code Samples**\n\nDelete the share\n\n```java\nResponse<Void> response = shareClient.deleteWithResponse(Duration.ofSeconds(1), new Context(key1, value1));\n System.out.println(\"Complete deleting the share with status code: \" + response.getStatusCode());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/delete-share"
returns:
description: "A response that only contains headers and response status code"
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Void.html\">Void</a>&gt;"
- uid: "com.azure.storage.file.share.ShareClient.exists()"
fullName: "com.azure.storage.file.share.ShareClient.exists()"
name: "exists()"
nameWithType: "ShareClient.exists()"
summary: "Determines if the share this client represents exists in the cloud."
syntax: "public Boolean exists()"
desc: "Determines if the share this client represents exists in the cloud.\n\n**Code Samples**\n\n```java\nSystem.out.printf(\"Exists? %b%n\", client.exists());\n```"
returns:
description: "Flag indicating existence of the share."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html\">Boolean</a>"
- uid: "com.azure.storage.file.share.ShareClient.existsWithResponse(java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareClient.existsWithResponse(Duration timeout, Context context)"
name: "existsWithResponse(Duration timeout, Context context)"
nameWithType: "ShareClient.existsWithResponse(Duration timeout, Context context)"
summary: "Determines if the share this client represents exists in the cloud."
parameters:
- description: "An optional timeout value beyond which a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be raised."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<Boolean> existsWithResponse(Duration timeout, Context context)"
desc: "Determines if the share this client represents exists in the cloud.\n\n**Code Samples**\n\n```java\nContext context = new Context(\"Key\", \"Value\");\n System.out.printf(\"Exists? %b%n\", client.existsWithResponse(timeout, context).getValue());\n```"
returns:
description: "Flag indicating existence of the share."
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html\">Boolean</a>&gt;"
- uid: "com.azure.storage.file.share.ShareClient.generateSas(com.azure.storage.file.share.sas.ShareServiceSasSignatureValues)"
fullName: "com.azure.storage.file.share.ShareClient.generateSas(ShareServiceSasSignatureValues shareServiceSasSignatureValues)"
name: "generateSas(ShareServiceSasSignatureValues shareServiceSasSignatureValues)"
nameWithType: "ShareClient.generateSas(ShareServiceSasSignatureValues shareServiceSasSignatureValues)"
summary: "Generates a service sas for the queue using the specified <xref uid=\"com.azure.storage.file.share.sas.ShareServiceSasSignatureValues\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareServiceSasSignatureValues\"></xref>"
parameters:
- description: "<xref uid=\"com.azure.storage.file.share.sas.ShareServiceSasSignatureValues\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareServiceSasSignatureValues\"></xref>"
name: "shareServiceSasSignatureValues"
type: "<xref href=\"com.azure.storage.file.share.sas.ShareServiceSasSignatureValues?alt=com.azure.storage.file.share.sas.ShareServiceSasSignatureValues&text=ShareServiceSasSignatureValues\" data-throw-if-not-resolved=\"False\" />"
syntax: "public String generateSas(ShareServiceSasSignatureValues shareServiceSasSignatureValues)"
desc: "Generates a service sas for the queue using the specified <xref uid=\"com.azure.storage.file.share.sas.ShareServiceSasSignatureValues\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareServiceSasSignatureValues\"></xref>\n\nNote : The client must be authenticated via <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"StorageSharedKeyCredential\"></xref>\n\nSee <xref uid=\"com.azure.storage.file.share.sas.ShareServiceSasSignatureValues\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareServiceSasSignatureValues\"></xref> for more information on how to construct a service SAS.\n\n**Code Samples**\n\n```java\nOffsetDateTime expiryTime = OffsetDateTime.now().plusDays(1);\n ShareSasPermission permission = new ShareSasPermission().setReadPermission(true);\n\n ShareServiceSasSignatureValues values = new ShareServiceSasSignatureValues(expiryTime, permission)\n .setStartTime(OffsetDateTime.now());\n\n shareAsyncClient.generateSas(values); // Client must be authenticated via StorageSharedKeyCredential\n```"
returns:
description: "A <code>String</code> representing the SAS query parameters."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.storage.file.share.ShareClient.generateSas(com.azure.storage.file.share.sas.ShareServiceSasSignatureValues,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareClient.generateSas(ShareServiceSasSignatureValues shareServiceSasSignatureValues, Context context)"
name: "generateSas(ShareServiceSasSignatureValues shareServiceSasSignatureValues, Context context)"
nameWithType: "ShareClient.generateSas(ShareServiceSasSignatureValues shareServiceSasSignatureValues, Context context)"
summary: "Generates a service sas for the queue using the specified <xref uid=\"com.azure.storage.file.share.sas.ShareServiceSasSignatureValues\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareServiceSasSignatureValues\"></xref>"
parameters:
- description: "<xref uid=\"com.azure.storage.file.share.sas.ShareServiceSasSignatureValues\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareServiceSasSignatureValues\"></xref>"
name: "shareServiceSasSignatureValues"
type: "<xref href=\"com.azure.storage.file.share.sas.ShareServiceSasSignatureValues?alt=com.azure.storage.file.share.sas.ShareServiceSasSignatureValues&text=ShareServiceSasSignatureValues\" data-throw-if-not-resolved=\"False\" />"
- description: "Additional context that is passed through the code when generating a SAS."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public String generateSas(ShareServiceSasSignatureValues shareServiceSasSignatureValues, Context context)"
desc: "Generates a service sas for the queue using the specified <xref uid=\"com.azure.storage.file.share.sas.ShareServiceSasSignatureValues\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareServiceSasSignatureValues\"></xref>\n\nNote : The client must be authenticated via <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"StorageSharedKeyCredential\"></xref>\n\nSee <xref uid=\"com.azure.storage.file.share.sas.ShareServiceSasSignatureValues\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareServiceSasSignatureValues\"></xref> for more information on how to construct a service SAS.\n\n**Code Samples**\n\n```java\nOffsetDateTime expiryTime = OffsetDateTime.now().plusDays(1);\n ShareSasPermission permission = new ShareSasPermission().setReadPermission(true);\n\n ShareServiceSasSignatureValues values = new ShareServiceSasSignatureValues(expiryTime, permission)\n .setStartTime(OffsetDateTime.now());\n\n // Client must be authenticated via StorageSharedKeyCredential\n shareAsyncClient.generateSas(values, new Context(\"key\", \"value\"));\n```"
returns:
description: "A <code>String</code> representing the SAS query parameters."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.storage.file.share.ShareClient.getAccessPolicy()"
fullName: "com.azure.storage.file.share.ShareClient.getAccessPolicy()"
name: "getAccessPolicy()"
nameWithType: "ShareClient.getAccessPolicy()"
summary: "Retrieves stored access policies specified for the share."
syntax: "public PagedIterable<ShareSignedIdentifier> getAccessPolicy()"
desc: "Retrieves stored access policies specified for the share.\n\n**Code Samples**\n\nList the stored access policies\n\n```java\nfor (ShareSignedIdentifier result : shareClient.getAccessPolicy()) {\n System.out.printf(\"Access policy %s allows these permissions: %s\",\n result.getId(), result.getAccessPolicy().getPermissions());\n }\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/get-share-acl"
returns:
description: "The stored access policies specified on the queue."
type: "<xref href=\"com.azure.core.http.rest.PagedIterable?alt=com.azure.core.http.rest.PagedIterable&text=PagedIterable\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.models.ShareSignedIdentifier?alt=com.azure.storage.file.share.models.ShareSignedIdentifier&text=ShareSignedIdentifier\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareClient.getAccessPolicy(com.azure.storage.file.share.options.ShareGetAccessPolicyOptions)"
fullName: "com.azure.storage.file.share.ShareClient.getAccessPolicy(ShareGetAccessPolicyOptions options)"
name: "getAccessPolicy(ShareGetAccessPolicyOptions options)"
nameWithType: "ShareClient.getAccessPolicy(ShareGetAccessPolicyOptions options)"
summary: "Retrieves stored access policies specified for the share."
parameters:
- description: "<xref uid=\"com.azure.storage.file.share.options.ShareGetAccessPolicyOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareGetAccessPolicyOptions\"></xref>"
name: "options"
type: "<xref href=\"com.azure.storage.file.share.options.ShareGetAccessPolicyOptions?alt=com.azure.storage.file.share.options.ShareGetAccessPolicyOptions&text=ShareGetAccessPolicyOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public PagedIterable<ShareSignedIdentifier> getAccessPolicy(ShareGetAccessPolicyOptions options)"
desc: "Retrieves stored access policies specified for the share.\n\n**Code Samples**\n\nList the stored access policies\n\n```java\nfor (ShareSignedIdentifier result : shareClient\n .getAccessPolicy(new ShareGetAccessPolicyOptions()\n .setRequestConditions(new ShareRequestConditions().setLeaseId(leaseId)))) {\n System.out.printf(\"Access policy %s allows these permissions: %s\",\n result.getId(), result.getAccessPolicy().getPermissions());\n }\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/get-share-acl"
returns:
description: "The stored access policies specified on the queue."
type: "<xref href=\"com.azure.core.http.rest.PagedIterable?alt=com.azure.core.http.rest.PagedIterable&text=PagedIterable\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.models.ShareSignedIdentifier?alt=com.azure.storage.file.share.models.ShareSignedIdentifier&text=ShareSignedIdentifier\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareClient.getAccountName()"
fullName: "com.azure.storage.file.share.ShareClient.getAccountName()"
name: "getAccountName()"
nameWithType: "ShareClient.getAccountName()"
summary: "Get associated account name."
syntax: "public String getAccountName()"
desc: "Get associated account name."
returns:
description: "account name associated with this storage resource."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.storage.file.share.ShareClient.getAccountUrl()"
fullName: "com.azure.storage.file.share.ShareClient.getAccountUrl()"
name: "getAccountUrl()"
nameWithType: "ShareClient.getAccountUrl()"
summary: "Get the url of the storage account."
syntax: "public String getAccountUrl()"
desc: "Get the url of the storage account."
returns:
description: "the URL of the storage account"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.storage.file.share.ShareClient.getDirectoryClient(java.lang.String)"
fullName: "com.azure.storage.file.share.ShareClient.getDirectoryClient(String directoryName)"
name: "getDirectoryClient(String directoryName)"
nameWithType: "ShareClient.getDirectoryClient(String directoryName)"
summary: "Constructs a <xref uid=\"com.azure.storage.file.share.ShareDirectoryClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareDirectoryClient\"></xref> that interacts with the specified directory."
parameters:
- description: "Name of the directory"
name: "directoryName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public ShareDirectoryClient getDirectoryClient(String directoryName)"
desc: "Constructs a <xref uid=\"com.azure.storage.file.share.ShareDirectoryClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareDirectoryClient\"></xref> that interacts with the specified directory.\n\nIf the directory doesn't exist in the share <xref uid=\"com.azure.storage.file.share.ShareDirectoryClient.create()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"create\"></xref> in the client will need to be called before interaction with the directory can happen."
returns:
description: "a <xref uid=\"com.azure.storage.file.share.ShareDirectoryClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareDirectoryClient\"></xref> that interacts with the directory in the share"
type: "<xref href=\"com.azure.storage.file.share.ShareDirectoryClient?alt=com.azure.storage.file.share.ShareDirectoryClient&text=ShareDirectoryClient\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareClient.getFileClient(java.lang.String)"
fullName: "com.azure.storage.file.share.ShareClient.getFileClient(String filePath)"
name: "getFileClient(String filePath)"
nameWithType: "ShareClient.getFileClient(String filePath)"
summary: "Constructs a <xref uid=\"com.azure.storage.file.share.ShareFileClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareFileClient\"></xref> that interacts with the specified file."
parameters:
- description: "Name of the file"
name: "filePath"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public ShareFileClient getFileClient(String filePath)"
desc: "Constructs a <xref uid=\"com.azure.storage.file.share.ShareFileClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareFileClient\"></xref> that interacts with the specified file.\n\nIf the file doesn't exist in the share <xref uid=\"com.azure.storage.file.share.ShareFileClient.create(long)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareFileClient#create(long)\"></xref> ) create\\} in the client will need to be called before interaction with the file can happen."
returns:
description: "a <xref uid=\"com.azure.storage.file.share.ShareFileClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareFileClient\"></xref> that interacts with the file in the share"
type: "<xref href=\"com.azure.storage.file.share.ShareFileClient?alt=com.azure.storage.file.share.ShareFileClient&text=ShareFileClient\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareClient.getHttpPipeline()"
fullName: "com.azure.storage.file.share.ShareClient.getHttpPipeline()"
name: "getHttpPipeline()"
nameWithType: "ShareClient.getHttpPipeline()"
summary: "Gets the <xref uid=\"com.azure.core.http.HttpPipeline\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HttpPipeline\"></xref> powering this client."
syntax: "public HttpPipeline getHttpPipeline()"
desc: "Gets the <xref uid=\"com.azure.core.http.HttpPipeline\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HttpPipeline\"></xref> powering this client."
returns:
description: "The pipeline."
type: "<xref href=\"com.azure.core.http.HttpPipeline?alt=com.azure.core.http.HttpPipeline&text=HttpPipeline\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareClient.getPermission(java.lang.String)"
fullName: "com.azure.storage.file.share.ShareClient.getPermission(String filePermissionKey)"
name: "getPermission(String filePermissionKey)"
nameWithType: "ShareClient.getPermission(String filePermissionKey)"
summary: "Gets a permission for a given key"
parameters:
- description: "The file permission key."
name: "filePermissionKey"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public String getPermission(String filePermissionKey)"
desc: "Gets a permission for a given key\n\n**Code Samples**\n\n```java\nString response = shareClient.getPermission(\"filePermissionKey\");\n System.out.printf(\"The file permission is %s\", response);\n```"
returns:
description: "The file permission associated with the file permission key."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.storage.file.share.ShareClient.getPermissionWithResponse(java.lang.String,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareClient.getPermissionWithResponse(String filePermissionKey, Context context)"
name: "getPermissionWithResponse(String filePermissionKey, Context context)"
nameWithType: "ShareClient.getPermissionWithResponse(String filePermissionKey, Context context)"
summary: "Gets a permission for a given key."
parameters:
- description: "The file permission key."
name: "filePermissionKey"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<String> getPermissionWithResponse(String filePermissionKey, Context context)"
desc: "Gets a permission for a given key.\n\n**Code Samples**\n\n```java\nResponse<String> response = shareClient.getPermissionWithResponse(\"filePermissionKey\", Context.NONE);\n System.out.printf(\"The file permission is %s\", response.getValue());\n```"
returns:
description: "A response that contains th file permission associated with the file permission key."
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>&gt;"
- uid: "com.azure.storage.file.share.ShareClient.getProperties()"
fullName: "com.azure.storage.file.share.ShareClient.getProperties()"
name: "getProperties()"
nameWithType: "ShareClient.getProperties()"
summary: "Retrieves the properties of the share, these include the metadata associated to it and the quota that the share is restricted to."
syntax: "public ShareProperties getProperties()"
desc: "Retrieves the properties of the share, these include the metadata associated to it and the quota that the share is restricted to.\n\n**Code Samples**\n\nRetrieve the share properties\n\n```java\nShareProperties properties = shareClient.getProperties();\n System.out.printf(\"Share quota: %d, Metadata: %s\", properties.getQuota(), properties.getMetadata());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/get-share-properties"
returns:
description: "The <xref uid=\"com.azure.storage.file.share.models.ShareProperties\" data-throw-if-not-resolved=\"false\" data-raw-source=\"properties of the share\"></xref>"
type: "<xref href=\"com.azure.storage.file.share.models.ShareProperties?alt=com.azure.storage.file.share.models.ShareProperties&text=ShareProperties\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareClient.getPropertiesWithResponse(com.azure.storage.file.share.options.ShareGetPropertiesOptions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareClient.getPropertiesWithResponse(ShareGetPropertiesOptions options, Duration timeout, Context context)"
name: "getPropertiesWithResponse(ShareGetPropertiesOptions options, Duration timeout, Context context)"
nameWithType: "ShareClient.getPropertiesWithResponse(ShareGetPropertiesOptions options, Duration timeout, Context context)"
summary: "Retrieves the properties of the share, these include the metadata associated to it and the quota that the share is restricted to."
parameters:
- description: "<xref uid=\"com.azure.storage.file.share.options.ShareGetPropertiesOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareGetPropertiesOptions\"></xref>"
name: "options"
type: "<xref href=\"com.azure.storage.file.share.options.ShareGetPropertiesOptions?alt=com.azure.storage.file.share.options.ShareGetPropertiesOptions&text=ShareGetPropertiesOptions\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<ShareProperties> getPropertiesWithResponse(ShareGetPropertiesOptions options, Duration timeout, Context context)"
desc: "Retrieves the properties of the share, these include the metadata associated to it and the quota that the share is restricted to.\n\n**Code Samples**\n\nRetrieve the share properties\n\n```java\nShareProperties properties = shareClient.getPropertiesWithResponse(new ShareGetPropertiesOptions()\n .setRequestConditions(new ShareRequestConditions().setLeaseId(leaseId)),\n Duration.ofSeconds(1), new Context(key1, value1)).getValue();\n System.out.printf(\"Share quota: %d, Metadata: %s\", properties.getQuota(), properties.getMetadata());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/get-share-properties"
returns:
description: "A response containing <xref uid=\"com.azure.storage.file.share.models.ShareProperties\" data-throw-if-not-resolved=\"false\" data-raw-source=\"properties of the share\"></xref> with response status code"
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.models.ShareProperties?alt=com.azure.storage.file.share.models.ShareProperties&text=ShareProperties\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareClient.getPropertiesWithResponse(java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareClient.getPropertiesWithResponse(Duration timeout, Context context)"
name: "getPropertiesWithResponse(Duration timeout, Context context)"
nameWithType: "ShareClient.getPropertiesWithResponse(Duration timeout, Context context)"
summary: "Retrieves the properties of the share, these include the metadata associated to it and the quota that the share is restricted to."
parameters:
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<ShareProperties> getPropertiesWithResponse(Duration timeout, Context context)"
desc: "Retrieves the properties of the share, these include the metadata associated to it and the quota that the share is restricted to.\n\n**Code Samples**\n\nRetrieve the share properties\n\n```java\nShareProperties properties = shareClient.getPropertiesWithResponse(\n Duration.ofSeconds(1), new Context(key1, value1)).getValue();\n System.out.printf(\"Share quota: %d, Metadata: %s\", properties.getQuota(), properties.getMetadata());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/get-share-properties"
returns:
description: "A response containing <xref uid=\"com.azure.storage.file.share.models.ShareProperties\" data-throw-if-not-resolved=\"false\" data-raw-source=\"properties of the share\"></xref> with response status code"
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.models.ShareProperties?alt=com.azure.storage.file.share.models.ShareProperties&text=ShareProperties\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareClient.getRootDirectoryClient()"
fullName: "com.azure.storage.file.share.ShareClient.getRootDirectoryClient()"
name: "getRootDirectoryClient()"
nameWithType: "ShareClient.getRootDirectoryClient()"
summary: "Constructs a <xref uid=\"com.azure.storage.file.share.ShareDirectoryClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareDirectoryClient\"></xref> that interacts with the root directory in the share."
syntax: "public ShareDirectoryClient getRootDirectoryClient()"
desc: "Constructs a <xref uid=\"com.azure.storage.file.share.ShareDirectoryClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareDirectoryClient\"></xref> that interacts with the root directory in the share.\n\nIf the directory doesn't exist in the share <xref uid=\"com.azure.storage.file.share.ShareDirectoryClient.create()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"create\"></xref> in the client will need to be called before interaction with the directory can happen."
returns:
description: "a <xref uid=\"com.azure.storage.file.share.ShareDirectoryClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareDirectoryClient\"></xref> that interacts with the root directory in the share"
type: "<xref href=\"com.azure.storage.file.share.ShareDirectoryClient?alt=com.azure.storage.file.share.ShareDirectoryClient&text=ShareDirectoryClient\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareClient.getServiceVersion()"
fullName: "com.azure.storage.file.share.ShareClient.getServiceVersion()"
name: "getServiceVersion()"
nameWithType: "ShareClient.getServiceVersion()"
summary: "Gets the service version the client is using."
syntax: "public ShareServiceVersion getServiceVersion()"
desc: "Gets the service version the client is using."
returns:
description: "the service version the client is using."
type: "<xref href=\"com.azure.storage.file.share.ShareServiceVersion?alt=com.azure.storage.file.share.ShareServiceVersion&text=ShareServiceVersion\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareClient.getShareName()"
fullName: "com.azure.storage.file.share.ShareClient.getShareName()"
name: "getShareName()"
nameWithType: "ShareClient.getShareName()"
summary: "Get share name from share client."
syntax: "public String getShareName()"
desc: "Get share name from share client.\n\n**Code Samples**\n\n```java\nString shareName = shareClient.getShareName();\n System.out.println(\"The name of the share is \" + shareName);\n```"
returns:
description: "The name of the share."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.storage.file.share.ShareClient.getShareUrl()"
fullName: "com.azure.storage.file.share.ShareClient.getShareUrl()"
name: "getShareUrl()"
nameWithType: "ShareClient.getShareUrl()"
summary: "Get the url of the storage share client."
syntax: "public String getShareUrl()"
desc: "Get the url of the storage share client."
returns:
description: "the url of the Storage Share."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.storage.file.share.ShareClient.getSnapshotClient(java.lang.String)"
fullName: "com.azure.storage.file.share.ShareClient.getSnapshotClient(String snapshot)"
name: "getSnapshotClient(String snapshot)"
nameWithType: "ShareClient.getSnapshotClient(String snapshot)"
summary: "Creates a new <xref uid=\"com.azure.storage.file.share.ShareAsyncClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareAsyncClient\"></xref> linked to the `snapshot` of this share resource."
parameters:
- description: "the identifier for a specific snapshot of this share"
name: "snapshot"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public ShareClient getSnapshotClient(String snapshot)"
desc: "Creates a new <xref uid=\"com.azure.storage.file.share.ShareAsyncClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareAsyncClient\"></xref> linked to the `snapshot` of this share resource."
returns:
description: "a <xref uid=\"com.azure.storage.file.share.ShareClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareClient\"></xref> used to interact with the specific snapshot."
type: "<xref href=\"com.azure.storage.file.share.ShareClient?alt=com.azure.storage.file.share.ShareClient&text=ShareClient\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareClient.getSnapshotId()"
fullName: "com.azure.storage.file.share.ShareClient.getSnapshotId()"
name: "getSnapshotId()"
nameWithType: "ShareClient.getSnapshotId()"
summary: "Get snapshot id which attached to <xref uid=\"com.azure.storage.file.share.ShareClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareClient\"></xref>."
syntax: "public String getSnapshotId()"
desc: "Get snapshot id which attached to <xref uid=\"com.azure.storage.file.share.ShareClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareClient\"></xref>. Return `null` if no snapshot id attached.\n\n**Code Samples**\n\nGet the share snapshot id.\n\n```java\nOffsetDateTime currentTime = OffsetDateTime.of(LocalDateTime.now(), ZoneOffset.UTC);\n ShareClient shareClient = new ShareClientBuilder().endpoint(\"https://${accountName}.file.core.windows.net\")\n .sasToken(\"${SASToken}\")\n .shareName(\"myshare\")\n .snapshot(currentTime.toString())\n .buildClient();\n\n System.out.printf(\"Snapshot ID: %s%n\", shareClient.getSnapshotId());\n```"
returns:
description: "The snapshot id which is a unique <code>DateTime</code> value that identifies the share snapshot to its base\n share."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.storage.file.share.ShareClient.getStatistics()"
fullName: "com.azure.storage.file.share.ShareClient.getStatistics()"
name: "getStatistics()"
nameWithType: "ShareClient.getStatistics()"
summary: "Retrieves storage statistics about the share."
syntax: "public ShareStatistics getStatistics()"
desc: "Retrieves storage statistics about the share.\n\n**Code Samples**\n\nRetrieve the storage statistics\n\n```java\nShareStatistics response = shareClient.getStatistics();\n System.out.printf(\"The share is using %d GB\", response.getShareUsageInGB());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/get-share-stats"
returns:
description: "The storage <xref uid=\"com.azure.storage.file.share.models.ShareStatistics\" data-throw-if-not-resolved=\"false\" data-raw-source=\"statistics of the share\"></xref>"
type: "<xref href=\"com.azure.storage.file.share.models.ShareStatistics?alt=com.azure.storage.file.share.models.ShareStatistics&text=ShareStatistics\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareClient.getStatisticsWithResponse(com.azure.storage.file.share.options.ShareGetStatisticsOptions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareClient.getStatisticsWithResponse(ShareGetStatisticsOptions options, Duration timeout, Context context)"
name: "getStatisticsWithResponse(ShareGetStatisticsOptions options, Duration timeout, Context context)"
nameWithType: "ShareClient.getStatisticsWithResponse(ShareGetStatisticsOptions options, Duration timeout, Context context)"
summary: "Retrieves storage statistics about the share."
parameters:
- description: "<xref uid=\"com.azure.storage.file.share.options.ShareGetStatisticsOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareGetStatisticsOptions\"></xref>"
name: "options"
type: "<xref href=\"com.azure.storage.file.share.options.ShareGetStatisticsOptions?alt=com.azure.storage.file.share.options.ShareGetStatisticsOptions&text=ShareGetStatisticsOptions\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<ShareStatistics> getStatisticsWithResponse(ShareGetStatisticsOptions options, Duration timeout, Context context)"
desc: "Retrieves storage statistics about the share.\n\n**Code Samples**\n\nRetrieve the storage statistics\n\n```java\nResponse<ShareStatistics> response = shareClient.getStatisticsWithResponse(\n new ShareGetStatisticsOptions().setRequestConditions(new ShareRequestConditions().setLeaseId(leaseId)),\n Duration.ofSeconds(1), new Context(key1, value1));\n System.out.printf(\"The share is using %d GB\", response.getValue().getShareUsageInGB());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/get-share-stats"
returns:
description: "A response containing the <xref uid=\"com.azure.storage.file.share.models.ShareStatistics\" data-throw-if-not-resolved=\"false\" data-raw-source=\"statistics of the share\"></xref>"
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.models.ShareStatistics?alt=com.azure.storage.file.share.models.ShareStatistics&text=ShareStatistics\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareClient.getStatisticsWithResponse(java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareClient.getStatisticsWithResponse(Duration timeout, Context context)"
name: "getStatisticsWithResponse(Duration timeout, Context context)"
nameWithType: "ShareClient.getStatisticsWithResponse(Duration timeout, Context context)"
summary: "Retrieves storage statistics about the share."
parameters:
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<ShareStatistics> getStatisticsWithResponse(Duration timeout, Context context)"
desc: "Retrieves storage statistics about the share.\n\n**Code Samples**\n\nRetrieve the storage statistics\n\n```java\nResponse<ShareStatistics> response = shareClient.getStatisticsWithResponse(\n Duration.ofSeconds(1), new Context(key1, value1));\n System.out.printf(\"The share is using %d GB\", response.getValue().getShareUsageInGB());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/get-share-stats"
returns:
description: "A response containing the <xref uid=\"com.azure.storage.file.share.models.ShareStatistics\" data-throw-if-not-resolved=\"false\" data-raw-source=\"statistics of the share\"></xref>"
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.models.ShareStatistics?alt=com.azure.storage.file.share.models.ShareStatistics&text=ShareStatistics\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareClient.setAccessPolicy(java.util.List<com.azure.storage.file.share.models.ShareSignedIdentifier>)"
fullName: "com.azure.storage.file.share.ShareClient.setAccessPolicy(List<ShareSignedIdentifier> permissions)"
name: "setAccessPolicy(List<ShareSignedIdentifier> permissions)"
nameWithType: "ShareClient.setAccessPolicy(List<ShareSignedIdentifier> permissions)"
summary: "Sets stored access policies for the share."
parameters:
- description: "Access policies to set on the queue"
name: "permissions"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/List.html\">List</a>&lt;<xref href=\"com.azure.storage.file.share.models.ShareSignedIdentifier?alt=com.azure.storage.file.share.models.ShareSignedIdentifier&text=ShareSignedIdentifier\" data-throw-if-not-resolved=\"False\" />&gt;"
syntax: "public ShareInfo setAccessPolicy(List<ShareSignedIdentifier> permissions)"
desc: "Sets stored access policies for the share.\n\n**Code Samples**\n\nSet a read only stored access policy\n\n```java\nShareAccessPolicy accessPolicy = new ShareAccessPolicy().setPermissions(\"r\")\n .setStartsOn(OffsetDateTime.now(ZoneOffset.UTC))\n .setExpiresOn(OffsetDateTime.now(ZoneOffset.UTC).plusDays(10));\n\n ShareSignedIdentifier permission = new ShareSignedIdentifier().setId(\"mypolicy\").setAccessPolicy(accessPolicy);\n\n shareClient.setAccessPolicy(Collections.singletonList(permission));\n System.out.println(\"Setting access policies completed.\");\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/set-share-acl"
returns:
description: "The <xref uid=\"com.azure.storage.file.share.models.ShareInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"information of the share\"></xref>"
type: "<xref href=\"com.azure.storage.file.share.models.ShareInfo?alt=com.azure.storage.file.share.models.ShareInfo&text=ShareInfo\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareClient.setAccessPolicyWithResponse(com.azure.storage.file.share.options.ShareSetAccessPolicyOptions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareClient.setAccessPolicyWithResponse(ShareSetAccessPolicyOptions options, Duration timeout, Context context)"
name: "setAccessPolicyWithResponse(ShareSetAccessPolicyOptions options, Duration timeout, Context context)"
nameWithType: "ShareClient.setAccessPolicyWithResponse(ShareSetAccessPolicyOptions options, Duration timeout, Context context)"
summary: "Sets stored access policies for the share."
parameters:
- description: "<xref uid=\"com.azure.storage.file.share.options.ShareSetAccessPolicyOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareSetAccessPolicyOptions\"></xref>"
name: "options"
type: "<xref href=\"com.azure.storage.file.share.options.ShareSetAccessPolicyOptions?alt=com.azure.storage.file.share.options.ShareSetAccessPolicyOptions&text=ShareSetAccessPolicyOptions\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<ShareInfo> setAccessPolicyWithResponse(ShareSetAccessPolicyOptions options, Duration timeout, Context context)"
desc: "Sets stored access policies for the share.\n\n**Code Samples**\n\nSet a read only stored access policy\n\n```java\nShareAccessPolicy accessPolicy = new ShareAccessPolicy().setPermissions(\"r\")\n .setStartsOn(OffsetDateTime.now(ZoneOffset.UTC))\n .setExpiresOn(OffsetDateTime.now(ZoneOffset.UTC).plusDays(10));\n\n ShareSignedIdentifier permission = new ShareSignedIdentifier().setId(\"mypolicy\").setAccessPolicy(accessPolicy);\n\n Response<ShareInfo> response = shareClient.setAccessPolicyWithResponse(\n new ShareSetAccessPolicyOptions().setPermissions(Collections.singletonList(permission))\n .setRequestConditions(new ShareRequestConditions().setLeaseId(leaseId)),\n Duration.ofSeconds(1), new Context(key1, value1));\n System.out.printf(\"Setting access policies completed with status code %d\", response.getStatusCode());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/set-share-acl"
returns:
description: "A response containing the <xref uid=\"com.azure.storage.file.share.models.ShareInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"information of the share\"></xref> with headers and response status\n code"
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.models.ShareInfo?alt=com.azure.storage.file.share.models.ShareInfo&text=ShareInfo\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareClient.setAccessPolicyWithResponse(java.util.List<com.azure.storage.file.share.models.ShareSignedIdentifier>,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareClient.setAccessPolicyWithResponse(List<ShareSignedIdentifier> permissions, Duration timeout, Context context)"
name: "setAccessPolicyWithResponse(List<ShareSignedIdentifier> permissions, Duration timeout, Context context)"
nameWithType: "ShareClient.setAccessPolicyWithResponse(List<ShareSignedIdentifier> permissions, Duration timeout, Context context)"
summary: "Sets stored access policies for the share."
parameters:
- description: "Access policies to set on the queue"
name: "permissions"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/List.html\">List</a>&lt;<xref href=\"com.azure.storage.file.share.models.ShareSignedIdentifier?alt=com.azure.storage.file.share.models.ShareSignedIdentifier&text=ShareSignedIdentifier\" data-throw-if-not-resolved=\"False\" />&gt;"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<ShareInfo> setAccessPolicyWithResponse(List<ShareSignedIdentifier> permissions, Duration timeout, Context context)"
desc: "Sets stored access policies for the share.\n\n**Code Samples**\n\nSet a read only stored access policy\n\n```java\nShareAccessPolicy accessPolicy = new ShareAccessPolicy().setPermissions(\"r\")\n .setStartsOn(OffsetDateTime.now(ZoneOffset.UTC))\n .setExpiresOn(OffsetDateTime.now(ZoneOffset.UTC).plusDays(10));\n\n ShareSignedIdentifier permission = new ShareSignedIdentifier().setId(\"mypolicy\").setAccessPolicy(accessPolicy);\n\n Response<ShareInfo> response = shareClient.setAccessPolicyWithResponse(Collections.singletonList(permission),\n Duration.ofSeconds(1), new Context(key1, value1));\n System.out.printf(\"Setting access policies completed with status code %d\", response.getStatusCode());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/set-share-acl"
returns:
description: "A response containing the <xref uid=\"com.azure.storage.file.share.models.ShareInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"information of the share\"></xref> with headers and response status\n code"
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.models.ShareInfo?alt=com.azure.storage.file.share.models.ShareInfo&text=ShareInfo\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareClient.setMetadata(java.util.Map<java.lang.String,java.lang.String>)"
fullName: "com.azure.storage.file.share.ShareClient.setMetadata(Map<String,String> metadata)"
name: "setMetadata(Map<String,String> metadata)"
nameWithType: "ShareClient.setMetadata(Map<String,String> metadata)"
summary: "Sets the user-defined metadata to associate to the share."
parameters:
- description: "Metadata to set on the share, if null is passed the metadata for the share is cleared"
name: "metadata"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/Map.html\">Map</a>&lt;<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>,<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>&gt;"
syntax: "public ShareInfo setMetadata(Map<String,String> metadata)"
desc: "Sets the user-defined metadata to associate to the share.\n\nIf `null` is passed for the metadata it will clear the metadata associated to the share.\n\n**Code Samples**\n\nSet the metadata to \"share:updatedMetadata\"\n\n```java\nshareClient.setMetadata(Collections.singletonMap(\"share\", \"updatedMetadata\"));\n System.out.println(\"Setting the share metadata.\");\n```\n\nClear the metadata of the share\n\n```java\nshareClient.setMetadata(null);\n System.out.println(\"Clear metadata completed.\");\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/set-share-metadata"
returns:
description: "The <xref uid=\"com.azure.storage.file.share.models.ShareProperties\" data-throw-if-not-resolved=\"false\" data-raw-source=\"properties of the share\"></xref>"
type: "<xref href=\"com.azure.storage.file.share.models.ShareInfo?alt=com.azure.storage.file.share.models.ShareInfo&text=ShareInfo\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareClient.setMetadataWithResponse(com.azure.storage.file.share.options.ShareSetMetadataOptions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareClient.setMetadataWithResponse(ShareSetMetadataOptions options, Duration timeout, Context context)"
name: "setMetadataWithResponse(ShareSetMetadataOptions options, Duration timeout, Context context)"
nameWithType: "ShareClient.setMetadataWithResponse(ShareSetMetadataOptions options, Duration timeout, Context context)"
summary: "Sets the user-defined metadata to associate to the share."
parameters:
- description: "<xref uid=\"com.azure.storage.file.share.options.ShareSetMetadataOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareSetMetadataOptions\"></xref>"
name: "options"
type: "<xref href=\"com.azure.storage.file.share.options.ShareSetMetadataOptions?alt=com.azure.storage.file.share.options.ShareSetMetadataOptions&text=ShareSetMetadataOptions\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<ShareInfo> setMetadataWithResponse(ShareSetMetadataOptions options, Duration timeout, Context context)"
desc: "Sets the user-defined metadata to associate to the share.\n\nIf `null` is passed for the metadata it will clear the metadata associated to the share.\n\n**Code Samples**\n\nSet the metadata to \"share:updatedMetadata\"\n\n```java\nResponse<ShareInfo> response = shareClient.setMetadataWithResponse(new ShareSetMetadataOptions()\n .setMetadata(Collections.singletonMap(\"share\", \"updatedMetadata\"))\n .setRequestConditions(new ShareRequestConditions().setLeaseId(leaseId)),\n Duration.ofSeconds(1),\n new Context(key1, value1));\n System.out.printf(\"Setting the share metadata completed with status code %d\", response.getStatusCode());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/set-share-metadata"
returns:
description: "A response containing <xref uid=\"com.azure.storage.file.share.models.ShareProperties\" data-throw-if-not-resolved=\"false\" data-raw-source=\"properties of the share\"></xref> with response status code"
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.models.ShareInfo?alt=com.azure.storage.file.share.models.ShareInfo&text=ShareInfo\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareClient.setMetadataWithResponse(java.util.Map<java.lang.String,java.lang.String>,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareClient.setMetadataWithResponse(Map<String,String> metadata, Duration timeout, Context context)"
name: "setMetadataWithResponse(Map<String,String> metadata, Duration timeout, Context context)"
nameWithType: "ShareClient.setMetadataWithResponse(Map<String,String> metadata, Duration timeout, Context context)"
summary: "Sets the user-defined metadata to associate to the share."
parameters:
- description: "Metadata to set on the share, if null is passed the metadata for the share is cleared"
name: "metadata"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/Map.html\">Map</a>&lt;<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>,<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>&gt;"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<ShareInfo> setMetadataWithResponse(Map<String,String> metadata, Duration timeout, Context context)"
desc: "Sets the user-defined metadata to associate to the share.\n\nIf `null` is passed for the metadata it will clear the metadata associated to the share.\n\n**Code Samples**\n\nSet the metadata to \"share:updatedMetadata\"\n\n```java\nResponse<ShareInfo> response = shareClient.setMetadataWithResponse(\n Collections.singletonMap(\"share\", \"updatedMetadata\"), Duration.ofSeconds(1),\n new Context(key1, value1));\n System.out.printf(\"Setting the share metadata completed with status code %d\", response.getStatusCode());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/set-share-metadata"
returns:
description: "A response containing <xref uid=\"com.azure.storage.file.share.models.ShareProperties\" data-throw-if-not-resolved=\"false\" data-raw-source=\"properties of the share\"></xref> with response status code"
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.models.ShareInfo?alt=com.azure.storage.file.share.models.ShareInfo&text=ShareInfo\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareClient.setProperties(com.azure.storage.file.share.options.ShareSetPropertiesOptions)"
fullName: "com.azure.storage.file.share.ShareClient.setProperties(ShareSetPropertiesOptions options)"
name: "setProperties(ShareSetPropertiesOptions options)"
nameWithType: "ShareClient.setProperties(ShareSetPropertiesOptions options)"
summary: "Sets the share's properties."
parameters:
- description: "<xref uid=\"com.azure.storage.file.share.options.ShareSetPropertiesOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareSetPropertiesOptions\"></xref>"
name: "options"
type: "<xref href=\"com.azure.storage.file.share.options.ShareSetPropertiesOptions?alt=com.azure.storage.file.share.options.ShareSetPropertiesOptions&text=ShareSetPropertiesOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public ShareInfo setProperties(ShareSetPropertiesOptions options)"
desc: "Sets the share's properties.\n\n**Code Samples**\n\n```java\nSystem.out.println(\"Setting the share access tier completed.\" + shareClient.setProperties(\n new ShareSetPropertiesOptions().setAccessTier(ShareAccessTier.HOT).setQuotaInGb(1024)));\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/get-share-properties"
returns:
description: "The <xref uid=\"com.azure.storage.file.share.models.ShareInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"information about the share\"></xref>"
type: "<xref href=\"com.azure.storage.file.share.models.ShareInfo?alt=com.azure.storage.file.share.models.ShareInfo&text=ShareInfo\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareClient.setPropertiesWithResponse(com.azure.storage.file.share.options.ShareSetPropertiesOptions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareClient.setPropertiesWithResponse(ShareSetPropertiesOptions options, Duration timeout, Context context)"
name: "setPropertiesWithResponse(ShareSetPropertiesOptions options, Duration timeout, Context context)"
nameWithType: "ShareClient.setPropertiesWithResponse(ShareSetPropertiesOptions options, Duration timeout, Context context)"
summary: "Sets the share's properties."
parameters:
- description: "<xref uid=\"com.azure.storage.file.share.options.ShareSetPropertiesOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareSetPropertiesOptions\"></xref>"
name: "options"
type: "<xref href=\"com.azure.storage.file.share.options.ShareSetPropertiesOptions?alt=com.azure.storage.file.share.options.ShareSetPropertiesOptions&text=ShareSetPropertiesOptions\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<ShareInfo> setPropertiesWithResponse(ShareSetPropertiesOptions options, Duration timeout, Context context)"
desc: "Sets the share's properties.\n\n**Code Samples**\n\n```java\nResponse<ShareInfo> response = shareClient.setPropertiesWithResponse(\n new ShareSetPropertiesOptions().setAccessTier(ShareAccessTier.HOT).setQuotaInGb(1024),\n Duration.ofSeconds(1), new Context(key1, value1));\n System.out.printf(\"Setting the share access tier completed with status code %d\", response.getStatusCode());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/get-share-properties"
returns:
description: "A response containing <xref uid=\"com.azure.storage.file.share.models.ShareInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"information about the share\"></xref> with response status code"
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.models.ShareInfo?alt=com.azure.storage.file.share.models.ShareInfo&text=ShareInfo\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareClient.setQuota(int)"
fullName: "com.azure.storage.file.share.ShareClient.setQuota(int quotaInGB)"
name: "setQuota(int quotaInGB)"
nameWithType: "ShareClient.setQuota(int quotaInGB)"
summary: "Sets the maximum size in GB that the share is allowed to grow."
deprecatedTag: "Use <xref uid=\"com.azure.storage.file.share.ShareClient.setProperties(com.azure.storage.file.share.options.ShareSetPropertiesOptions)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareClient#setProperties(ShareSetPropertiesOptions)\"></xref>"
parameters:
- description: "Size in GB to limit the share's growth. The quota in GB must be between 1 and 5120."
name: "quotaInGB"
type: "<xref href=\"int?alt=int&text=int\" data-throw-if-not-resolved=\"False\" />"
syntax: "@Deprecated\npublic ShareInfo setQuota(int quotaInGB)"
desc: "Sets the maximum size in GB that the share is allowed to grow.\n\n**Code Samples**\n\nSet the quota to 1024 GB\n\n```java\nSystem.out.println(\"Setting the share quota completed.\" + shareClient.setQuota(1024));\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/get-share-properties"
hasDeprecatedTag: true
returns:
description: "The <xref uid=\"com.azure.storage.file.share.models.ShareInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"information about the share\"></xref>"
type: "<xref href=\"com.azure.storage.file.share.models.ShareInfo?alt=com.azure.storage.file.share.models.ShareInfo&text=ShareInfo\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareClient.setQuotaWithResponse(int,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareClient.setQuotaWithResponse(int quotaInGB, Duration timeout, Context context)"
name: "setQuotaWithResponse(int quotaInGB, Duration timeout, Context context)"
nameWithType: "ShareClient.setQuotaWithResponse(int quotaInGB, Duration timeout, Context context)"
summary: "Sets the maximum size in GB that the share is allowed to grow."
deprecatedTag: "Use <xref uid=\"com.azure.storage.file.share.ShareClient.setPropertiesWithResponse(com.azure.storage.file.share.options.ShareSetPropertiesOptions,java.time.Duration,com.azure.core.util.Context)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareClient#setPropertiesWithResponse(ShareSetPropertiesOptions, Duration, Context)\"></xref>"
parameters:
- description: "Size in GB to limit the share's growth. The quota in GB must be between 1 and 5120."
name: "quotaInGB"
type: "<xref href=\"int?alt=int&text=int\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "@Deprecated\npublic Response<ShareInfo> setQuotaWithResponse(int quotaInGB, Duration timeout, Context context)"
desc: "Sets the maximum size in GB that the share is allowed to grow.\n\n**Code Samples**\n\nSet the quota to 1024 GB\n\n```java\nResponse<ShareInfo> response = shareClient.setQuotaWithResponse(1024,\n Duration.ofSeconds(1), new Context(key1, value1));\n System.out.printf(\"Setting the share quota completed with status code %d\", response.getStatusCode());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/get-share-properties"
hasDeprecatedTag: true
returns:
description: "A response containing <xref uid=\"com.azure.storage.file.share.models.ShareInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"information about the share\"></xref> with response status code"
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.models.ShareInfo?alt=com.azure.storage.file.share.models.ShareInfo&text=ShareInfo\" data-throw-if-not-resolved=\"False\" />&gt;"
type: "class"
desc: "This class provides a client that contains all the operations for interacting with a share in Azure Storage Share. Operations allowed by the client are creating and deleting the share, creating snapshots for the share, creating and deleting directories in the share and retrieving and updating properties metadata and access policies of the share.\n\n**Instantiating a Synchronous Share Client**\n\n```java\nShareClient client = new ShareClientBuilder()\n .connectionString(\"${connectionString}\")\n .endpoint(\"${endpoint}\")\n .buildClient();\n```\n\nView <xref uid=\"com.azure.storage.file.share.ShareClientBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"this\"></xref> for additional ways to construct the client."
metadata: {}
package: "com.azure.storage.file.share"
artifact: com.azure:azure-storage-file-share:12.15.1