Fix Update-AzSentinelIncident help examples to include required parameters#29293
Fix Update-AzSentinelIncident help examples to include required parameters#29293coder999999999 wants to merge 2 commits intoAzure:mainfrom
Conversation
…eters (Azure#29130) Updated documentation for Update-AzSentinelIncident to: - Clarify that -Title, -Status, and -Severity are required for successful updates - Add Example 2 showing UpdateViaIdentityExpanded usage with -InputObject - Add Example 3 showing label updates with required parameters - Note that omitted parameters may be reset to defaults by the API
| Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status. |
|
Thank you for your contribution @coder999999999! We will review the pull request and get back to you soon. |
There was a problem hiding this comment.
Pull request overview
This PR fixes the Update-AzSentinelIncident cmdlet documentation in the SecurityInsights module so the published examples include required fields (-Title, -Status, -Severity) and no longer fail with service-side validation errors (Fixes [#29130]).
Changes:
- Updated Example 1 to call out that
-Title,-Status, and-Severitymust be provided to avoid validation errors. - Added examples demonstrating updating an incident via
-InputObject, including label updates. - Added a release note entry under
## Upcoming Releasefor the documentation fix.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/SecurityInsights/SecurityInsights/help/Update-AzSentinelIncident.md |
Adds/updates examples and explanatory text to include required parameters and show -InputObject usage. |
src/SecurityInsights/SecurityInsights/ChangeLog.md |
Notes the documentation correction for Update-AzSentinelIncident under “Upcoming Release”. |
| --> | ||
|
|
||
| ## Upcoming Release | ||
| * Fixed `Update-AzSentinelIncident` help documentation to include required `-Title`, `-Status`, and `-Severity` parameters in examples and added examples for `UpdateViaIdentityExpanded` parameter set [#29130] |
There was a problem hiding this comment.
ChangeLog entry mentions the internal parameter-set name UpdateViaIdentityExpanded, which is not very user-facing. Consider describing the impact from the user perspective (for example, that the help examples now show how to update incidents using -InputObject without triggering validation errors) and keep the issue reference (e.g., "Fixed issue [#29130]").
| * Fixed `Update-AzSentinelIncident` help documentation to include required `-Title`, `-Status`, and `-Severity` parameters in examples and added examples for `UpdateViaIdentityExpanded` parameter set [#29130] | |
| * Improved `Update-AzSentinelIncident` help documentation for updating incidents using `-InputObject` | |
| - Examples now include required `-Title`, `-Status`, and `-Severity` parameters and avoid validation errors when using `-InputObject` | |
| - Fixed issue [#29130] |
| This command updates an incident using the pipeline identity parameter. | ||
| When using `-InputObject`, you must still provide `-Title`, `-Status`, and `-Severity` to prevent the API from returning a validation error. | ||
| It is recommended to pass the existing values from the incident object (e.g., `$incident.Title`) to avoid unintentionally resetting those fields. |
There was a problem hiding this comment.
Example 2 text says it "updates an incident using the pipeline identity parameter", but the example passes the incident via the -InputObject argument (not via the pipeline). Please reword to match what the example actually demonstrates, or change the example to use pipeline input (e.g., piping $incident into Update-AzSentinelIncident).
@microsoft-github-policy-service agree |
|
Closing this one because we have inclueded everything in #29294 |
Description
Fixes #29130
The documentation for
Update-AzSentinelIncidentcontained an incomplete example that did not work as shown. The API requires-Title,-Status, and-Severityparameters even though they are listed as optional in the parameter syntax. Omitting them results in validation errors ("Title" must have a non-empty value,status must not be empty).Changes
-Title,-Status, and-Severitymust be providedUpdateViaIdentityExpandedusage with-InputObject, showing how to pass existing incident values to avoid resetting fields-InputObjectwith required parametersChangeLog.mdunder## Upcoming ReleaseChecklist
src/SecurityInsights/SecurityInsights/ChangeLog.mdTesting
This is a documentation-only change. The examples were validated against the parameter syntax in the
UpdateExpandedandUpdateViaIdentityExpandedparameter sets defined in the cmdlet.