diff --git a/source/sdk/dotnet/API.md b/source/sdk/dotnet/API.md
index 87f46960..3903bbf0 100644
--- a/source/sdk/dotnet/API.md
+++ b/source/sdk/dotnet/API.md
@@ -6,10 +6,10 @@
```cs
MinioClient minioClient = new MinioClient()
- .WithEndpoint("play.min.io")
- .WithCredentials("Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG")
- .WithSSL()
- .Build();
+ .WithEndpoint("play.min.io")
+ .WithCredentials("Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG")
+ .WithSSL()
+ .Build();
```
## AWS S3
@@ -17,38 +17,38 @@ MinioClient minioClient = new MinioClient()
```cs
MinioClient minioClient = new MinioClient()
- .WithEndpoint("s3.amazonaws.com")
- .WithCredentials("YOUR-ACCESSKEYID", "YOUR-SECRETACCESSKEY")
- .WithSSL()
- .Build();
+ .WithEndpoint("s3.amazonaws.com")
+ .WithCredentials("YOUR-ACCESSKEYID", "YOUR-SECRETACCESSKEY")
+ .WithSSL()
+ .Build();
```
-| Bucket operations | Object operations | Presigned operations | Bucket Policy Operations
-|:--- |:--- |:--- |:--- |
-| [`makeBucket`](#makeBucket) |[`getObject`](#getObject) |[`presignedGetObject`](#presignedGetObject) | [`getBucketPolicy`](#getBucketPolicy) |
-| [`listBuckets`](#listBuckets) | [`putObject`](#putObject) | [`presignedPutObject`](#presignedPutObject) | [`setBucketPolicy`](#setBucketPolicy) |
-| [`bucketExists`](#bucketExists) | [`copyObject`](#copyObject) | [`presignedPostPolicy`](#presignedPostPolicy) |[`setBucketNotification`](#setBucketNotification) |
-| [`removeBucket`](#removeBucket) | [`statObject`](#statObject) | | [`getBucketNotification`](#getBucketNotification) |
-| [`listObjects`](#listObjects) | [`removeObject`](#removeObject) | | [`removeAllBucketNotification`](#removeAllBucketNotification) |
-| [`listIncompleteUploads`](#listIncompleteUploads) | [`removeObjects`](#removeObjects) | | |
-| [`listenBucketNotifications`](#listenBucketNotifications) | [`selectObjectContent`](#selectObjectContent) | | |
-| [`setVersioning`](#setVersioning) | [`setLegalHold`](#setLegalHold) | | |
-| [`getVersioning`](#getVersioning) | [`getLegalHold`](#getLegalHold) | | |
-| [`setBucketEncryption`](#setBucketEncryption) | [`setObjectTags`](#setObjectTags) | | |
-| [`getBucketEncryption`](#getBucketEncryption) | [`getObjectTags`](#getObjectTags) | | |
-| [`removeBucketEncryption`](#removeBucketEncryption) | [`removeObjectTags`](#removeObjectTags) | | |
-| [`setBucketTags`](#setBucketTags) | [`setObjectRetention`](#setObjectRetention) | | |
-| [`getBucketTags`](#getBucketTags) | [`getObjectRetention`](#getObjectRetention) | | |
-| [`removeBucketTags`](#removeBucketTags) | [`clearObjectRetention`](#clearObjectRetention) | | |
-| [`setObjectLock`](#setObjectLock) | [`removeIncompleteUpload`](#removeIncompleteUpload) | | |
-| [`getObjectLock`](#getObjectLock) | | | |
-| [`removeObjectLock`](#removeObjectLock) | | | |
-| [`setBucketLifecycle`](#setBucketLifecycle) | | | |
-| [`getBucketLifecycle`](#getBucketLifecycle) | | | |
-| [`removeBucketLifecycle`](#removeBucketLifecycle) | | | |
-| [`setBucketReplication`](#setBucketReplication) | | | |
-| [`getBucketReplication`](#getBucketReplication) | | | |
-| [`removeBucketReplication`](#removeBucketReplication) | | | |
+| Bucket operations | Object operations | Presigned operations | Bucket Policy Operations |
+|:----------------------------------------------------------|:----------------------------------------------------|:----------------------------------------------|:--------------------------------------------------------------|
+| [`makeBucket`](#makeBucket) | [`getObject`](#getObject) | [`presignedGetObject`](#presignedGetObject) | [`getBucketPolicy`](#getBucketPolicy) |
+| [`listBuckets`](#listBuckets) | [`putObject`](#putObject) | [`presignedPutObject`](#presignedPutObject) | [`setBucketPolicy`](#setBucketPolicy) |
+| [`bucketExists`](#bucketExists) | [`copyObject`](#copyObject) | [`presignedPostPolicy`](#presignedPostPolicy) | [`setBucketNotification`](#setBucketNotification) |
+| [`removeBucket`](#removeBucket) | [`statObject`](#statObject) | | [`getBucketNotification`](#getBucketNotification) |
+| [`listObjects`](#listObjects) | [`removeObject`](#removeObject) | | [`removeAllBucketNotification`](#removeAllBucketNotification) |
+| [`listIncompleteUploads`](#listIncompleteUploads) | [`removeObjects`](#removeObjects) | | |
+| [`listenBucketNotifications`](#listenBucketNotifications) | [`selectObjectContent`](#selectObjectContent) | | |
+| [`setVersioning`](#setVersioning) | [`setLegalHold`](#setLegalHold) | | |
+| [`getVersioning`](#getVersioning) | [`getLegalHold`](#getLegalHold) | | |
+| [`setBucketEncryption`](#setBucketEncryption) | [`setObjectTags`](#setObjectTags) | | |
+| [`getBucketEncryption`](#getBucketEncryption) | [`getObjectTags`](#getObjectTags) | | |
+| [`removeBucketEncryption`](#removeBucketEncryption) | [`removeObjectTags`](#removeObjectTags) | | |
+| [`setBucketTags`](#setBucketTags) | [`setObjectRetention`](#setObjectRetention) | | |
+| [`getBucketTags`](#getBucketTags) | [`getObjectRetention`](#getObjectRetention) | | |
+| [`removeBucketTags`](#removeBucketTags) | [`clearObjectRetention`](#clearObjectRetention) | | |
+| [`setObjectLock`](#setObjectLock) | [`removeIncompleteUpload`](#removeIncompleteUpload) | | |
+| [`getObjectLock`](#getObjectLock) | | | |
+| [`removeObjectLock`](#removeObjectLock) | | | |
+| [`setBucketLifecycle`](#setBucketLifecycle) | | | |
+| [`getBucketLifecycle`](#getBucketLifecycle) | | | |
+| [`removeBucketLifecycle`](#removeBucketLifecycle) | | | |
+| [`setBucketReplication`](#setBucketReplication) | | | |
+| [`getBucketReplication`](#getBucketReplication) | | | |
+| [`removeBucketReplication`](#removeBucketReplication) | | | |
@@ -56,162 +56,97 @@ MinioClient minioClient = new MinioClient()
-| |
-|---|
-|`public MinioClient(string endpoint, string accessKey = "", string secretKey = "", string region = "", string sessionToken="")` |
-| Creates MinIO client object with given endpoint.AccessKey, secretKey, region and sessionToken are optional parameters, and can be omitted for anonymous access.
- The client object uses Http access by default. To use Https, chain method WithSSL() to client object to use secure transfer protocol |
+| |
+|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| `public MinioClient(string endpoint, string accessKey = "", string secretKey = "", string region = "", string sessionToken="")` |
+| Creates MinIO client object with given endpoint.AccessKey, secretKey, region and sessionToken are optional parameters, and can be omitted for anonymous access. |
+| The client object uses Http access by default. To use Https, chain method WithSSL() to client object to use secure transfer protocol |
__Parameters__
-| Param | Type | Description |
-|---|---|---|
-| `endpoint` | _string_ | endPoint is an URL, domain name, IPv4 address or IPv6 address.Valid endpoints are listed below: |
-| | |s3.amazonaws.com |
-| | |play.min.io |
-| | |localhost |
-| | |play.min.io|
-| `accessKey` | _string_ |accessKey is like user-id that uniquely identifies your account.This field is optional and can be omitted for anonymous access. |
-|`secretKey` | _string_ | secretKey is the password to your account.This field is optional and can be omitted for anonymous access.|
-|`region` | _string_ | region to which calls should be made.This field is optional and can be omitted.|
-|`sessionToken` | _string_ | sessionToken needs to be set if temporary access credentials are used |
+| Param | Type | Description |
+|----------------|----------|---------------------------------------------------------------------------------------------------------------------------------|
+| `endpoint` | _string_ | endPoint is an URL, domain name, IPv4 address or IPv6 address.Valid endpoints are listed below: |
+| | | s3.amazonaws.com |
+| | | play.min.io |
+| | | localhost |
+| | | play.min.io |
+| `accessKey` | _string_ | accessKey is like user-id that uniquely identifies your account.This field is optional and can be omitted for anonymous access. |
+| `secretKey` | _string_ | secretKey is the password to your account.This field is optional and can be omitted for anonymous access. |
+| `region` | _string_ | region to which calls should be made.This field is optional and can be omitted. |
+| `sessionToken` | _string_ | sessionToken needs to be set if temporary access credentials are used |
-__Secure Access__
+| Secure Access (TLS) |
+|--------------------------------------------------------------------------|
+| `Chain .WithSSL() to MinIO Client object to use https instead of http. ` |
-| |
-|---|
-|`Chain .WithSSL() to MinIO Client object to use https instead of http. ` |
+| Proxy |
+|----------------------------------------------------------------------|
+| `Chain .WithProxy(proxyObject) to MinIO Client object to use proxy ` |
-__Proxy__
-
-| |
-|---|
-|`Chain .WithProxy(proxyObject) to MinIO Client object to use proxy ` |
-
-| |
-|---|
-|`public MinioClient()` |
-| Creates MinIO client. This client gives an empty object that can be used with Chaining to populate only the member variables we need.
- The next important step is to connect to an endpoint. You can chain one of the overloaded method WithEndpoint() to client object to connect.
- This client object also uses Http access by default. To use Https, chain method WithSSL() to client object to use secure transfer protocol.
- To use non-anonymous access, chain method WithCredentials() to the client object along with the access key & secret key.
- Finally chain the method Build() to get the finally built client object. |
+| |
+|----------------------------------------------------------------------------------------------------------------------------------------------|
+| `public MinioClient()` |
+| Creates MinIO client. This client gives an empty object that can be used with Chaining to populate only the member variables we need. |
+| The next important step is to connect to an endpoint. You can chain one of the overloaded method WithEndpoint() to client object to connect. |
+| This client object also uses Http access by default. To use Https, chain method WithSSL() to client object to use secure transfer protocol. |
+| To use non-anonymous access, chain method WithCredentials() to the client object along with the access key & secret key. |
+| Finally chain the method Build() to get the finally built client object. |
-__Parameters__
-
-| None |
+| Endpoint |
+|-----------------------------------------------------------------------------|
+| `Chain .WithEndpoint() to MinIO Client object to initialize the endpoint. ` |
-__Secure Access__
-
-| |
-|---|
-|`Chain .WithSSL() to MinIO Client object to use https instead of http. ` |
-
-
-__Endpoint__
-
-| |
-|---|
-|`Chain .WithEndpoint() to MinIO Client object to initialize the endpoint. ` |
-
-
-__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``endpoint`` | _string_ | Server Name (Resolvable) or IP address as the endpoint |
-
-| Return Type | Exceptions |
-|:--- |:--- |
-| ``MinioClient`` | Listed Exceptions: |
-| | |
-
-
-
-__Endpoint__
-
-| |
-|---|
-|`Chain .WithEndpoint() to MinIO Client object to initialize the endpoint. ` |
-
-
-__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``endpoint`` | _string_ | Server Name (Resolvable) or IP address as the endpoint |
-| ``port`` | _int_ | Port on which the server is listening |
-| ``secure`` | _bool_ | If true, use https; if not, use http |
-
-| Return Type | Exceptions |
-|:--- |:--- |
-| ``MinioClient`` | Listed Exceptions: |
-| | |
-
-
-__Proxy__
-
-| |
-|---|
-|`Chain .WithProxy(proxyObject) to MinIO Client object to use proxy ` |
-
+| Return Type | Exceptions |
+|:----------------|:-------------------|
+| ``MinioClient`` | Listed Exceptions: |
__Examples__
-
### MinIO
```cs
-// 1. public MinioClient(String endpoint)
-MinioClient minioClient = new MinioClient("play.min.io");
-
-// 2. public MinioClient(String endpoint, String accessKey, String secretKey)
-MinioClient minioClient = new MinioClient("play.min.io",
- accessKey:"Q3AM3UQ867SPQQA43P2F",
- secretKey:"zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG");
+// 1. Using Builder with public MinioClient(), Endpoint, Credentials & Secure connection
+MinioClient minioClient = new MinioClient()
+ .WithEndpoint("play.min.io")
+ .WithCredentials("Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG")
+ .WithSSL()
+ .Build()
+// 2. Using Builder with public MinioClient(), Endpoint, Credentials & Secure connection
+MinioClient minioClient = new MinioClient()
+ .WithEndpoint("play.min.io", 9000, true)
+ .WithCredentials("Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG")
+ .Build()
// 3. Initializing minio client with proxy
IWebProxy proxy = new WebProxy("192.168.0.1", 8000);
-MinioClient minioClient = new MinioClient("my-ip-address:9000", "minio", "minio123").WithSSL().WithProxy(proxy);
-
-// 4. Initializing minio client with temporary credentials
-MinioClient minioClient = new MinioClient("my-ip-address:9000", "tempuserid", "temppasswd", sessionToken:"sessionToken");
-
-// 5. Using Builder with public MinioClient(), Endpoint, Credentials & Secure connection
MinioClient minioClient = new MinioClient()
- .WithEndpoint("play.min.io")
- .WithCredentials("Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG")
- .WithSSL()
- .Build()
-// 6. Using Builder with public MinioClient(), Endpoint, Credentials & Secure connection
-MinioClient minioClient = new MinioClient()
- .WithEndpoint("play.min.io", 9000, true)
- .WithCredentials("Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG")
- .Build()
+ .WithEndpoint("my-ip-address:9000")
+ .WithCredentials("minio", "minio123")
+ .WithSSL()
+ .WithProxy(proxy)
+ .Build();
+
```
-
-
### AWS S3
-
```cs
-// 1. public MinioClient(String endpoint)
-MinioClient s3Client = new MinioClient("s3.amazonaws.com").WithSSL();
-
-// 2. public MinioClient(String endpoint, String accessKey, String secretKey)
+// 1. public MinioClient(String endpoint, String accessKey, String secretKey)
MinioClient s3Client = new MinioClient("s3.amazonaws.com",
- accessKey:"YOUR-ACCESSKEYID",
- secretKey:"YOUR-SECRETACCESSKEY");
-// 3. Using Builder with public MinioClient(), Endpoint, Credentials & Secure connection
+ accessKey:"YOUR-ACCESSKEYID",
+ secretKey:"YOUR-SECRETACCESSKEY");
+// 2. Using Builder with public MinioClient(), Endpoint, Credentials & Secure connection
MinioClient minioClient = new MinioClient()
- .WithEndpoint("s3.amazonaws.com")
- .WithCredentials("YOUR-ACCESSKEYID", "YOUR-SECRETACCESSKEY")
- .WithSSL()
- .Build()
+ .WithEndpoint("s3.amazonaws.com")
+ .WithCredentials("YOUR-ACCESSKEYID", "YOUR-SECRETACCESSKEY")
+ .WithSSL()
+ .Build()
```
## 2. Bucket operations
@@ -225,20 +160,20 @@ Creates a new bucket.
__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``bucketName`` | _string_ | Name of the bucket |
-| ``region`` | _string_| Optional parameter. Defaults to us-east-1 for AWS requests |
-| ``cancellationToken``| _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| Param | Type | Description |
+|:----------------------|:-------------------------------------|:-----------------------------------------------------------|
+| ``bucketName`` | _string_ | Name of the bucket |
+| ``region`` | _string_ | Optional parameter. Defaults to us-east-1 for AWS requests |
+| ``cancellationToken`` | _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
-| Return Type | Exceptions |
-|:--- |:--- |
-| ``Task`` | Listed Exceptions: |
-| | ``InvalidBucketNameException`` : upon invalid bucket name |
-| | ``ConnectionException`` : upon connection error |
-| | ``AccessDeniedException`` : upon access denial |
-| | ``RedirectionException`` : upon redirection by server |
-| | ``InternalClientException`` : upon internal library error |
+| Return Type | Exceptions |
+|:------------|:----------------------------------------------------------|
+| ``Task`` | Listed Exceptions: |
+| | ``InvalidBucketNameException`` : upon invalid bucket name |
+| | ``ConnectionException`` : upon connection error |
+| | ``AccessDeniedException`` : upon access denial |
+| | ``RedirectionException`` : upon redirection by server |
+| | ``InternalClientException`` : upon internal library error |
__Example__
@@ -251,13 +186,13 @@ try
bool found = await minioClient.BucketExistsAsync("mybucket");
if (found)
{
- Console.WriteLine("mybucket already exists");
+ Console.WriteLine("mybucket already exists");
}
else
{
- // Create bucket 'my-bucketname'.
- await minioClient.MakeBucketAsync("mybucket");
- Console.WriteLine("mybucket is created successfully");
+ // Create bucket 'my-bucketname'.
+ await minioClient.MakeBucketAsync("mybucket");
+ Console.WriteLine("mybucket is created successfully");
}
}
catch (MinioException e)
@@ -274,19 +209,19 @@ Creates a new bucket.
__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``args`` | _MakeBucketArgs_ | Arguments Object - name, location. |
-| ``cancellationToken``| _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| Param | Type | Description |
+|:----------------------|:-------------------------------------|:-----------------------------------------------------------|
+| ``args`` | _MakeBucketArgs_ | Arguments Object - name, location. |
+| ``cancellationToken`` | _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
-| Return Type | Exceptions |
-|:--- |:--- |
-| ``Task`` | Listed Exceptions: |
-| | ``InvalidBucketNameException`` : upon invalid bucket name |
-| | ``ConnectionException`` : upon connection error |
-| | ``AccessDeniedException`` : upon access denial |
-| | ``RedirectionException`` : upon redirection by server |
-| | ``InternalClientException`` : upon internal library error |
+| Return Type | Exceptions |
+|:------------|:----------------------------------------------------------|
+| ``Task`` | Listed Exceptions: |
+| | ``InvalidBucketNameException`` : upon invalid bucket name |
+| | ``ConnectionException`` : upon connection error |
+| | ``AccessDeniedException`` : upon access denial |
+| | ``RedirectionException`` : upon redirection by server |
+| | ``InternalClientException`` : upon internal library error |
__Example__
@@ -299,13 +234,13 @@ try
bool found = await minioClient.BucketExistsAsync(bktExistArgs);
if (found)
{
- Console.WriteLine(bktExistArgs.BucketName +" already exists");
+ Console.WriteLine(bktExistArgs.BucketName +" already exists");
}
else
{
- // Create bucket 'my-bucketname'.
- await minioClient.MakeBucketAsync(mkBktArgs);
- Console.WriteLine(mkBktArgs.BucketName + " is created successfully");
+ // Create bucket 'my-bucketname'.
+ await minioClient.MakeBucketAsync(mkBktArgs);
+ Console.WriteLine(mkBktArgs.BucketName + " is created successfully");
}
}
catch (MinioException e)
@@ -322,19 +257,20 @@ catch (MinioException e)
Lists all buckets.
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``cancellationToken``| _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| Param | Type | Description |
+|:----------------------|:-------------------------------------|:-----------------------------------------------------------|
+| ``cancellationToken`` | _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| | | |
-|Return Type | Exceptions |
-|:--- |:--- |
-| ``Task`` : Task with List of bucket type. | Listed Exceptions: |
-| | ``InvalidBucketNameException`` : upon invalid bucket name |
-| | ``ConnectionException`` : upon connection error |
-| | ``AccessDeniedException`` : upon access denial |
-| | ``InvalidOperationException``: upon unsuccessful deserialization of xml data |
-| | ``ErrorResponseException`` : upon unsuccessful execution |
-| | ``InternalClientException`` : upon internal library error |
+| Return Type | Exceptions |
+|:------------------------------------------------------------------|:-----------------------------------------------------------------------------|
+| ``Task`` : Task with List of bucket type. | Listed Exceptions: |
+| | ``InvalidBucketNameException`` : upon invalid bucket name |
+| | ``ConnectionException`` : upon connection error |
+| | ``AccessDeniedException`` : upon access denial |
+| | ``InvalidOperationException``: upon unsuccessful deserialization of xml data |
+| | ``ErrorResponseException`` : upon unsuccessful execution |
+| | ``InternalClientException`` : upon internal library error |
__Example__
@@ -343,16 +279,16 @@ __Example__
```cs
try
{
- // List buckets that have read access.
- var list = await minioClient.ListBucketsAsync();
- foreach (Bucket bucket in list.Buckets)
- {
- Console.WriteLine(bucket.Name + " " + bucket.CreationDateDateTime);
- }
+ // List buckets that have read access.
+ var list = await minioClient.ListBucketsAsync();
+ foreach (Bucket bucket in list.Buckets)
+ {
+ Console.WriteLine(bucket.Name + " " + bucket.CreationDateDateTime);
+ }
}
catch (MinioException e)
{
- Console.WriteLine("Error occurred: " + e);
+ Console.WriteLine("Error occurred: " + e);
}
```
@@ -367,20 +303,20 @@ Checks if a bucket exists.
__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``bucketName`` | _string_ | Name of the bucket. |
-| ``cancellationToken``| _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| Param | Type | Description |
+|:----------------------|:-------------------------------------|:-----------------------------------------------------------|
+| ``bucketName`` | _string_ | Name of the bucket. |
+| ``cancellationToken`` | _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
-| Return Type | Exceptions |
-|:--- |:--- |
-| ``Task`` : true if the bucket exists | Listed Exceptions: |
-| | ``InvalidBucketNameException`` : upon invalid bucket name |
-| | ``ConnectionException`` : upon connection error |
-| | ``AccessDeniedException`` : upon access denial |
-| | ``ErrorResponseException`` : upon unsuccessful execution |
-| | ``InternalClientException`` : upon internal library error |
+| Return Type | Exceptions |
+|:-------------------------------------------|:----------------------------------------------------------|
+| ``Task`` : true if the bucket exists | Listed Exceptions: |
+| | ``InvalidBucketNameException`` : upon invalid bucket name |
+| | ``ConnectionException`` : upon connection error |
+| | ``AccessDeniedException`` : upon access denial |
+| | ``ErrorResponseException`` : upon unsuccessful execution |
+| | ``InternalClientException`` : upon internal library error |
@@ -411,20 +347,20 @@ Checks if a bucket exists.
__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``args`` | _BucketExistsArgs_ | Argument object - bucket name. |
-| ``cancellationToken``| _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| Param | Type | Description |
+|:----------------------|:-------------------------------------|:-----------------------------------------------------------|
+| ``args`` | _BucketExistsArgs_ | Argument object - bucket name. |
+| ``cancellationToken`` | _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
-| Return Type | Exceptions |
-|:--- |:--- |
-| ``Task`` : true if the bucket exists | Listed Exceptions: |
-| | ``InvalidBucketNameException`` : upon invalid bucket name |
-| | ``ConnectionException`` : upon connection error |
-| | ``AccessDeniedException`` : upon access denial |
-| | ``ErrorResponseException`` : upon unsuccessful execution |
-| | ``InternalClientException`` : upon internal library error |
+| Return Type | Exceptions |
+|:-------------------------------------------|:----------------------------------------------------------|
+| ``Task`` : true if the bucket exists | Listed Exceptions: |
+| | ``InvalidBucketNameException`` : upon invalid bucket name |
+| | ``ConnectionException`` : upon connection error |
+| | ``AccessDeniedException`` : upon access denial |
+| | ``ErrorResponseException`` : upon unsuccessful execution |
+| | ``InternalClientException`` : upon internal library error |
@@ -457,22 +393,22 @@ NOTE: - removeBucket does not delete the objects inside the bucket. The objects
__Parameters__
-
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``bucketName`` | _string_ | Name of the bucket |
-| ``cancellationToken``| _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+
+| Param | Type | Description |
+|:----------------------|:-------------------------------------|:-----------------------------------------------------------|
+| ``bucketName`` | _string_ | Name of the bucket |
+| ``cancellationToken`` | _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
-| Return Type | Exceptions |
-|:--- |:--- |
-| Task | Listed Exceptions: |
-| | ``InvalidBucketNameException`` : upon invalid bucket name |
-| | ``ConnectionException`` : upon connection error |
-| | ``AccessDeniedException`` : upon access denial |
-| | ``ErrorResponseException`` : upon unsuccessful execution |
-| | ``InternalClientException`` : upon internal library error |
-| | ``BucketNotFoundException`` : upon missing bucket |
+| Return Type | Exceptions |
+|:------------|:----------------------------------------------------------|
+| Task | Listed Exceptions: |
+| | ``InvalidBucketNameException`` : upon invalid bucket name |
+| | ``ConnectionException`` : upon connection error |
+| | ``AccessDeniedException`` : upon access denial |
+| | ``ErrorResponseException`` : upon unsuccessful execution |
+| | ``InternalClientException`` : upon internal library error |
+| | ``BucketNotFoundException`` : upon missing bucket |
__Example__
@@ -481,22 +417,22 @@ __Example__
```cs
try
{
- // Check if my-bucket exists before removing it.
- bool found = await minioClient.BucketExistsAsync("mybucket");
- if (found)
- {
- // Remove bucket my-bucketname. This operation will succeed only if the bucket is empty.
- await minioClient.RemoveBucketAsync("mybucket");
- Console.WriteLine("mybucket is removed successfully");
- }
- else
- {
- Console.WriteLine("mybucket does not exist");
- }
+ // Check if my-bucket exists before removing it.
+ bool found = await minioClient.BucketExistsAsync("mybucket");
+ if (found)
+ {
+ // Remove bucket my-bucketname. This operation will succeed only if the bucket is empty.
+ await minioClient.RemoveBucketAsync("mybucket");
+ Console.WriteLine("mybucket is removed successfully");
+ }
+ else
+ {
+ Console.WriteLine("mybucket does not exist");
+ }
}
catch(MinioException e)
{
- Console.WriteLine("Error occurred: " + e);
+ Console.WriteLine("Error occurred: " + e);
}
```
@@ -512,22 +448,22 @@ NOTE: - removeBucket does not delete the objects inside the bucket. The objects
__Parameters__
-
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``args`` | _RemoveBucketArgs_ | Arguments Object - bucket name |
-| ``cancellationToken``| _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+
+| Param | Type | Description |
+|:----------------------|:-------------------------------------|:-----------------------------------------------------------|
+| ``args`` | _RemoveBucketArgs_ | Arguments Object - bucket name |
+| ``cancellationToken`` | _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
-| Return Type | Exceptions |
-|:--- |:--- |
-| Task | Listed Exceptions: |
-| | ``InvalidBucketNameException`` : upon invalid bucket name |
-| | ``ConnectionException`` : upon connection error |
-| | ``AccessDeniedException`` : upon access denial |
-| | ``ErrorResponseException`` : upon unsuccessful execution |
-| | ``InternalClientException`` : upon internal library error |
-| | ``BucketNotFoundException`` : upon missing bucket |
+| Return Type | Exceptions |
+|:------------|:----------------------------------------------------------|
+| Task | Listed Exceptions: |
+| | ``InvalidBucketNameException`` : upon invalid bucket name |
+| | ``ConnectionException`` : upon connection error |
+| | ``AccessDeniedException`` : upon access denial |
+| | ``ErrorResponseException`` : upon unsuccessful execution |
+| | ``InternalClientException`` : upon internal library error |
+| | ``BucketNotFoundException`` : upon missing bucket |
__Example__
@@ -536,22 +472,22 @@ __Example__
```cs
try
{
- // Check if my-bucket exists before removing it.
- bool found = await minioClient.BucketExistsAsync(bktExistsArgs);
- if (found)
- {
- // Remove bucket my-bucketname. This operation will succeed only if the bucket is empty.
- await minioClient.RemoveBucketAsync(rmBktArgs);
- Console.WriteLine(rmBktArgs.BucketName + " is removed successfully");
- }
- else
- {
- Console.WriteLine(bktExistsArgs.BucketName + " does not exist");
- }
+ // Check if my-bucket exists before removing it.
+ bool found = await minioClient.BucketExistsAsync(bktExistsArgs);
+ if (found)
+ {
+ // Remove bucket my-bucketname. This operation will succeed only if the bucket is empty.
+ await minioClient.RemoveBucketAsync(rmBktArgs);
+ Console.WriteLine(rmBktArgs.BucketName + " is removed successfully");
+ }
+ else
+ {
+ Console.WriteLine(bktExistsArgs.BucketName + " does not exist");
+ }
}
catch(MinioException e)
{
- Console.WriteLine("Error occurred: " + e);
+ Console.WriteLine("Error occurred: " + e);
}
```
@@ -565,15 +501,15 @@ Get versioning information for a bucket.
__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``args`` | _GetVersioningArgs_ | Arguments Object - bucket name. |
-| ``cancellationToken``| _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| Param | Type | Description |
+|:----------------------|:-------------------------------------|:-----------------------------------------------------------|
+| ``args`` | _GetVersioningArgs_ | Arguments Object - bucket name. |
+| ``cancellationToken`` | _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
-|Return Type | Exceptions |
-|:--- |:--- |
-| ``VersioningConfiguration``:VersioningConfiguration with information populated from response. | _None_ |
+| Return Type | Exceptions |
+|:----------------------------------------------------------------------------------------------|:-----------|
+| ``VersioningConfiguration``:VersioningConfiguration with information populated from response. | _None_ |
__Example__
@@ -582,22 +518,22 @@ __Example__
```cs
try
{
- // Check whether 'mybucket' exists or not.
- bool found = minioClient.BucketExistsAsync(bktExistsArgs);
- if (found)
- {
- var args = new GetVersioningArgs("mybucket")
- .WithSSL();
- VersioningConfiguration vc = await minio.GetVersioningInfoAsync(args);
- }
- else
- {
- Console.WriteLine(bktExistsArgs.BucketName + " does not exist");
- }
+ // Check whether 'mybucket' exists or not.
+ bool found = minioClient.BucketExistsAsync(bktExistsArgs);
+ if (found)
+ {
+ var args = new GetVersioningArgs("mybucket")
+ .WithSSL();
+ VersioningConfiguration vc = await minio.GetVersioningInfoAsync(args);
+ }
+ else
+ {
+ Console.WriteLine(bktExistsArgs.BucketName + " does not exist");
+ }
}
catch (MinioException e)
{
- Console.WriteLine("Error occurred: " + e);
+ Console.WriteLine("Error occurred: " + e);
}
```
@@ -612,15 +548,15 @@ Set versioning to Enabled or Suspended for a bucket.
__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``args`` | _SetVersioningArgs_ | Arguments Object - bucket name, versioning status. |
-| ``cancellationToken``| _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| Param | Type | Description |
+|:----------------------|:-------------------------------------|:-----------------------------------------------------------|
+| ``args`` | _SetVersioningArgs_ | Arguments Object - bucket name, versioning status. |
+| ``cancellationToken`` | _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
-|Return Type | Exceptions |
-|:--- |:--- |
-| ``Task``: | _None_ |
+| Return Type | Exceptions |
+|:------------|:-----------|
+| ``Task``: | _None_ |
__Example__
@@ -629,24 +565,24 @@ __Example__
```cs
try
{
- // Check whether 'mybucket' exists or not.
- bool found = minioClient.BucketExistsAsync(bktExistsArgs);
- if (found)
- {
- var args = new SetVersioningArgs("mybucket")
- .WithSSL()
- .WithVersioningEnabled();
+ // Check whether 'mybucket' exists or not.
+ bool found = minioClient.BucketExistsAsync(bktExistsArgs);
+ if (found)
+ {
+ var args = new SetVersioningArgs("mybucket")
+ .WithSSL()
+ .WithVersioningEnabled();
- await minio.SetVersioningAsync(setArgs);
- }
- else
- {
- Console.WriteLine(bktExistsArgs.BucketName + " does not exist");
- }
+ await minio.SetVersioningAsync(setArgs);
+ }
+ else
+ {
+ Console.WriteLine(bktExistsArgs.BucketName + " does not exist");
+ }
}
catch (MinioException e)
{
- Console.WriteLine("Error occurred: " + e);
+ Console.WriteLine("Error occurred: " + e);
}
```
@@ -663,20 +599,20 @@ Sets the Bucket Encryption Configuration of a bucket.
__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``args`` | _SetBucketEncryptionArgs_ | SetBucketEncryptionArgs Argument Object with bucket, encryption configuration |
-| ``cancellationToken``| _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| Param | Type | Description |
+|:----------------------|:-------------------------------------|:------------------------------------------------------------------------------|
+| ``args`` | _SetBucketEncryptionArgs_ | SetBucketEncryptionArgs Argument Object with bucket, encryption configuration |
+| ``cancellationToken`` | _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
-| Return Type | Exceptions |
-|:--- |:--- |
-| ``Task`` | Listed Exceptions: |
-| | ``AuthorizationException`` : upon access or secret key wrong or not found |
-| | ``InvalidBucketNameException`` : upon invalid bucket name |
-| | ``BucketNotFoundException`` : upon bucket with name not found |
-| | ``MalFormedXMLException`` : upon configuration XML in http request validation failure |
-| | ``UnexpectedMinioException`` : upon internal errors encountered during the operation |
+| Return Type | Exceptions |
+|:------------|:--------------------------------------------------------------------------------------|
+| ``Task`` | Listed Exceptions: |
+| | ``AuthorizationException`` : upon access or secret key wrong or not found |
+| | ``InvalidBucketNameException`` : upon invalid bucket name |
+| | ``BucketNotFoundException`` : upon bucket with name not found |
+| | ``MalFormedXMLException`` : upon configuration XML in http request validation failure |
+| | ``UnexpectedMinioException`` : upon internal errors encountered during the operation |
@@ -686,11 +622,11 @@ __Example__
```cs
try
{
- // Set Encryption Configuration for the bucket
- SetBucketEncryptionArgs args = new SetBucketEncryptionArgs()
- .WithBucket(bucketName)
- .WithEncryptionConfig(config);
- await minio.SetBucketEncryptionAsync(args);
+ // Set Encryption Configuration for the bucket
+ SetBucketEncryptionArgs args = new SetBucketEncryptionArgs()
+ .WithBucket(bucketName)
+ .WithEncryptionConfig(config);
+ await minio.SetBucketEncryptionAsync(args);
}
catch(MinioException e)
{
@@ -709,22 +645,22 @@ Gets the Bucket Encryption configuration of the bucket.
__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``args`` | _GetBucketEncryptionArgs_ | GetBucketEncryptionArgs Argument Object with bucket name |
-| ``cancellationToken``| _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| Param | Type | Description |
+|:----------------------|:-------------------------------------|:-----------------------------------------------------------|
+| ``args`` | _GetBucketEncryptionArgs_ | GetBucketEncryptionArgs Argument Object with bucket name |
+| ``cancellationToken`` | _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
-| Return Type | Exceptions |
-|:--- |:--- |
-| ``Task``: ServerSideEncryptionConfiguration object which contains the bucket encryption configuration. | Listed Exceptions: |
-| | ``AuthorizationException`` : upon access or secret key wrong or not found |
-| | ``InvalidBucketNameException`` : upon invalid bucket name |
-| | ``BucketNotFoundException`` : upon bucket with name not found |
-| | ``MalFormedXMLException`` : upon configuration XML in http request validation failure |
-| | ``UnexpectedMinioException`` : upon internal errors encountered during the operation |
-
+| Return Type | Exceptions |
+|:--------------------------------------------|:--------------------------------------------------------------------------------------|
+| ``Task`` | Listed Exceptions: |
+| | ``AuthorizationException`` : upon access or secret key wrong or not found |
+| | ``InvalidBucketNameException`` : upon invalid bucket name |
+| | ``BucketNotFoundException`` : upon bucket with name not found |
+| | ``MalFormedXMLException`` : upon configuration XML in http request validation failure |
+| | ``UnexpectedMinioException`` : upon internal errors encountered during the operation |
+__ServerSideEncryptionConfiguration__ object which contains the bucket encryption configuration.
__Example__
@@ -732,11 +668,11 @@ __Example__
```cs
try
{
- // Get Bucket Encryption Configuration for the bucket
- var args = new GetBucketEncryptionArgs()
- .WithBucket(bucketName);
- ServerSideEncryptionConfiguration config = await minio.GetBucketEncryptionAsync(args);
- Console.WriteLine($"Got encryption configuration for bucket {bucketName}.");
+ // Get Bucket Encryption Configuration for the bucket
+ var args = new GetBucketEncryptionArgs()
+ .WithBucket(bucketName);
+ ServerSideEncryptionConfiguration config = await minio.GetBucketEncryptionAsync(args);
+ Console.WriteLine($"Got encryption configuration for bucket {bucketName}.");
}
catch(MinioException e)
{
@@ -756,20 +692,20 @@ Remove the Bucket Encryption configuration of an object.
__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``args`` | _RemoveBucketEncryptionArgs_ | RemoveBucketEncryptionArgs Argument Object with bucket name |
-| ``cancellationToken``| _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| Param | Type | Description |
+|:----------------------|:-------------------------------------|:------------------------------------------------------------|
+| ``args`` | _RemoveBucketEncryptionArgs_ | RemoveBucketEncryptionArgs Argument Object with bucket name |
+| ``cancellationToken`` | _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
-| Return Type | Exceptions |
-|:--- |:--- |
-| ``Task`` | Listed Exceptions: |
-| | ``AuthorizationException`` : upon access or secret key wrong or not found |
-| | ``InvalidBucketNameException`` : upon invalid bucket name |
-| | ``BucketNotFoundException`` : upon bucket with name not found |
-| | ``MalFormedXMLException`` : upon configuration XML in http request validation failure |
-| | ``UnexpectedMinioException`` : upon internal errors encountered during the operation |
+| Return Type | Exceptions |
+|:------------|:--------------------------------------------------------------------------------------|
+| ``Task`` | Listed Exceptions: |
+| | ``AuthorizationException`` : upon access or secret key wrong or not found |
+| | ``InvalidBucketNameException`` : upon invalid bucket name |
+| | ``BucketNotFoundException`` : upon bucket with name not found |
+| | ``MalFormedXMLException`` : upon configuration XML in http request validation failure |
+| | ``UnexpectedMinioException`` : upon internal errors encountered during the operation |
@@ -779,11 +715,11 @@ __Example__
```cs
try
{
- // Remove Bucket Encryption Configuration for the bucket
- var args = new RemoveBucketEncryptionArgs()
- .WithBucket(bucketName);
- await minio.RemoveBucketEncryptionAsync(args);
- Console.WriteLine($"Removed encryption configuration for bucket {bucketName}.");
+ // Remove Bucket Encryption Configuration for the bucket
+ var args = new RemoveBucketEncryptionArgs()
+ .WithBucket(bucketName);
+ await minio.RemoveBucketEncryptionAsync(args);
+ Console.WriteLine($"Removed encryption configuration for bucket {bucketName}.");
}
catch(MinioException e)
{
@@ -802,21 +738,20 @@ Sets tags to a bucket.
__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``args`` | _SetBucketTagsArgs_ | SetBucketTagsArgs Argument Object with bucket, tags to set |
-| ``cancellationToken``| _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| Param | Type | Description |
+|:----------------------|:-------------------------------------|:-----------------------------------------------------------|
+| ``args`` | _SetBucketTagsArgs_ | SetBucketTagsArgs Argument Object with bucket, tags to set |
+| ``cancellationToken`` | _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
-| Return Type | Exceptions |
-|:--- |:--- |
-| ``Task`` | Listed Exceptions: |
-| | ``AuthorizationException`` : upon access or secret key wrong or not found |
-| | ``InvalidBucketNameException`` : upon invalid bucket name |
-| | ``BucketNotFoundException`` : upon bucket with name not found |
-| | ``MalFormedXMLException`` : upon configuration XML in http request validation failure |
-| | ``UnexpectedMinioException`` : upon internal errors encountered during the operation |
-
+| Return Type | Exceptions |
+|:------------|:--------------------------------------------------------------------------------------|
+| ``Task`` | Listed Exceptions: |
+| | ``AuthorizationException`` : upon access or secret key wrong or not found |
+| | ``InvalidBucketNameException`` : upon invalid bucket name |
+| | ``BucketNotFoundException`` : upon bucket with name not found |
+| | ``MalFormedXMLException`` : upon configuration XML in http request validation failure |
+| | ``UnexpectedMinioException`` : upon internal errors encountered during the operation |
__Example__
@@ -825,12 +760,12 @@ __Example__
```cs
try
{
- // Set Tags for the bucket
- SetBucketTagsArgs args = new SetBucketTagsArgs()
- .WithBucket(bucketName)
- .WithTagging(tags);
- await minio.SetBucketTagsAsync(args);
- Console.WriteLine($"Set Tags for bucket {bucketName}.");
+ // Set Tags for the bucket
+ SetBucketTagsArgs args = new SetBucketTagsArgs()
+ .WithBucket(bucketName)
+ .WithTagging(tags);
+ await minio.SetBucketTagsAsync(args);
+ Console.WriteLine($"Set Tags for bucket {bucketName}.");
}
catch(MinioException e)
{
@@ -846,24 +781,23 @@ catch(MinioException e)
Gets tags of a bucket.
-
__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``args`` | _GetBucketTagsArgs_ | GetBucketTagsArgs Argument Object with bucket name |
-| ``cancellationToken``| _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| Param | Type | Description |
+|:----------------------|:-------------------------------------|:-----------------------------------------------------------|
+| ``args`` | _GetBucketTagsArgs_ | GetBucketTagsArgs Argument Object with bucket name |
+| ``cancellationToken`` | _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
-| Return Type | Exceptions |
-|:--- |:--- |
-| ``Task``: Tagging object which containing tag-value pairs. | Listed Exceptions: |
-| | ``AuthorizationException`` : upon access or secret key wrong or not found |
-| | ``InvalidBucketNameException`` : upon invalid bucket name |
-| | ``BucketNotFoundException`` : upon bucket with name not found |
-| | ``MalFormedXMLException`` : upon configuration XML in http request validation failure |
-| | ``UnexpectedMinioException`` : upon internal errors encountered during the operation |
+| Return Type | Exceptions |
+|:--------------------------------------------------------------------|:--------------------------------------------------------------------------------------|
+| ``Task``: Tagging object which containing tag-value pairs. | Listed Exceptions: |
+| | ``AuthorizationException`` : upon access or secret key wrong or not found |
+| | ``InvalidBucketNameException`` : upon invalid bucket name |
+| | ``BucketNotFoundException`` : upon bucket with name not found |
+| | ``MalFormedXMLException`` : upon configuration XML in http request validation failure |
+| | ``UnexpectedMinioException`` : upon internal errors encountered during the operation |
@@ -873,11 +807,11 @@ __Example__
```cs
try
{
- // Get Bucket Tags for the bucket
- var args = new GetBucketTagsArgs()
- .WithBucket(bucketName);
- var tags = await minio.GetBucketTagsAsync(args);
- Console.WriteLine($"Got tags for bucket {bucketName}.");
+ // Get Bucket Tags for the bucket
+ var args = new GetBucketTagsArgs()
+ .WithBucket(bucketName);
+ var tags = await minio.GetBucketTagsAsync(args);
+ Console.WriteLine($"Got tags for bucket {bucketName}.");
}
catch(MinioException e)
{
@@ -897,20 +831,21 @@ Deletes tags of a bucket.
__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``args`` | _RemoveBucketTagsArgs_ | RemoveBucketTagsArgs Argument Object with bucket name |
-| ``cancellationToken``| _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| Param | Type | Description |
+|:----------------------|:-------------------------------------|:-----------------------------------------------------------|
+| ``args`` | _RemoveBucketTagsArgs_ | RemoveBucketTagsArgs Argument Object with bucket name |
+| ``cancellationToken`` | _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| | | |
-| Return Type | Exceptions |
-|:--- |:--- |
-| ``Task`` | Listed Exceptions: |
-| | ``AuthorizationException`` : upon access or secret key wrong or not found |
-| | ``InvalidBucketNameException`` : upon invalid bucket name |
-| | ``BucketNotFoundException`` : upon bucket with name not found |
-| | ``MalFormedXMLException`` : upon configuration XML in http request validation failure |
-| | ``UnexpectedMinioException`` : upon internal errors encountered during the operation |
+| Return Type | Exceptions |
+|:------------|:--------------------------------------------------------------------------------------|
+| ``Task`` | Listed Exceptions: |
+| | ``AuthorizationException`` : upon access or secret key wrong or not found |
+| | ``InvalidBucketNameException`` : upon invalid bucket name |
+| | ``BucketNotFoundException`` : upon bucket with name not found |
+| | ``MalFormedXMLException`` : upon configuration XML in http request validation failure |
+| | ``UnexpectedMinioException`` : upon internal errors encountered during the operation |
@@ -920,11 +855,11 @@ __Example__
```cs
try
{
- // Remove Bucket Encryption Configuration for the bucket
- var args = new RemoveBucketTagsArgs()
- .WithBucket(bucketName);
- await minio.RemoveBucketTagsAsync(args);
- Console.WriteLine($"Removed tags for bucket {bucketName}.");
+ // Remove Bucket Encryption Configuration for the bucket
+ var args = new RemoveBucketTagsArgs()
+ .WithBucket(bucketName);
+ await minio.RemoveBucketTagsAsync(args);
+ Console.WriteLine($"Removed tags for bucket {bucketName}.");
}
catch(MinioException e)
{
@@ -944,20 +879,20 @@ Sets Lifecycle configuration to a bucket.
__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``args`` | _SetBucketLifecycleArgs_ | SetBucketLifecycleArgs Argument Object with bucket name, Lifecycle configuration to set |
-| ``cancellationToken``| _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| Param | Type | Description |
+|:----------------------|:-------------------------------------|:----------------------------------------------------------------------------------------|
+| ``args`` | _SetBucketLifecycleArgs_ | SetBucketLifecycleArgs Argument Object with bucket name, Lifecycle configuration to set |
+| ``cancellationToken`` | _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
-| Return Type | Exceptions |
-|:--- |:--- |
-| ``Task`` | Listed Exceptions: |
-| | ``AuthorizationException`` : upon access or secret key wrong or not found |
-| | ``InvalidBucketNameException`` : upon invalid bucket name |
-| | ``BucketNotFoundException`` : upon bucket with name not found |
-| | ``MalFormedXMLException`` : upon configuration XML in http request validation failure |
-| | ``UnexpectedMinioException`` : upon internal errors encountered during the operation |
+| Return Type | Exceptions |
+|:------------|:--------------------------------------------------------------------------------------|
+| ``Task`` | Listed Exceptions: |
+| | ``AuthorizationException`` : upon access or secret key wrong or not found |
+| | ``InvalidBucketNameException`` : upon invalid bucket name |
+| | ``BucketNotFoundException`` : upon bucket with name not found |
+| | ``MalFormedXMLException`` : upon configuration XML in http request validation failure |
+| | ``UnexpectedMinioException`` : upon internal errors encountered during the operation |
@@ -967,12 +902,12 @@ __Example__
```cs
try
{
- // Set Lifecycle configuration for the bucket
- SetBucketLifecycleArgs args = new SetBucketLifecycleArgs()
- .WithBucket(bucketName)
- .WithConfiguration(lfc);
- await minio.SetBucketLifecycleAsync(args);
- Console.WriteLine($"Set Lifecycle for bucket {bucketName}.");
+ // Set Lifecycle configuration for the bucket
+ SetBucketLifecycleArgs args = new SetBucketLifecycleArgs()
+ .WithBucket(bucketName)
+ .WithConfiguration(lfc);
+ await minio.SetBucketLifecycleAsync(args);
+ Console.WriteLine($"Set Lifecycle for bucket {bucketName}.");
}
catch(MinioException e)
{
@@ -988,24 +923,23 @@ catch(MinioException e)
Gets Lifecycle configuration of a bucket.
-
__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``args`` | _GetBucketLifecycleArgs_ | GetBucketLifecycleArgs Argument Object with bucket name |
-| ``cancellationToken``| _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| Param | Type | Description |
+|:----------------------|:-------------------------------------|:-----------------------------------------------------------|
+| ``args`` | _GetBucketLifecycleArgs_ | GetBucketLifecycleArgs Argument Object with bucket name |
+| ``cancellationToken`` | _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
-| Return Type | Exceptions |
-|:--- |:--- |
-| ``Task``: LifecycleConfiguration object which contains the Lifecycle configuration details. | Listed Exceptions: |
-| | ``AuthorizationException`` : upon access or secret key wrong or not found |
-| | ``InvalidBucketNameException`` : upon invalid bucket name |
-| | ``BucketNotFoundException`` : upon bucket with name not found |
-| | ``MalFormedXMLException`` : upon configuration XML in http request validation failure |
-| | ``UnexpectedMinioException`` : upon internal errors encountered during the operation |
+| Return Type | Exceptions |
+|:--------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------|
+| ``Task``: LifecycleConfiguration object which contains the Lifecycle configuration details. | Listed Exceptions: |
+| | ``AuthorizationException`` : upon access or secret key wrong or not found |
+| | ``InvalidBucketNameException`` : upon invalid bucket name |
+| | ``BucketNotFoundException`` : upon bucket with name not found |
+| | ``MalFormedXMLException`` : upon configuration XML in http request validation failure |
+| | ``UnexpectedMinioException`` : upon internal errors encountered during the operation |
@@ -1015,11 +949,11 @@ __Example__
```cs
try
{
- // Get Bucket Lifecycle configuration for the bucket
- var args = new GetBucketLifecycleArgs()
- .WithBucket(bucketName);
- var lfc = await minio.GetBucketLifecycleAsync(args);
- Console.WriteLine($"Got Lifecycle configuration for bucket {bucketName}.");
+ // Get Bucket Lifecycle configuration for the bucket
+ var args = new GetBucketLifecycleArgs()
+ .WithBucket(bucketName);
+ var lfc = await minio.GetBucketLifecycleAsync(args);
+ Console.WriteLine($"Got Lifecycle configuration for bucket {bucketName}.");
}
catch(MinioException e)
{
@@ -1039,20 +973,20 @@ Deletes Lifecycle configuration of a bucket.
__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``args`` | _RemoveBucketLifecycleArgs_ | RemoveBucketLifecycleArgs Argument Object with bucket name |
-| ``cancellationToken``| _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| Param | Type | Description |
+|:----------------------|:-------------------------------------|:-----------------------------------------------------------|
+| ``args`` | _RemoveBucketLifecycleArgs_ | RemoveBucketLifecycleArgs Argument Object with bucket name |
+| ``cancellationToken`` | _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
-| Return Type | Exceptions |
-|:--- |:--- |
-| ``Task`` | Listed Exceptions: |
-| | ``AuthorizationException`` : upon access or secret key wrong or not found |
-| | ``InvalidBucketNameException`` : upon invalid bucket name |
-| | ``BucketNotFoundException`` : upon bucket with name not found |
-| | ``MalFormedXMLException`` : upon configuration XML in http request validation failure |
-| | ``UnexpectedMinioException`` : upon internal errors encountered during the operation |
+| Return Type | Exceptions |
+|:------------|:--------------------------------------------------------------------------------------|
+| ``Task`` | Listed Exceptions: |
+| | ``AuthorizationException`` : upon access or secret key wrong or not found |
+| | ``InvalidBucketNameException`` : upon invalid bucket name |
+| | ``BucketNotFoundException`` : upon bucket with name not found |
+| | ``MalFormedXMLException`` : upon configuration XML in http request validation failure |
+| | ``UnexpectedMinioException`` : upon internal errors encountered during the operation |
@@ -1062,11 +996,11 @@ __Example__
```cs
try
{
- // Remove Bucket Lifecycle Configuration for the bucket
- var args = new RemoveBucketLifecycleArgs()
- .WithBucket(bucketName);
- await minio.RemoveBucketLifecycleAsync(args);
- Console.WriteLine($"Removed Lifecycle configuration for bucket {bucketName}.");
+ // Remove Bucket Lifecycle Configuration for the bucket
+ var args = new RemoveBucketLifecycleArgs()
+ .WithBucket(bucketName);
+ await minio.RemoveBucketLifecycleAsync(args);
+ Console.WriteLine($"Removed Lifecycle configuration for bucket {bucketName}.");
}
catch(MinioException e)
{
@@ -1087,20 +1021,20 @@ Sets Replication configuration to a bucket.
__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``args`` | _SetBucketReplicationArgs_ | SetBucketReplicationArgs Argument Object with bucket name, Replication configuration to set |
-| ``cancellationToken``| _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| Param | Type | Description |
+|:----------------------|:-------------------------------------|:--------------------------------------------------------------------------------------------|
+| ``args`` | _SetBucketReplicationArgs_ | SetBucketReplicationArgs Argument Object with bucket name, Replication configuration to set |
+| ``cancellationToken`` | _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
-| Return Type | Exceptions |
-|:--- |:--- |
-| ``Task`` | Listed Exceptions: |
-| | ``AuthorizationException`` : upon access or secret key wrong or not found |
-| | ``InvalidBucketNameException`` : upon invalid bucket name |
-| | ``BucketNotFoundException`` : upon bucket with name not found |
-| | ``MalFormedXMLException`` : upon configuration XML in http request validation failure |
-| | ``UnexpectedMinioException`` : upon internal errors encountered during the operation |
+| Return Type | Exceptions |
+|:------------|:--------------------------------------------------------------------------------------|
+| ``Task`` | Listed Exceptions: |
+| | ``AuthorizationException`` : upon access or secret key wrong or not found |
+| | ``InvalidBucketNameException`` : upon invalid bucket name |
+| | ``BucketNotFoundException`` : upon bucket with name not found |
+| | ``MalFormedXMLException`` : upon configuration XML in http request validation failure |
+| | ``UnexpectedMinioException`` : upon internal errors encountered during the operation |
@@ -1110,12 +1044,12 @@ __Example__
```cs
try
{
- // Set Replication configuration for the bucket
- SetBucketReplicationArgs args = new SetBucketReplicationArgs()
- .WithBucket(bucketName)
- .WithConfiguration(cfg);
- await minio.SetBucketReplicationAsync(args);
- Console.WriteLine($"Set Replication configuration for bucket {bucketName}.");
+ // Set Replication configuration for the bucket
+ SetBucketReplicationArgs args = new SetBucketReplicationArgs()
+ .WithBucket(bucketName)
+ .WithConfiguration(cfg);
+ await minio.SetBucketReplicationAsync(args);
+ Console.WriteLine($"Set Replication configuration for bucket {bucketName}.");
}
catch(MinioException e)
{
@@ -1135,20 +1069,20 @@ Gets Replication configuration of a bucket.
__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``args`` | _GetBucketReplicationArgs_ | GetBucketReplicationArgs Argument Object with bucket name |
-| ``cancellationToken``| _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| Param | Type | Description |
+|:----------------------|:-------------------------------------|:-----------------------------------------------------------|
+| ``args`` | _GetBucketReplicationArgs_ | GetBucketReplicationArgs Argument Object with bucket name |
+| ``cancellationToken`` | _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
-| Return Type | Exceptions |
-|:--- |:--- |
-| ``Task``: ReplicationConfiguration object which contains the Replication configuration details. | Listed Exceptions: |
-| | ``AuthorizationException`` : upon access or secret key wrong or not found |
-| | ``InvalidBucketNameException`` : upon invalid bucket name |
-| | ``BucketNotFoundException`` : upon bucket with name not found |
-| | ``MalFormedXMLException`` : upon configuration XML in http request validation failure |
-| | ``UnexpectedMinioException`` : upon internal errors encountered during the operation |
+| Return Type | Exceptions |
+|:--------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------|
+| ``Task``: ReplicationConfiguration object which contains the Replication configuration details. | Listed Exceptions: |
+| | ``AuthorizationException`` : upon access or secret key wrong or not found |
+| | ``InvalidBucketNameException`` : upon invalid bucket name |
+| | ``BucketNotFoundException`` : upon bucket with name not found |
+| | ``MalFormedXMLException`` : upon configuration XML in http request validation failure |
+| | ``UnexpectedMinioException`` : upon internal errors encountered during the operation |
@@ -1158,11 +1092,11 @@ __Example__
```cs
try
{
- // Get Bucket Replication for the bucket
- var args = new GetBucketReplicationArgs()
- .WithBucket(bucketName);
- var cfg = await minio.GetBucketReplicationAsync(args);
- Console.WriteLine($"Got Replication configuration for bucket {bucketName}.");
+ // Get Bucket Replication for the bucket
+ var args = new GetBucketReplicationArgs()
+ .WithBucket(bucketName);
+ var cfg = await minio.GetBucketReplicationAsync(args);
+ Console.WriteLine($"Got Replication configuration for bucket {bucketName}.");
}
catch(MinioException e)
{
@@ -1182,20 +1116,20 @@ Deletes Replication configuration of a bucket.
__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``args`` | _RemoveBucketReplicationArgs_ | RemoveBucketReplicationArgs Argument Object with bucket name |
-| ``cancellationToken``| _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| Param | Type | Description |
+|:----------------------|:-------------------------------------|:-------------------------------------------------------------|
+| ``args`` | _RemoveBucketReplicationArgs_ | RemoveBucketReplicationArgs Argument Object with bucket name |
+| ``cancellationToken`` | _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
-| Return Type | Exceptions |
-|:--- |:--- |
-| ``Task`` | Listed Exceptions: |
-| | ``AuthorizationException`` : upon access or secret key wrong or not found |
-| | ``InvalidBucketNameException`` : upon invalid bucket name |
-| | ``BucketNotFoundException`` : upon bucket with name not found |
-| | ``MalFormedXMLException`` : upon configuration XML in http request validation failure |
-| | ``UnexpectedMinioException`` : upon internal errors encountered during the operation |
+| Return Type | Exceptions |
+|:------------|:--------------------------------------------------------------------------------------|
+| ``Task`` | Listed Exceptions: |
+| | ``AuthorizationException`` : upon access or secret key wrong or not found |
+| | ``InvalidBucketNameException`` : upon invalid bucket name |
+| | ``BucketNotFoundException`` : upon bucket with name not found |
+| | ``MalFormedXMLException`` : upon configuration XML in http request validation failure |
+| | ``UnexpectedMinioException`` : upon internal errors encountered during the operation |
@@ -1205,11 +1139,11 @@ __Example__
```cs
try
{
- // Remove Bucket Replication Configuration for the bucket
- var args = new RemoveBucketReplicationArgs()
- .WithBucket(bucketName);
- await minio.RemoveBucketReplicationAsync(args);
- Console.WriteLine($"Removed Replication configuration for bucket {bucketName}.");
+ // Remove Bucket Replication Configuration for the bucket
+ var args = new RemoveBucketReplicationArgs()
+ .WithBucket(bucketName);
+ await minio.RemoveBucketReplicationAsync(args);
+ Console.WriteLine($"Removed Replication configuration for bucket {bucketName}.");
}
catch(MinioException e)
{
@@ -1228,15 +1162,15 @@ Lists all objects (with version IDs, if existing) in a bucket.
__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``args`` | _ListObjectArgs_ | ListObjectArgs object - encapsulates bucket name, prefix, show recursively, show versions. |
-| ``cancellationToken``| _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| Param | Type | Description |
+|:----------------------|:-------------------------------------|:-------------------------------------------------------------------------------------------|
+| ``args`` | _ListObjectArgs_ | ListObjectArgs object - encapsulates bucket name, prefix, show recursively, show versions. |
+| ``cancellationToken`` | _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
-|Return Type | Exceptions |
-|:--- |:--- |
-| ``IObservable- ``:an Observable of Items. | _None_ |
+| Return Type | Exceptions |
+|:----------------------------------------------|:-----------|
+| ``IObservable
- ``:an Observable of Items. | _None_ |
__Example__
@@ -1245,59 +1179,59 @@ __Example__
```cs
try
{
- // Just list of objects
- // Check whether 'mybucket' exists or not.
- bool found = minioClient.BucketExistsAsync("mybucket");
- if (found)
- {
- // List objects from 'my-bucketname'
- ListObjectArgs args = new ListObjectArgs()
- .WithBucket("mybucket")
- .WithPrefix("prefix")
- .WithRecursive(true);
- IObservable
- observable = minioClient.ListObjectsAsync(args);
- IDisposable subscription = observable.Subscribe(
+ // Just list of objects
+ // Check whether 'mybucket' exists or not.
+ bool found = minioClient.BucketExistsAsync("mybucket");
+ if (found)
+ {
+ // List objects from 'my-bucketname'
+ ListObjectArgs args = new ListObjectArgs()
+ .WithBucket("mybucket")
+ .WithPrefix("prefix")
+ .WithRecursive(true);
+ IObservable
- observable = minioClient.ListObjectsAsync(args);
+ IDisposable subscription = observable.Subscribe(
item => Console.WriteLine("OnNext: {0}", item.Key),
ex => Console.WriteLine("OnError: {0}", ex.Message),
() => Console.WriteLine("OnComplete: {0}"));
- }
- else
- {
- Console.WriteLine("mybucket does not exist");
- }
+ }
+ else
+ {
+ Console.WriteLine("mybucket does not exist");
+ }
}
catch (MinioException e)
{
- Console.WriteLine("Error occurred: " + e);
+ Console.WriteLine("Error occurred: " + e);
}
try
{
- // List of objects with version IDs.
- // Check whether 'mybucket' exists or not.
- bool found = minioClient.BucketExistsAsync("mybucket");
- if (found)
- {
- // List objects from 'my-bucketname'
- ListObjectArgs args = new ListObjectArgs()
- .WithBucket("mybucket")
- .WithPrefix("prefix")
- .WithRecursive(true)
- .WithVersions(true)
- IObservable
- observable = minioClient.ListObjectsAsync(args, true);
- IDisposable subscription = observable.Subscribe(
+ // List of objects with version IDs.
+ // Check whether 'mybucket' exists or not.
+ bool found = minioClient.BucketExistsAsync("mybucket");
+ if (found)
+ {
+ // List objects from 'my-bucketname'
+ ListObjectArgs args = new ListObjectArgs()
+ .WithBucket("mybucket")
+ .WithPrefix("prefix")
+ .WithRecursive(true)
+ .WithVersions(true)
+ IObservable
- observable = minioClient.ListObjectsAsync(args, true);
+ IDisposable subscription = observable.Subscribe(
item => Console.WriteLine("OnNext: {0} - {1}", item.Key, item.VersionId),
ex => Console.WriteLine("OnError: {0}", ex.Message),
() => Console.WriteLine("OnComplete: {0}"));
- }
- else
- {
- Console.WriteLine("mybucket does not exist");
- }
+ }
+ else
+ {
+ Console.WriteLine("mybucket does not exist");
+ }
}
catch (MinioException e)
{
- Console.WriteLine("Error occurred: " + e);
+ Console.WriteLine("Error occurred: " + e);
}
```
@@ -1315,20 +1249,20 @@ Sets object-lock configuration in a bucket.
__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``args`` | _SetObjectLockConfigurationArgs_ | SetObjectLockConfigurationArgs Argument Object with bucket, lock configuration to set |
-| ``cancellationToken``| _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| Param | Type | Description |
+|:----------------------|:-------------------------------------|:--------------------------------------------------------------------------------------|
+| ``args`` | _SetObjectLockConfigurationArgs_ | SetObjectLockConfigurationArgs Argument Object with bucket, lock configuration to set |
+| ``cancellationToken`` | _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
-| Return Type | Exceptions |
-|:--- |:--- |
-| ``Task`` | Listed Exceptions: |
-| | ``AuthorizationException`` : upon access or secret key wrong or not found |
-| | ``InvalidBucketNameException`` : upon invalid bucket name |
-| | ``BucketNotFoundException`` : upon bucket with name not found |
-| | ``MalFormedXMLException`` : upon configuration XML in http request validation failure |
-| | ``UnexpectedMinioException`` : upon internal errors encountered during the operation |
+| Return Type | Exceptions |
+|:------------|:--------------------------------------------------------------------------------------|
+| ``Task`` | Listed Exceptions: |
+| | ``AuthorizationException`` : upon access or secret key wrong or not found |
+| | ``InvalidBucketNameException`` : upon invalid bucket name |
+| | ``BucketNotFoundException`` : upon bucket with name not found |
+| | ``MalFormedXMLException`` : upon configuration XML in http request validation failure |
+| | ``UnexpectedMinioException`` : upon internal errors encountered during the operation |
@@ -1338,13 +1272,13 @@ __Example__
```cs
try
{
- ObjectLockConfiguration config = = new ObjectLockConfiguration(RetentionMode.GOVERNANCE, 35);
- // Set Object Lock Configuration for the bucket
- SetObjectLockConfigurationArgs args = new SetObjectLockConfigurationArgs()
- .WithBucket(bucketName)
- .WithLockConfiguration(config);
- await minio.SetObjectLockConfigurationAsync(args);
- Console.WriteLine($"Set Object lock configuration to bucket {bucketName}.");
+ ObjectLockConfiguration config = = new ObjectLockConfiguration(RetentionMode.GOVERNANCE, 35);
+ // Set Object Lock Configuration for the bucket
+ SetObjectLockConfigurationArgs args = new SetObjectLockConfigurationArgs()
+ .WithBucket(bucketName)
+ .WithLockConfiguration(config);
+ await minio.SetObjectLockConfigurationAsync(args);
+ Console.WriteLine($"Set Object lock configuration to bucket {bucketName}.");
}
catch(MinioException e)
{
@@ -1365,20 +1299,20 @@ Gets object-lock configuration of a bucket.
__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``args`` | _GetObjectLockConfigurationArgs_ | GetObjectLockConfigurationArgs Argument Object with bucket name |
-| ``cancellationToken``| _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| Param | Type | Description |
+|:----------------------|:-------------------------------------|:----------------------------------------------------------------|
+| ``args`` | _GetObjectLockConfigurationArgs_ | GetObjectLockConfigurationArgs Argument Object with bucket name |
+| ``cancellationToken`` | _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
-| Return Type | Exceptions |
-|:--- |:--- |
-| ``Task``: ObjectLockConfiguration object which containing lock-enabled status & Object lock rule. | Listed Exceptions: |
-| | ``AuthorizationException`` : upon access or secret key wrong or not found |
-| | ``InvalidBucketNameException`` : upon invalid bucket name |
-| | ``BucketNotFoundException`` : upon bucket with name not found |
-| | ``MalFormedXMLException`` : upon configuration XML in http request validation failure |
-| | ``UnexpectedMinioException`` : upon internal errors encountered during the operation |
+| Return Type | Exceptions |
+|:---------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------|
+| ``Task``: ObjectLockConfiguration object which containing lock-enabled status & Object lock rule. | Listed Exceptions: |
+| | ``AuthorizationException`` : upon access or secret key wrong or not found |
+| | ``InvalidBucketNameException`` : upon invalid bucket name |
+| | ``BucketNotFoundException`` : upon bucket with name not found |
+| | ``MalFormedXMLException`` : upon configuration XML in http request validation failure |
+| | ``UnexpectedMinioException`` : upon internal errors encountered during the operation |
@@ -1388,11 +1322,11 @@ __Example__
```cs
try
{
- // Get the Object Lock Configuration for the bucket
- var args = new GetObjectLockConfigurationArgs()
- .WithBucket(bucketName);
- var config = await minio.GetObjectLockConfigurationAsync(args);
- Console.WriteLine($"Object lock configuration on bucket {bucketName} is : " + config.ObjectLockEnabled);
+ // Get the Object Lock Configuration for the bucket
+ var args = new GetObjectLockConfigurationArgs()
+ .WithBucket(bucketName);
+ var config = await minio.GetObjectLockConfigurationAsync(args);
+ Console.WriteLine($"Object lock configuration on bucket {bucketName} is : " + config.ObjectLockEnabled);
}
catch(MinioException e)
{
@@ -1413,20 +1347,20 @@ Removes object-lock configuration on a bucket.
__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``args`` | _RemoveObjectLockConfigurationArgs_ | RemoveObjectLockConfigurationArgs Argument Object with bucket name |
-| ``cancellationToken``| _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| Param | Type | Description |
+|:----------------------|:-------------------------------------|:-------------------------------------------------------------------|
+| ``args`` | _RemoveObjectLockConfigurationArgs_ | RemoveObjectLockConfigurationArgs Argument Object with bucket name |
+| ``cancellationToken`` | _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
-| Return Type | Exceptions |
-|:--- |:--- |
-| ``Task`` | Listed Exceptions: |
-| | ``AuthorizationException`` : upon access or secret key wrong or not found |
-| | ``InvalidBucketNameException`` : upon invalid bucket name |
-| | ``BucketNotFoundException`` : upon bucket with name not found |
-| | ``MalFormedXMLException`` : upon configuration XML in http request validation failure |
-| | ``UnexpectedMinioException`` : upon internal errors encountered during the operation |
+| Return Type | Exceptions |
+|:------------|:--------------------------------------------------------------------------------------|
+| ``Task`` | Listed Exceptions: |
+| | ``AuthorizationException`` : upon access or secret key wrong or not found |
+| | ``InvalidBucketNameException`` : upon invalid bucket name |
+| | ``BucketNotFoundException`` : upon bucket with name not found |
+| | ``MalFormedXMLException`` : upon configuration XML in http request validation failure |
+| | ``UnexpectedMinioException`` : upon internal errors encountered during the operation |
@@ -1436,11 +1370,11 @@ __Example__
```cs
try
{
- // Remove Object Lock Configuration on the bucket
- var args = new RemoveObjectLockConfigurationArgs()
- .WithBucket(bucketName);
- await minio.RemoveObjectLockConfigurationAsync(args);
- Console.WriteLine($"Removed Object lock configuration on bucket {bucketName}.");
+ // Remove Object Lock Configuration on the bucket
+ var args = new RemoveObjectLockConfigurationArgs()
+ .WithBucket(bucketName);
+ await minio.RemoveObjectLockConfigurationAsync(args);
+ Console.WriteLine($"Removed Object lock configuration on bucket {bucketName}.");
}
catch(MinioException e)
{
@@ -1461,15 +1395,15 @@ Lists partially uploaded objects in a bucket.
__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``args`` | _ListIncompleteUploadsArgs_ | ListIncompleteUploadsArgs object - encapsulates bucket name, prefix, show recursively. |
-| ``cancellationToken``| _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| Param | Type | Description |
+|:----------------------|:-------------------------------------|:---------------------------------------------------------------------------------------|
+| ``args`` | _ListIncompleteUploadsArgs_ | ListIncompleteUploadsArgs object - encapsulates bucket name, prefix, show recursively. |
+| ``cancellationToken`` | _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
-|Return Type | Exceptions |
-|:--- |:--- |
-| ``IObservable ``: an Observable of Upload. | _None_ |
+| Return Type | Exceptions |
+|:---------------------------------------------------|:-----------|
+| ``IObservable ``: an Observable of Upload. | _None_ |
__Example__
@@ -1478,29 +1412,29 @@ __Example__
```cs
try
{
- // Check whether 'mybucket' exist or not.
- bool found = minioClient.BucketExistsAsync("mybucket");
- if (found)
- {
- // List all incomplete multipart upload of objects in 'mybucket'
- ListIncompleteUploadsArgs listArgs = new ListIncompleteUploadsArgs()
- .WithBucket("mybucket")
- .WithPrefix("prefix")
- .WithRecursive(true);
- IObservable observable = minioClient.ListIncompleteUploads(listArgs);
- IDisposable subscription = observable.Subscribe(
+ // Check whether 'mybucket' exist or not.
+ bool found = minioClient.BucketExistsAsync("mybucket");
+ if (found)
+ {
+ // List all incomplete multipart upload of objects in 'mybucket'
+ ListIncompleteUploadsArgs listArgs = new ListIncompleteUploadsArgs()
+ .WithBucket("mybucket")
+ .WithPrefix("prefix")
+ .WithRecursive(true);
+ IObservable observable = minioClient.ListIncompleteUploads(listArgs);
+ IDisposable subscription = observable.Subscribe(
item => Console.WriteLine("OnNext: {0}", item.Key),
ex => Console.WriteLine("OnError: {0}", ex.Message),
() => Console.WriteLine("OnComplete: {0}"));
- }
- else
- {
- Console.WriteLine("mybucket does not exist");
- }
+ }
+ else
+ {
+ Console.WriteLine("mybucket does not exist");
+ }
}
catch (MinioException e)
{
- Console.WriteLine("Error occurred: " + e);
+ Console.WriteLine("Error occurred: " + e);
}
```
@@ -1515,15 +1449,15 @@ Subscribes to bucket change notifications (a Minio-only extension)
__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``args`` | _ListenBucketNotificationsArgs_ | ListenBucketNotificationsArgs object - encapsulates bucket name, list of events, prefix, suffix. |
-| ``cancellationToken``| _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| Param | Type | Description |
+|:----------------------|:-------------------------------------|:-------------------------------------------------------------------------------------------------|
+| ``args`` | _ListenBucketNotificationsArgs_ | ListenBucketNotificationsArgs object - encapsulates bucket name, list of events, prefix, suffix. |
+| ``cancellationToken`` | _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
-|Return Type | Exceptions |
-|:--- |:--- |
-| ``IObservable``: an Observable of _MinioNotificationRaw_, which contain the raw JSON notifications. Use the _MinioNotification_ class to deserialise using the JSON library of your choice. | _None_ |
+| Return Type | Exceptions |
+|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------|
+| ``IObservable``: an Observable of _MinioNotificationRaw_, which contain the raw JSON notifications. Use the _MinioNotification_ class to deserialise using the JSON library of your choice. | _None_ |
__Example__
@@ -1532,25 +1466,25 @@ __Example__
```cs
try
{
- var events = new List { EventType.ObjectCreatedAll };
- var prefix = null;
- var suffix = null;
- ListenBucketNotificationsArgs args = new ListenBucketNotificationsArgs()
- .WithBucket(bucketName)
- .WithEvents(events)
- .WithPrefix(prefix)
- .WithSuffix(suffix);
- IObservable observable = minioClient.ListenBucketNotificationsAsync(args);
+ var events = new List { EventType.ObjectCreatedAll };
+ var prefix = null;
+ var suffix = null;
+ ListenBucketNotificationsArgs args = new ListenBucketNotificationsArgs()
+ .WithBucket(bucketName)
+ .WithEvents(events)
+ .WithPrefix(prefix)
+ .WithSuffix(suffix);
+ IObservable observable = minioClient.ListenBucketNotificationsAsync(args);
- IDisposable subscription = observable.Subscribe(
- notification => Console.WriteLine($"Notification: {notification.json}"),
- ex => Console.WriteLine($"OnError: {ex}"),
- () => Console.WriteLine($"Stopped listening for bucket notifications\n"));
+ IDisposable subscription = observable.Subscribe(
+ notification => Console.WriteLine($"Notification: {notification.json}"),
+ ex => Console.WriteLine($"OnError: {ex}"),
+ () => Console.WriteLine($"Stopped listening for bucket notifications\n"));
}
catch (MinioException e)
{
- Console.WriteLine("Error occurred: " + e);
+ Console.WriteLine("Error occurred: " + e);
}
```
@@ -1563,21 +1497,21 @@ Get bucket policy.
__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``args`` | _GetPolicyArgs_ | GetPolicyArgs object encapsulating bucket name. |
-| ``cancellationToken``| _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| Param | Type | Description |
+|:----------------------|:-------------------------------------|:-----------------------------------------------------------|
+| ``args`` | _GetPolicyArgs_ | GetPolicyArgs object encapsulating bucket name. |
+| ``cancellationToken`` | _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
-| Return Type | Exceptions |
-|:--- |:--- |
-| ``Task``: The current bucket policy for given bucket as a json string. | Listed Exceptions: |
-| | ``InvalidBucketNameException `` : upon invalid bucket name. |
-| | ``InvalidObjectPrefixException`` : upon invalid object prefix. |
-| | ``ConnectionException`` : upon connection error. |
-| | ``AccessDeniedException`` : upon access denial |
-| | ``InternalClientException`` : upon internal library error. |
-| | ``BucketNotFoundException`` : upon missing bucket |
+| Return Type | Exceptions |
+|:-------------------------------------------------------------------------------|:---------------------------------------------------------------|
+| ``Task``: The current bucket policy for given bucket as a json string. | Listed Exceptions: |
+| | ``InvalidBucketNameException `` : upon invalid bucket name. |
+| | ``InvalidObjectPrefixException`` : upon invalid object prefix. |
+| | ``ConnectionException`` : upon connection error. |
+| | ``AccessDeniedException`` : upon access denial |
+| | ``InternalClientException`` : upon internal library error. |
+| | ``BucketNotFoundException`` : upon missing bucket |
__Example__
@@ -1586,14 +1520,14 @@ __Example__
```cs
try
{
- GetPolicyArgs args = new GetPolicyArgs()
- .WithBucket("myBucket");
- String policyJson = await minioClient.GetPolicyAsync(args);
- Console.WriteLine("Current policy: " + policyJson);
+ GetPolicyArgs args = new GetPolicyArgs()
+ .WithBucket("myBucket");
+ String policyJson = await minioClient.GetPolicyAsync(args);
+ Console.WriteLine("Current policy: " + policyJson);
}
catch (MinioException e)
{
- Console.WriteLine("Error occurred: " + e);
+ Console.WriteLine("Error occurred: " + e);
}
```
@@ -1605,20 +1539,21 @@ Set policy on bucket.
__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``args`` | _SetPolicyArgs_ | SetPolicyArgs object encapsulating bucket name, Policy as a json string. |
-| ``cancellationToken``| _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| Param | Type | Description |
+|:----------------------|:-------------------------------------|:-------------------------------------------------------------------------|
+| ``args`` | _SetPolicyArgs_ | SetPolicyArgs object encapsulating bucket name, Policy as a json string. |
+| ``cancellationToken`` | _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| | | |
-| Return Type | Exceptions |
-|:--- |:--- |
-| Task | Listed Exceptions: |
-| | ``InvalidBucketNameException`` : upon invalid bucket name |
-| | ``ConnectionException`` : upon connection error |
-| | ``InternalClientException`` : upon internal library error |
-| | ``InvalidBucketNameException `` : upon invalid bucket name |
-| | ``InvalidObjectPrefixException`` : upon invalid object prefix |
+| Return Type | Exceptions |
+|:------------|:--------------------------------------------------------------|
+| Task | Listed Exceptions: |
+| | ``InvalidBucketNameException`` : upon invalid bucket name |
+| | ``ConnectionException`` : upon connection error |
+| | ``InternalClientException`` : upon internal library error |
+| | ``InvalidBucketNameException `` : upon invalid bucket name |
+| | ``InvalidObjectPrefixException`` : upon invalid object prefix |
@@ -1627,15 +1562,15 @@ __Example__
```cs
try
{
- string policyJson = $@"{{""Version"":""2012-10-17"",""Statement"":[{{""Action"":[""s3:GetBucketLocation""],""Effect"":""Allow"",""Principal"":{{""AWS"":[""*""]}},""Resource"":[""arn:aws:s3:::{bucketName}""],""Sid"":""""}},{{""Action"":[""s3:ListBucket""],""Condition"":{{""StringEquals"":{{""s3:prefix"":[""foo"",""prefix/""]}}}},""Effect"":""Allow"",""Principal"":{{""AWS"":[""*""]}},""Resource"":[""arn:aws:s3:::{bucketName}""],""Sid"":""""}},{{""Action"":[""s3:GetObject""],""Effect"":""Allow"",""Principal"":{{""AWS"":[""*""]}},""Resource"":[""arn:aws:s3:::{bucketName}/foo*"",""arn:aws:s3:::{bucketName}/prefix/*""],""Sid"":""""}}]}}";
- SetPolicyArgs args = new SetPolicyArgs()
- .WithBucket("myBucket")
- .WithPolicy(policyJson);
- await minioClient.SetPolicyAsync(args);
+ string policyJson = $@"{{""Version"":""2012-10-17"",""Statement"":[{{""Action"":[""s3:GetBucketLocation""],""Effect"":""Allow"",""Principal"":{{""AWS"":[""*""]}},""Resource"":[""arn:aws:s3:::{bucketName}""],""Sid"":""""}},{{""Action"":[""s3:ListBucket""],""Condition"":{{""StringEquals"":{{""s3:prefix"":[""foo"",""prefix/""]}}}},""Effect"":""Allow"",""Principal"":{{""AWS"":[""*""]}},""Resource"":[""arn:aws:s3:::{bucketName}""],""Sid"":""""}},{{""Action"":[""s3:GetObject""],""Effect"":""Allow"",""Principal"":{{""AWS"":[""*""]}},""Resource"":[""arn:aws:s3:::{bucketName}/foo*"",""arn:aws:s3:::{bucketName}/prefix/*""],""Sid"":""""}}]}}";
+ SetPolicyArgs args = new SetPolicyArgs()
+ .WithBucket("myBucket")
+ .WithPolicy(policyJson);
+ await minioClient.SetPolicyAsync(args);
}
catch (MinioException e)
{
- Console.WriteLine("Error occurred: " + e);
+ Console.WriteLine("Error occurred: " + e);
}
```
@@ -1648,19 +1583,20 @@ Sets notification configuration for a given bucket
__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``args`` | _SetBucketNotificationsArgs_ | SetBucketNotificationsArgs object encapsulating bucket name, notification configuration object. |
-| ``cancellationToken``| _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| Param | Type | Description |
+|:----------------------|:-------------------------------------|:------------------------------------------------------------------------------------------------|
+| ``args`` | _SetBucketNotificationsArgs_ | SetBucketNotificationsArgs object encapsulating bucket name, notification configuration object. |
+| ``cancellationToken`` | _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
-| Return Type | Exceptions |
-|:--- |:--- |
-| Task | Listed Exceptions: |
-| | ``ConnectionException`` : upon connection error |
-| | ``InternalClientException`` : upon internal library error |
-| | ``InvalidBucketNameException `` : upon invalid bucket name |
-| | ``InvalidOperationException``: upon unsuccessful serialization of notification object |
+| Return Type | Exceptions |
+|:------------|:--------------------------------------------------------------------------------------|
+| Task | Listed Exceptions: |
+| | ``ConnectionException`` : upon connection error |
+| | ``InternalClientException`` : upon internal library error |
+| | ``InvalidBucketNameException `` : upon invalid bucket name |
+| | ``InvalidOperationException``: upon unsuccessful serialization of notification object |
+| | |
@@ -1668,29 +1604,29 @@ __Example__
```cs
try
{
- BucketNotification notification = new BucketNotification();
- Arn topicArn = new Arn("aws", "sns", "us-west-1", "412334153608", "topicminio");
+ BucketNotification notification = new BucketNotification();
+ Arn topicArn = new Arn("aws", "sns", "us-west-1", "412334153608", "topicminio");
- TopicConfig topicConfiguration = new TopicConfig(topicArn);
- List events = new List(){ EventType.ObjectCreatedPut , EventType.ObjectCreatedCopy };
- topicConfiguration.AddEvents(events);
- topicConfiguration.AddFilterPrefix("images");
- topicConfiguration.AddFilterSuffix("jpg");
- notification.AddTopic(topicConfiguration);
+ TopicConfig topicConfiguration = new TopicConfig(topicArn);
+ List events = new List(){ EventType.ObjectCreatedPut , EventType.ObjectCreatedCopy };
+ topicConfiguration.AddEvents(events);
+ topicConfiguration.AddFilterPrefix("images");
+ topicConfiguration.AddFilterSuffix("jpg");
+ notification.AddTopic(topicConfiguration);
- QueueConfig queueConfiguration = new QueueConfig("arn:aws:sqs:us-west-1:482314153608:testminioqueue1");
- queueConfiguration.AddEvents(new List() { EventType.ObjectCreatedCompleteMultipartUpload });
- notification.AddQueue(queueConfiguration);
+ QueueConfig queueConfiguration = new QueueConfig("arn:aws:sqs:us-west-1:482314153608:testminioqueue1");
+ queueConfiguration.AddEvents(new List() { EventType.ObjectCreatedCompleteMultipartUpload });
+ notification.AddQueue(queueConfiguration);
- SetBucketNotificationsArgs args = new SetBucketNotificationsArgs()
- .WithBucket(bucketName)
- .WithBucketNotificationConfiguration(notification);
- await minio.SetBucketNotificationsAsync(args);
- Console.WriteLine("Notifications set for the bucket " + args.BucketName + " successfully");
+ SetBucketNotificationsArgs args = new SetBucketNotificationsArgs()
+ .WithBucket(bucketName)
+ .WithBucketNotificationConfiguration(notification);
+ await minio.SetBucketNotificationsAsync(args);
+ Console.WriteLine("Notifications set for the bucket " + args.BucketName + " successfully");
}
catch (MinioException e)
{
- Console.WriteLine("Error occurred: " + e);
+ Console.WriteLine("Error occurred: " + e);
}
```
@@ -1703,21 +1639,21 @@ Get bucket notification configuration
__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``args`` | _GetBucketNotificationsArgs_ | GetBucketNotificationsArgs object encapsulating bucket name. |
-| ``cancellationToken``| _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| Param | Type | Description |
+|:----------------------|:-------------------------------------|:-------------------------------------------------------------|
+| ``args`` | _GetBucketNotificationsArgs_ | GetBucketNotificationsArgs object encapsulating bucket name. |
+| ``cancellationToken`` | _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
-| Return Type | Exceptions |
-|:--- |:--- |
-| ``Task``: The current notification configuration for the bucket. | Listed Exceptions: |
-| | ``InvalidBucketNameException `` : upon invalid bucket name. |
-| | ``ConnectionException`` : upon connection error. |
-| | ``AccessDeniedException`` : upon access denial |
-| | ``InternalClientException`` : upon internal library error. |
-| | ``BucketNotFoundException`` : upon missing bucket |
-| | ``InvalidOperationException``: upon unsuccessful deserialization of xml data |
+| Return Type | Exceptions |
+|:-------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------|
+| ``Task``: The current notification configuration for the bucket. | Listed Exceptions: |
+| | ``InvalidBucketNameException `` : upon invalid bucket name. |
+| | ``ConnectionException`` : upon connection error. |
+| | ``AccessDeniedException`` : upon access denial |
+| | ``InternalClientException`` : upon internal library error. |
+| | ``BucketNotFoundException`` : upon missing bucket |
+| | ``InvalidOperationException``: upon unsuccessful deserialization of xml data |
__Example__
@@ -1726,14 +1662,14 @@ __Example__
```cs
try
{
- GetBucketNotificationsArgs args = new GetBucketNotificationsArgs()
- .WithBucket(bucketName);
- BucketNotification notifications = await minioClient.GetBucketNotificationAsync(args);
- Console.WriteLine("Notifications is " + notifications.ToXML());
+ GetBucketNotificationsArgs args = new GetBucketNotificationsArgs()
+ .WithBucket(bucketName);
+ BucketNotification notifications = await minioClient.GetBucketNotificationAsync(args);
+ Console.WriteLine("Notifications is " + notifications.ToXML());
}
catch (MinioException e)
{
- Console.WriteLine("Error occurred: " + e);
+ Console.WriteLine("Error occurred: " + e);
}
```
@@ -1746,21 +1682,22 @@ Remove all notification configurations set on the bucket
__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``args`` | _RemoveAllBucketNotificationsArgs_ | RemoveAllBucketNotificationsArgs args encapsulating the bucket name. |
-| ``cancellationToken``| _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| Param | Type | Description |
+|:----------------------|:-------------------------------------|:---------------------------------------------------------------------|
+| ``args`` | _RemoveAllBucketNotificationsArgs_ | RemoveAllBucketNotificationsArgs args encapsulating the bucket name. |
+| ``cancellationToken`` | _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| | | |
-| Return Type | Exceptions |
-|:--- |:--- |
-| ``Task`: | Listed Exceptions: |
-| | ``InvalidBucketNameException `` : upon invalid bucket name. |
-| | ``ConnectionException`` : upon connection error. |
-| | ``AccessDeniedException`` : upon access denial |
-| | ``InternalClientException`` : upon internal library error. |
-| | ``BucketNotFoundException`` : upon missing bucket |
-| | ``InvalidOperationException``: upon unsuccessful serialization of xml data |
+| Return Type | Exceptions |
+|:------------|:---------------------------------------------------------------------------|
+| ``Task`: | Listed Exceptions: |
+| | ``InvalidBucketNameException `` : upon invalid bucket name. |
+| | ``ConnectionException`` : upon connection error. |
+| | ``AccessDeniedException`` : upon access denial |
+| | ``InternalClientException`` : upon internal library error. |
+| | ``BucketNotFoundException`` : upon missing bucket |
+| | ``InvalidOperationException``: upon unsuccessful serialization of xml data |
__Example__
@@ -1769,14 +1706,14 @@ __Example__
```cs
try
{
- RemoveAllBucketNotificationsArgs args = new RemoveAllBucketNotificationsArgs()
- .WithBucket(bucketName);
- await minioClient.RemoveAllBucketNotificationsAsync(args);
- Console.WriteLine("Notifications successfully removed from the bucket " + bucketName);
+ RemoveAllBucketNotificationsArgs args = new RemoveAllBucketNotificationsArgs()
+ .WithBucket(bucketName);
+ await minioClient.RemoveAllBucketNotificationsAsync(args);
+ Console.WriteLine("Notifications successfully removed from the bucket " + bucketName);
}
catch (MinioException e)
{
- Console.WriteLine("Error occurred: " + e);
+ Console.WriteLine("Error occurred: " + e);
}
```
@@ -1793,25 +1730,25 @@ Downloads an object.
__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``args`` | _GetObjectArgs_ | GetObjectArgs Argument Object encapsulating bucket, object names, version Id, ServerSideEncryption object, offset, length |
-| ``cancellationToken``| _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| Param | Type | Description |
+|:----------------------|:-------------------------------------|:--------------------------------------------------------------------------------------------------------------------------|
+| ``args`` | _GetObjectArgs_ | GetObjectArgs Argument Object encapsulating bucket, object names, version Id, ServerSideEncryption object, offset, length |
+| ``cancellationToken`` | _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
-| Return Type | Exceptions |
-|:--- |:--- |
-| ``Task``: Task callback returns an InputStream containing the object data. | Listed Exceptions: |
-| | ``InvalidBucketNameException`` : upon invalid bucket name. |
-| | ``ConnectionException`` : upon connection error. |
-| | ``InternalClientException`` : upon internal library error. |
+| Return Type | Exceptions |
+|:---------------------------------------------------------------------------|:-----------------------------------------------------------|
+| ``Task``: Task callback returns an InputStream containing the object data. | Listed Exceptions: |
+| | ``InvalidBucketNameException`` : upon invalid bucket name. |
+| | ``ConnectionException`` : upon connection error. |
+| | ``InternalClientException`` : upon internal library error. |
__Examples__
```cs
-//1. With Bucket & Object names.
+// 1. With Bucket & Object names.
try
{
// Check whether the object exists using statObject().
@@ -1819,78 +1756,77 @@ try
// else it means that the object exists.
// Execution is successful.
StatObjectArgs statObjectArgs = new StatObjectArgs()
- .WithBucket("mybucket")
- .WithObject("myobject");
+ .WithBucket("mybucket")
+ .WithObject("myobject");
await minioClient.StatObjectAsync(statObjectArgs);
// Get input stream to have content of 'my-objectname' from 'my-bucketname'
GetObjectArgs getObjectArgs = new GetObjectArgs()
- .WithBucket("mybucket")
- .WithObject("myobject")
- .WithCallbackStream((stream) =>
- {
- stream.CopyTo(Console.OpenStandardOutput());
- });
+ .WithBucket("mybucket")
+ .WithObject("myobject")
+ .WithCallbackStream((stream) =>
+ {
+ stream.CopyTo(Console.OpenStandardOutput());
+ });
await minioClient.GetObjectAsync(getObjectArgs);
- }
- catch (MinioException e)
- {
- Console.WriteLine("Error occurred: " + e);
- }
- // 2. With Offset Length specifying a range of bytes & the object as a stream.
- try
- {
- // Check whether the object exists using statObject().
- // If the object is not found, statObject() throws an exception,
- // else it means that the object exists.
- // Execution is successful.
- StatObjectArgs statObjectArgs = new StatObjectArgs()
- .WithBucket("mybucket")
- .WithObject("myobject");
- await minioClient.StatObjectAsync(statObjectArgs);
-
- // Get input stream to have content of 'my-objectname' from 'my-bucketname'
- GetObjectArgs getObjectArgs = new GetObjectArgs()
- .WithBucket("mybucket")
- .WithObject("myobject")
- .WithOffset(1024L)
- .WithObjectSize(10L)
- .WithCallbackStream((stream) =>
- {
- stream.CopyTo(Console.OpenStandardOutput());
- });
- await minioClient.GetObjectAsync(getObjectArgs);
- }
- catch (MinioException e)
- {
- Console.WriteLine("Error occurred: " + e);
- }
-
- //3. Downloads and saves the object as a file in the local filesystem.
- try
- {
- // Check whether the object exists using statObjectAsync().
- // If the object is not found, statObjectAsync() throws an exception,
- // else it means that the object exists.
- // Execution is successful.
- StatObjectArgs statObjectArgs = new StatObjectArgs()
- .WithBucket("mybucket")
- .WithObject("myobject");
- await minioClient.StatObjectAsync(statObjectArgs);
-
- // Gets the object's data and stores it in photo.jpg
- GetObjectArgs getObjectArgs = new GetObjectArgs()
- .WithBucket("mybucket")
- .WithObject("myobject")
- .WithFileName("photo.jpg");
- await minioClient.GetObjectAsync(getObjectArgs);
-
}
catch (MinioException e)
{
- Console.WriteLine("Error occurred: " + e);
+ Console.WriteLine("Error occurred: " + e);
}
+// 2. With Offset Length specifying a range of bytes & the object as a stream.
+try
+{
+ // Check whether the object exists using statObject().
+ // If the object is not found, statObject() throws an exception,
+ // else it means that the object exists.
+ // Execution is successful.
+ StatObjectArgs statObjectArgs = new StatObjectArgs()
+ .WithBucket("mybucket")
+ .WithObject("myobject");
+ await minioClient.StatObjectAsync(statObjectArgs);
+
+ // Get input stream to have content of 'my-objectname' from 'my-bucketname'
+ GetObjectArgs getObjectArgs = new GetObjectArgs()
+ .WithBucket("mybucket")
+ .WithObject("myobject")
+ .WithOffset(1024L)
+ .WithObjectSize(10L)
+ .WithCallbackStream((stream) =>
+ {
+ stream.CopyTo(Console.OpenStandardOutput());
+ });
+ await minioClient.GetObjectAsync(getObjectArgs);
+}
+catch (MinioException e)
+{
+ Console.WriteLine("Error occurred: " + e);
+}
+
+// 3. Downloads and saves the object as a file in the local filesystem.
+try
+{
+ // Check whether the object exists using statObjectAsync().
+ // If the object is not found, statObjectAsync() throws an exception,
+ // else it means that the object exists.
+ // Execution is successful.
+ StatObjectArgs statObjectArgs = new StatObjectArgs()
+ .WithBucket("mybucket")
+ .WithObject("myobject");
+ await minioClient.StatObjectAsync(statObjectArgs);
+
+ // Gets the object's data and stores it in photo.jpg
+ GetObjectArgs getObjectArgs = new GetObjectArgs()
+ .WithBucket("mybucket")
+ .WithObject("myobject")
+ .WithFileName("photo.jpg");
+ await minioClient.GetObjectAsync(getObjectArgs);
+}
+catch (MinioException e)
+{
+ Console.WriteLine("Error occurred: " + e);
+}
```
@@ -1904,24 +1840,24 @@ PutObjectAsync: Uploads object from a file or stream.
__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``args`` | _PutObjectArgs_ | Arguments object - bucket name, object name, file name, object data stream, object size, content type, object metadata, SSE. etc. |
-| ``cancellationToken``| _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| Param | Type | Description |
+|:----------------------|:-------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------|
+| ``args`` | _PutObjectArgs_ | Arguments object - bucket name, object name, file name, object data stream, object size, content type, object metadata, SSE. etc. |
+| ``cancellationToken`` | _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
-| Return Type | Exceptions |
-|:--- |:--- |
-| ``Task`` | Listed Exceptions: |
-| | ``AuthorizationException`` : upon access or secret key wrong or not found |
-| | ``InvalidBucketNameException`` : upon invalid bucket name |
-| | ``InvalidObjectNameException`` : upon invalid object name |
-| | ``ConnectionException`` : upon connection error |
-| | ``InternalClientException`` : upon internal library error |
-| | ``EntityTooLargeException``: upon proposed upload size exceeding max allowed |
-| | ``UnexpectedShortReadException``: data read was shorter than size of input buffer |
-| | ``ArgumentNullException``: upon null input stream |
-| | ``InvalidOperationException``: upon input value to PutObjectArgs being invalid |
+| Return Type | Exceptions |
+|:------------|:----------------------------------------------------------------------------------|
+| ``Task`` | Listed Exceptions: |
+| | ``AuthorizationException`` : upon access or secret key wrong or not found |
+| | ``InvalidBucketNameException`` : upon invalid bucket name |
+| | ``InvalidObjectNameException`` : upon invalid object name |
+| | ``ConnectionException`` : upon connection error |
+| | ``InternalClientException`` : upon internal library error |
+| | ``EntityTooLargeException``: upon proposed upload size exceeding max allowed |
+| | ``UnexpectedShortReadException``: data read was shorter than size of input buffer |
+| | ``ArgumentNullException``: upon null input stream |
+| | ``InvalidOperationException``: upon input value to PutObjectArgs being invalid |
__Example__
@@ -1932,22 +1868,22 @@ The maximum size of a single object is limited to 5TB. putObject transparently u
```cs
try
{
- Aes aesEncryption = Aes.Create();
- aesEncryption.KeySize = 256;
- aesEncryption.GenerateKey();
- var ssec = new SSEC(aesEncryption.Key);
- PutObjectArgs putObjectArgs = new PutObjectArgs()
- .WithBucket("mybucket")
- .WithObject("island.jpg")
- .WithFilename("/mnt/photos/island.jpg")
- .WithContentType("application/octet-stream")
- .WithServerSideEncryption(ssec);
- await minio.PutObjectAsync(putObjectArgs);
- Console.WriteLine("island.jpg is uploaded successfully");
+ Aes aesEncryption = Aes.Create();
+ aesEncryption.KeySize = 256;
+ aesEncryption.GenerateKey();
+ var ssec = new SSEC(aesEncryption.Key);
+ PutObjectArgs putObjectArgs = new PutObjectArgs()
+ .WithBucket("mybucket")
+ .WithObject("island.jpg")
+ .WithFilename("/mnt/photos/island.jpg")
+ .WithContentType("application/octet-stream")
+ .WithServerSideEncryption(ssec);
+ await minio.PutObjectAsync(putObjectArgs);
+ Console.WriteLine("island.jpg is uploaded successfully");
}
catch(MinioException e)
{
- Console.WriteLine("Error occurred: " + e);
+ Console.WriteLine("Error occurred: " + e);
}
```
@@ -1963,18 +1899,18 @@ Gets metadata of an object.
__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``args`` | _StatObjectArgs_ | StatObjectArgs Argument Object with bucket, object names & server side encryption object |
-| ``cancellationToken``| _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| Param | Type | Description |
+|:----------------------|:-------------------------------------|:-----------------------------------------------------------------------------------------|
+| ``args`` | _StatObjectArgs_ | StatObjectArgs Argument Object with bucket, object names & server side encryption object |
+| ``cancellationToken`` | _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
-| Return Type | Exceptions |
-|:--- |:--- |
-| ``Task``: Populated object meta data. | Listed Exceptions: |
-| | ``InvalidBucketNameException`` : upon invalid bucket name |
-| | ``ConnectionException`` : upon connection error |
-| | ``InternalClientException`` : upon internal library error |
+| Return Type | Exceptions |
+|:--------------------------------------------------|:----------------------------------------------------------|
+| ``Task``: Populated object meta data. | Listed Exceptions: |
+| | ``InvalidBucketNameException`` : upon invalid bucket name |
+| | ``ConnectionException`` : upon connection error |
+| | ``InternalClientException`` : upon internal library error |
@@ -1986,8 +1922,8 @@ try
{
// Get the metadata of the object.
StatObjectArgs statObjectArgs = new StatObjectArgs()
- .WithBucket("mybucket")
- .WithObject("myobject");
+ .WithBucket("mybucket")
+ .WithObject("myobject");
ObjectStat objectStat = await minioClient.StatObjectAsync(statObjectArgs);
Console.WriteLine(objectStat);
}
@@ -2008,24 +1944,24 @@ Copies content from objectName to destObjectName.
__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``args`` | _CopyObjectArgs_ | Arguments object - bucket name, object name, destination bucket name, destination object name, copy conditions, metadata, Source SSE, Destination SSE. etc. |
-| ``cancellationToken``| _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| Param | Type | Description |
+|:----------------------|:-------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| ``args`` | _CopyObjectArgs_ | Arguments object - bucket name, object name, destination bucket name, destination object name, copy conditions, metadata, Source SSE, Destination SSE. etc. |
+| ``cancellationToken`` | _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
-| Return Type | Exceptions |
-|:--- |:--- |
-| ``Task`` | Listed Exceptions: |
-| | ``AuthorizationException`` : upon access or secret key wrong or not found |
-| | ``InvalidBucketNameException`` : upon invalid bucket name |
-| | ``InvalidObjectNameException`` : upon invalid object name |
-| | ``BucketNotFoundException`` : upon bucket with name not found |
-| | ``ObjectNotFoundException`` : upon object with name not found |
-| | ``MalFormedXMLException`` : upon configuration XML in http request validation failure |
-| | ``ConnectionException`` : upon connection error |
-| | ``InternalClientException`` : upon internal library error |
-| | ``ArgumentException`` : upon missing bucket/object names |
+| Return Type | Exceptions |
+|:------------|:--------------------------------------------------------------------------------------|
+| ``Task`` | Listed Exceptions: |
+| | ``AuthorizationException`` : upon access or secret key wrong or not found |
+| | ``InvalidBucketNameException`` : upon invalid bucket name |
+| | ``InvalidObjectNameException`` : upon invalid object name |
+| | ``BucketNotFoundException`` : upon bucket with name not found |
+| | ``ObjectNotFoundException`` : upon object with name not found |
+| | ``MalFormedXMLException`` : upon configuration XML in http request validation failure |
+| | ``ConnectionException`` : upon connection error |
+| | ``InternalClientException`` : upon internal library error |
+| | ``ArgumentException`` : upon missing bucket/object names |
__Example__
@@ -2040,11 +1976,11 @@ try
ServerSideEncryption sseSrc, sseDst;
// Uncomment to specify source and destination Server-side encryption options
/*
- Aes aesEncryption = Aes.Create();
- aesEncryption.KeySize = 256;
- aesEncryption.GenerateKey();
- sseSrc = new SSEC(aesEncryption.Key);
- sseDst = new SSES3();
+ Aes aesEncryption = Aes.Create();
+ aesEncryption.KeySize = 256;
+ aesEncryption.GenerateKey();
+ sseSrc = new SSEC(aesEncryption.Key);
+ sseDst = new SSES3();
*/
await minioClient.CopyObjectAsync("mybucket", "island.jpg", "mydestbucket", "processed.png", copyConditions, sseSrc:sseSrc, sseDest:sseDst);
Console.WriteLine("island.jpg is uploaded successfully");
@@ -2066,17 +2002,17 @@ Removes an object.
__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``args`` | _RemoveObjectArgs_ | Arguments Object. |
-| ``cancellationToken``| _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| Param | Type | Description |
+|:----------------------|:-------------------------------------|:-----------------------------------------------------------|
+| ``args`` | _RemoveObjectArgs_ | Arguments Object. |
+| ``cancellationToken`` | _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
-| Return Type | Exceptions |
-|:--- |:--- |
-| ``Task`` | Listed Exceptions: |
-| | ``InvalidBucketNameException`` : upon invalid bucket name |
-| | ``ConnectionException`` : upon connection error |
-| | ``InternalClientException`` : upon internal library error |
+| Return Type | Exceptions |
+|:------------|:----------------------------------------------------------|
+| ``Task`` | Listed Exceptions: |
+| | ``InvalidBucketNameException`` : upon invalid bucket name |
+| | ``ConnectionException`` : upon connection error |
+| | ``InternalClientException`` : upon internal library error |
@@ -2087,30 +2023,30 @@ __Example__
// 1. Remove object myobject from the bucket mybucket.
try
{
- RemoveObjectArgs rmArgs = new RemoveObjectArgs()
- .WithBucket("mybucket")
- .WithObject("myobject");
- await minioClient.RemoveObjectAsync(args);
- Console.WriteLine("successfully removed mybucket/myobject");
+ RemoveObjectArgs rmArgs = new RemoveObjectArgs()
+ .WithBucket("mybucket")
+ .WithObject("myobject");
+ await minioClient.RemoveObjectAsync(args);
+ Console.WriteLine("successfully removed mybucket/myobject");
}
catch (MinioException e)
{
- Console.WriteLine("Error: " + e);
+ Console.WriteLine("Error: " + e);
}
// 2. Remove one version of object myobject with versionID from mybucket.
try
{
- RemoveObjectArgs rmArgs = new RemoveObjectArgs()
- .WithBucket("mybucket")
- .WithObject("myobject")
- .WithVersionId("versionId");
- await minioClient.RemoveObjectAsync(args);
- Console.WriteLine("successfully removed mybucket/myobject{versionId}");
+ RemoveObjectArgs rmArgs = new RemoveObjectArgs()
+ .WithBucket("mybucket")
+ .WithObject("myobject")
+ .WithVersionId("versionId");
+ await minioClient.RemoveObjectAsync(args);
+ Console.WriteLine("successfully removed mybucket/myobject{versionId}");
}
catch (MinioException e)
{
- Console.WriteLine("Error: " + e);
+ Console.WriteLine("Error: " + e);
}
```
@@ -2125,17 +2061,17 @@ Removes a list of objects or object versions.
__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``args`` | _RemoveObjectsArgs_ | Arguments Object - bucket name, List of Objects to be deleted or List of Tuples with Tuple(object name, List of version IDs). |
-| ``cancellationToken``| _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| Param | Type | Description |
+|:----------------------|:-------------------------------------|:------------------------------------------------------------------------------------------------------------------------------|
+| ``args`` | _RemoveObjectsArgs_ | Arguments Object - bucket name, List of Objects to be deleted or List of Tuples with Tuple(object name, List of version IDs). |
+| ``cancellationToken`` | _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
-| Return Type | Exceptions |
-|:--- |:--- |
-| ``Task`` | Listed Exceptions: |
-| | ``InvalidBucketNameException`` : upon invalid bucket name |
-| | ``ConnectionException`` : upon connection error |
-| | ``InternalClientException`` : upon internal library error |
+| Return Type | Exceptions |
+|:------------|:----------------------------------------------------------|
+| ``Task`` | Listed Exceptions: |
+| | ``InvalidBucketNameException`` : upon invalid bucket name |
+| | ``ConnectionException`` : upon connection error |
+| | ``InternalClientException`` : upon internal library error |
@@ -2146,57 +2082,57 @@ __Example__
// 1. Remove list of objects in objectNames from the bucket bucketName.
try
{
- string bucketName = "mybucket"
- List objectNames = new LinkedList();
- objectNames.add("my-objectname1");
- objectNames.add("my-objectname2");
- objectNames.add("my-objectname3");
- RemoveObjectsAsync rmArgs = new RemoveObjectsAsync()
- .WithBucket(bucketName)
- .WithObjects(objectNames);
- IObservable observable = await minio.RemoveObjectAsync(rmArgs);
- IDisposable subscription = observable.Subscribe(
- deleteError => Console.WriteLine("Object: {0}", deleteError.Key),
- ex => Console.WriteLine("OnError: {0}", ex),
- () =>
- {
- Console.WriteLine("Removed objects from " + bucketName + "\n");
- });
+ string bucketName = "mybucket"
+ List objectNames = new LinkedList();
+ objectNames.add("my-objectname1");
+ objectNames.add("my-objectname2");
+ objectNames.add("my-objectname3");
+ RemoveObjectsAsync rmArgs = new RemoveObjectsAsync()
+ .WithBucket(bucketName)
+ .WithObjects(objectNames);
+ IObservable observable = await minio.RemoveObjectAsync(rmArgs);
+ IDisposable subscription = observable.Subscribe(
+ deleteError => Console.WriteLine("Object: {0}", deleteError.Key),
+ ex => Console.WriteLine("OnError: {0}", ex),
+ () =>
+ {
+ Console.WriteLine("Removed objects from " + bucketName + "\n");
+ });
}
catch (MinioException e)
{
- Console.WriteLine("Error: " + e);
+ Console.WriteLine("Error: " + e);
}
// 2. Remove list of objects (only specific versions mentioned in Version ID list) from the bucket bucketName
try
{
- string bucketName = "mybucket";
- string objectName = "myobject1";
- List versionIDs = new List();
- versionIDs.Add("abcobject1version1dce");
- versionIDs.Add("abcobject1version2dce");
- versionIDs.Add("abcobject1version3dce");
- List> objectsVersions = new List>();
- objectsVersions.Add(new Tuple>(objectName, versionIDs));
- objectsVersions.Add(new Tuple("myobject2" "abcobject2version1dce"));
- objectsVersions.Add(new Tuple("myobject2", "abcobject2version2dce"));
- objectsVersions.Add(new Tuple("myobject2", "abcobject2version3dce"));
- RemoveObjectsAsync rmArgs = new RemoveObjectsAsync()
- .WithBucket(bucketName)
- .WithObjectsVersions(objectsVersions);
- IObservable observable = await minio.RemoveObjectsAsync(rmArgs);
- IDisposable subscription = observable.Subscribe(
- deleteError => Console.WriteLine("Object: {0}", deleteError.Key),
- ex => Console.WriteLine("OnError: {0}", ex),
- () =>
- {
- Console.WriteLine("Listed all delete errors for remove objects on " + bucketName + "\n");
- });
+ string bucketName = "mybucket";
+ string objectName = "myobject1";
+ List versionIDs = new List();
+ versionIDs.Add("abcobject1version1dce");
+ versionIDs.Add("abcobject1version2dce");
+ versionIDs.Add("abcobject1version3dce");
+ List> objectsVersions = new List>();
+ objectsVersions.Add(new Tuple>(objectName, versionIDs));
+ objectsVersions.Add(new Tuple("myobject2" "abcobject2version1dce"));
+ objectsVersions.Add(new Tuple("myobject2", "abcobject2version2dce"));
+ objectsVersions.Add(new Tuple("myobject2", "abcobject2version3dce"));
+ RemoveObjectsAsync rmArgs = new RemoveObjectsAsync()
+ .WithBucket(bucketName)
+ .WithObjectsVersions(objectsVersions);
+ IObservable observable = await minio.RemoveObjectsAsync(rmArgs);
+ IDisposable subscription = observable.Subscribe(
+ deleteError => Console.WriteLine("Object: {0}", deleteError.Key),
+ ex => Console.WriteLine("OnError: {0}", ex),
+ () =>
+ {
+ Console.WriteLine("Listed all delete errors for remove objects on " + bucketName + "\n");
+ });
}
catch (MinioException e)
{
- Console.WriteLine("Error: " + e);
+ Console.WriteLine("Error: " + e);
}
```
@@ -2212,18 +2148,18 @@ Removes a partially uploaded object.
__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``args`` | _RemoveIncompleteUploadArgs_ | RemoveIncompleteUploadArgs object encapsulating the bucket, object names |
-| ``cancellationToken``| _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| Param | Type | Description |
+|:----------------------|:-------------------------------------|:-------------------------------------------------------------------------|
+| ``args`` | _RemoveIncompleteUploadArgs_ | RemoveIncompleteUploadArgs object encapsulating the bucket, object names |
+| ``cancellationToken`` | _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
-| Return Type | Exceptions |
-|:--- |:--- |
-| ``Task`` | Listed Exceptions: |
-| | ``InvalidBucketNameException`` : upon invalid bucket name |
-| | ``ConnectionException`` : upon connection error |
-| | ``InternalClientException`` : upon internal library error |
+| Return Type | Exceptions |
+|:------------|:----------------------------------------------------------|
+| ``Task`` | Listed Exceptions: |
+| | ``InvalidBucketNameException`` : upon invalid bucket name |
+| | ``ConnectionException`` : upon connection error |
+| | ``InternalClientException`` : upon internal library error |
__Example__
@@ -2232,16 +2168,16 @@ __Example__
```cs
try
{
- // Removes partially uploaded objects from buckets.
- RemoveIncompleteUploadArgs args = new RemoveIncompleteUploadArgs()
- .WithBucket(bucketName)
- .WithObject(objectName);
- await minioClient.RemoveIncompleteUploadAsync(args);
- Console.WriteLine("successfully removed all incomplete upload session of my-bucketname/my-objectname");
+ // Removes partially uploaded objects from buckets.
+ RemoveIncompleteUploadArgs args = new RemoveIncompleteUploadArgs()
+ .WithBucket(bucketName)
+ .WithObject(objectName);
+ await minioClient.RemoveIncompleteUploadAsync(args);
+ Console.WriteLine("successfully removed all incomplete upload session of my-bucketname/my-objectname");
}
catch(MinioException e)
{
- Console.WriteLine("Error occurred: " + e);
+ Console.WriteLine("Error occurred: " + e);
}
```
@@ -2256,20 +2192,20 @@ Downloads an object as a stream.
__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``args`` | _SelectObjectContentArgs_ | options for SelectObjectContent async | Required parameter. |
-| ``cancellationToken``| _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| Param | Type | Description | |
+|:----------------------|:-------------------------------------|:-----------------------------------------------------------|---------------------|
+| ``args`` | _SelectObjectContentArgs_ | options for SelectObjectContent async | Required parameter. |
+| ``cancellationToken`` | _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) | |
-| Return Type | Exceptions |
-|:--- |:--- |
-| ``Task``: Task callback returns a SelectResponseStream containing select results. | Listed Exceptions: |
-| | ``InvalidBucketNameException`` : upon invalid bucket name. |
-| | ``ConnectionException`` : upon connection error. |
-| | ``InternalClientException`` : upon internal library error. |
-| | ``ArgumentException`` : upon invalid response format |
-| | ``IOException`` : insufficient data |
+| Return Type | Exceptions |
+|:----------------------------------------------------------------------------------|:-----------------------------------------------------------|
+| ``Task``: Task callback returns a SelectResponseStream containing select results. | Listed Exceptions: |
+| | ``InvalidBucketNameException`` : upon invalid bucket name. |
+| | ``ConnectionException`` : upon connection error. |
+| | ``InternalClientException`` : upon internal library error. |
+| | ``ArgumentException`` : upon invalid response format |
+| | ``IOException`` : insufficient data |
__Example__
@@ -2278,47 +2214,47 @@ __Example__
```cs
try
{
- var opts = new SelectObjectOptions()
- {
- ExpressionType = QueryExpressionType.SQL,
- Expression = "select count(*) from s3object",
- InputSerialization = new SelectObjectInputSerialization()
- {
- CompressionType = SelectCompressionType.NONE,
- CSV = new CSVInputOptions()
- {
- FileHeaderInfo = CSVFileHeaderInfo.None,
- RecordDelimiter = "\n",
- FieldDelimiter = ",",
- }
- },
- OutputSerialization = new SelectObjectOutputSerialization()
- {
- CSV = new CSVOutputOptions()
- {
- RecordDelimiter = "\n",
- FieldDelimiter = ",",
- }
- }
- };
+ var opts = new SelectObjectOptions()
+ {
+ ExpressionType = QueryExpressionType.SQL,
+ Expression = "select count(*) from s3object",
+ InputSerialization = new SelectObjectInputSerialization()
+ {
+ CompressionType = SelectCompressionType.NONE,
+ CSV = new CSVInputOptions()
+ {
+ FileHeaderInfo = CSVFileHeaderInfo.None,
+ RecordDelimiter = "\n",
+ FieldDelimiter = ",",
+ }
+ },
+ OutputSerialization = new SelectObjectOutputSerialization()
+ {
+ CSV = new CSVOutputOptions()
+ {
+ RecordDelimiter = "\n",
+ FieldDelimiter = ",",
+ }
+ }
+ };
- SelectObjectContentArgs args = SelectObjectContentArgs()
- .WithBucket(bucketName)
- .WithObject(objectName)
- .WithSelectObjectOptions(opts);
- var resp = await minio.SelectObjectContentAsync(args);
- resp.Payload.CopyTo(Console.OpenStandardOutput());
- Console.WriteLine("Bytes scanned:" + resp.Stats.BytesScanned);
- Console.WriteLine("Bytes returned:" + resp.Stats.BytesReturned);
- Console.WriteLine("Bytes processed:" + resp.Stats.BytesProcessed);
- if (resp.Progress != null)
- {
- Console.WriteLine("Progress :" + resp.Progress.BytesProcessed);
- }
+ SelectObjectContentArgs args = SelectObjectContentArgs()
+ .WithBucket(bucketName)
+ .WithObject(objectName)
+ .WithSelectObjectOptions(opts);
+ var resp = await minio.SelectObjectContentAsync(args);
+ resp.Payload.CopyTo(Console.OpenStandardOutput());
+ Console.WriteLine("Bytes scanned:" + resp.Stats.BytesScanned);
+ Console.WriteLine("Bytes returned:" + resp.Stats.BytesReturned);
+ Console.WriteLine("Bytes processed:" + resp.Stats.BytesProcessed);
+ if (resp.Progress != null)
+ {
+ Console.WriteLine("Progress :" + resp.Progress.BytesProcessed);
+ }
}
catch (MinioException e)
{
- Console.WriteLine("Error occurred: " + e);
+ Console.WriteLine("Error occurred: " + e);
}
```
@@ -2334,22 +2270,22 @@ Sets the Legal Hold status of an object.
__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``args`` | _SetObjectLegalHoldArgs_ | SetObjectLegalHoldArgs Argument Object with bucket, object names, version id(optional) |
-| ``cancellationToken``| _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| Param | Type | Description |
+|:----------------------|:-------------------------------------|:---------------------------------------------------------------------------------------|
+| ``args`` | _SetObjectLegalHoldArgs_ | SetObjectLegalHoldArgs Argument Object with bucket, object names, version id(optional) |
+| ``cancellationToken`` | _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
-| Return Type | Exceptions |
-|:--- |:--- |
-| ``Task`` | Listed Exceptions: |
-| | ``AuthorizationException`` : upon access or secret key wrong or not found |
-| | ``InvalidBucketNameException`` : upon invalid bucket name |
-| | ``InvalidObjectNameException`` : upon invalid object name |
-| | ``BucketNotFoundException`` : upon bucket with name not found |
-| | ``ObjectNotFoundException`` : upon object with name not found |
-| | ``MissingObjectLockConfigurationException`` : upon bucket created with object lock not enabled |
-| | ``MalFormedXMLException`` : upon configuration XML in http request validation failure |
+| Return Type | Exceptions |
+|:------------|:-----------------------------------------------------------------------------------------------|
+| ``Task`` | Listed Exceptions: |
+| | ``AuthorizationException`` : upon access or secret key wrong or not found |
+| | ``InvalidBucketNameException`` : upon invalid bucket name |
+| | ``InvalidObjectNameException`` : upon invalid object name |
+| | ``BucketNotFoundException`` : upon bucket with name not found |
+| | ``ObjectNotFoundException`` : upon object with name not found |
+| | ``MissingObjectLockConfigurationException`` : upon bucket created with object lock not enabled |
+| | ``MalFormedXMLException`` : upon configuration XML in http request validation failure |
@@ -2359,13 +2295,13 @@ __Example__
```cs
try
{
- // Setting WithLegalHold true, sets Legal hold status to ON.
- SetObjectLegalHoldArgs args = new SetObjectLegalHoldArgs()
- .WithBucket(bucketName)
- .WithObject(objectName)
- .WithVersionId(versionId)
- .WithLegalHold(true);
- await minio.SetObjectLegalHoldAsync(args);
+ // Setting WithLegalHold true, sets Legal hold status to ON.
+ SetObjectLegalHoldArgs args = new SetObjectLegalHoldArgs()
+ .WithBucket(bucketName)
+ .WithObject(objectName)
+ .WithVersionId(versionId)
+ .WithLegalHold(true);
+ await minio.SetObjectLegalHoldAsync(args);
}
catch(MinioException e)
{
@@ -2384,22 +2320,22 @@ Gets the Legal Hold status of an object.
__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``args`` | _GetObjectLegalHoldArgs_ | GetObjectLegalHoldArgs Argument Object with bucket, object names, version id(optional) |
-| ``cancellationToken``| _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| Param | Type | Description |
+|:----------------------|:-------------------------------------|:---------------------------------------------------------------------------------------|
+| ``args`` | _GetObjectLegalHoldArgs_ | GetObjectLegalHoldArgs Argument Object with bucket, object names, version id(optional) |
+| ``cancellationToken`` | _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
-| Return Type | Exceptions |
-|:--- |:--- |
-| ``Task``: True if LegalHold is enabled, false otherwise. | Listed Exceptions: |
-| | ``AuthorizationException`` : upon access or secret key wrong or not found |
-| | ``InvalidBucketNameException`` : upon invalid bucket name |
-| | ``InvalidObjectNameException`` : upon invalid object name |
-| | ``BucketNotFoundException`` : upon bucket with name not found |
-| | ``ObjectNotFoundException`` : upon object with name not found |
-| | ``MissingObjectLockConfigurationException`` : upon bucket created with object lock not enabled |
-| | ``MalFormedXMLException`` : upon configuration XML in http request validation failure |
+| Return Type | Exceptions |
+|:---------------------------------------------------------------|:-----------------------------------------------------------------------------------------------|
+| ``Task``: True if LegalHold is enabled, false otherwise. | Listed Exceptions: |
+| | ``AuthorizationException`` : upon access or secret key wrong or not found |
+| | ``InvalidBucketNameException`` : upon invalid bucket name |
+| | ``InvalidObjectNameException`` : upon invalid object name |
+| | ``BucketNotFoundException`` : upon bucket with name not found |
+| | ``ObjectNotFoundException`` : upon object with name not found |
+| | ``MissingObjectLockConfigurationException`` : upon bucket created with object lock not enabled |
+| | ``MalFormedXMLException`` : upon configuration XML in http request validation failure |
__Example__
@@ -2408,15 +2344,15 @@ __Example__
```cs
try
{
- // Get Legal Hold status a object
- var args = new GetObjectLegalHoldArgs()
- .WithBucket(bucketName)
- .WithObject(objectName)
- .WithVersionId(versionId);
- bool enabled = await minio.GetObjectLegalHoldAsync(args);
- Console.WriteLine("LegalHold Configuration STATUS for " + bucketName + "/" + objectName +
- (!string.IsNullOrEmpty(versionId)?" with Version ID " + versionId: " ") +
- " : " + (enabled?"ON":"OFF"));
+ // Get Legal Hold status a object
+ var args = new GetObjectLegalHoldArgs()
+ .WithBucket(bucketName)
+ .WithObject(objectName)
+ .WithVersionId(versionId);
+ bool enabled = await minio.GetObjectLegalHoldAsync(args);
+ Console.WriteLine("LegalHold Configuration STATUS for " + bucketName + "/" + objectName +
+ (!string.IsNullOrEmpty(versionId)?" with Version ID " + versionId: " ") +
+ " : " + (enabled?"ON":"OFF"));
}
catch(MinioException e)
{
@@ -2434,22 +2370,22 @@ Sets tags to a object.
__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``args`` | _SetObjectTagsArgs_ | SetObjectTagsArgs Argument Object with object, tags to set |
-| ``cancellationToken``| _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| Param | Type | Description |
+|:----------------------|:-------------------------------------|:-----------------------------------------------------------|
+| ``args`` | _SetObjectTagsArgs_ | SetObjectTagsArgs Argument Object with object, tags to set |
+| ``cancellationToken`` | _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
-| Return Type | Exceptions |
-|:--- |:--- |
-| ``Task`` | Listed Exceptions: |
-| | ``AuthorizationException`` : upon access or secret key wrong or not found |
-| | ``InvalidBucketNameException`` : upon invalid bucket name |
-| | ``InvalidObjectNameException`` : upon invalid object name |
-| | ``BucketNotFoundException`` : upon bucket with name not found |
-| | ``ObjectNotFoundException`` : upon object with name not found |
-| | ``MalFormedXMLException`` : upon configuration XML in http request validation failure |
-| | ``UnexpectedMinioException`` : upon internal errors encountered during the operation |
+| Return Type | Exceptions |
+|:------------|:--------------------------------------------------------------------------------------|
+| ``Task`` | Listed Exceptions: |
+| | ``AuthorizationException`` : upon access or secret key wrong or not found |
+| | ``InvalidBucketNameException`` : upon invalid bucket name |
+| | ``InvalidObjectNameException`` : upon invalid object name |
+| | ``BucketNotFoundException`` : upon bucket with name not found |
+| | ``ObjectNotFoundException`` : upon object with name not found |
+| | ``MalFormedXMLException`` : upon configuration XML in http request validation failure |
+| | ``UnexpectedMinioException`` : upon internal errors encountered during the operation |
@@ -2459,13 +2395,13 @@ __Example__
```cs
try
{
- // Set Tags for the object
- SetObjectTagsArgs args = new new SetObjectTagsArgs()
- .WithBucket(bucketName)
- .WithObject(objectName)
- .WithTagging(tags);
- await minio.SetObjectTagsAsync(args);
- Console.WriteLine($"Set tags for object {bucketName}/{objectName}.");
+ // Set Tags for the object
+ SetObjectTagsArgs args = new new SetObjectTagsArgs()
+ .WithBucket(bucketName)
+ .WithObject(objectName)
+ .WithTagging(tags);
+ await minio.SetObjectTagsAsync(args);
+ Console.WriteLine($"Set tags for object {bucketName}/{objectName}.");
}
catch(MinioException e)
{
@@ -2485,22 +2421,22 @@ Gets tags of a object.
__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``args`` | _GetObjectTagsArgs_ | GetObjectTagsArgs Argument Object with object name |
-| ``cancellationToken``| _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| Param | Type | Description |
+|:----------------------|:-------------------------------------|:-----------------------------------------------------------|
+| ``args`` | _GetObjectTagsArgs_ | GetObjectTagsArgs Argument Object with object name |
+| ``cancellationToken`` | _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
-| Return Type | Exceptions |
-|:--- |:--- |
-| ``Task``: Task object which containing tag-value pairs. | Listed Exceptions: |
-| | ``AuthorizationException`` : upon access or secret key wrong or not found |
-| | ``InvalidBucketNameException`` : upon invalid bucket name |
-| | ``InvalidObjectNameException`` : upon invalid object name |
-| | ``BucketNotFoundException`` : upon bucket with name not found |
-| | ``ObjectNotFoundException`` : upon object with name not found |
-| | ``MalFormedXMLException`` : upon configuration XML in http request validation failure |
-| | ``UnexpectedMinioException`` : upon internal errors encountered during the operation |
+| Return Type | Exceptions |
+|:--------------------------------------------------------------------------|:--------------------------------------------------------------------------------------|
+| ``Task``: Task object which containing tag-value pairs. | Listed Exceptions: |
+| | ``AuthorizationException`` : upon access or secret key wrong or not found |
+| | ``InvalidBucketNameException`` : upon invalid bucket name |
+| | ``InvalidObjectNameException`` : upon invalid object name |
+| | ``BucketNotFoundException`` : upon bucket with name not found |
+| | ``ObjectNotFoundException`` : upon object with name not found |
+| | ``MalFormedXMLException`` : upon configuration XML in http request validation failure |
+| | ``UnexpectedMinioException`` : upon internal errors encountered during the operation |
@@ -2510,12 +2446,12 @@ __Example__
```cs
try
{
- // Get Object Tags for the object
- var args = new GetObjectTagsArgs()
- .WithBucket(bucketName)
- .WithObject(objectName);
- var tags = await minio.GetObjectTagsAsync(args);
- Console.WriteLine($"Got tags for object {bucketName}/{objectName}.");
+ // Get Object Tags for the object
+ var args = new GetObjectTagsArgs()
+ .WithBucket(bucketName)
+ .WithObject(objectName);
+ var tags = await minio.GetObjectTagsAsync(args);
+ Console.WriteLine($"Got tags for object {bucketName}/{objectName}.");
}
catch(MinioException e)
{
@@ -2535,22 +2471,22 @@ Deletes tags of a object.
__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``args`` | _RemoveObjectTagsArgs_ | RemoveObjectTagsArgs Argument Object with object name |
-| ``cancellationToken``| _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| Param | Type | Description |
+|:----------------------|:-------------------------------------|:-----------------------------------------------------------|
+| ``args`` | _RemoveObjectTagsArgs_ | RemoveObjectTagsArgs Argument Object with object name |
+| ``cancellationToken`` | _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
-| Return Type | Exceptions |
-|:--- |:--- |
-| ``Task`` | Listed Exceptions: |
-| | ``AuthorizationException`` : upon access or secret key wrong or not found |
-| | ``InvalidBucketNameException`` : upon invalid bucket name |
-| | ``InvalidObjectNameException`` : upon invalid object name |
-| | ``BucketNotFoundException`` : upon bucket with name not found |
-| | ``ObjectNotFoundException`` : upon object with name not found |
-| | ``MalFormedXMLException`` : upon configuration XML in http request validation failure |
-| | ``UnexpectedMinioException`` : upon internal errors encountered during the operation |
+| Return Type | Exceptions |
+|:------------|:--------------------------------------------------------------------------------------|
+| ``Task`` | Listed Exceptions: |
+| | ``AuthorizationException`` : upon access or secret key wrong or not found |
+| | ``InvalidBucketNameException`` : upon invalid bucket name |
+| | ``InvalidObjectNameException`` : upon invalid object name |
+| | ``BucketNotFoundException`` : upon bucket with name not found |
+| | ``ObjectNotFoundException`` : upon object with name not found |
+| | ``MalFormedXMLException`` : upon configuration XML in http request validation failure |
+| | ``UnexpectedMinioException`` : upon internal errors encountered during the operation |
@@ -2560,12 +2496,12 @@ __Example__
```cs
try
{
- // Remove Tags for the object
- var args = new RemoveObjectTagsArgs()
- .WithBucket(bucketName)
- .WithObject(objectName);
- await minio.RemoveObjectTagsAsync(args);
- Console.WriteLine($"Removed tags for object {bucketName}/{objectName}.");
+ // Remove Tags for the object
+ var args = new RemoveObjectTagsArgs()
+ .WithBucket(bucketName)
+ .WithObject(objectName);
+ await minio.RemoveObjectTagsAsync(args);
+ Console.WriteLine($"Removed tags for object {bucketName}/{objectName}.");
}
catch(MinioException e)
{
@@ -2585,22 +2521,22 @@ Sets retention configuration to an object.
__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``args`` | _SetObjectRetentionArgs_ | SetObjectRetentionArgs Argument Object with bucket, object names, version id(optional) |
-| ``cancellationToken``| _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| Param | Type | Description |
+|:----------------------|:-------------------------------------|:---------------------------------------------------------------------------------------|
+| ``args`` | _SetObjectRetentionArgs_ | SetObjectRetentionArgs Argument Object with bucket, object names, version id(optional) |
+| ``cancellationToken`` | _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
-| Return Type | Exceptions |
-|:--- |:--- |
-| ``Task`` | Listed Exceptions: |
-| | ``AuthorizationException`` : upon access or secret key wrong or not found |
-| | ``InvalidBucketNameException`` : upon invalid bucket name |
-| | ``InvalidObjectNameException`` : upon invalid object name |
-| | ``BucketNotFoundException`` : upon bucket with name not found |
-| | ``ObjectNotFoundException`` : upon object with name not found |
-| | ``MissingObjectLockConfigurationException`` : upon bucket created with object lock not enabled |
-| | ``MalFormedXMLException`` : upon configuration XML in http request validation failure |
+| Return Type | Exceptions |
+|:------------|:-----------------------------------------------------------------------------------------------|
+| ``Task`` | Listed Exceptions: |
+| | ``AuthorizationException`` : upon access or secret key wrong or not found |
+| | ``InvalidBucketNameException`` : upon invalid bucket name |
+| | ``InvalidObjectNameException`` : upon invalid object name |
+| | ``BucketNotFoundException`` : upon bucket with name not found |
+| | ``ObjectNotFoundException`` : upon object with name not found |
+| | ``MissingObjectLockConfigurationException`` : upon bucket created with object lock not enabled |
+| | ``MalFormedXMLException`` : upon configuration XML in http request validation failure |
@@ -2610,13 +2546,13 @@ __Example__
```cs
try
{
- // Setting Retention Configuration of the object.
- SetObjectRetentionArgs args = new SetObjectRetentionArgs()
- .WithBucket(bucketName)
- .WithObject(objectName)
- .WithRetentionValidDays(numOfDays);
- await minio.SetObjectRetentionAsync(args);
- Console.WriteLine($"Assigned retention configuration to object {bucketName}/{objectName}");
+ // Setting Retention Configuration of the object.
+ SetObjectRetentionArgs args = new SetObjectRetentionArgs()
+ .WithBucket(bucketName)
+ .WithObject(objectName)
+ .WithRetentionValidDays(numOfDays);
+ await minio.SetObjectRetentionAsync(args);
+ Console.WriteLine($"Assigned retention configuration to object {bucketName}/{objectName}");
}
catch(MinioException e)
{
@@ -2637,22 +2573,22 @@ Gets retention configuration of an object.
__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``args`` | _GetObjectRetentionArgs_ | GetObjectRetentionArgs Argument Object with bucket, object names, version id(optional) |
-| ``cancellationToken``| _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| Param | Type | Description |
+|:----------------------|:-------------------------------------|:---------------------------------------------------------------------------------------|
+| ``args`` | _GetObjectRetentionArgs_ | GetObjectRetentionArgs Argument Object with bucket, object names, version id(optional) |
+| ``cancellationToken`` | _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
-| Return Type | Exceptions |
-|:--- |:--- |
-| ``Task``: ObjectRetentionConfiguration object with configuration data. | Listed Exceptions: |
-| | ``AuthorizationException`` : upon access or secret key wrong or not found |
-| | ``InvalidBucketNameException`` : upon invalid bucket name |
-| | ``InvalidObjectNameException`` : upon invalid object name |
-| | ``BucketNotFoundException`` : upon bucket with name not found |
-| | ``ObjectNotFoundException`` : upon object with name not found |
-| | ``MissingObjectLockConfigurationException`` : upon bucket created with object lock not enabled |
-| | ``MalFormedXMLException`` : upon configuration XML in http request validation failure |
+| Return Type | Exceptions |
+|:-----------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------|
+| ``Task``: ObjectRetentionConfiguration object with configuration data. | Listed Exceptions: |
+| | ``AuthorizationException`` : upon access or secret key wrong or not found |
+| | ``InvalidBucketNameException`` : upon invalid bucket name |
+| | ``InvalidObjectNameException`` : upon invalid object name |
+| | ``BucketNotFoundException`` : upon bucket with name not found |
+| | ``ObjectNotFoundException`` : upon object with name not found |
+| | ``MissingObjectLockConfigurationException`` : upon bucket created with object lock not enabled |
+| | ``MalFormedXMLException`` : upon configuration XML in http request validation failure |
__Example__
@@ -2661,12 +2597,12 @@ __Example__
```cs
try
{
- // Get Retention configuration of an object
- var args = new GetObjectRetentionArgs()
- .WithBucket(bucketName)
- .WithObject(objectName);
- ObjectRetentionConfiguration config = await minio.GetObjectRetentionAsync(args);
- Console.WriteLine($"Got retention configuration for object {bucketName}/{objectName}");
+ // Get Retention configuration of an object
+ var args = new GetObjectRetentionArgs()
+ .WithBucket(bucketName)
+ .WithObject(objectName);
+ ObjectRetentionConfiguration config = await minio.GetObjectRetentionAsync(args);
+ Console.WriteLine($"Got retention configuration for object {bucketName}/{objectName}");
}
catch(MinioException e)
{
@@ -2686,22 +2622,22 @@ Clears retention configuration to an object.
__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``args`` | _ClearObjectRetentionArgs_ | ClearObjectRetentionArgs Argument Object with bucket, object names, version id(optional) |
-| ``cancellationToken``| _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
+| Param | Type | Description |
+|:----------------------|:-------------------------------------|:-----------------------------------------------------------------------------------------|
+| ``args`` | _ClearObjectRetentionArgs_ | ClearObjectRetentionArgs Argument Object with bucket, object names, version id(optional) |
+| ``cancellationToken`` | _System.Threading.CancellationToken_ | Optional parameter. Defaults to default(CancellationToken) |
-| Return Type | Exceptions |
-|:--- |:--- |
-| ``Task`` | Listed Exceptions: |
-| | ``AuthorizationException`` : upon access or secret key wrong or not found |
-| | ``InvalidBucketNameException`` : upon invalid bucket name |
-| | ``InvalidObjectNameException`` : upon invalid object name |
-| | ``BucketNotFoundException`` : upon bucket with name not found |
-| | ``ObjectNotFoundException`` : upon object with name not found |
-| | ``MissingObjectLockConfigurationException`` : upon bucket created with object lock not enabled |
-| | ``MalFormedXMLException`` : upon configuration XML in http request validation failure |
+| Return Type | Exceptions |
+|:------------|:-----------------------------------------------------------------------------------------------|
+| ``Task`` | Listed Exceptions: |
+| | ``AuthorizationException`` : upon access or secret key wrong or not found |
+| | ``InvalidBucketNameException`` : upon invalid bucket name |
+| | ``InvalidObjectNameException`` : upon invalid object name |
+| | ``BucketNotFoundException`` : upon bucket with name not found |
+| | ``ObjectNotFoundException`` : upon object with name not found |
+| | ``MissingObjectLockConfigurationException`` : upon bucket created with object lock not enabled |
+| | ``MalFormedXMLException`` : upon configuration XML in http request validation failure |
@@ -2711,12 +2647,12 @@ __Example__
```cs
try
{
- // Clearing the Retention Configuration of the object.
- ClearObjectRetentionArgs args = new ClearObjectRetentionArgs()
- .WithBucket(bucketName)
- .WithObject(objectName);
- await minio.ClearObjectRetentionAsync(args);
- Console.WriteLine($"Clears retention configuration to object {bucketName}/{objectName}");
+ // Clearing the Retention Configuration of the object.
+ ClearObjectRetentionArgs args = new ClearObjectRetentionArgs()
+ .WithBucket(bucketName)
+ .WithObject(objectName);
+ await minio.ClearObjectRetentionAsync(args);
+ Console.WriteLine($"Clears retention configuration to object {bucketName}/{objectName}");
}
catch(MinioException e)
{
@@ -2737,16 +2673,16 @@ Generates a presigned URL for HTTP GET operations. Browsers/Mobile clients may p
__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``args`` | _PresignedGetObjectArgs_ | PresignedGetObjectArgs encapsulating bucket, object names, expiry, response headers & request date |
+| Param | Type | Description |
+|:---------|:-------------------------|:---------------------------------------------------------------------------------------------------|
+| ``args`` | _PresignedGetObjectArgs_ | PresignedGetObjectArgs encapsulating bucket, object names, expiry, response headers & request date |
-| Return Type | Exceptions |
-|:--- |:--- |
-| ``Task`` : string contains URL to download the object | Listed Exceptions: |
-| | ``InvalidBucketNameException`` : upon invalid bucket name |
-| | ``ConnectionException`` : upon connection error |
-| | ``InvalidExpiryRangeException`` : upon invalid expiry range. |
+| Return Type | Exceptions |
+|:--------------------------------------------------------------|:-------------------------------------------------------------|
+| ``Task`` : string contains URL to download the object | Listed Exceptions: |
+| | ``InvalidBucketNameException`` : upon invalid bucket name |
+| | ``ConnectionException`` : upon connection error |
+| | ``InvalidExpiryRangeException`` : upon invalid expiry range. |
__Example__
@@ -2755,16 +2691,16 @@ __Example__
```cs
try
{
- PresignedGetObjectArgs args = new PresignedGetObjectArgs()
- .WithBucket("mybucket")
- .WithObject("myobject")
- .WithExpiry(60 * 60 * 24);
- String url = await minioClient.PresignedGetObjectAsync(args);
- Console.WriteLine(url);
+ PresignedGetObjectArgs args = new PresignedGetObjectArgs()
+ .WithBucket("mybucket")
+ .WithObject("myobject")
+ .WithExpiry(60 * 60 * 24);
+ String url = await minioClient.PresignedGetObjectAsync(args);
+ Console.WriteLine(url);
}
catch(MinioException e)
{
- Console.WriteLine("Error occurred: " + e);
+ Console.WriteLine("Error occurred: " + e);
}
```
@@ -2778,17 +2714,17 @@ Generates a presigned URL for HTTP PUT operations. Browsers/Mobile clients may p
__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``args`` | _PresignedPutObjectArgs_ | PresignedPutObjectArgs arguments object with bucket, object names & expiry |
+| Param | Type | Description |
+|:---------|:-------------------------|:---------------------------------------------------------------------------|
+| ``args`` | _PresignedPutObjectArgs_ | PresignedPutObjectArgs arguments object with bucket, object names & expiry |
-| Return Type | Exceptions |
-|:--- |:--- |
-| ``Task`` : string contains URL to upload the object | Listed Exceptions: |
-| | ``InvalidBucketNameException`` : upon invalid bucket name |
-| | ``InvalidKeyException`` : upon an invalid access key or secret key |
-| | ``ConnectionException`` : upon connection error |
-| | ``InvalidExpiryRangeException`` : upon invalid expiry range. |
+| Return Type | Exceptions |
+|:------------------------------------------------------------|:-------------------------------------------------------------------|
+| ``Task`` : string contains URL to upload the object | Listed Exceptions: |
+| | ``InvalidBucketNameException`` : upon invalid bucket name |
+| | ``InvalidKeyException`` : upon an invalid access key or secret key |
+| | ``ConnectionException`` : upon connection error |
+| | ``InvalidExpiryRangeException`` : upon invalid expiry range. |
__Example__
@@ -2796,16 +2732,16 @@ __Example__
```cs
try
{
- PresignedPutObjectArgs args = PresignedPutObjectArgs()
- .WithBucket("mybucket")
- .WithObject("myobject")
- .WithExpiry(60 * 60 * 24);
- String url = await minioClient.PresignedPutObjectAsync(args);
- Console.WriteLine(url);
+ PresignedPutObjectArgs args = PresignedPutObjectArgs()
+ .WithBucket("mybucket")
+ .WithObject("myobject")
+ .WithExpiry(60 * 60 * 24);
+ String url = await minioClient.PresignedPutObjectAsync(args);
+ Console.WriteLine(url);
}
catch(MinioException e)
{
- Console.WriteLine("Error occurred: " + e);
+ Console.WriteLine("Error occurred: " + e);
}
```
@@ -2819,17 +2755,17 @@ Allows setting policy conditions to a presigned URL for POST operations. Policie
__Parameters__
-|Param | Type | Description |
-|:--- |:--- |:--- |
-| ``args`` | _PresignedPostPolicyArgs_ | PresignedPostPolicyArgs Arguments object includes bucket, object names & Post policy of an object. |
+| Param | Type | Description |
+|:---------|:--------------------------|:---------------------------------------------------------------------------------------------------|
+| ``args`` | _PresignedPostPolicyArgs_ | PresignedPostPolicyArgs Arguments object includes bucket, object names & Post policy of an object. |
-| Return Type | Exceptions |
-|:--- |:--- |
-| ``Task>``: Map of strings to construct form-data. | Listed Exceptions: |
-| | ``InvalidBucketNameException`` : upon invalid bucket name |
-| | ``ConnectionException`` : upon connection error |
-| | ``NoSuchAlgorithmException`` : upon requested algorithm was not found during signature calculation. |
+| Return Type | Exceptions |
+|:-----------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------|
+| ``Task>``: Map of strings to construct form-data. | Listed Exceptions: |
+| | ``InvalidBucketNameException`` : upon invalid bucket name |
+| | ``ConnectionException`` : upon connection error |
+| | ``NoSuchAlgorithmException`` : upon requested algorithm was not found during signature calculation. |
@@ -2839,26 +2775,26 @@ __Example__
```cs
try
{
- PostPolicy policy = new PostPolicy();
- policy.SetContentType("image/png");
- policy.SetUserMetadata("custom", "user");
- DateTime expiration = DateTime.UtcNow;
- policy.SetExpires(expiration.AddDays(10));
- policy.SetKey("my-objectname");
- policy.SetBucket("my-bucketname");
- PresignedPostPolicyArgs args = PresignedPostPolicyArgs()
- .WithBucket("my-bucketname")
- .WithObject("my-objectname")
- .WithPolicy(policy);
+ PostPolicy policy = new PostPolicy();
+ policy.SetContentType("image/png");
+ policy.SetUserMetadata("custom", "user");
+ DateTime expiration = DateTime.UtcNow;
+ policy.SetExpires(expiration.AddDays(10));
+ policy.SetKey("my-objectname");
+ policy.SetBucket("my-bucketname");
+ PresignedPostPolicyArgs args = PresignedPostPolicyArgs()
+ .WithBucket("my-bucketname")
+ .WithObject("my-objectname")
+ .WithPolicy(policy);
- Dictionary formData = minioClient.Api.PresignedPostPolicy(args);
- string curlCommand = "curl ";
- foreach (KeyValuePair pair in formData)
- {
- curlCommand = curlCommand + " -F " + pair.Key + "=" + pair.Value;
- }
- curlCommand = curlCommand + " -F file=@/etc/bashrc https://s3.amazonaws.com/my-bucketname";
- Console.WriteLine(curlCommand);
+ Dictionary formData = minioClient.Api.PresignedPostPolicy(args);
+ string curlCommand = "curl ";
+ foreach (KeyValuePair pair in formData)
+ {
+ curlCommand = curlCommand + " -F " + pair.Key + "=" + pair.Value;
+ }
+ curlCommand = curlCommand + " -F file=@/etc/bashrc https://s3.amazonaws.com/my-bucketname";
+ Console.WriteLine(curlCommand);
}
catch(MinioException e)
{
@@ -2872,10 +2808,10 @@ Adds application details to User-Agent.
__Parameters__
-| Param | Type | Description |
-|---|---|---|
-|`appName` | _string_ | Name of the application performing the API requests |
-| `appVersion`| _string_ | Version of the application performing the API requests |
+| Param | Type | Description |
+|--------------|----------|--------------------------------------------------------|
+| `appName` | _string_ | Name of the application performing the API requests |
+| `appVersion` | _string_ | Version of the application performing the API requests |
__Example__
@@ -2891,9 +2827,9 @@ Enables HTTP tracing. The trace is written to the stdout.
__Parameters__
-| Param | Type | Description |
-|---|---|---|
-|`logger` | _IRequestLogger_ | Implementation of interface `Minio.IRequestLogger` for serialization models for trace HTTP |
+| Param | Type | Description |
+|----------|------------------|--------------------------------------------------------------------------------------------|
+| `logger` | _IRequestLogger_ | Implementation of interface `Minio.IRequestLogger` for serialization models for trace HTTP |
__Example__
@@ -2910,7 +2846,6 @@ minioClient.SetTraceOn(new JsonNetLogger())
### SetTraceOff()
Disables HTTP tracing.
-
__Example__
```cs
// Sets HTTP tracing off.