OCISDK/OCISDK/ObjectStorage/ObjectStorageClientAsync.cs
/// <summary>
/// Performs a partial or full update of a bucket's user-defined metadata.
/// 
/// Use UpdateBucket to move a bucket from one compartment to another within the same tenancy. 
/// Supply the compartmentID of the compartment that you want to move the bucket to. 
/// For more information about moving resources between compartments, see Moving Resources to a Different Compartment.
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
Performs a partial or full update of a bucket's user-defined metadata.

Use UpdateBucket to move a bucket from one compartment to another within the same tenancy.
Supply the compartmentID of the compartment that you want to move the bucket to.
For more information about moving resources between compartments, see Moving Resources to a Different Compartment.
Performs a partial or full update of a bucket ' s user - defined metadata . Use UpdateBucket to move a bucket from one compartment to another within the same tenancy . Supply the compartmentID of the compartment that you want to move the bucket to . For more information about moving resources between compartments see Moving Resources to a Different Compartment .
public async Task<UpdateBucketResponse> UpdateBucket(UpdateBucketRequest request)
        {
            var uri = new Uri(GetEndPointNoneVersion(ObjectStorageServices.Bucket(request.NamespaceName, request.BucketName), this.Region));
            var httpRequestHeaderParam = new HttpRequestHeaderParam()
            {
                IfMatch = request.IfMatch,
                OpcClientRequestId = request.OpcClientRequestId
            };
            using (var webResponse = await this.RestClientAsync.Post(uri, request.UpdateBucketDetails, httpRequestHeaderParam))
            using (var stream = webResponse.GetResponseStream())
            using (var reader = new StreamReader(stream))
            {
                var response = reader.ReadToEnd();
                return new UpdateBucketResponse()
                {
                    Bucket = JsonSerializer.Deserialize<Bucket>(response),
                    ETag = webResponse.Headers.Get("ETag"),
                    OpcRequestId = webResponse.Headers.Get("opc-request-id"),
                    OpcClientRequestId = webResponse.Headers.Get("opc-client-request-id")
                };
            }
        }
public async Task < UpdateBucketResponse > UpdateBucket ( UpdateBucketRequest request ) { var uri = new Uri ( GetEndPointNoneVersion ( ObjectStorageServices . Bucket ( request . NamespaceName , request . BucketName ) , this . Region ) ) ; var httpRequestHeaderParam = new HttpRequestHeaderParam ( ) { IfMatch = request . IfMatch , OpcClientRequestId = request . OpcClientRequestId } ; using ( var webResponse = await this . RestClientAsync . Post ( uri , request . UpdateBucketDetails , httpRequestHeaderParam ) ) using ( var stream = webResponse . GetResponseStream ( ) ) using ( var reader = new StreamReader ( stream ) ) { var response = reader . ReadToEnd ( ) ; return new UpdateBucketResponse ( ) { Bucket = JsonSerializer . Deserialize < Bucket > ( response ) , ETag = webResponse . Headers . Get ( " " ) , OpcRequestId = webResponse . Headers . Get ( " " ) , OpcClientRequestId = webResponse . Headers . Get ( " " ) } ; } }
Performs a partial or full update of a bucket's user-defined metadata.
Performs a partial or full update of a bucket ' s user - defined metadata .
None
request
UpdateBucketRequest
None