// Put Empty Retention Configuration for the bucket public async static Task Run(MinioClient minio, string bucketName = "my-bucket-name", string objectName = "my-object-name", string versionId = null) { try { Console.WriteLine("Running example for API: ClearObjectRetention"); await minio.ClearObjectRetentionAsync( new ClearObjectRetentionArgs() .WithBucket(bucketName) .WithObject(objectName) .WithVersionId(versionId) ); string versionInfo = (string.IsNullOrEmpty(versionId))?"":(" Version ID: " + versionId); Console.WriteLine($"Cleared retention configuration to object {bucketName}/{objectName} " + versionInfo); Console.WriteLine(); } catch (Exception e) { Console.WriteLine($"[Object] Exception: {e}"); } }