// BatchDeleteScalingConfig private static void BatchDeleteScalingConfig(AsClient asClient) { var batchDeleteScalingConfigRequest = new BatchDeleteScalingConfigsRequest { Body = new BatchDeleteScalingConfigsRequestBody { ScalingConfigurationId = new List <string> { "085b99d1-c923-41ea-9d7e-35b3bdf1e583" } } }; try { var batchDeleteScalingConfigsResponse = asClient.BatchDeleteScalingConfigs(batchDeleteScalingConfigRequest); Console.WriteLine(batchDeleteScalingConfigsResponse.HttpStatusCode); } catch (RequestTimeoutException requestTimeoutException) { Console.WriteLine(requestTimeoutException.ErrorMessage); } catch (ServiceResponseException clientRequestException) { Console.WriteLine(clientRequestException.HttpStatusCode); Console.WriteLine(clientRequestException.ErrorCode); Console.WriteLine(clientRequestException.ErrorMsg); } catch (ConnectionException connectionException) { Console.WriteLine(connectionException.ErrorMessage); } }
/// <summary> /// 批量删除弹性伸缩配置 /// </summary> public BatchDeleteScalingConfigsResponse BatchDeleteScalingConfigs(BatchDeleteScalingConfigsRequest batchDeleteScalingConfigsRequest) { Dictionary <string, string> urlParam = new Dictionary <string, string>(); string urlPath = HttpUtils.AddUrlPath("/autoscaling-api/v1/{project_id}/scaling_configurations", urlParam); SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json;charset=UTF-8", batchDeleteScalingConfigsRequest); SdkResponse response = DoHttpRequest("POST", request); return(JsonUtils.DeSerializeNull <BatchDeleteScalingConfigsResponse>(response)); }