我试图从下面的suds响应中获取SecretId的值:
(SearchSecretsResult){
Errors = ""
SecretSummaries =
(ArrayOfSecretSummary){
SecretSummary[] =
(SecretSummary){
SecretId = 31431
SecretName = "new digicert"
SecretTypeName = "ROOT ACCOUNT"
SecretTypeId = 6055
FolderId = 730
IsRestricted = False
},
}
}
这是我的代码:
import sys
import suds
import re
from suds.client import Client
client = suds.client.Client("https://10.2.5.18/SecretServer/webservices/SSWebservice.asmx?wsdl")
token = client.service.Authenticate("username", "password", "", "domain.com")
searchSecret=client.service.SearchSecrets(token.Token, "digicert")
suds_dict = Client.dict(searchSecret)
print(suds_dict)
我明白了
{'Errors': , 'SecretSummaries': (ArrayOfSecretSummary){
SecretSummary[] =
(SecretSummary){
SecretId = 31431
SecretName = "new cloud cert with digicert"
SecretTypeName = "AWS ROOT ACCOUNT"
SecretTypeId = 6055
FolderId = 730
IsRestricted = False
},
}}
我不确定该如何获取SecretId字段的值。