Azure / azure-powershell

Microsoft Azure PowerShell
Other
4.21k stars 3.82k forks source link

Cmdlet reference doc - New-AzDataCollectionEndpoint - Required parameter conflict #24758

Open Get-Ryan opened 4 months ago

Get-Ryan commented 4 months ago

Type of issue

Other (describe below)

Feedback

Under the Parameters heading, the parameter NetworkAclsPublicNetworkAccess is listed as not being required. The Syntax area also doesn't indicate it is required. However, both examples shown include a value for that parameter. And when trying to use the cmdlet without that parameter resulted in an error message "Invalid resource payload: 'properties' are missing". Running the same set of parameters with the addition of "Enabled" for the NetworkAclsPublicNetworkAccess parameter resulted in success.

This would indicate the NetworkAclsPublicNetworkAccess parameter is required. The Required field in it's parameter table should be updated to True.

Page URL

https://learn.microsoft.com/en-us/powershell/module/az.monitor/new-azdatacollectionendpoint?view=azps-11.5.0

Content source URL

https://github.com/Azure/azure-powershell/blob/main/src/Monitor/Monitor/help/New-AzDataCollectionEndpoint.md

Author

@mikefrobbins

Document Id

02f95826-d824-38cc-7bff-9b2592ce7fed

isra-fel commented 4 months ago

Hi Joyer, please look into this issue. Thanks.

JoyerJin commented 4 months ago

Hi Yeming, I confirmed with the swagger file, this property in body is not required, only the location is required. required property for body schema swagger file

isra-fel commented 4 months ago

It looks most likely a bug in swagger where the property is actuall required but not marked as required. Or there's possibility that under some corner cases this parameter is not required. I'll loop in Monitor team to share the insights.