Nazir_52641
Sep 19, 2018Cirrus
Retrieving ASM Policy ID or md5hash without fetching entire ASM policy list
Is there a way to get the ASM policy ID or MD5Hash for ASM Policy without fetching all the existing policy. In the production environment we have more than 200+ ASM policy and fetching all 200 will have huge impact on CPU and memory.
To avoid any impact is there a way to fetch only the specified ASM policy.
Below is the example to fetch all the ASM policy and filter for name and ID curl -sku "admin:password" -X GET | ./jq '.items[] | "Name: " + .fullPath + " id: " + .id'
O/P:
"Name: /Common/Test_ASM_Policy id: m16vXIW65asdSAJwkm2tX78"
"Name: /Common/Test_ASM_Policy1 id: mA6vXIW65asdSAJwkm2tX56"
"Name: /Common/Test_ASM_Policy2 id: mB6vXIW65asdSAJwkm2tX23"
"Name: /Common/Test_ASM_Policy3 id: mC6vXIW65asdSAJwkm2tX01"
"Name: /Common/Test_ASM_Policy4 id: mD6vXIW65asdSAJwkm2tX12"
Instead I need a command which can fetch Name and ID or ID alone. Or is there anywhere in files this ID is stored so that I can get the Policy ID from the file.
Thanks
Syed Nazir