You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @bidhan690 , this is because console.log will simplify the display of deeply nested objects or arrays to improve readability. So if you want to get full log, you can try to use console.dir() to print the result.
Here is the sample:
const resArray = new Array();
for await (let item of client.containerGroups.list()) {
resArray.push(item);
}
console.dir(resArray, { depth: null, colors: true })
Link to sample
https://learn.microsoft.com/en-us/rest/api/container-instances/container-groups/list?view=rest-container-instances-2023-05-01&tabs=JavaScript
Library name and version
@azure/arm-containerinstance
Language of the Sample
Sample Issue Type
Issue details
not getting actual enough response that i need
"containers": [
{
"name": "demo1",
"properties": {
"command": [],
"environmentVariables": [],
"image": "nginx",
"instanceView": {
"restartCount": 0,
"currentState": {
"state": "Running",
"startTime": "2017-10-17T17:27:21Z",
"detailStatus": ""
},
// other res
]``
Expected behavior
{
"value": [
{
"id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/demo1",
"location": "WestUs",
"zones": [
"1"
],
"name": "demo1",
"properties": {
"containers": [
{
"name": "demo1",
"properties": {
"command": [],
"environmentVariables": [],
"image": "nginx",
"instanceView": {
"restartCount": 0,
"currentState": {
"state": "Running",
"startTime": "2017-10-17T17:27:21Z",
"detailStatus": ""
},
"events": []
},
"ports": [
{
"port": 80
}
],
"resources": {
"requests": {
"cpu": 1,
"memoryInGB": 1.5
}
},
"volumeMounts": [
{
"mountPath": "/mnt/volume1",
"name": "volume1",
"readOnly": false
}
]
}
}
],
"imageRegistryCredentials": [
{
"server": "azcloudconsoleregistry.azurecr.io",
"username": "azcloudconsoleregistry"
}
],
"ipAddress": {
"ip": "10.0.0.1",
"ports": [
{
"port": 80,
"protocol": "TCP"
}
],
"type": "Public"
},
"osType": "Linux",
"provisioningState": "Succeeded",
"volumes": [
{
"azureFile": {
"readOnly": false,
"shareName": "share1",
"storageAccountName": "storage1"
},
"name": "volume1"
}
]
},
"type": "Microsoft.ContainerInstance/containerGroups"
}
]
}``
Actual behavior
{"id":"/subscriptions/__/resourceGroups/__/providers/Microsoft.ContainerInstance/containerGroups/aci-fat-substantial-butcher","name":"aci-fat-substantial-butcher","type":"Microsoft.ContainerInstance/containerGroups","location":"__","provisioningState":"Succeeded","containers":[{"name":"fat-substantial-butcher","image":"__","ports":[],"environmentVariables":[],"resources":{"requests":{"memoryInGB":1.5,"cpu":1}}}],"imageRegistryCredentials":[],"restartPolicy":"Never","osType":"Linux","sku":"Standard","initContainers":[]}
Reproduction Steps
const aciInstances = new Array();
for await (let item of aciClient.containerGroups.list()) {
aciInstances.push(item);
}
console.log(aciInstances);
Environment
Node.js 20 lts
The text was updated successfully, but these errors were encountered: