protected override void ProcessRecord()
        {
            base.ProcessRecord();
            UpdateConfigRequest request;

            try
            {
                request = new UpdateConfigRequest
                {
                    ApmDomainId         = ApmDomainId,
                    ConfigId            = ConfigId,
                    UpdateConfigDetails = UpdateConfigDetails,
                    IfMatch             = IfMatch,
                    OpcRequestId        = OpcRequestId,
                    OpcDryRun           = OpcDryRun
                };

                response = client.UpdateConfig(request).GetAwaiter().GetResult();
                WriteOutput(response, response.Config);
                FinishProcessing(response);
            }
            catch (Exception ex)
            {
                TerminatingErrorDuringExecution(ex);
            }
        }
示例#2
0
 public Task <IResponse> UpdateConfigAsync(UpdateConfigRequest request)
 {
     return(SendRequestAsync(
                new HttpRequestMessageBuilder(HttpMethod.Put, $"/configs/{request.ConfigName}")
                .Content(request)
                .Serialize(SerializeType.Json),
                project: request.ProjectName));
 }
示例#3
0
 public ActionResult UpdateConfig([FromBody] UpdateConfigRequest dto)
 {
     return(Result(_userService.UpdateConfig(dto)));
 }