Skip to content

[Az.StorageSync] Add Apiversion 2025-12-01 to Microsot.StorageSync - #28956

Open
Ankush Bindlish (ankushbindlish2) wants to merge 34 commits into
Azure:mainfrom
ankushbindlish2:ChangeEnumerationIntervalDays-with-2025-09-01
Open

[Az.StorageSync] Add Apiversion 2025-12-01 to Microsot.StorageSync#28956
Ankush Bindlish (ankushbindlish2) wants to merge 34 commits into
Azure:mainfrom
ankushbindlish2:ChangeEnumerationIntervalDays-with-2025-09-01

Conversation

@ankushbindlish2

@ankushbindlish2Ankush Bindlish (ankushbindlish2) commented Dec 4, 2025

Copy link
Copy Markdown
Member

🤖 PR Validation — ❌ Action needed

Tests
❌ 20/24
️✔️Az.Accounts
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Az.Storage
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
❌Az.StorageSync
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Breaking Change Check
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Signature Check
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
⚠️Help Example Check
⚠️PowerShell Core - Windows
TypeCmdletExampleLineRuleNameDescriptionExtentRemediation
⚠️New-AzStorageSyncCloudEndpoint11Unassigned_VariableNew-AzStorageSyncCloudEndpoint -StorageAccountResourceId $storageAccountResourceId is a null-valued parameter value.-StorageAccountResourceIdAssign value for $storageAccountResourceId.
⚠️Windows PowerShell - Windows
TypeCmdletExampleLineRuleNameDescriptionExtentRemediation
⚠️New-AzStorageSyncCloudEndpoint11Unassigned_VariableNew-AzStorageSyncCloudEndpoint -StorageAccountResourceId $storageAccountResourceId is a null-valued parameter value.-StorageAccountResourceIdAssign value for $storageAccountResourceId.
️✔️Help File Existence Check
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️File Change Check
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️UX Metadata Check
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Generated Sdk Check
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
❌Test
❌PowerShell Core - Linux
❌PowerShell Core - MacOS
❌PowerShell Core - Windows
❌Windows PowerShell - Windows

Description

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • Update src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.
      • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT adjust version of module manually in pull request

This commit introduces support for configuring the change enumeration interval for cloud endpoints in Azure File Sync.
Changes include:
- Added ChangeEnumerationIntervalDays parameter to New-AzStorageSyncCloudEndpoint cmdlet
* Optional parameter with ValidateRange(1, 20) attribute
* Allows customers to control the interval between change enumeration operations
- Created new Set-AzStorageSyncCloudEndpoint cmdlet
* Enables updating ChangeEnumerationIntervalDays on existing cloud endpoints
* Supports three parameter sets: StringParameterSet, ResourceIdParameterSet, ObjectParameterSet
* Supports pipeline input for flexible usage
- Updated SDK models:
* CloudEndpoint - added ChangeEnumerationIntervalDays property
* CloudEndpointCreateParameters - added parameter support
* CloudEndpointCreateParametersProperties - added property
* CloudEndpointUpdateParameters - new model for update operations
- Updated PowerShell models and converters:
* PSCloudEndpoint - added ChangeEnumerationIntervalDays property
* CloudEndpointConverter - updated Transform methods to handle new property
- Added comprehensive documentation:
* Updated New-AzStorageSyncCloudEndpoint.md with parameter details
* Created Set-AzStorageSyncCloudEndpoint.md with full cmdlet documentation
* Updated ChangeLog.md with feature descriptions
Valid range: 1 to 20 days
Reordered and refactored CloudEndpointsOperations methods to align with REST conventions. Swapped method signatures and implementations for Create, Get, ListBySyncGroup, Update, and Delete operations, and updated documentation and tracing accordingly. Added support for new AfsShareMetadataCertificatePublicKeys API and adjusted method parameters for consistency.
Introduces validation logic to ensure ChangeEnumerationIntervalDays is between 1 and 20 in CloudEndpoint models and parameter classes. Updates CloudEndpoint update methods to accept changeEnumerationIntervalDays directly instead of properties, and bumps API version to 2025-12-01.
CopilotAI review requested due to automatic review settings December 4, 2025 23:42
@azure-client-tools-bot-prd

Copy link
Copy Markdown
Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status.

@isra-fel

Copy link
Copy Markdown
Member

/azp run

@ankushbindlish2Ankush Bindlish (ankushbindlish2) changed the title Change enumeration interval days with 2025 09 01[NEW API] [DO NOT MERGE] Add Change enumeration interval days optional property to New CloudEndpoint. Add Set CloudEndpoint commandDec 4, 2025
@azure-pipelines

Copy link
Copy Markdown
Contributor
Azure Pipelines successfully started running 3 pipeline(s).

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds support for configuring change enumeration intervals on Azure File Sync cloud endpoints. The change introduces a new ChangeEnumerationIntervalDays parameter (valid range: 1-20 days) to control the frequency of change detection operations. The implementation includes a new Set-AzStorageSyncCloudEndpoint cmdlet for updating existing cloud endpoints and extends New-AzStorageSyncCloudEndpoint to accept this parameter during creation. The PR also updates the Storage Sync Management SDK to API version 2025-12-01.

Key changes:

  • Added Set-AzStorageSyncCloudEndpoint cmdlet to update cloud endpoint properties
  • Extended New-AzStorageSyncCloudEndpoint with optional ChangeEnumerationIntervalDays parameter
  • Updated SDK from API version 2022-09-01 to 2025-12-01

Reviewed changes

Copilot reviewed 9 out of 20 changed files in this pull request and generated 4 comments.

Show a summary per file
FileDescription
src/StorageSync/StorageSync/ChangeLog.mdAdded user-facing changelog entries for new cmdlet and parameter
src/StorageSync/StorageSync/help/Set-AzStorageSyncCloudEndpoint.mdNew help documentation for Set-AzStorageSyncCloudEndpoint cmdlet
src/StorageSync/StorageSync/help/New-AzStorageSyncCloudEndpoint.mdUpdated help to document ChangeEnumerationIntervalDays parameter
src/StorageSync/StorageSync/CloudEndpoint/SetCloudEndpointCommand.csNew cmdlet implementation supporting three parameter sets for updating cloud endpoints
src/StorageSync/StorageSync/CloudEndpoint/NewCloudEndpointCommand.csAdded ChangeEnumerationIntervalDays parameter support
src/StorageSync/StorageSync/Models/PSCloudEndpoint.csAdded ChangeEnumerationIntervalDays property to PowerShell model
src/StorageSync/StorageSync/Common/HelpMessages.csAdded help message constant for the new parameter
src/StorageSync/StorageSync/Common/Converters/CloudEndpointConverter.csUpdated converter to map ChangeEnumerationIntervalDays between SDK and PS models
src/StorageSync/StorageSync.Management.Sdk/README.mdUpdated AutoRest configuration to use API version 2025-12-01
src/StorageSync/StorageSync.Management.Sdk/Generated/StorageSyncManagementClient.csUpdated API version constant to 2025-12-01
src/StorageSync/StorageSync.Management.Sdk/Generated/Models/CloudEndpoint*.csGenerated SDK models supporting ChangeEnumerationIntervalDays property with validation
src/StorageSync/StorageSync.Management.Sdk/Generated/ICloudEndpointsOperations.csAdded Update operation interface for cloud endpoints
src/StorageSync/StorageSync.Management.Sdk/Generated/CloudEndpointsOperations*.csImplemented Update and BeginUpdate operations with PATCH HTTP method

Comment threadsrc/StorageSync/StorageSync.Management.Sdk/README.md Outdated
Comment on lines +21 to +27
* Added `ChangeEnumerationIntervalDays` parameter to `New-AzStorageSyncCloudEndpoint` cmdlet
- Allows customers to configure the interval in days between change enumeration operations for cloud endpoints
- Valid range: 1 to 20 days
- Optional parameter that provides control over change detection frequency
* Added `Set-AzStorageSyncCloudEndpoint` cmdlet
- Allows customers to update the `ChangeEnumerationIntervalDays` property of an existing cloud endpoint
- Valid range: 1 to 20 days

CopilotAIDec 4, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changelog entries use backticks around parameter names (e.g., ChangeEnumerationIntervalDays, New-AzStorageSyncCloudEndpoint), which is acceptable according to the guidelines. However, for consistency with PowerShell module manifest compatibility, consider using simple quotes instead (e.g., 'ChangeEnumerationIntervalDays'). Backticks are automatically converted to single quotes in release notes, so either format is acceptable.

Copilot generated this review using guidance from repository custom instructions.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot open a new pull request to apply changes based on this feedback

Comment threadsrc/StorageSync/StorageSync/CloudEndpoint/SetCloudEndpointCommand.cs Outdated
Comment on lines +35 to +36
[Cmdlet(VerbsCommon.Set, StorageSyncNouns.NounAzureRmStorageSyncCloudEndpoint,
DefaultParameterSetName = StorageSyncParameterSets.StringParameterSet, SupportsShouldProcess = true), OutputType(typeof(PSCloudEndpoint))]

CopilotAIDec 4, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new Set-AzStorageSyncCloudEndpoint cmdlet lacks test coverage. The repository has comprehensive test files in src/StorageSync/StorageSync.Test/ScenarioTests/CloudEndpointTests.ps1, but no tests were added for this new cmdlet or the ChangeEnumerationIntervalDays parameter. Consider adding test cases that cover:

  1. Setting ChangeEnumerationIntervalDays on a new cloud endpoint
  2. Updating ChangeEnumerationIntervalDays on an existing endpoint
  3. Validation of the 1-20 day range
  4. Different parameter sets (StringParameterSet, ResourceIdParameterSet, ObjectParameterSet)

Copilot uses AI. Check for mistakes.
@isra-fel

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Contributor
Azure Pipelines successfully started running 3 pipeline(s).

Refactored parameter and related references from ChangeEnumerationIntervalDays to ChangeEnumerationIntervalDay in NewCloudEndpointCommand, SetCloudEndpointCommand, and their help documentation for clarity and consistency.
Updated Az.StorageSync.psd1 to include Set-AzStorageSyncCloudEndpoint in the CmdletsToExport list, enabling users to access this cmdlet from the module.
@NoriZC

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Contributor
Azure Pipelines successfully started running 3 pipeline(s).

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 21 changed files in this pull request and generated 8 comments.

Comment on lines +258 to +260
/// The change enumeration interval days parameter
/// </summary>
public const string ChangeEnumerationIntervalDaysParameter = "Change Enumeration Interval Days. This parameter defines the interval in days between change enumeration operations for the cloud endpoint. Valid values range from 1 to 20 days.";

CopilotAIDec 5, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The help message constant name ChangeEnumerationIntervalDaysParameter uses the plural form "Days", but the actual parameter name is ChangeEnumerationIntervalDay (singular). For consistency, consider naming this constant ChangeEnumerationIntervalDayParameter to match the parameter name.

Suggested change
/// The change enumeration interval days parameter
/// </summary>
publicconststringChangeEnumerationIntervalDaysParameter="Change Enumeration Interval Days. This parameter defines the interval in days between change enumeration operations for the cloud endpoint. Valid values range from 1 to 20 days.";
/// The change enumeration interval day parameter
/// </summary>
publicconststringChangeEnumerationIntervalDayParameter="Change Enumeration Interval Days. This parameter defines the interval in days between change enumeration operations for the cloud endpoint. Valid values range from 1 to 20 days.";

Copilot uses AI. Check for mistakes.
Comment on lines +203 to +216
// Create update parameters with the existing values and new ChangeEnumerationIntervalDay
var updateParameters = new CloudEndpointUpdateParameters()
{
};

// Apply the update if parameter is provided
if (this.IsParameterBound(c => c.ChangeEnumerationIntervalDay))
{
updateParameters.ChangeEnumerationIntervalDays = ChangeEnumerationIntervalDay;
}
else if (existingCloudEndpoint.ChangeEnumerationIntervalDays.HasValue)
{
updateParameters.ChangeEnumerationIntervalDays = existingCloudEndpoint.ChangeEnumerationIntervalDays;
}

CopilotAIDec 5, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CloudEndpointUpdateParameters object is created but never used. It's created at line 204, populated at lines 211 and 215, but then only the ChangeEnumerationIntervalDays property is passed to the Update method at line 226. Since the Update method signature expects int? changeEnumerationIntervalDays directly, you should simplify this code to work directly with an int? variable instead of creating an unused object.

Copilot uses AI. Check for mistakes.
- Additional information about change #1
-->
## Upcoming Release
* Added `ChangeEnumerationIntervalDays` parameter to `New-AzStorageSyncCloudEndpoint` cmdlet

CopilotAIDec 5, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parameter name in the ChangeLog should be ChangeEnumerationIntervalDay (singular), not ChangeEnumerationIntervalDays (plural), to match the actual cmdlet parameter name used in the code.

Copilot generated this review using guidance from repository custom instructions.
- Valid range: 1 to 20 days
- Optional parameter that provides control over change detection frequency
* Added `Set-AzStorageSyncCloudEndpoint` cmdlet
- Allows customers to update the `ChangeEnumerationIntervalDays` property of an existing cloud endpoint

CopilotAIDec 5, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parameter name in the ChangeLog should be ChangeEnumerationIntervalDay (singular), not ChangeEnumerationIntervalDays (plural), to match the actual cmdlet parameter name used in the code.

Copilot generated this review using guidance from repository custom instructions.
storageSyncServiceName,
parentResourceName,
resourceName,
updateParameters.ChangeEnumerationIntervalDays);

CopilotAIDec 5, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Update method is being called with a single parameter updateParameters.ChangeEnumerationIntervalDays, but the method signature expects the full CloudEndpointUpdateParameters object. This should be updateParameters instead of updateParameters.ChangeEnumerationIntervalDays.

Suggested change
updateParameters.ChangeEnumerationIntervalDays);
updateParameters);

Copilot uses AI. Check for mistakes.
/// <summary>
/// The change enumeration interval days parameter
/// </summary>
public const string ChangeEnumerationIntervalDaysParameter = "Change Enumeration Interval Days. This parameter defines the interval in days between change enumeration operations for the cloud endpoint. Valid values range from 1 to 20 days.";

CopilotAIDec 5, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The help message should be more concise and avoid over-explanation. Consider simplifying to: "Interval in days between change enumeration operations for the cloud endpoint (1-20 days)." The current message is somewhat redundant with "This parameter defines the interval in days" and then repeating "Valid values range from 1 to 20 days."

Copilot generated this review using guidance from repository custom instructions.
```

### -ChangeEnumerationIntervalDay
Change Enumeration Interval Day. This parameter defines the interval in days between change enumeration operations for the cloud endpoint. Valid values range from 1 to 20 days.

CopilotAIDec 5, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parameter description is redundant. Consider simplifying to: "Interval in days between change enumeration operations for the cloud endpoint. Valid values range from 1 to 20 days." This avoids the redundancy of "This parameter defines the interval in days" followed immediately by defining the interval.

Copilot generated this review using guidance from repository custom instructions.
```

### -ChangeEnumerationIntervalDay
Change Enumeration Interval Day. This parameter defines the interval in days between change enumeration operations for the cloud endpoint. Valid values range from 1 to 20 days.

CopilotAIDec 5, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parameter description is redundant. Consider simplifying to: "Interval in days between change enumeration operations for the cloud endpoint. Valid values range from 1 to 20 days." This avoids the redundancy of "This parameter defines the interval in days" followed immediately by defining the interval.

Copilot generated this review using guidance from repository custom instructions.
@thomas-temby

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Contributor
Azure Pipelines successfully started running 3 pipeline(s).

@thomas-temby

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Contributor
Azure Pipelines successfully started running 3 pipeline(s).

@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Contributor
Azure Pipelines:
Successfully started running 3 pipeline(s).

@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Contributor
Azure Pipelines:
Successfully started running 3 pipeline(s).

Refreshes the StorageSync SDK generation commit and switches the specification source to the official azure/azure-rest-api-specs repository.
@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Contributor
Azure Pipelines:
Successfully started running 3 pipeline(s).

Use resourceServerGuid instead of resourceName when calling RegisteredServers.Get, matching the expected server identifier parameter.
@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Contributor
Azure Pipelines:
Successfully started running 3 pipeline(s).

@ankushbindlish2Ankush Bindlish (ankushbindlish2) changed the title [NEW API] [DO NOT MERGE] Add Change enumeration interval days optional property to New CloudEndpoint. Add Set CloudEndpoint command[NEW API] [DO NOT MERGE] Add Apiversion 2025-12-01 to Microsot.StorageSyncSep 4, 2026
Extract the trailing GUID from the recorded SyncServerId ARM resource ID so the mock matches the real GetSyncServerId contract while preserving bare GUID values.
@ankushbindlish2Ankush Bindlish (ankushbindlish2) changed the title [NEW API] [DO NOT MERGE] Add Apiversion 2025-12-01 to Microsot.StorageSync[Az.StorageSync] Add Apiversion 2025-12-01 to Microsot.StorageSyncSep 4, 2026
@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Contributor
Azure Pipelines:
Successfully started running 3 pipeline(s).

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants

@ankushbindlish2@isra-fel@NoriZC@thomas-temby@a0x1ab@notyashhh@stefong99@anpint