internal DeleteLogGroupResponse DeleteLogGroup(DeleteLogGroupRequest request) { var marshaller = new DeleteLogGroupRequestMarshaller(); var unmarshaller = DeleteLogGroupResponseUnmarshaller.Instance; return(Invoke <DeleteLogGroupRequest, DeleteLogGroupResponse>(request, marshaller, unmarshaller)); }
/// <summary> /// Initiates the asynchronous execution of the DeleteLogGroup operation. /// <seealso cref="Amazon.CloudWatchLogs.IAmazonCloudWatchLogs"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeleteLogGroup operation.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// <returns>The task object representing the asynchronous operation.</returns> public Task <DeleteLogGroupResponse> DeleteLogGroupAsync(DeleteLogGroupRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DeleteLogGroupRequestMarshaller(); var unmarshaller = DeleteLogGroupResponseUnmarshaller.Instance; return(Invoke <IRequest, DeleteLogGroupRequest, DeleteLogGroupResponse>(request, marshaller, unmarshaller, signer, cancellationToken)); }
protected override void ProcessRecord() { base.ProcessRecord(); if (!ConfirmDelete("OCILoggingLogGroup", "Remove")) { return; } DeleteLogGroupRequest request; try { request = new DeleteLogGroupRequest { LogGroupId = LogGroupId, IfMatch = IfMatch, OpcRequestId = OpcRequestId }; response = client.DeleteLogGroup(request).GetAwaiter().GetResult(); WriteOutput(response, CreateWorkRequestObject(response.OpcWorkRequestId)); FinishProcessing(response); } catch (Exception ex) { TerminatingErrorDuringExecution(ex); } }
internal DeleteLogGroupResponse DeleteLogGroup(DeleteLogGroupRequest request) { var task = DeleteLogGroupAsync(request); try { return(task.Result); } catch (AggregateException e) { ExceptionDispatchInfo.Capture(e.InnerException).Throw(); return(null); } }
// snippet-start:[CloudWatchLogs.dotnetv3.DeleteLogGroupExample] public static async Task Main() { var client = new AmazonCloudWatchLogsClient(); string logGroupName = "cloudwatchlogs-example-loggroup"; var request = new DeleteLogGroupRequest { LogGroupName = logGroupName, }; var response = await client.DeleteLogGroupAsync(request); if (response.HttpStatusCode == System.Net.HttpStatusCode.OK) { Console.WriteLine($"Successfully deleted CloudWatch log group, {logGroupName}."); } }