我已经使用powershell脚本在azure上创建了Web应用服务。我可以使用Powershell脚本创建 Web应用bot 吗?我可以参考一些参考文件吗? 我想添加以下服务
答案 0 :(得分:0)
钦迈,
Azure Powershell模块文档可以为found here。
不幸的是,它似乎不具备创建Web应用程序机器人的功能。
如果您曾经在Azure门户中手动创建过漫游器,那么您就会知道漫游器实际上由几种蔚蓝资源类型组成,例如应用程序服务,漫游器服务等。
我希望自己了解Powershell的功能。
如果您有兴趣,Azure CLI工具确实支持机器人的创建和管理。该工具集中有public class Dowlode extends AsyncTask<String,Void,String > {
@Override
protected String doInBackground(String... urls) {
String result="";
URL url;
HttpURLConnection urlConnection =null;
try {
url=new URL(urls[0]);
urlConnection=(HttpURLConnection) url.openConnection();
InputStream in =urlConnection.getInputStream() ;
InputStreamReader reader=new InputStreamReader(in);
int data = reader.read();
while (data!=-1){
char current = (char) data;
result += current;
data = reader.read();
}
return result;
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return null;
}
@Override
protected void onPostExecute(String s) {
super.onPostExecute(s);
try {
JSONObject jsonObject = new JSONObject();
JSONObject weather = new JSONObject(jsonObject.getString("main"));
double tempreture = Double.parseDouble(weather.getString("temp"));
int ctempreture = (int) (tempreture- 273.15 );
int ftempreture = (int) (tempreture * 1.8-459.67);
int ktempreture = (int) (tempreture);
Weatherapp.ctemp.setText(String.valueOf(ctempreture));
Weatherapp.ftemp.setText(String.valueOf(ftempreture));
Weatherapp.ktemp.setText(String.valueOf(ktempreture));
String location = jsonObject.getString("name");
double pressure = Double.parseDouble(weather.getString("pressure"));
String pressuree = pressure+ "pascal";
double humidity = Double.parseDouble(weather.getString("humidity"));
String humidityy= humidity+"";
double temp_min = Double.parseDouble(weather.getString("temp_min"));
int cmintemp = (int) (temp_min- 273.15 );
int fmintemp = (int) (temp_min * 1.8-459.67);
int kmintemp = (int) (temp_min);
double temp_max = Double.parseDouble((weather.getString("temp_max")));
int cmaxtemp = (int) (temp_max- 273.15 );
int fmaxtemp = (int) (temp_max * 1.8-459.67);
int kmaxtemp = (int) (temp_max);
double sea_level = Double.parseDouble(weather.getString("sea_level"));
int sealevel = (int) (sea_level);
double grnd_level = Double.parseDouble((weather.getString("grnd_level")));
int groundlevel= (int) (grnd_level);
JSONObject wind = new JSONObject(jsonObject.getString("wind"));
double speed = Double.parseDouble((wind.getString("speed")));
int speedd = (int) (speed);
} catch (Exception e) {
e.printStackTrace();
}
}
}
个命令。文档可以为found here。