Skip to content

[AutoPR azure-mgmt-costmanagement]-generated-from-SDK Generation - Python-6689522 - #48541

Open
azure-sdk-automation[bot] wants to merge 1 commit into
mainfrom
sdkauto/azure-mgmt-costmanagement-6689522
Open

[AutoPR azure-mgmt-costmanagement]-generated-from-SDK Generation - Python-6689522#48541
azure-sdk-automation[bot] wants to merge 1 commit into
mainfrom
sdkauto/azure-mgmt-costmanagement-6689522

Conversation

@azure-sdk-automation

Copy link
Copy Markdown
Contributor

Configurations: 'specification/cost-management/resource-manager/Microsoft.CostManagement/CostManagement/tspconfig.yaml', SDK Release Type: stable, and CommitSHA: 'de5af7be7ad092c3cf52862dedd75293ccb70187' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6689522 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. Release plan link: https://azsdk-releaseplan-dashboard-hveph5aqhhcfhtgu.westus-01.azurewebsites.net/?releaseplan=35986 Submitted by: mraveendar@microsoft.com

…soft.CostManagement/CostManagement/tspconfig.yaml', SDK Release Type: stable, and CommitSHA: 'de5af7be7ad092c3cf52862dedd75293ccb70187' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6689522 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release.
Copilot AI balanced review requested due to automatic review settings August 12, 2026 03:23
@azure-sdk-automation azure-sdk-automation Bot added the auto-release When merged to main, release pipelines for this PR's changed packages trigger automatically. label Aug 12, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
9 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI 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

Note

Copilot could not run the full agentic suite for this review because it was automatically requested on a bot-authored pull request. Request a review from Copilot under Reviewers to retry with the full agentic suite. Improved support for bot-authored pull requests is coming soon.

Updates the azure-mgmt-costmanagement Python SDK to align with the 2026-06-01 CostManagement swagger drop, including new Markup Rules support and regenerated public surface area artifacts.

Changes:

  • Bump default API version to 2026-06-01 and update generation metadata (spec commit, emitter/http client versions, API view files).
  • Add Markup Rules operation group (markup_rules) plus related models/enums (e.g., MarkupRule, CustomerMetadata, Scope.MANAGEMENT_GROUP).
  • Regenerate samples/tests and update x-ms-original-file annotations to 2026-06-01.

Reviewed changes

Copilot reviewed 236 out of 236 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
sdk/costmanagement/azure-mgmt-costmanagement/tsp-location.yaml Updates source spec commit pointer for regeneration.
sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_configuration.py Bumps default api version + docstring updates.
sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/_configuration.py Bumps default api version + docstring updates (async).
sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_client.py Wires new markup_rules operation group into sync client.
sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/_client.py Wires new markup_rules operation group into async client.
sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/init.py Exposes MarkupRulesOperations in sync operations namespace.
sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/init.py Exposes MarkupRulesOperations in async operations namespace.
sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_operations.py Adds async Markup Rules operations implementation + api-version validation decorator usage.
sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_enums.py Adds Scope.MANAGEMENT_GROUP.
sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/init.py Exports newly generated models.
sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_validation.py Introduces api_version_validation decorator.
sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_utils/model_base.py Extends deserialization helpers (bool-as-str) + docstring adjustments.
sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_utils/serialization.py Adds docstring details for serializer ctor args.
sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_markup_rules_operations.py Adds generated (currently skipped) sync Markup Rules tests.
sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_markup_rules_operations_async.py Adds generated (currently skipped) async Markup Rules tests.
sdk/costmanagement/azure-mgmt-costmanagement/generated_samples/*.py Regenerates samples and updates x-ms-original-file references to 2026-06-01 (+ new Markup Rules / BenefitRecommendations samples).
sdk/costmanagement/azure-mgmt-costmanagement/api.md Updates documented public surface area (new ops/models/types).
sdk/costmanagement/azure-mgmt-costmanagement/apiview-properties.json Updates APIView mapping for new ops/models.
sdk/costmanagement/azure-mgmt-costmanagement/_metadata.json Updates api version + generator metadata.
sdk/costmanagement/azure-mgmt-costmanagement/api.metadata.yml Updates parser version + api.md hash.
sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_version.py Bumps package version to 5.1.0.
sdk/costmanagement/azure-mgmt-costmanagement/CHANGELOG.md Adds release notes for 5.1.0.
Suppressed comments (2)

sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_markup_rules_operations.py:1

  • All newly added Markup Rules tests are marked skipped, which means the new markup_rules operation group has no effective test coverage in CI. If these tests are intended to validate the generated surface, consider either (1) converting them into recorded tests with real assertions and enabling them, or (2) removing them from the test suite until they can be made runnable to avoid giving a false sense of coverage.
    sdk/costmanagement/azure-mgmt-costmanagement/generated_tests/test_cost_management_markup_rules_operations_async.py:1
  • Same as the sync counterpart: the async Markup Rules tests are all skipped, so the new async markup_rules operation group has no effective coverage. Consider enabling these with recordings/assertions (or excluding them entirely until they can run) so the new API surface is validated.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +30 to +62
def decorator(func):
@functools.wraps(func)
def wrapper(*args, **kwargs):
try:
# this assumes the client has an _api_version attribute
client = args[0]
client_api_version = client._config.api_version # pylint: disable=protected-access
except AttributeError:
return func(*args, **kwargs)

if _index_with_default(method_added_on) > _index_with_default(client_api_version):
raise ValueError(
f"'{func.__name__}' is not available in API version "
f"{client_api_version}. Pass service API version {method_added_on} or newer to your client."
)

unsupported = {
parameter: api_version
for api_version, parameters in params_added_on.items()
for parameter in parameters
if parameter in kwargs and _index_with_default(api_version) > _index_with_default(client_api_version)
}
if unsupported:
raise ValueError(
"".join(
[
f"'{param}' is not available in API version {client_api_version}. "
f"Use service API version {version} or newer.\n"
for param, version in unsupported.items()
]
)
)
return func(*args, **kwargs)
Comment on lines +46 to +51
unsupported = {
parameter: api_version
for api_version, parameters in params_added_on.items()
for parameter in parameters
if parameter in kwargs and _index_with_default(api_version) > _index_with_default(client_api_version)
}
Comment on lines +986 to +996
@overload
async def create_or_update(
self,
billing_account_id: str,
billing_profile_id: str,
rule_name: str,
resource: MarkupRule,
*,
content_type: str = "application/json",
**kwargs: Any
) -> MarkupRule: ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-release When merged to main, release pipelines for this PR's changed packages trigger automatically.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants