public class DataLakePathClient extends Object
| Modifier and Type | Method and Description |
|---|---|
PathInfo |
create()
Creates a resource.
|
PathInfo |
create(boolean overwrite)
Creates a resource.
|
com.azure.core.http.rest.Response<PathInfo> |
createWithResponse(String permissions,
String umask,
PathHttpHeaders headers,
Map<String,String> metadata,
DataLakeRequestConditions requestConditions,
Duration timeout,
com.azure.core.util.Context context)
Creates a resource.
|
Boolean |
exists()
Gets if the path this client represents exists in the cloud.
|
com.azure.core.http.rest.Response<Boolean> |
existsWithResponse(Duration timeout,
com.azure.core.util.Context context)
Gets if the path this client represents exists in the cloud.
|
String |
generateSas(DataLakeServiceSasSignatureValues dataLakeServiceSasSignatureValues)
Generates a service SAS for the path using the specified
DataLakeServiceSasSignatureValues |
String |
generateSas(DataLakeServiceSasSignatureValues dataLakeServiceSasSignatureValues,
com.azure.core.util.Context context)
Generates a service SAS for the path using the specified
DataLakeServiceSasSignatureValues |
String |
generateUserDelegationSas(DataLakeServiceSasSignatureValues dataLakeServiceSasSignatureValues,
UserDelegationKey userDelegationKey)
Generates a user delegation SAS for the path using the specified
DataLakeServiceSasSignatureValues. |
String |
generateUserDelegationSas(DataLakeServiceSasSignatureValues dataLakeServiceSasSignatureValues,
UserDelegationKey userDelegationKey,
String accountName,
com.azure.core.util.Context context)
Generates a user delegation SAS for the path using the specified
DataLakeServiceSasSignatureValues. |
PathAccessControl |
getAccessControl()
Returns the access control for a resource.
|
com.azure.core.http.rest.Response<PathAccessControl> |
getAccessControlWithResponse(boolean userPrincipalNameReturned,
DataLakeRequestConditions requestConditions,
Duration timeout,
com.azure.core.util.Context context)
Returns the access control for a resource.
|
String |
getAccountName()
Gets the associated account name.
|
String |
getFileSystemName()
Gets the name of the File System in which this object lives.
|
com.azure.core.http.HttpPipeline |
getHttpPipeline()
Gets the
HttpPipeline powering this client. |
PathProperties |
getProperties()
Returns the resources's metadata and properties.
|
com.azure.core.http.rest.Response<PathProperties> |
getPropertiesWithResponse(DataLakeRequestConditions requestConditions,
Duration timeout,
com.azure.core.util.Context context)
Returns the resource's metadata and properties.
|
DataLakeServiceVersion |
getServiceVersion()
Gets the service version the client is using.
|
AccessControlChangeResult |
removeAccessControlRecursive(List<PathRemoveAccessControlEntry> accessControlList)
Recursively removes the access control on a path and all subpaths.
|
com.azure.core.http.rest.Response<AccessControlChangeResult> |
removeAccessControlRecursiveWithResponse(PathRemoveAccessControlRecursiveOptions options,
Duration timeout,
com.azure.core.util.Context context)
Recursively removes the access control on a path and all subpaths.
|
PathInfo |
setAccessControlList(List<PathAccessControlEntry> accessControlList,
String group,
String owner)
Changes the access control list, group and/or owner for a resource.
|
com.azure.core.http.rest.Response<PathInfo> |
setAccessControlListWithResponse(List<PathAccessControlEntry> accessControlList,
String group,
String owner,
DataLakeRequestConditions requestConditions,
Duration timeout,
com.azure.core.util.Context context)
Changes the access control list, group and/or owner for a resource.
|
AccessControlChangeResult |
setAccessControlRecursive(List<PathAccessControlEntry> accessControlList)
Recursively sets the access control on a path and all subpaths.
|
com.azure.core.http.rest.Response<AccessControlChangeResult> |
setAccessControlRecursiveWithResponse(PathSetAccessControlRecursiveOptions options,
Duration timeout,
com.azure.core.util.Context context)
Recursively sets the access control on a path and all subpaths.
|
void |
setHttpHeaders(PathHttpHeaders headers)
Changes a resources's HTTP header properties.
|
com.azure.core.http.rest.Response<Void> |
setHttpHeadersWithResponse(PathHttpHeaders headers,
DataLakeRequestConditions requestConditions,
Duration timeout,
com.azure.core.util.Context context)
Changes a resources's HTTP header properties.
|
void |
setMetadata(Map<String,String> metadata)
Changes a resource's metadata.
|
com.azure.core.http.rest.Response<Void> |
setMetadataWithResponse(Map<String,String> metadata,
DataLakeRequestConditions requestConditions,
Duration timeout,
com.azure.core.util.Context context)
Changes a resource's metadata.
|
PathInfo |
setPermissions(PathPermissions permissions,
String group,
String owner)
Changes the permissions, group and/or owner for a resource.
|
com.azure.core.http.rest.Response<PathInfo> |
setPermissionsWithResponse(PathPermissions permissions,
String group,
String owner,
DataLakeRequestConditions requestConditions,
Duration timeout,
com.azure.core.util.Context context)
Changes the permissions, group and/or owner for a resource.
|
AccessControlChangeResult |
updateAccessControlRecursive(List<PathAccessControlEntry> accessControlList)
Recursively updates the access control on a path and all subpaths.
|
com.azure.core.http.rest.Response<AccessControlChangeResult> |
updateAccessControlRecursiveWithResponse(PathUpdateAccessControlRecursiveOptions options,
Duration timeout,
com.azure.core.util.Context context)
Recursively updates the access control on a path and all subpaths.
|
public String getAccountName()
public String getFileSystemName()
public com.azure.core.http.HttpPipeline getHttpPipeline()
HttpPipeline powering this client.public DataLakeServiceVersion getServiceVersion()
public PathInfo create()
Code Samples
System.out.printf("Last Modified Time:%s", client.create().getLastModified());
For more information see the Azure Docs
public PathInfo create(boolean overwrite)
Code Samples
boolean overwrite = true;
System.out.printf("Last Modified Time:%s", client.create(true).getLastModified());
For more information see the Azure Docs
overwrite - Whether or not to overwrite, should data exist on the path.public com.azure.core.http.rest.Response<PathInfo> createWithResponse(String permissions, String umask, PathHttpHeaders headers, Map<String,String> metadata, DataLakeRequestConditions requestConditions, Duration timeout, com.azure.core.util.Context context)
Code Samples
PathHttpHeaders httpHeaders = new PathHttpHeaders()
.setContentLanguage("en-US")
.setContentType("binary");
DataLakeRequestConditions requestConditions = new DataLakeRequestConditions()
.setLeaseId(leaseId);
String permissions = "permissions";
String umask = "umask";
Response<PathInfo> response = client.createWithResponse(permissions, umask, httpHeaders,
Collections.singletonMap("metadata", "value"), requestConditions, timeout,
new Context(key1, value1));
System.out.printf("Last Modified Time:%s", response.getValue().getLastModified());
For more information see the Azure Docs
permissions - POSIX access permissions for the resource owner, the resource owning group, and others.umask - Restricts permissions of the resource to be created.headers - PathHttpHeadersmetadata - Metadata to associate with the resource. If there is leading or trailing whitespace in any
metadata key or value, it must be removed or encoded.requestConditions - DataLakeRequestConditionstimeout - An optional timeout value beyond which a RuntimeException will be raised.context - Additional context that is passed through the Http pipeline during the service call.public void setMetadata(Map<String,String> metadata)
Code Samples
client.setMetadata(Collections.singletonMap("metadata", "value"));
System.out.println("Set metadata completed");
For more information, see the Azure Docs
metadata - Metadata to associate with the resource. If there is leading or trailing whitespace in any
metadata key or value, it must be removed or encoded.public com.azure.core.http.rest.Response<Void> setMetadataWithResponse(Map<String,String> metadata, DataLakeRequestConditions requestConditions, Duration timeout, com.azure.core.util.Context context)
Code Samples
DataLakeRequestConditions requestConditions = new DataLakeRequestConditions().setLeaseId(leaseId);
client.setMetadataWithResponse(Collections.singletonMap("metadata", "value"), requestConditions, timeout,
new Context(key2, value2));
System.out.println("Set metadata completed");
For more information, see the Azure Docs
metadata - Metadata to associate with the resource. If there is leading or trailing whitespace in any
metadata key or value, it must be removed or encoded.requestConditions - DataLakeRequestConditionstimeout - An optional timeout value beyond which a RuntimeException will be raised.context - Additional context that is passed through the Http pipeline during the service call.public void setHttpHeaders(PathHttpHeaders headers)
Code Samples
client.setHttpHeaders(new PathHttpHeaders()
.setContentLanguage("en-US")
.setContentType("binary"));
For more information, see the Azure Docs
headers - PathHttpHeaderspublic com.azure.core.http.rest.Response<Void> setHttpHeadersWithResponse(PathHttpHeaders headers, DataLakeRequestConditions requestConditions, Duration timeout, com.azure.core.util.Context context)
Code Samples
DataLakeRequestConditions requestConditions = new DataLakeRequestConditions().setLeaseId(leaseId);
Response<Void> response = client.setHttpHeadersWithResponse(new PathHttpHeaders()
.setContentLanguage("en-US")
.setContentType("binary"), requestConditions, timeout, new Context(key2, value2));
System.out.printf("Set HTTP headers completed with status %d%n",
response.getStatusCode());
For more information, see the Azure Docs
headers - PathHttpHeadersrequestConditions - DataLakeRequestConditionstimeout - An optional timeout value beyond which a RuntimeException will be raised.context - Additional context that is passed through the Http pipeline during the service call.public PathInfo setAccessControlList(List<PathAccessControlEntry> accessControlList, String group, String owner)
Code Samples
PathAccessControlEntry pathAccessControlEntry = new PathAccessControlEntry()
.setEntityId("entityId")
.setPermissions(new RolePermissions().setReadPermission(true));
List<PathAccessControlEntry> pathAccessControlEntries = new ArrayList<>();
pathAccessControlEntries.add(pathAccessControlEntry);
String group = "group";
String owner = "owner";
System.out.printf("Last Modified Time: %s", client.setAccessControlList(pathAccessControlEntries, group, owner)
.getLastModified());
For more information, see the Azure Docs
accessControlList - A list of PathAccessControlEntry objects.group - The group of the resource.owner - The owner of the resource.public com.azure.core.http.rest.Response<PathInfo> setAccessControlListWithResponse(List<PathAccessControlEntry> accessControlList, String group, String owner, DataLakeRequestConditions requestConditions, Duration timeout, com.azure.core.util.Context context)
Code Samples
DataLakeRequestConditions requestConditions = new DataLakeRequestConditions().setLeaseId(leaseId);
PathAccessControlEntry pathAccessControlEntry = new PathAccessControlEntry()
.setEntityId("entityId")
.setPermissions(new RolePermissions().setReadPermission(true));
List<PathAccessControlEntry> pathAccessControlEntries = new ArrayList<>();
pathAccessControlEntries.add(pathAccessControlEntry);
String group = "group";
String owner = "owner";
Response<PathInfo> response = client.setAccessControlListWithResponse(pathAccessControlEntries, group, owner,
requestConditions, timeout, new Context(key2, value2));
System.out.printf("Last Modified Time: %s", response.getValue().getLastModified());
For more information, see the Azure Docs
accessControlList - A list of PathAccessControlEntry objects.group - The group of the resource.owner - The owner of the resource.requestConditions - DataLakeRequestConditionstimeout - An optional timeout value beyond which a RuntimeException will be raised.context - Additional context that is passed through the Http pipeline during the service call.public PathInfo setPermissions(PathPermissions permissions, String group, String owner)
Code Samples
PathPermissions permissions = new PathPermissions()
.setGroup(new RolePermissions().setExecutePermission(true).setReadPermission(true))
.setOwner(new RolePermissions().setExecutePermission(true).setReadPermission(true).setWritePermission(true))
.setOther(new RolePermissions().setReadPermission(true));
String group = "group";
String owner = "owner";
System.out.printf("Last Modified Time: %s", client.setPermissions(permissions, group, owner)
.getLastModified());
For more information, see the Azure Docs
permissions - PathPermissionsgroup - The group of the resource.owner - The owner of the resource.public com.azure.core.http.rest.Response<PathInfo> setPermissionsWithResponse(PathPermissions permissions, String group, String owner, DataLakeRequestConditions requestConditions, Duration timeout, com.azure.core.util.Context context)
Code Samples
DataLakeRequestConditions requestConditions = new DataLakeRequestConditions().setLeaseId(leaseId);
PathPermissions permissions = new PathPermissions()
.setGroup(new RolePermissions().setExecutePermission(true).setReadPermission(true))
.setOwner(new RolePermissions().setExecutePermission(true).setReadPermission(true).setWritePermission(true))
.setOther(new RolePermissions().setReadPermission(true));
String group = "group";
String owner = "owner";
Response<PathInfo> response = client.setPermissionsWithResponse(permissions, group, owner, requestConditions,
timeout, new Context(key2, value2));
System.out.printf("Last Modified Time: %s", response.getValue().getLastModified());
For more information, see the Azure Docs
permissions - PathPermissionsgroup - The group of the resource.owner - The owner of the resource.requestConditions - DataLakeRequestConditionstimeout - An optional timeout value beyond which a RuntimeException will be raised.context - Additional context that is passed through the Http pipeline during the service call.public AccessControlChangeResult setAccessControlRecursive(List<PathAccessControlEntry> accessControlList)
Code Samples
PathAccessControlEntry pathAccessControlEntry = new PathAccessControlEntry()
.setEntityId("entityId")
.setPermissions(new RolePermissions().setReadPermission(true));
List<PathAccessControlEntry> pathAccessControlEntries = new ArrayList<>();
pathAccessControlEntries.add(pathAccessControlEntry);
AccessControlChangeResult response = client.setAccessControlRecursive(pathAccessControlEntries);
System.out.printf("Successful changed file operations: %d",
response.getCounters().getChangedFilesCount());
For more information, see the Azure Docs
accessControlList - The POSIX access control list for the file or directory.DataLakeAclChangeFailedException - if a request to storage throws a
DataLakeStorageException or a Exception to wrap the exception with the continuation token.public com.azure.core.http.rest.Response<AccessControlChangeResult> setAccessControlRecursiveWithResponse(PathSetAccessControlRecursiveOptions options, Duration timeout, com.azure.core.util.Context context)
Code Samples
DataLakeRequestConditions requestConditions = new DataLakeRequestConditions().setLeaseId(leaseId);
PathAccessControlEntry pathAccessControlEntry = new PathAccessControlEntry()
.setEntityId("entityId")
.setPermissions(new RolePermissions().setReadPermission(true));
List<PathAccessControlEntry> pathAccessControlEntries = new ArrayList<>();
pathAccessControlEntries.add(pathAccessControlEntry);
Integer batchSize = 2;
Integer maxBatches = 10;
boolean continueOnFailure = false;
String continuationToken = null;
Consumer<Response<AccessControlChanges>> progressHandler =
response -> System.out.println("Received response");
PathSetAccessControlRecursiveOptions options =
new PathSetAccessControlRecursiveOptions(pathAccessControlEntries)
.setBatchSize(batchSize)
.setMaxBatches(maxBatches)
.setContinueOnFailure(continueOnFailure)
.setContinuationToken(continuationToken)
.setProgressHandler(progressHandler);
Response<AccessControlChangeResult> response = client.setAccessControlRecursiveWithResponse(options, timeout,
new Context(key2, value2));
System.out.printf("Successful changed file operations: %d",
response.getValue().getCounters().getChangedFilesCount());
For more information, see the Azure Docs
options - PathSetAccessControlRecursiveOptionstimeout - An optional timeout value beyond which a RuntimeException will be raised.context - Additional context that is passed through the Http pipeline during the service call.DataLakeAclChangeFailedException - if a request to storage throws a
DataLakeStorageException or a Exception to wrap the exception with the continuation token.public AccessControlChangeResult updateAccessControlRecursive(List<PathAccessControlEntry> accessControlList)
Code Samples
PathAccessControlEntry pathAccessControlEntry = new PathAccessControlEntry()
.setEntityId("entityId")
.setPermissions(new RolePermissions().setReadPermission(true));
List<PathAccessControlEntry> pathAccessControlEntries = new ArrayList<>();
pathAccessControlEntries.add(pathAccessControlEntry);
AccessControlChangeResult response = client.updateAccessControlRecursive(pathAccessControlEntries);
System.out.printf("Successful changed file operations: %d",
response.getCounters().getChangedFilesCount());
For more information, see the Azure Docs
accessControlList - The POSIX access control list for the file or directory.DataLakeAclChangeFailedException - if a request to storage throws a
DataLakeStorageException or a Exception to wrap the exception with the continuation token.public com.azure.core.http.rest.Response<AccessControlChangeResult> updateAccessControlRecursiveWithResponse(PathUpdateAccessControlRecursiveOptions options, Duration timeout, com.azure.core.util.Context context)
Code Samples
DataLakeRequestConditions requestConditions = new DataLakeRequestConditions().setLeaseId(leaseId);
PathAccessControlEntry pathAccessControlEntry = new PathAccessControlEntry()
.setEntityId("entityId")
.setPermissions(new RolePermissions().setReadPermission(true));
List<PathAccessControlEntry> pathAccessControlEntries = new ArrayList<>();
pathAccessControlEntries.add(pathAccessControlEntry);
Integer batchSize = 2;
Integer maxBatches = 10;
boolean continueOnFailure = false;
String continuationToken = null;
Consumer<Response<AccessControlChanges>> progressHandler =
response -> System.out.println("Received response");
PathUpdateAccessControlRecursiveOptions options =
new PathUpdateAccessControlRecursiveOptions(pathAccessControlEntries)
.setBatchSize(batchSize)
.setMaxBatches(maxBatches)
.setContinueOnFailure(continueOnFailure)
.setContinuationToken(continuationToken)
.setProgressHandler(progressHandler);
Response<AccessControlChangeResult> response = client.updateAccessControlRecursiveWithResponse(options, timeout,
new Context(key2, value2));
System.out.printf("Successful changed file operations: %d",
response.getValue().getCounters().getChangedFilesCount());
For more information, see the Azure Docs
options - PathUpdateAccessControlRecursiveOptionstimeout - An optional timeout value beyond which a RuntimeException will be raised.context - Additional context that is passed through the Http pipeline during the service call.DataLakeAclChangeFailedException - if a request to storage throws a
DataLakeStorageException or a Exception to wrap the exception with the continuation token.public AccessControlChangeResult removeAccessControlRecursive(List<PathRemoveAccessControlEntry> accessControlList)
Code Samples
PathRemoveAccessControlEntry pathAccessControlEntry = new PathRemoveAccessControlEntry()
.setEntityId("entityId");
List<PathRemoveAccessControlEntry> pathAccessControlEntries = new ArrayList<>();
pathAccessControlEntries.add(pathAccessControlEntry);
AccessControlChangeResult response = client.removeAccessControlRecursive(pathAccessControlEntries);
System.out.printf("Successful changed file operations: %d",
response.getCounters().getChangedFilesCount());
For more information, see the Azure Docs
accessControlList - The POSIX access control list for the file or directory.DataLakeAclChangeFailedException - if a request to storage throws a
DataLakeStorageException or a Exception to wrap the exception with the continuation token.public com.azure.core.http.rest.Response<AccessControlChangeResult> removeAccessControlRecursiveWithResponse(PathRemoveAccessControlRecursiveOptions options, Duration timeout, com.azure.core.util.Context context)
Code Samples
DataLakeRequestConditions requestConditions = new DataLakeRequestConditions().setLeaseId(leaseId);
PathRemoveAccessControlEntry pathAccessControlEntry = new PathRemoveAccessControlEntry()
.setEntityId("entityId");
List<PathRemoveAccessControlEntry> pathAccessControlEntries = new ArrayList<>();
pathAccessControlEntries.add(pathAccessControlEntry);
Integer batchSize = 2;
Integer maxBatches = 10;
boolean continueOnFailure = false;
String continuationToken = null;
Consumer<Response<AccessControlChanges>> progressHandler =
response -> System.out.println("Received response");
PathRemoveAccessControlRecursiveOptions options =
new PathRemoveAccessControlRecursiveOptions(pathAccessControlEntries)
.setBatchSize(batchSize)
.setMaxBatches(maxBatches)
.setContinueOnFailure(continueOnFailure)
.setContinuationToken(continuationToken)
.setProgressHandler(progressHandler);
Response<AccessControlChangeResult> response = client.removeAccessControlRecursiveWithResponse(options, timeout,
new Context(key2, value2));
System.out.printf("Successful changed file operations: %d",
response.getValue().getCounters().getChangedFilesCount());
For more information, see the Azure Docs
options - PathRemoveAccessControlRecursiveOptionstimeout - An optional timeout value beyond which a RuntimeException will be raised.context - Additional context that is passed through the Http pipeline during the service call.DataLakeAclChangeFailedException - if a request to storage throws a
DataLakeStorageException or a Exception to wrap the exception with the continuation token.public PathAccessControl getAccessControl()
Code Samples
PathAccessControl response = client.getAccessControl();
System.out.printf("Access Control List: %s, Group: %s, Owner: %s, Permissions: %s",
PathAccessControlEntry.serializeList(response.getAccessControlList()), response.getGroup(),
response.getOwner(), response.getPermissions());
For more information, see the Azure Docs
public com.azure.core.http.rest.Response<PathAccessControl> getAccessControlWithResponse(boolean userPrincipalNameReturned, DataLakeRequestConditions requestConditions, Duration timeout, com.azure.core.util.Context context)
Code Samples
DataLakeRequestConditions requestConditions = new DataLakeRequestConditions().setLeaseId(leaseId);
boolean userPrincipalNameReturned = false;
Response<PathAccessControl> response = client.getAccessControlWithResponse(userPrincipalNameReturned,
requestConditions, timeout, new Context(key1, value1));
PathAccessControl pac = response.getValue();
System.out.printf("Access Control List: %s, Group: %s, Owner: %s, Permissions: %s",
PathAccessControlEntry.serializeList(pac.getAccessControlList()), pac.getGroup(), pac.getOwner(),
pac.getPermissions());
For more information, see the Azure Docs
userPrincipalNameReturned - When true, user identity values returned as User Principal Names. When false,
user identity values returned as Azure Active Directory Object IDs. Default value is false.requestConditions - DataLakeRequestConditionstimeout - An optional timeout value beyond which a RuntimeException will be raised.context - Additional context that is passed through the Http pipeline during the service call.public PathProperties getProperties()
Code Samples
System.out.printf("Creation Time: %s, Size: %d%n", client.getProperties().getCreationTime(),
client.getProperties().getFileSize());
For more information, see the Azure Docs
public com.azure.core.http.rest.Response<PathProperties> getPropertiesWithResponse(DataLakeRequestConditions requestConditions, Duration timeout, com.azure.core.util.Context context)
Code Samples
DataLakeRequestConditions requestConditions = new DataLakeRequestConditions().setLeaseId(leaseId);
Response<PathProperties> response = client.getPropertiesWithResponse(requestConditions, timeout,
new Context(key2, value2));
System.out.printf("Creation Time: %s, Size: %d%n", response.getValue().getCreationTime(),
response.getValue().getFileSize());
For more information, see the Azure Docs
requestConditions - DataLakeRequestConditionstimeout - An optional timeout value beyond which a RuntimeException will be raised.context - Additional context that is passed through the Http pipeline during the service call.public Boolean exists()
Note that this method does not guarantee that the path type (file/directory) matches expectations.
For example, a DataLakeFileClient representing a path to a datalake directory will return true, and vice versa.
Code Samples
System.out.printf("Exists? %b%n", client.exists());
public com.azure.core.http.rest.Response<Boolean> existsWithResponse(Duration timeout, com.azure.core.util.Context context)
Note that this method does not guarantee that the path type (file/directory) matches expectations.
For example, a DataLakeFileClient representing a path to a datalake directory will return true, and vice versa.
Code Samples
System.out.printf("Exists? %b%n", client.existsWithResponse(timeout, new Context(key2, value2)).getValue());
timeout - An optional timeout value beyond which a RuntimeException will be raised.context - Additional context that is passed through the Http pipeline during the service call.public String generateUserDelegationSas(DataLakeServiceSasSignatureValues dataLakeServiceSasSignatureValues, UserDelegationKey userDelegationKey)
DataLakeServiceSasSignatureValues.
See DataLakeServiceSasSignatureValues for more information on how to construct a user delegation SAS.
Code Samples
OffsetDateTime myExpiryTime = OffsetDateTime.now().plusDays(1);
PathSasPermission myPermission = new PathSasPermission().setReadPermission(true);
DataLakeServiceSasSignatureValues myValues = new DataLakeServiceSasSignatureValues(expiryTime, permission)
.setStartTime(OffsetDateTime.now());
client.generateUserDelegationSas(values, userDelegationKey);
dataLakeServiceSasSignatureValues - DataLakeServiceSasSignatureValuesuserDelegationKey - A UserDelegationKey object used to sign the SAS values.
See DataLakeServiceClient.getUserDelegationKey(OffsetDateTime, OffsetDateTime) for more information
on how to get a user delegation key.String representing the SAS query parameters.public String generateUserDelegationSas(DataLakeServiceSasSignatureValues dataLakeServiceSasSignatureValues, UserDelegationKey userDelegationKey, String accountName, com.azure.core.util.Context context)
DataLakeServiceSasSignatureValues.
See DataLakeServiceSasSignatureValues for more information on how to construct a user delegation SAS.
Code Samples
OffsetDateTime myExpiryTime = OffsetDateTime.now().plusDays(1);
PathSasPermission myPermission = new PathSasPermission().setReadPermission(true);
DataLakeServiceSasSignatureValues myValues = new DataLakeServiceSasSignatureValues(expiryTime, permission)
.setStartTime(OffsetDateTime.now());
client.generateUserDelegationSas(values, userDelegationKey, accountName, new Context("key", "value"));
dataLakeServiceSasSignatureValues - DataLakeServiceSasSignatureValuesuserDelegationKey - A UserDelegationKey object used to sign the SAS values.
See DataLakeServiceClient.getUserDelegationKey(OffsetDateTime, OffsetDateTime) for more information
on how to get a user delegation key.accountName - The account name.context - Additional context that is passed through the code when generating a SAS.String representing the SAS query parameters.public String generateSas(DataLakeServiceSasSignatureValues dataLakeServiceSasSignatureValues)
DataLakeServiceSasSignatureValues
Note : The client must be authenticated via StorageSharedKeyCredential
See DataLakeServiceSasSignatureValues for more information on how to construct a service SAS.
Code Samples
OffsetDateTime expiryTime = OffsetDateTime.now().plusDays(1);
PathSasPermission permission = new PathSasPermission().setReadPermission(true);
DataLakeServiceSasSignatureValues values = new DataLakeServiceSasSignatureValues(expiryTime, permission)
.setStartTime(OffsetDateTime.now());
client.generateSas(values); // Client must be authenticated via StorageSharedKeyCredential
dataLakeServiceSasSignatureValues - DataLakeServiceSasSignatureValuesString representing the SAS query parameters.public String generateSas(DataLakeServiceSasSignatureValues dataLakeServiceSasSignatureValues, com.azure.core.util.Context context)
DataLakeServiceSasSignatureValues
Note : The client must be authenticated via StorageSharedKeyCredential
See DataLakeServiceSasSignatureValues for more information on how to construct a service SAS.
Code Samples
OffsetDateTime expiryTime = OffsetDateTime.now().plusDays(1);
PathSasPermission permission = new PathSasPermission().setReadPermission(true);
DataLakeServiceSasSignatureValues values = new DataLakeServiceSasSignatureValues(expiryTime, permission)
.setStartTime(OffsetDateTime.now());
// Client must be authenticated via StorageSharedKeyCredential
client.generateSas(values, new Context("key", "value"));
dataLakeServiceSasSignatureValues - DataLakeServiceSasSignatureValuescontext - Additional context that is passed through the code when generating a SAS.String representing the SAS query parameters.Copyright © 2021 Microsoft Corporation. All rights reserved.