Get CosmosDbContinuationToken - PlagueHO/CosmosDB GitHub Wiki
Return the continuation token from a response header object.
Get-CosmosDbContinuationToken [-ResponseHeader] <Object> [<CommonParameters>]
This function takes a response header object that is generated by the ResponseHeader reference parameter in the Get-CosmosDbCollection or Get-CosmosDbDocument functions and returns the continuation token that is found in the 'x-ms-continuation' header.
The continuation token can then be passed back into the Get-CosmosDbCollection or Get-CosmosDbDocument functions to continue to return records.
If the 'x-ms-continuation' header is missing or empty in the ResponseHeader then an exception will be thrown.
PS C:\> $ResponseHeader = $null
PS C:\> $documents = Get-CosmosDbDocument -Context $cosmosDbContext -CollectionId 'MyNewCollection' -MaxItemCount 5 -ResponseHeader ([ref] $ResponseHeader)
PS C:\> $continuationToken = Get-CosmosDbContinuationToken -ResponseHeader $ResponseHeader
Return the continuation token from the Get-CosmosDbDocument response headers.
The Response Header object generated by Get-CosmosDbCollection or Get-CosmosDbDocument functions.
Type: Object
Parameter Sets: (All)
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.