Partilhar via


DataLakePathCreateOptions Class

  • java.lang.Object
    • com.azure.storage.file.datalake.options.DataLakePathCreateOptions

public class DataLakePathCreateOptions

Extended options that may be passed when creating a datalake resource.

Constructor Summary

Constructor Description
DataLakePathCreateOptions()

Optional parameters for creating a file or directory.

Method Summary

Modifier and Type Method and Description
List<PathAccessControlEntry> getAccessControlList()
String getEncryptionContext()

Encryption context that is set on the file.

String getGroup()
Integer getLeaseDuration()
Map<String,String> getMetadata()
String getOwner()
PathHttpHeaders getPathHttpHeaders()

Gets the http header properties.

String getPermissions()
String getProposedLeaseId()
DataLakeRequestConditions getRequestConditions()

Optional DataLakeRequestConditions conditions on the creation of this file or directory.

DataLakePathScheduleDeletionOptions getScheduleDeletionOptions()
String getSourceLeaseId()
String getUmask()
DataLakePathCreateOptions setAccessControlList(List<PathAccessControlEntry> accessControl)

Optional.

DataLakePathCreateOptions setEncryptionContext(String encryptionContext)

Optional encryption context that can be set on the file.

DataLakePathCreateOptions setGroup(String group)

Optional.

DataLakePathCreateOptions setLeaseDuration(Integer duration)

Optional.

DataLakePathCreateOptions setMetadata(Map<String,String> metadata)

Optional custom metadata to set for this file or directory.

DataLakePathCreateOptions setOwner(String owner)

Optional.

DataLakePathCreateOptions setPathHttpHeaders(PathHttpHeaders headers)

Optional standard HTTP header properties that can be set for the new file or directory.

DataLakePathCreateOptions setPermissions(String permissions)

Sets POSIX access permissions for the file owner, the file owning group, and others.

DataLakePathCreateOptions setProposedLeaseId(String leaseId)

Optional.

DataLakePathCreateOptions setRequestConditions(DataLakeRequestConditions requestConditions)

Optional DataLakeRequestConditions conditions on the creation of this file or directory.

DataLakePathCreateOptions setScheduleDeletionOptions(DataLakePathScheduleDeletionOptions deletionOptions)

Scheduled deletion options to set on the path.

DataLakePathCreateOptions setSourceLeaseId(String leaseId)

Sets the source lease ID.

DataLakePathCreateOptions setUmask(String umask)

When creating a file or directory and the parent folder does not have a default ACL, the umask restricts the permissions of the file or directory to be created.

Methods inherited from java.lang.Object

Constructor Details

DataLakePathCreateOptions

public DataLakePathCreateOptions()

Optional parameters for creating a file or directory.

Method Details

getAccessControlList

public List getAccessControlList()

Returns:

the POSIX access control list for the file/directory.

getEncryptionContext

public String getEncryptionContext()

Encryption context that is set on the file.

Returns:

Encryption context that is set on the file.

getGroup

public String getGroup()

Returns:

the name of owning group of the file/directory.

getLeaseDuration

public Integer getLeaseDuration()

Returns:

the lease duration in seconds.

getMetadata

public Map getMetadata()

Returns:

Metadata associated with the datalake path.

getOwner

public String getOwner()

Returns:

the name of owner of the file/directory.

getPathHttpHeaders

public PathHttpHeaders getPathHttpHeaders()

Gets the http header properties.

Returns:

the http headers.

getPermissions

public String getPermissions()

Returns:

the permissions

getProposedLeaseId

public String getProposedLeaseId()

Returns:

the proposed lease ID.

getRequestConditions

public DataLakeRequestConditions getRequestConditions()

Optional DataLakeRequestConditions conditions on the creation of this file or directory.

Returns:

the request conditions.

getScheduleDeletionOptions

public DataLakePathScheduleDeletionOptions getScheduleDeletionOptions()

Returns:

getSourceLeaseId

public String getSourceLeaseId()

Returns:

the source lease ID

getUmask

public String getUmask()

Returns:

the umask.

setAccessControlList

public DataLakePathCreateOptions setAccessControlList(List accessControl)

Optional. The POSIX access control list for the file or directory.

Parameters:

accessControl - The access control list.

Returns:

The updated options.

setEncryptionContext

public DataLakePathCreateOptions setEncryptionContext(String encryptionContext)

Optional encryption context that can be set on the file. Encryption context is intended to store metadata that can be used to decrypt the blob.

Parameters:

encryptionContext - the encryption context to be set on the file.

Returns:

The updated options.

setGroup

public DataLakePathCreateOptions setGroup(String group)

Optional. Sets the owning group of the file/directory.

Parameters:

group - the new owning group.

Returns:

The updated options.

setLeaseDuration

public DataLakePathCreateOptions setLeaseDuration(Integer duration)

Optional. Specifies the duration of the lease, in seconds, or specify -1 for a lease that never expires. A non-infinite lease can be between 15 and 60 seconds. Does not apply to directories. Sets the lease duration.

Parameters:

duration - the new duration.

Returns:

The updated options.

setMetadata

public DataLakePathCreateOptions setMetadata(Map metadata)

Optional custom metadata to set for this file or directory.

Parameters:

metadata - Metadata to associate with the datalake path. If there is leading or trailing whitespace in any metadata key or value, it must be removed or encoded.

Returns:

The updated options.

setOwner

public DataLakePathCreateOptions setOwner(String owner)

Optional. Sets the owner of the file/directory.

Parameters:

owner - the new owner.

Returns:

The updated options.

setPathHttpHeaders

public DataLakePathCreateOptions setPathHttpHeaders(PathHttpHeaders headers)

Optional standard HTTP header properties that can be set for the new file or directory.

Parameters:

headers - The http headers.

Returns:

the updated options.

setPermissions

public DataLakePathCreateOptions setPermissions(String permissions)

Sets POSIX access permissions for the file owner, the file owning group, and others. Each class may be granted read, write, or execute permission. The sticky bit is also supported. Both symbolic (rwxrw-rw-) and 4-digit octal notation (e.g. 0766) are supported.

Parameters:

permissions - The permissions.

Returns:

the updated options.

setProposedLeaseId

public DataLakePathCreateOptions setProposedLeaseId(String leaseId)

Optional. Sets proposed lease ID. Does not apply to directories.

Parameters:

leaseId - the proposed lease ID.

Returns:

The updated options.

setRequestConditions

public DataLakePathCreateOptions setRequestConditions(DataLakeRequestConditions requestConditions)

Optional DataLakeRequestConditions conditions on the creation of this file or directory. Sets the request conditions.

Parameters:

requestConditions - The request conditions.

Returns:

The updated options.

setScheduleDeletionOptions

public DataLakePathCreateOptions setScheduleDeletionOptions(DataLakePathScheduleDeletionOptions deletionOptions)

Scheduled deletion options to set on the path.

Parameters:

deletionOptions - the DataLakePathScheduleDeletionOptions to set.

Returns:

the updated options.

setSourceLeaseId

public DataLakePathCreateOptions setSourceLeaseId(String leaseId)

Sets the source lease ID.

Parameters:

leaseId - the source lease ID.

Returns:

The updated options.

setUmask

public DataLakePathCreateOptions setUmask(String umask)

When creating a file or directory and the parent folder does not have a default ACL, the umask restricts the permissions of the file or directory to be created. The resulting permission is given by p bitwise-and ^u, where p is the permission and u is the umask. For example, if p is 0777 and u is 0057, then the resulting permission is 0720. The default permission is 0777 for a directory and 0666 for a file. The default umask is 0027. The umask must be specified in 4-digit octal notation (e.g. 0766).

Parameters:

umask - The umask.

Returns:

the updated options.

Applies to