我按照documentation发出的命令是
endpointscfg.py get_openapi_spec cfcapi.GreetingApi cfcmelbourne.org
我得到的错误是
WARNING:root:An exception has been encountered when attempting to use Application Default Credentials: An error was encountered while reading json file: C:\Code\Video-Archive\requirements.txt (pointed to by GOOGLE_APPLICATION_CREDENTIALS environment variable): No JSON object could be decoded. Falling back on dummy AppIdentityServiceStub.
usage: C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\endpointscfg.py
[-h] {get_client_lib, get_discovery_doc} ...
C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\endpointscfg.py: error: argument {get_client_lib, get_discovery_doc}: invalid choice: 'get_openapi_spec' (choose from 'get_client_lib', 'get_discovery_doc')
答案 0 :(得分:0)
您需要使用新端点库附带的$stuff=get-stuff
$results=
foreach ($item in $stuff) {
$item | select column1,@{N="Column 2";E={$_.column2}},description,created,@{N="Size (GB)";E={"{0:N2}" -f $_.sizegb}}
}
$results_sorted=@($results | sort created)
$results_sorted+=$item | select @{N="column1";E={"Totals"}},@{N="Column 2";E={$null}},@{N="Description";E={$null}},@{N="Created";E={$null}},@{N="Size (GB)";E={($results | Measure-Object "size (gb)" -Sum).Sum}}
$results_sorted | ft column1,"Column 2",Description,Created,"Size (GB)"
。您使用的版本是通过Cloud SDK分发的旧版本。