ResourceRecordSet object always has a weight
property even when Weighted Routing is not enabled
#344
Labels
breaking-change
This issue requires a breaking change to remediate.
bug
This issue is a bug.
module/powershell-cmdlets
needs-major-version
Can only be considered for the next major release
p2
This is a standard priority issue
v5
vNext
Describe the bug
When I call the
Get-R53ResourceRecordSet
function for a hosted zone it returns a collection of ResourceRecordSet. The value of theweight
property is 0 even when there is no Weighted Routing policy applied. In contrast, the documentation indicates that theweight
property only applies to weighted resource record sets only. For this reason, it is impossible to determine if the exported resource is supposed to have a weighted routing policy or not.I am using Powershell 7.
Expected Behavior
Similar to the aws cli, I expect the
weight
property to be null or undefined when the record does not have a weighted routing policy applied.Current Behavior
The
weight
property is 0 even when no weighted routing policy is enabled. A value of0
has special meaning and this created ambiguity. I assume because theweight
property is typed to Int64 .NET is converting a null value to 0.Reproduction Steps
(Get-R53ResourceRecordSet -HostedZoneId $zone.Id -MaxItem 1000).ResourceRecordSets
Observe the
weight
property on the exported resource records.Possible Solution
No response
Additional Information/Context
No response
AWS .NET SDK and/or Package version used
AWS Tools for PowerShell
Version 4.1.547
Copyright 2012-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Amazon Web Services SDK for .NET
Core Runtime Version 3.7.303.4
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
Targeted .NET Platform
.NET Core
Operating System and version
Ubuntu w/ Powershell 7
The text was updated successfully, but these errors were encountered: