File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed
Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change 1818 - Additional information about change #1
1919-->
2020## Upcoming Release
21+ * Fixed skip token for Consumption PriceSheet cmdlet
2122
2223## Version 2.0.1
2324* Fixed pagination for ` Get-AzConsumptionPriceSheet ` cmdlet
Original file line number Diff line number Diff line change @@ -68,6 +68,17 @@ public override void ExecuteCmdlet()
6868 expand , skipToken , numberToFetch ) ;
6969 UpdateResult ( result , priceSheet ) ;
7070 nextLink = priceSheet ? . NextLink ;
71+
72+ if ( ! string . IsNullOrWhiteSpace ( nextLink ) )
73+ {
74+ string queryString = new Uri ( nextLink ) . Query ;
75+ var queryDictionary = System . Web . HttpUtility . ParseQueryString ( queryString ) ;
76+
77+ if ( queryDictionary . AllKeys . Contains ( "skipToken" ) )
78+ {
79+ skipToken = queryDictionary [ "skipToken" ] ;
80+ }
81+ }
7182 } while ( ! this . Top . HasValue && ! string . IsNullOrWhiteSpace ( nextLink ) ) ;
7283 }
7384 else
@@ -77,6 +88,17 @@ public override void ExecuteCmdlet()
7788 priceSheet = ConsumptionManagementClient . PriceSheet . Get ( expand , skipToken , numberToFetch ) ;
7889 UpdateResult ( result , priceSheet ) ;
7990 nextLink = priceSheet ? . NextLink ;
91+
92+ if ( ! string . IsNullOrWhiteSpace ( nextLink ) )
93+ {
94+ string queryString = new Uri ( nextLink ) . Query ;
95+ var queryDictionary = System . Web . HttpUtility . ParseQueryString ( queryString ) ;
96+
97+ if ( queryDictionary . AllKeys . Contains ( "skipToken" ) )
98+ {
99+ skipToken = queryDictionary [ "skipToken" ] ;
100+ }
101+ }
80102 } while ( ! this . Top . HasValue && ! string . IsNullOrWhiteSpace ( nextLink ) ) ;
81103 }
82104 }
You can’t perform that action at this time.
0 commit comments