-
Notifications
You must be signed in to change notification settings - Fork 255
/
com.azure.storage.file.share.ShareClient.yml
1082 lines (1082 loc) · 136 KB
/
com.azure.storage.file.share.ShareClient.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
### 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\" />"
inheritedClassMethods:
- classRef: "java.lang.<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html\">Object</a>"
methodsRef:
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--\">clone</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-\">equals</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--\">finalize</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--\">getClass</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--\">hashCode</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--\">notify</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--\">notifyAll</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--\">toString</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--\">wait</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-\">wait</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-\">wait</a>"
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\" /><<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.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><<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>>"
- 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\" /><<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.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><<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>>"
- 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\" /><<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>,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><<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>>"
- 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\" /><<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.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\" /><<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.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\" /><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>>"
- 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><<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>>"
- 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\" /><<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.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\" /><<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.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><<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>>"
- 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\" /><<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.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\" /><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html\">Boolean</a>>"
- 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\" /><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Void.html\">Void</a>>"
- 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\" /><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html\">Boolean</a>>"
- 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\" /><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Void.html\">Void</a>>"
- 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\" /><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Void.html\">Void</a>>"
- 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\" /><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html\">Boolean</a>>"
- 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\" /><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Void.html\">Void</a>>"
- 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\" /><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Void.html\">Void</a>>"
- 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\" /><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html\">Boolean</a>>"
- 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\" /><<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\" />>"
- 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\" /><<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\" />>"
- 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\" /><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>>"
- 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\" /><<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(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\" /><<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.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\" /><<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(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\" /><<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.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><<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\" />>"
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\" /><<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(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><<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\" />>"
- 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\" /><<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.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><<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>>"
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\" /><<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(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><<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>>"
- 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\" />"