コード例 #1
0
        internal DeleteLogGroupResponse DeleteLogGroup(DeleteLogGroupRequest request)
        {
            var marshaller   = new DeleteLogGroupRequestMarshaller();
            var unmarshaller = DeleteLogGroupResponseUnmarshaller.Instance;

            return(Invoke <DeleteLogGroupRequest, DeleteLogGroupResponse>(request, marshaller, unmarshaller));
        }
コード例 #2
0
        /// <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));
        }
コード例 #3
0
        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);
            }
        }
コード例 #4
0
        internal DeleteLogGroupResponse DeleteLogGroup(DeleteLogGroupRequest request)
        {
            var task = DeleteLogGroupAsync(request);

            try
            {
                return(task.Result);
            }
            catch (AggregateException e)
            {
                ExceptionDispatchInfo.Capture(e.InnerException).Throw();
                return(null);
            }
        }
コード例 #5
0
        // 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}.");
            }
        }