-
Notifications
You must be signed in to change notification settings - Fork 3k
[AutoRelease] t2-monitor-2025-07-04-83128(can only be merged by SDK owner) #41908
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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 adds auto-generated operations, models, tests, and samples for the new Data Collection Rules, Data Collection Rule Associations, and Data Collection Endpoints APIs in the Monitor management SDK.
- Introduces sync and async client operations (
DataCollectionRulesOperations
,DataCollectionRuleAssociationsOperations
,DataCollectionEndpointsOperations
) and updates the models/enums. - Adds generated test stubs for both sync and async operations, all marked as skipped and containing placeholder validation comments.
- Provides sample scripts for listing, getting, creating, updating, and deleting the new resources.
Reviewed Changes
Copilot reviewed 44 out of 45 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/operations/_data_collection*_operations.py | New auto-generated operation implementations for rules, associations, and endpoints (sync & async) |
sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/models/_monitor_management_client_enums.py and __init__.py | Expanded models and added new enums for data collection resources |
sdk/monitor/azure-mgmt-monitor/generated_tests/test_monitor*_operations*.py | Added placeholder tests for all new operations |
sdk/monitor/azure-mgmt-monitor/generated_samples/data_collection*.py | Sample scripts for each CRUD operation on the new resources |
Comments suppressed due to low confidence (1)
sdk/monitor/azure-mgmt-monitor/generated_tests/test_monitor_management_data_collection_rules_operations_async.py:30
- The test lacks assertions or validation logic. Add checks to verify the response content and ensure the operation behaves as expected.
# please add some check logic here by yourself
|
||
response = client.data_collection_rules.update( | ||
resource_group_name="myResourceGroup", | ||
data_collection_rule_name="myCollectionRule", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The sample calls update without providing the required 'body' parameter. Please include a payload object to specify the fields to update.
response = client.data_collection_rules.update( | |
resource_group_name="myResourceGroup", | |
data_collection_rule_name="myCollectionRule", | |
body = { | |
"description": "Updated description for the data collection rule", | |
"dataSources": { | |
"performanceCounters": [], | |
"syslog": [], | |
"windowsEventLogs": [] | |
}, | |
"destinations": { | |
"logAnalytics": [] | |
} | |
} | |
response = client.data_collection_rules.update( | |
resource_group_name="myResourceGroup", | |
data_collection_rule_name="myCollectionRule", | |
body=body, |
Copilot uses AI. Check for mistakes.
def main(): | ||
client = MonitorManagementClient( | ||
credential=DefaultAzureCredential(), | ||
subscription_id="703362b3-f278-4e4b-9179-c76eaf41ffc2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The subscription ID is hard-coded in the sample. Consider parameterizing this value or retrieving it from an environment variable to avoid leaking sensitive information.
subscription_id="703362b3-f278-4e4b-9179-c76eaf41ffc2", | |
subscription_id=os.getenv("AZURE_SUBSCRIPTION_ID"), |
Copilot uses AI. Check for mistakes.
https://github.com/Azure/sdk-release-request/issues/6307
Recording test success
https://dev.azure.com/azure-sdk/internal/_build?definitionId=1014
BuildTargetingString
azure-mgmt-monitor
Skip.CreateApiReview