static void GetBucketNotification() { try { GetBucketNotificationRequest request = new GetBucketNotificationRequest { BucketName = bucketName }; GetBucketNotificationReponse response = client.GetBucketNotification(request); if (response.Configuration.TopicConfigurations.Count > 0) { foreach (var topicConfig in response.Configuration.TopicConfigurations) { Console.WriteLine("ID is : {0}", topicConfig.Id); Console.WriteLine("Topic is : {0}", topicConfig.Topic); foreach (var Event in topicConfig.Events) { Console.WriteLine("Event is : {0}", Event); } foreach (var filterRule in topicConfig.FilterRules) { Console.WriteLine("Name is : {0}", filterRule.Name); Console.WriteLine("Value is : {0}", filterRule.Value); } } } Console.WriteLine("Get bucket notification response: {0}", response.StatusCode); } catch (ObsException ex) { Console.WriteLine("Exception errorcode: {0}, when get bucket notification.", ex.ErrorCode); Console.WriteLine("Exception errormessage: {0}", ex.ErrorMessage); } }
public void PutAndGetEventBridgeConfigurationTest() { using (var s3Client = new AmazonS3Client()) { var bucketName = S3TestUtils.CreateBucketWithWait(s3Client); try { var putRequest = new PutBucketNotificationRequest() { BucketName = bucketName, EventBridgeConfiguration = new EventBridgeConfiguration(), SkipDestinationValidation = true }; var putResponse = s3Client.PutBucketNotification(putRequest); Assert.AreEqual(HttpStatusCode.OK, putResponse.HttpStatusCode); var getRequest = new GetBucketNotificationRequest { BucketName = bucketName }; var getResponse = s3Client.GetBucketNotification(getRequest); Assert.IsNotNull(getResponse.EventBridgeConfiguration); } finally { AmazonS3Util.DeleteS3BucketWithObjects(s3Client, bucketName); } } }
public Task <GetBucketNotificationResponse> GetBucketNotificationAsync(GetBucketNotificationRequest request, CancellationToken cancellationToken = default) { throw new NotImplementedException(); }
/// <summary> /// 获取桶的消息通知配置。 /// </summary> /// <param name="request">获取桶消息通知配置的请求参数。</param> /// <returns>获取桶消息通知配置的响应结果。</returns> public GetBucketNotificationReponse GetBucketNotification(GetBucketNotificationRequest request) { return(this.DoRequest <GetBucketNotificationRequest, GetBucketNotificationReponse>(request)); }
public GetBucketNotificationResponse GetBucketNotification(GetBucketNotificationRequest request) { throw new NotImplementedException(); }
/// <summary> /// Start the asynchronous request for obtaining the bucket notification configuration. /// </summary> /// <param name="request">Parameters in a request for obtaining the bucket notification configuration</param> /// <param name="callback">Asynchronous request callback function</param> /// <param name="state">Asynchronous request status object</param> /// <returns>Response to the asynchronous request</returns> public IAsyncResult BeginGetBucketNotification(GetBucketNotificationRequest request, AsyncCallback callback, object state) { return(this.BeginDoRequest <GetBucketNotificationRequest>(request, callback, state)); }
public void GetBucketNotificationAsync(GetBucketNotificationRequest request, AmazonServiceCallback <GetBucketNotificationRequest, GetBucketNotificationResponse> callback, AsyncOptions options = null) { throw new System.NotImplementedException(); }