Skip to content

Conversation

lnajaroen
Copy link

@lnajaroen lnajaroen commented Sep 15, 2025

Description

Update existing API. Make source list optional for redistribute throughput API. Currently it throws error if list is null and not passed through. We now support empty source list.

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

carjackson-msft and others added 30 commits February 25, 2024 22:27
…24165)

* apply Az.CosmosDB-preview branch CosmosDB folder to this branch

* Use autorest.powershell to generate management SDK for cosmosDB (Azure#22413)

* remove the custom code since character case change is not treated as a breaking change (Azure#22500)

* regen sdk

* specify header type as string to fix build error

* update autorest file to align with main; regen sdk

* fix casing

* [Cosmos DB] Powershell changes for 2023-03-15 stable API (Azure#21990)

* added tests for listconnectionstrings; updated changelog

* add changes for list connection strings response

* re-record test

* update changelog

* Add location api changes

* Added test recording for location api

* re-record tests

* re-record tests

* Revert "add changes for list connection strings response"

This reverts commit ff3ef0a.

* update changelog, update and re-record account tests

---------

Co-authored-by: Udit Singh <udsing@microsoft.com>

* CosmosDB - New Restore Parameter (Azure#22585)

* restore new param public network access

* minor fixes

* test change

* stable changes 1

* md param def changed

* reverting test changes for build

* restore ts

* test and test recording

* CosmosDB 2023-09-15 release (Azure#22726) (Azure#22953)

* genrated changes

* help and changelog and test case update

* Powershell model changes for burst capacity

* added customer managed key status to PSDatabaseAccountGetResults.cs

* added recording for MongoOperationsTests and SqlOperationsTest

* added recording for remaining tests

* rerecorded failed tests

* added changes in tests

* Minimal Tls version for create and update

* fixed build errors

* updated tls version in test

* updated commit id

* MinimalTlsVersion to changelog

* Update ChangeLog.md

Added CustomerManagedKeyStatus to the Changelog

* mask 'primaryReadOnlyMasterKey' and 'secondaryReadOnlyMasterKey' in recorded test

* mask 'primaryMasterKey' and 'secondaryMasterKey' in recorded test

* rerecorded account tests

* rerecorded account tests

* rerecorded Cassandra tests

* re-recorded all but mongo and restore tests

---------

Co-authored-by: Richa Sharma <richasharma.amu@gmail.com>
Co-authored-by: Adrián Sibaja Retana <adriansretana@hotmail.com>
Co-authored-by: unknown <danivsauma@gmail.com>
Co-authored-by: AdrianSibajaRetana <54075415+AdrianSibajaRetana@users.noreply.github.com>

* [CosmosDB] GA PowerShell commands for InAccount Restore of Deleted Database/ Containers feature for SQL/Mongo/Table/Gremlin (Azure#23666)

* changes and generated code

* update tests

* update session records

* update help files

* update changelog

* update session records

* update TestUpdateCosmosDBAccountBackupPolicyToContinuous30Days session record

* update session records

* add notimestamp tests and update few old session records

* regen sdk, fix build error

* fix duplicate code

* nit fix restore tests

* re-record tests

* CosmosDB: Adds changes to handle enabling partition merge on CosmosDB account (Azure#21736)

* Merge branch 'Az.CosmosDB-preview' of https://github.com/SrinikhilReddy/azure-powershell into features/users/nanarava/enablepmerge

* CosmosDB: Adds changes to handle enabling partition merge on CosmosDB account.

* CosmosDB: Adds changes to handle enabling partition merge on CosmosDB account.

* Update src/CosmosDB/CosmosDB/ChangeLog.md

Co-authored-by: Jin Lei <54836179+msJinLei@users.noreply.github.com>

* CosmosDB: Adds changes to handle enabling partition merge on CosmosDB account.

* CosmosDB: Adds changes to handle enabling partition merge on CosmosDB account.

* CosmosDB: Adds changes to handle enabling partition merge on CosmosDB account.

* Update ChangeLog.md

Remove duplicate line

* Resolve code comments.

---------

Co-authored-by: Jin Lei <54836179+msJinLei@users.noreply.github.com>

* Replace Start-Sleep with Start-TestSleep for all test cases (Azure#23780)

* re-record account test

* fix typo

* [Cosmos DB] Powershell changes for 2023-04-15 stable API (Continuous 7 GA) (Azure#21685)

* move to new swagger version and prereq

* edit readme.md

* manually generated from autorest

* Continuous 7 days change

* add 2 new test recordings

* fix example issues

* add all test recordings for RestoreTests suite

* fix New-AzCosmosDBAccount.md

* add almost all test recordings

* add 4 more successful recordings. all working now

* no examples

* clean up help file

* add output type to cmdlet

* suppress errors for existing cmdlets

* Revert "suppress errors for existing cmdlets"

This reverts commit f36e275.

* suppress static validation errors for existing commands

---------

Co-authored-by: Xiaogang <xidi@microsoft.com>
Co-authored-by: Udit Singh <udsing@microsoft.com>
Co-authored-by: mayankkatwal <121567171+mayankkatwal@users.noreply.github.com>
Co-authored-by: Yabo Hu <yabhu@microsoft.com>
Co-authored-by: Richa Sharma <richasharma.amu@gmail.com>
Co-authored-by: Adrián Sibaja Retana <adriansretana@hotmail.com>
Co-authored-by: unknown <danivsauma@gmail.com>
Co-authored-by: AdrianSibajaRetana <54075415+AdrianSibajaRetana@users.noreply.github.com>
Co-authored-by: ddhamotharan <105816437+ddhamotharan@users.noreply.github.com>
Co-authored-by: Srinikhil Naravamakula <srinikhil.r@gmail.com>
Co-authored-by: Jin Lei <54836179+msJinLei@users.noreply.github.com>
Co-authored-by: Vincent Dai <23257217+vidai-msft@users.noreply.github.com>
Co-authored-by: vinhms <vitrinh@microsoft.com>
* cherry-pick stable change into preview; stable:Azure#24199

* 1 out of 7 fixed

* fixing other 2 tests

* fixing remaining 4 tests failure due to session record
…re#24261)

* update and regen for 02-15-2024-preview version

* code changes

* test recording

* re-record tests

* regen sdk

* rerecord tests

* test recording

* Update ChangeLog.md

* Add DisableTtl

* Update md file

* Introduce custom model class DisableTtl to accomodate enumness

* Update readme

* Update test json file to expect string instead of bool

* Update readme to have boolean to string

* Revert back to boolean parameter

* Remove bak file

* Update restore test

* Update restore test

* Undo recording file change

* Add missing copy in the constructor

* Fix spaceing

* rerecord test

---------

Co-authored-by: Kushal Warke <kuwarke@microsoft.com>
Co-authored-by: Min Ho Kang <minhokang@microsoft.com>
[DoNotSquash] Get Az.CosmosDB-preview branch up to date
…review

[CosmosDB] Sync main to CosmosDB preview
[CosmosDB] Sync main to CosmosDB preview
VeryEarly and others added 15 commits May 20, 2025 10:25
[Microsoft.DocumentDB] Cosmos DB 2025-05-01-preview API version release.
)

Co-authored-by: Achint-Agrawal <45819170+Achint-Agrawal@users.noreply.github.com>
Co-authored-by: Achint Agrawal <ag.achint@gmail.com>
Co-authored-by: lijinpei2008 <31384087+lijinpei2008@users.noreply.github.com>
Co-authored-by: Gandharv Sachdeva <53263043+gansach@users.noreply.github.com>
Co-authored-by: gansach <gasachdeva@microsoft.com>
Co-authored-by: Azure PowerShell <65331932+azure-powershell-bot@users.noreply.github.com>
Co-authored-by: Yunchi Wang <54880216+wyunchi-ms@users.noreply.github.com>
Co-authored-by: EmmaZhu-MSFT <emmazhu@microsoft.com>
Co-authored-by: Prajjwal Kamboj <pkamboj@microsoft.com>
Co-authored-by: Xiaogang <xidi@microsoft.com>
Co-authored-by: Jin Lei <54836179+msJinLei@users.noreply.github.com>
Co-authored-by: Yabo Hu <yabhu@microsoft.com>
Co-authored-by: Vincent Dai <23257217+vidai-msft@users.noreply.github.com>
Co-authored-by: Prajjwal Kamboj <kamboj.prjwl@gmail.com>
Co-authored-by: Ankit Baluni <56029339+ankitbaluni123@users.noreply.github.com>
Co-authored-by: Ankit Baluni (from Dev Box) <ankitbaluni@microsoft.com>
Co-authored-by: Eugenio Peña García <70240915+EugenioPena@users.noreply.github.com>
Co-authored-by: Himanshu Agarwal <hiaga@microsoft.com>
Co-authored-by: Karthik Gumpu <gumpukarthik@gmail.com>
Co-authored-by: Karthik Gumpu (from Dev Box) <karthikgumpu@microsoft.com>
Co-authored-by: JoyerJin <116236375+JoyerJin@users.noreply.github.com>
Co-authored-by: Jingshu918 <138486531+Jingshu918@users.noreply.github.com>
Co-authored-by: ShawnX <17153057+ShawnXxy@users.noreply.github.com>
Co-authored-by: mmkiran21-git <v-mmanikiran@microsoft.com>
Co-authored-by: kumarutkarsh3b2166 <kumarutkarsh@microsoft.com>
Co-authored-by: NoriZC <110961157+NoriZC@users.noreply.github.com>
Co-authored-by: Auðunn <audunnb@gmail.com>
Co-authored-by: Sam Lee <32776898+minhsuanlee@users.noreply.github.com>
Co-authored-by: Sam Lee <samlee3@microsoft.com>
Co-authored-by: Yan Xu <yanxu1@microsoft.com>
Co-authored-by: yashikajain14 <140590975+yashikajain14@users.noreply.github.com>
Co-authored-by: Mike F. Robbins <6719572+mikefrobbins@users.noreply.github.com>
Co-authored-by: Theodore Chang <thchan@microsoft.com>
Co-authored-by: Yeming Liu <11371776+isra-fel@users.noreply.github.com>
Co-authored-by: Yeming Liu <yeliu@microsoft.com>
Co-authored-by: yanivha6 <132562992+yanivha6@users.noreply.github.com>
Co-authored-by: Yaniv Haddad <yanivhaddad@microsoft.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Qi Pan <43341456+Pan-Qi@users.noreply.github.com>
Co-authored-by: Arie Heinrich <arie.heinrich@outlook.com>
Co-authored-by: Wei Wei <weiwei@microsoft.com>
Co-authored-by: Ana Arias Rosales <147624519+anaarias-msft@users.noreply.github.com>
Co-authored-by: Srinivas <alluri02@users.noreply.github.com>
Co-authored-by: Srinivas Alluri <sralluri@microsoft.com>
Co-authored-by: Aditya Pujara <59631311+a0x1ab@users.noreply.github.com>
Co-authored-by: v-sapanchal <117979452+v-sapanchal@users.noreply.github.com>
Co-authored-by: yk <83654272+2258093686@users.noreply.github.com>
Co-authored-by: Yukun Li (Beyondsoft) <v-yukunli@microsoft.com>
Co-authored-by: Faizan Uddin Fahad Khan <contact.faizan.fahad@gmail.com>
Co-authored-by: Faizan Uddin Fahad Khan <faikh@microsoft.com>
Co-authored-by: emmeliaAra <emmelia.ara42@gmail.com>
Co-authored-by: emmeliaAra <earakleitou@microsoft.com>
Co-authored-by: ajtms <154369796+ajtms@users.noreply.github.com>
Co-authored-by: Christopher Lewis <ChristopherGLewis@users.noreply.github.com>
Co-authored-by: mihretkidane-OCI <mihret.kidane@oracle.com>
Co-authored-by: raghumetta <raghunadh.metta@oracle.com>
Co-authored-by: Emily Hua <emily.hua@oracle.com>
Co-authored-by: Mathias Foster <77993506+mfoster58@users.noreply.github.com>
Co-authored-by: mfoster58 <mathfoster@microsoft.com>
Co-authored-by: Anna Pankiewicz <anna.pankiewicz@microsoft.com>
Co-authored-by: prakhar_shukla <78557330+shuklaprakhar415@users.noreply.github.com>
Co-authored-by: Prakhar Shukla <prakshukla@microsoft.com>
Co-authored-by: Weishu Zhao <632604666@qq.com>
Co-authored-by: BhumikaMatharu <50544476+BhumikaMatharu@users.noreply.github.com>
Co-authored-by: Bhumika Kaur Matharu <bmatharu@microsoft.com>
Co-authored-by: am-lim <55768281+am-lim@users.noreply.github.com>
…uckets (Azure#28378)

Co-authored-by: NoriZC <110961157+NoriZC@users.noreply.github.com>
@Copilot Copilot AI review requested due to automatic review settings September 15, 2025 23:21
Copy link

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

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR makes the source list parameter optional for the redistribute throughput API in CosmosDB. Previously, the API would throw an error when the source list was null or not passed, but now it supports empty source lists to provide more flexibility.

Key Changes

  • Updated the redistribute throughput API to handle optional source lists
  • Modified validation logic to accept empty/null source lists instead of throwing errors

Reviewed Changes

Copilot reviewed 2 out of 526 changed files in this pull request and generated 1 comment.

File Description
src/CosmosDB/CosmosDB.Management.Sdk/CosmosDB.Management.Sdk.csproj Added BOM character to project file
NuGet.Config Added empty lines to configuration file

@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
Copy link
Preview

Copilot AI Sep 15, 2025

Choose a reason for hiding this comment

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

The addition of a UTF-8 BOM (Byte Order Mark) character at the beginning of the project file is unnecessary and can cause issues with some tools and editors. Project files should be saved as UTF-8 without BOM.

Suggested change
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

Copilot uses AI. Check for mistakes.

@isra-fel
Copy link
Member

/azp run

Copy link
Contributor

Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

@VeryEarly VeryEarly self-assigned this Sep 16, 2025




Copy link
Collaborator

Choose a reason for hiding this comment

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

please remove this change from your PR

Copy link
Collaborator

@VeryEarly VeryEarly left a comment

Choose a reason for hiding this comment

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

please remove changes under azure-powershell/generated from your PR

@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
Copy link
Collaborator

Choose a reason for hiding this comment

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

what is this change for?

Copy link
Collaborator

Choose a reason for hiding this comment

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

please use a specific commit id instead of main

Copy link
Collaborator

Choose a reason for hiding this comment

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

it looks like your base branch was based on the preview feature branch, and incorrectly targeting to main branch, please double check your target release

Copy link
Contributor

@lnajaroen please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@microsoft-github-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@microsoft-github-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@microsoft-github-policy-service agree company="Microsoft"
Contributor License Agreement

Contribution License Agreement

This Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
and conveys certain license rights to Microsoft Corporation and its affiliates (“Microsoft”) for Your
contributions to Microsoft open source projects. This Agreement is effective as of the latest signature
date below.

  1. Definitions.
    “Code” means the computer software code, whether in human-readable or machine-executable form,
    that is delivered by You to Microsoft under this Agreement.
    “Project” means any of the projects owned or managed by Microsoft and offered under a license
    approved by the Open Source Initiative (www.opensource.org).
    “Submit” is the act of uploading, submitting, transmitting, or distributing code or other content to any
    Project, including but not limited to communication on electronic mailing lists, source code control
    systems, and issue tracking systems that are managed by, or on behalf of, the Project for the purpose of
    discussing and improving that Project, but excluding communication that is conspicuously marked or
    otherwise designated in writing by You as “Not a Submission.”
    “Submission” means the Code and any other copyrightable material Submitted by You, including any
    associated comments and documentation.
  2. Your Submission. You must agree to the terms of this Agreement before making a Submission to any
    Project. This Agreement covers any and all Submissions that You, now or in the future (except as
    described in Section 4 below), Submit to any Project.
  3. Originality of Work. You represent that each of Your Submissions is entirely Your original work.
    Should You wish to Submit materials that are not Your original work, You may Submit them separately
    to the Project if You (a) retain all copyright and license information that was in the materials as You
    received them, (b) in the description accompanying Your Submission, include the phrase “Submission
    containing materials of a third party:” followed by the names of the third party and any licenses or other
    restrictions of which You are aware, and (c) follow any other instructions in the Project’s written
    guidelines concerning Submissions.
  4. Your Employer. References to “employer” in this Agreement include Your employer or anyone else
    for whom You are acting in making Your Submission, e.g. as a contractor, vendor, or agent. If Your
    Submission is made in the course of Your work for an employer or Your employer has intellectual
    property rights in Your Submission by contract or applicable law, You must secure permission from Your
    employer to make the Submission before signing this Agreement. In that case, the term “You” in this
    Agreement will refer to You and the employer collectively. If You change employers in the future and
    desire to Submit additional Submissions for the new employer, then You agree to sign a new Agreement
    and secure permission from the new employer before Submitting those Submissions.
  5. Licenses.
  • Copyright License. You grant Microsoft, and those who receive the Submission directly or
    indirectly from Microsoft, a perpetual, worldwide, non-exclusive, royalty-free, irrevocable license in the
    Submission to reproduce, prepare derivative works of, publicly display, publicly perform, and distribute
    the Submission and such derivative works, and to sublicense any or all of the foregoing rights to third
    parties.
  • Patent License. You grant Microsoft, and those who receive the Submission directly or
    indirectly from Microsoft, a perpetual, worldwide, non-exclusive, royalty-free, irrevocable license under
    Your patent claims that are necessarily infringed by the Submission or the combination of the
    Submission with the Project to which it was Submitted to make, have made, use, offer to sell, sell and
    import or otherwise dispose of the Submission alone or with the Project.
  • Other Rights Reserved. Each party reserves all rights not expressly granted in this Agreement.
    No additional licenses or rights whatsoever (including, without limitation, any implied licenses) are
    granted by implication, exhaustion, estoppel or otherwise.
  1. Representations and Warranties. You represent that You are legally entitled to grant the above
    licenses. You represent that each of Your Submissions is entirely Your original work (except as You may
    have disclosed under Section 3). You represent that You have secured permission from Your employer to
    make the Submission in cases where Your Submission is made in the course of Your work for Your
    employer or Your employer has intellectual property rights in Your Submission by contract or applicable
    law. If You are signing this Agreement on behalf of Your employer, You represent and warrant that You
    have the necessary authority to bind the listed employer to the obligations contained in this Agreement.
    You are not expected to provide support for Your Submission, unless You choose to do so. UNLESS
    REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING, AND EXCEPT FOR THE WARRANTIES
    EXPRESSLY STATED IN SECTIONS 3, 4, AND 6, THE SUBMISSION PROVIDED UNDER THIS AGREEMENT IS
    PROVIDED WITHOUT WARRANTY OF ANY KIND, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTY OF
    NONINFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
  2. Notice to Microsoft. You agree to notify Microsoft in writing of any facts or circumstances of which
    You later become aware that would make Your representations in this Agreement inaccurate in any
    respect.
  3. Information about Submissions. You agree that contributions to Projects and information about
    contributions may be maintained indefinitely and disclosed publicly, including Your name and other
    information that You submit with Your Submission.
  4. Governing Law/Jurisdiction. This Agreement is governed by the laws of the State of Washington, and
    the parties consent to exclusive jurisdiction and venue in the federal courts sitting in King County,
    Washington, unless no federal subject matter jurisdiction exists, in which case the parties consent to
    exclusive jurisdiction and venue in the Superior Court of King County, Washington. The parties waive all
    defenses of lack of personal jurisdiction and forum non-conveniens.
  5. Entire Agreement/Assignment. This Agreement is the entire agreement between the parties, and
    supersedes any and all prior agreements, understandings or communications, written or oral, between
    the parties relating to the subject matter hereof. This Agreement may be assigned by Microsoft.

Copy link

‼️ DO NOT MERGE THIS PR ‼️
This PR was labeled "Do Not Merge" because it contains code change that cannot be merged. Please contact the reviewer for more information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.