Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions sdk/storage/azure-storage-file-share/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
## 12.33.0-beta.1 (Unreleased)

### Features Added
- Added support for change feed on premium file shares. Added `ShareCreateOptions.setChangeFeedEnabled`,
`setChangeFeedRetentionInDays` and `ShareSetPropertiesOptions.setChangeFeedEnabled`,
`setChangeFeedRetentionInDays` to enable and configure change feed.
- Added `ShareProperties.isChangeFeedEnabled()`, `getChangeFeedRetentionInDays()` and
`getChangeFeedBlobContainerName()`.
- Added `ShareProperties.getCreationTime()` and `ShareProperties.setCreationTime(OffsetDateTime)` to expose the share
creation time returned in list and get properties responses.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,8 @@ Mono<Response<ShareInfo>> createWithResponse(ShareCreateOptions options, Context
options.getAccessTier(), enabledProtocol, options.getRootSquash(),
options.isSnapshotVirtualDirectoryAccessEnabled(), options.isPaidBurstingEnabled(),
options.getPaidBurstingMaxBandwidthMibps(), options.getPaidBurstingMaxIops(),
options.getProvisionedMaxIops(), options.getProvisionedMaxBandwidthMibps(), null, context)
options.getProvisionedMaxIops(), options.getProvisionedMaxBandwidthMibps(), null,
options.isChangeFeedEnabled(), options.getChangeFeedRetentionInDays(), context)
.map(ModelHelper::mapToShareInfoResponse);
}

Expand Down Expand Up @@ -940,7 +941,8 @@ Mono<Response<ShareInfo>> setPropertiesWithResponse(ShareSetPropertiesOptions op
options.getAccessTier(), requestConditions.getLeaseId(), options.getRootSquash(),
options.isSnapshotVirtualDirectoryAccessEnabled(), options.isPaidBurstingEnabled(),
options.getPaidBurstingMaxBandwidthMibps(), options.getPaidBurstingMaxIops(),
options.getProvisionedMaxIops(), options.getProvisionedMaxBandwidthMibps(), null, context)
options.getProvisionedMaxIops(), options.getProvisionedMaxBandwidthMibps(), null,
options.isChangeFeedEnabled(), options.getChangeFeedRetentionInDays(), context)
.map(ModelHelper::mapToShareInfoResponse);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ public Response<ShareInfo> createWithResponse(ShareCreateOptions options, Durati
finalOptions.isSnapshotVirtualDirectoryAccessEnabled(), finalOptions.isPaidBurstingEnabled(),
finalOptions.getPaidBurstingMaxBandwidthMibps(), finalOptions.getPaidBurstingMaxIops(),
finalOptions.getProvisionedMaxIops(), finalOptions.getProvisionedMaxBandwidthMibps(), null,
finalContext);
finalOptions.isChangeFeedEnabled(), finalOptions.getChangeFeedRetentionInDays(), finalContext);
Comment thread
ibrandes marked this conversation as resolved.

return ModelHelper.mapToShareInfoResponse(sendRequest(operation, timeout, ShareStorageException.class));
}
Expand Down Expand Up @@ -899,7 +899,8 @@ public Response<ShareInfo> setPropertiesWithResponse(ShareSetPropertiesOptions o
requestConditions.getLeaseId(), options.getRootSquash(),
options.isSnapshotVirtualDirectoryAccessEnabled(), options.isPaidBurstingEnabled(),
options.getPaidBurstingMaxBandwidthMibps(), options.getPaidBurstingMaxIops(),
options.getProvisionedMaxIops(), options.getProvisionedMaxBandwidthMibps(), null, finalContext);
options.getProvisionedMaxIops(), options.getProvisionedMaxBandwidthMibps(), null,
options.isChangeFeedEnabled(), options.getChangeFeedRetentionInDays(), finalContext);

return ModelHelper.mapToShareInfoResponse(sendRequest(operation, timeout, ShareStorageException.class));
}
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,24 @@ public final class SharesGetPropertiesHeaders {
@Generated
private Boolean xMsEnableSmbDirectoryLease;

/*
* The x-ms-file-blob-container-for-xfiles-change-feed property.
*/
@Generated
private String xMsFileBlobContainerForXfilesChangeFeed;

/*
* The x-ms-file-change-feed-retention-in-days property.
*/
@Generated
private Integer xMsFileChangeFeedRetentionInDays;

/*
* The x-ms-file-enable-change-feed property.
*/
@Generated
private Boolean xMsFileEnableChangeFeed;

private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version");

private static final HttpHeaderName X_MS_SHARE_QUOTA = HttpHeaderName.fromString("x-ms-share-quota");
Expand Down Expand Up @@ -269,6 +287,15 @@ public final class SharesGetPropertiesHeaders {
private static final HttpHeaderName X_MS_ENABLE_SMB_DIRECTORY_LEASE
= HttpHeaderName.fromString("x-ms-enable-smb-directory-lease");

private static final HttpHeaderName X_MS_FILE_BLOB_CONTAINER_FOR_XFILES_CHANGE_FEED
= HttpHeaderName.fromString("x-ms-file-blob-container-for-xfiles-change-feed");

private static final HttpHeaderName X_MS_FILE_CHANGE_FEED_RETENTION_IN_DAYS
= HttpHeaderName.fromString("x-ms-file-change-feed-retention-in-days");

private static final HttpHeaderName X_MS_FILE_ENABLE_CHANGE_FEED
= HttpHeaderName.fromString("x-ms-file-enable-change-feed");

// HttpHeaders containing the raw property values.
/**
* Creates an instance of SharesGetPropertiesHeaders class.
Expand Down Expand Up @@ -428,6 +455,20 @@ public SharesGetPropertiesHeaders(HttpHeaders rawHeaders) {
} else {
this.xMsEnableSmbDirectoryLease = null;
}
this.xMsFileBlobContainerForXfilesChangeFeed
= rawHeaders.getValue(X_MS_FILE_BLOB_CONTAINER_FOR_XFILES_CHANGE_FEED);
String xMsFileChangeFeedRetentionInDays = rawHeaders.getValue(X_MS_FILE_CHANGE_FEED_RETENTION_IN_DAYS);
if (xMsFileChangeFeedRetentionInDays != null) {
this.xMsFileChangeFeedRetentionInDays = Integer.parseInt(xMsFileChangeFeedRetentionInDays);
} else {
this.xMsFileChangeFeedRetentionInDays = null;
}
String xMsFileEnableChangeFeed = rawHeaders.getValue(X_MS_FILE_ENABLE_CHANGE_FEED);
if (xMsFileEnableChangeFeed != null) {
this.xMsFileEnableChangeFeed = Boolean.parseBoolean(xMsFileEnableChangeFeed);
} else {
this.xMsFileEnableChangeFeed = null;
}
Map<String, String> xMsMetaHeaderCollection = new LinkedHashMap<>();

rawHeaders.stream().forEach(header -> {
Expand Down Expand Up @@ -1166,4 +1207,73 @@ public SharesGetPropertiesHeaders setXMsEnableSmbDirectoryLease(Boolean xMsEnabl
this.xMsEnableSmbDirectoryLease = xMsEnableSmbDirectoryLease;
return this;
}

/**
* Get the xMsFileBlobContainerForXfilesChangeFeed property: The x-ms-file-blob-container-for-xfiles-change-feed
* property.
*
* @return the xMsFileBlobContainerForXfilesChangeFeed value.
*/
@Generated
public String getXMsFileBlobContainerForXfilesChangeFeed() {
return this.xMsFileBlobContainerForXfilesChangeFeed;
}

/**
* Set the xMsFileBlobContainerForXfilesChangeFeed property: The x-ms-file-blob-container-for-xfiles-change-feed
* property.
*
* @param xMsFileBlobContainerForXfilesChangeFeed the xMsFileBlobContainerForXfilesChangeFeed value to set.
* @return the SharesGetPropertiesHeaders object itself.
*/
@Generated
public SharesGetPropertiesHeaders
setXMsFileBlobContainerForXfilesChangeFeed(String xMsFileBlobContainerForXfilesChangeFeed) {
this.xMsFileBlobContainerForXfilesChangeFeed = xMsFileBlobContainerForXfilesChangeFeed;
return this;
}

/**
* Get the xMsFileChangeFeedRetentionInDays property: The x-ms-file-change-feed-retention-in-days property.
*
* @return the xMsFileChangeFeedRetentionInDays value.
*/
@Generated
public Integer getXMsFileChangeFeedRetentionInDays() {
return this.xMsFileChangeFeedRetentionInDays;
}

/**
* Set the xMsFileChangeFeedRetentionInDays property: The x-ms-file-change-feed-retention-in-days property.
*
* @param xMsFileChangeFeedRetentionInDays the xMsFileChangeFeedRetentionInDays value to set.
* @return the SharesGetPropertiesHeaders object itself.
*/
@Generated
public SharesGetPropertiesHeaders setXMsFileChangeFeedRetentionInDays(Integer xMsFileChangeFeedRetentionInDays) {
this.xMsFileChangeFeedRetentionInDays = xMsFileChangeFeedRetentionInDays;
return this;
}

/**
* Get the xMsFileEnableChangeFeed property: The x-ms-file-enable-change-feed property.
*
* @return the xMsFileEnableChangeFeed value.
*/
@Generated
public Boolean isXMsFileEnableChangeFeed() {
return this.xMsFileEnableChangeFeed;
}

/**
* Set the xMsFileEnableChangeFeed property: The x-ms-file-enable-change-feed property.
*
* @param xMsFileEnableChangeFeed the xMsFileEnableChangeFeed value to set.
* @return the SharesGetPropertiesHeaders object itself.
*/
@Generated
public SharesGetPropertiesHeaders setXMsFileEnableChangeFeed(Boolean xMsFileEnableChangeFeed) {
this.xMsFileEnableChangeFeed = xMsFileEnableChangeFeed;
return this;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,10 @@ public static Response<ShareInfo> mapToShareInfoResponse(Response<?> response) {
.setMaxBurstCreditsForIops(headers.getXMsShareMaxBurstCreditsForIops())
.setNextAllowedProvisionedIopsDowngradeTime(headers.getXMsShareNextAllowedProvisionedIopsDowngradeTime())
.setNextAllowedProvisionedBandwidthDowngradeTime(
headers.getXMsShareNextAllowedProvisionedBandwidthDowngradeTime());
headers.getXMsShareNextAllowedProvisionedBandwidthDowngradeTime())
.setChangeFeedEnabled(headers.isXMsFileEnableChangeFeed())
.setChangeFeedBlobContainerName(headers.getXMsFileBlobContainerForXfilesChangeFeed())
.setChangeFeedRetentionInDays(headers.getXMsFileChangeFeedRetentionInDays());

return new SimpleResponse<>(response, shareProperties);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,25 @@ public final class ShareProperties implements XmlSerializable<ShareProperties> {
*/
private Boolean enableSmbDirectoryLease;

/*
* Optional. Supported in version 2026-06-06 and above.
* Specifies whether change feed is enabled on the share.
*/
private Boolean enableChangeFeed;

/*
* Optional. Supported in version 2026-06-06 and above.
* The number of days that change feed records are retained on the share. Valid values are between 1 and 365
* inclusive. Default if not specified is 7 days.
*/
private Integer changeFeedRetentionInDays;

/*
* Optional. Supported in version 2026-06-06 and above. The name of the blob container where the change feed
* records are stored. The name of the blob container is in the format {@code $fileschangefeed-<guid>}.
*/
private String changeFeedBlobContainerName;

/**
* Creates a new instance of {@link ShareProperties}.
*/
Expand Down Expand Up @@ -857,6 +876,68 @@ public ShareProperties setSmbDirectoryLeaseEnabled(Boolean enableSmbDirectoryLea
return this;
}

/**
* Optional. Supported in version 2026-06-06 and above.
* Specifies whether change feed is enabled on the share.
* @return the enableChangeFeed value, or {@code null} if not returned by the service.
*/
public Boolean isChangeFeedEnabled() {
return enableChangeFeed;
}

/**
* Optional. Supported in version 2026-06-06 and above.
* Specifies whether change feed is enabled on the share.
* @param enableChangeFeed the enableChangeFeed value to set, or {@code null} if unavailable.
* @return the ShareProperties object itself.
*/
public ShareProperties setChangeFeedEnabled(Boolean enableChangeFeed) {
this.enableChangeFeed = enableChangeFeed;
return this;
}

/**
* Optional. Supported in version 2026-06-06 and above.
* The number of days that change feed records are retained on the share. Valid values are between 1 and 365
* inclusive. Default if not specified is 7 days.
* @return the changeFeedRetentionInDays value, or {@code null} if not returned by the service.
*/
public Integer getChangeFeedRetentionInDays() {
return changeFeedRetentionInDays;
}

/**
* Optional. Supported in version 2026-06-06 and above.
* The number of days that change feed records are retained on the share. Valid values are between 1 and 365
* inclusive. Default if not specified is 7 days.
* @param changeFeedRetentionInDays the changeFeedRetentionInDays value to set, or {@code null} if unavailable.
* @return the ShareProperties object itself.
*/
public ShareProperties setChangeFeedRetentionInDays(Integer changeFeedRetentionInDays) {
this.changeFeedRetentionInDays = changeFeedRetentionInDays;
return this;
}

/**
* Optional. Supported in version 2026-06-06 and above. The name of the blob container where the change feed
* records are stored. The name of the blob container is in the format {@code $fileschangefeed-<guid>}.
* @return the blobContainerForChangeFeed value.
*/
public String getChangeFeedBlobContainerName() {
return changeFeedBlobContainerName;
}

/**
* Optional. Supported in version 2026-06-06 and above. The name of the blob container where the change feed
* records are stored. The name of the blob container is in the format {@code $fileschangefeed-<guid>}.
* @param changeFeedBlobContainerName the blobContainerForChangeFeed value to set.
* @return the ShareProperties object itself.
*/
public ShareProperties setChangeFeedBlobContainerName(String changeFeedBlobContainerName) {
this.changeFeedBlobContainerName = changeFeedBlobContainerName;
return this;
}

@Override
public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException {
return toXml(xmlWriter, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ public class ShareCreateOptions {
private Long paidBurstingMaxBandwidthMibps;
private Long provisionedMaxIops;
private Long provisionedMaxBandwidthMibps;
private Boolean enableChangeFeed;
private Integer changeFeedRetentionInDays;

/**
* Creates a new instance of {@link ShareCreateOptions}.
Expand Down Expand Up @@ -277,4 +279,50 @@ public ShareCreateOptions setProvisionedMaxBandwidthMibps(Long provisionedMaxBan
this.provisionedMaxBandwidthMibps = provisionedMaxBandwidthMibps;
return this;
}

/**
* Get the enableChangeFeed property:
* Optional. Supported in version 2026-06-06 and above. Only applicable for premium file storage accounts.
* This property enables change feed on the share.
* @return the enableChangeFeed value.
*/
public Boolean isChangeFeedEnabled() {
return enableChangeFeed;
}

/**
* Set the enableChangeFeed property:
* Optional. Supported in version 2026-06-06 and above. Only applicable for premium file storage accounts.
* This property enables change feed on the share.
* @param enableChangeFeed the enableChangeFeed value to set.
* @return the ShareCreateOptions object itself.
*/
public ShareCreateOptions setChangeFeedEnabled(Boolean enableChangeFeed) {
Comment thread
ibrandes marked this conversation as resolved.
this.enableChangeFeed = enableChangeFeed;
return this;
}

/**
* Get the changeFeedRetentionInDays property:
* Optional. Supported in version 2026-06-06 and above. Only applicable for premium file storage accounts.
* The number of days that change feed records are retained. Valid values are between 1 and 365 inclusive.
* Default if not specified is 7 days.
* @return the changeFeedRetentionInDays value.
*/
public Integer getChangeFeedRetentionInDays() {
return changeFeedRetentionInDays;
}

/**
* Set the changeFeedRetentionInDays property:
* Optional. Supported in version 2026-06-06 and above. Only applicable for premium file storage accounts.
* The number of days that change feed records are retained. Valid values are between 1 and 365 inclusive.
* Default if not specified is 7 days.
* @param changeFeedRetentionInDays the changeFeedRetentionInDays value to set.
* @return the ShareCreateOptions object itself.
*/
public ShareCreateOptions setChangeFeedRetentionInDays(Integer changeFeedRetentionInDays) {
this.changeFeedRetentionInDays = changeFeedRetentionInDays;
return this;
}
}
Loading
Loading