Tabnine Logo
BucketNotificationConfiguration
Code IndexAdd Tabnine to your IDE (free)

How to use
BucketNotificationConfiguration
in
com.amazonaws.services.s3.model

Best Java code snippets using com.amazonaws.services.s3.model.BucketNotificationConfiguration (Showing top 20 results out of 315)

origin: aws/aws-sdk-java

BucketNotificationConfiguration config = new BucketNotificationConfiguration();
      Entry<String, NotificationConfiguration> entry = TopicConfigurationStaxUnmarshaller.getInstance()
          .unmarshall(context);
      config.addConfiguration(entry.getKey(), entry.getValue());
    } else if (context.testExpression("QueueConfiguration", targetDepth)) {
      Entry<String, NotificationConfiguration> entry = QueueConfigurationStaxUnmarshaller.getInstance()
          .unmarshall(context);
      config.addConfiguration(entry.getKey(), entry.getValue());
    } else if (context.testExpression("CloudFunctionConfiguration", targetDepth)) {
      Entry<String, NotificationConfiguration> entry = LambdaConfigurationStaxUnmarshaller.getInstance()
          .unmarshall(context);
      config.addConfiguration(entry.getKey(), entry.getValue());
origin: aws/aws-sdk-java

@Override
public String toString() {
  return Jackson.toJsonString(this.getConfigurations());
}
origin: aws/aws-sdk-java

/**
 * <p>
 * Sets the {@link BucketNotificationConfiguration.TopicConfiguration}
 * <code>TopicConfigurations</code> and returns this object,
 * enabling additional method calls to be chained together.
 * </p>
 * <p>
 * Calling this method will overwrite any
 * previously set <code>TopicConfigurations</code> for this object.
 * </p>
 *
 * @param topicConfigurations
 *            A set of topic configurations.
 *
 * @return The updated {@link BucketNotificationConfiguration} object,
 *            enabling additional method calls to be chained together.
 *
 * @deprecated
 * @see BucketNotificationConfiguration#withNotificationConfiguration(Map)
 */
public BucketNotificationConfiguration withTopicConfigurations( TopicConfiguration... topicConfigurations ) {
  setTopicConfigurations(Arrays.asList(topicConfigurations));
  return this;
}
origin: aws/aws-sdk-java

/**
 * <p>
 * Creates a new bucket notification configuration with the given configuration.
 * </p>
 *
 * @param name the name for the configuration
 * @param notificationConfiguration the notification configuration for the Amazon S3 bucket.
 */
public BucketNotificationConfiguration(String name,
    NotificationConfiguration notificationConfiguration) {
  this.configurations = new HashMap<String, NotificationConfiguration>();
  addConfiguration(name, notificationConfiguration);
}
origin: aws-amplify/aws-sdk-android

@Test
public void unmarshall_ValidTopicConfiguration() throws Exception {
  final BucketNotificationConfiguration config = unmarshaller.unmarshall(getResource(TOPIC_INPUT));
  final TopicConfiguration topicConfig = (TopicConfiguration) config.getConfigurationByName("TopicConfigId");
  assertEquals("some-topic-arn", topicConfig.getTopicARN());
  assertEventsUnmarshalledCorrectly(topicConfig.getEvents());
  assertFilterRulesUnmarshalledCorrectly(topicConfig.getFilter().getS3KeyFilter().getFilterRules());
}
origin: aws/aws-sdk-java

/**
 * <p>
 * Creates a new bucket notification configuration containing the specified
 * <code>TopicConfigurations</code>.
 * </p>
 * <p>
 * Passing the new configuration directly to
 * {@link AmazonS3#setBucketNotificationConfiguration(String,BucketNotificationConfiguration)}
 * will set the bucket's notification configuration and overwrite any existing configuration.
 * </p>
 * @deprecated
 * @see BucketNotificationConfiguration#BucketNotificationConfiguration(String, NotificationConfiguration)
 */
public BucketNotificationConfiguration( Collection<TopicConfiguration> topicConfigurations ) {
  this.configurations = new HashMap<String, NotificationConfiguration>();
  if (topicConfigurations != null){
    for(TopicConfiguration config : topicConfigurations) {
      addConfiguration(UUID.randomUUID().toString(), config);
    }
  }
}
origin: aws-amplify/aws-sdk-android

@Test
public void unmarshall_ValidQueueConfiguration() throws Exception {
  final BucketNotificationConfiguration config = unmarshaller.unmarshall(getResource(QUEUE_INPUT));
  final QueueConfiguration queueConfig = (QueueConfiguration) config.getConfigurationByName("QueueConfigId");
  assertEquals("some-queue-arn", queueConfig.getQueueARN());
  assertEventsUnmarshalledCorrectly(queueConfig.getEvents());
  assertFilterRulesUnmarshalledCorrectly(queueConfig.getFilter().getS3KeyFilter().getFilterRules());
}
origin: aws-amplify/aws-sdk-android

final BucketNotificationConfiguration config = new BucketNotificationConfiguration();
      final Entry<String, NotificationConfiguration> entry = TopicConfigurationStaxUnmarshaller.getInstance()
          .unmarshall(context);
      config.addConfiguration(entry.getKey(), entry.getValue());
    } else if (context.testExpression("QueueConfiguration", targetDepth)) {
      final Entry<String, NotificationConfiguration> entry = QueueConfigurationStaxUnmarshaller.getInstance()
          .unmarshall(context);
      config.addConfiguration(entry.getKey(), entry.getValue());
    } else if (context.testExpression("CloudFunctionConfiguration", targetDepth)) {
      final Entry<String, NotificationConfiguration> entry = LambdaConfigurationStaxUnmarshaller.getInstance()
          .unmarshall(context);
      config.addConfiguration(entry.getKey(), entry.getValue());
origin: aws/aws-sdk-java

/**
 * <p>
 * Sets the {@link BucketNotificationConfiguration.TopicConfiguration}.
 * </p>
 * <p>
 * Calling this method will overwrite any
 * previously set <code>TopicConfigurations</code> for this object.
 * </p>
 *
 * @param topicConfigurations
 *            A collection of topic configurations.
 *
 * @deprecated
 * @see BucketNotificationConfiguration#setConfigurations(Map)
 */
public void setTopicConfigurations( Collection<TopicConfiguration> topicConfigurations ) {
  this.configurations.clear();
  if (topicConfigurations != null) {
    for (TopicConfiguration topicConfiguration : topicConfigurations) {
      addConfiguration(UUID.randomUUID().toString(),
          topicConfiguration);
    }
  }
}
origin: aws-amplify/aws-sdk-android

@Override
public String toString() {
  return new Gson().toJson(this.getConfigurations());
}
origin: aws-amplify/aws-sdk-android

/**
 * <p>
 * Sets the {@link BucketNotificationConfiguration.TopicConfiguration}
 * <code>TopicConfigurations</code> and returns this object, enabling
 * additional method calls to be chained together.
 * </p>
 * <p>
 * Calling this method will overwrite any previously set
 * <code>TopicConfigurations</code> for this object.
 * </p>
 *
 * @param topicConfigurations A set of topic configurations.
 * @return The updated {@link BucketNotificationConfiguration} object,
 *         enabling additional method calls to be chained together.
 * @deprecated
 * @see BucketNotificationConfiguration#withNotificationConfiguration(Map)
 */
@Deprecated
public BucketNotificationConfiguration withTopicConfigurations(
    TopicConfiguration... topicConfigurations) {
  setTopicConfigurations(Arrays.asList(topicConfigurations));
  return this;
}
origin: aws-amplify/aws-sdk-android

@Test
public void unmarshall_ValidLambdaConfiguration() throws Exception {
  final BucketNotificationConfiguration config = unmarshaller.unmarshall(getResource(LAMBDA_INPUT));
  final LambdaConfiguration lambdaConfig = (LambdaConfiguration) config.getConfigurationByName("LambdaConfigId");
  assertEquals("some-lambda-function-arn", lambdaConfig.getFunctionARN());
  assertEventsUnmarshalledCorrectly(lambdaConfig.getEvents());
  assertFilterRulesUnmarshalledCorrectly(lambdaConfig.getFilter().getS3KeyFilter().getFilterRules());
}
origin: Nextdoor/bender

BucketNotificationConfiguration config = new BucketNotificationConfiguration();
      Entry<String, NotificationConfiguration> entry = TopicConfigurationStaxUnmarshaller.getInstance()
          .unmarshall(context);
      config.addConfiguration(entry.getKey(), entry.getValue());
    } else if (context.testExpression("QueueConfiguration", targetDepth)) {
      Entry<String, NotificationConfiguration> entry = QueueConfigurationStaxUnmarshaller.getInstance()
          .unmarshall(context);
      config.addConfiguration(entry.getKey(), entry.getValue());
    } else if (context.testExpression("CloudFunctionConfiguration", targetDepth)) {
      Entry<String, NotificationConfiguration> entry = LambdaConfigurationStaxUnmarshaller.getInstance()
          .unmarshall(context);
      config.addConfiguration(entry.getKey(), entry.getValue());
origin: aws-amplify/aws-sdk-android

/**
 * <p>
 * Creates a new bucket notification configuration with the given
 * configuration.
 * </p>
 *
 * @param name the name for the configuration
 * @param notificationConfiguration the notification configuration for the
 *            Amazon S3 bucket.
 */
public BucketNotificationConfiguration(String name,
    NotificationConfiguration notificationConfiguration) {
  this.configurations = new HashMap<String, NotificationConfiguration>();
  addConfiguration(name, notificationConfiguration);
}
origin: aws/aws-sdk-java

xml.start("NotificationConfiguration", "xmlns", Constants.XML_NAMESPACE);
Map<String, NotificationConfiguration> configurations = notificationConfiguration
    .getConfigurations();
origin: Nextdoor/bender

/**
 * <p>
 * Sets the {@link BucketNotificationConfiguration.TopicConfiguration}
 * <code>TopicConfigurations</code> and returns this object,
 * enabling additional method calls to be chained together.
 * </p>
 * <p>
 * Calling this method will overwrite any
 * previously set <code>TopicConfigurations</code> for this object.
 * </p>
 *
 * @param topicConfigurations
 *            A set of topic configurations.
 *
 * @return The updated {@link BucketNotificationConfiguration} object,
 *            enabling additional method calls to be chained together.
 *
 * @deprecated
 * @see BucketNotificationConfiguration#withNotificationConfiguration(Map)
 */
public BucketNotificationConfiguration withTopicConfigurations( TopicConfiguration... topicConfigurations ) {
  setTopicConfigurations(Arrays.asList(topicConfigurations));
  return this;
}
origin: aws-amplify/aws-sdk-android

/**
 * If CloudFunctionConfiguration has the InvocationRole attribute it should be unmarshalled into
 * a {@link CloudFunctionConfiguration}
 */
@Test
public void unmarshall_ValidCloudFunctionConfiguration() throws Exception {
  final BucketNotificationConfiguration config = unmarshaller.unmarshall(getResource(CLOUD_FUNCTION_INPUT));
  final CloudFunctionConfiguration cloudFunctionConfig = (CloudFunctionConfiguration) config
      .getConfigurationByName("CloudFunctionConfigId");
  assertEquals("some-cloud-function-arn", cloudFunctionConfig.getCloudFunctionARN());
  assertEquals("some-cloud-invoc-role", cloudFunctionConfig.getInvocationRoleARN());
  assertEventsUnmarshalledCorrectly(cloudFunctionConfig.getEvents());
  assertFilterRulesUnmarshalledCorrectly(cloudFunctionConfig.getFilter().getS3KeyFilter().getFilterRules());
}
origin: com.amazonaws/aws-android-sdk-s3

final BucketNotificationConfiguration config = new BucketNotificationConfiguration();
      final Entry<String, NotificationConfiguration> entry = TopicConfigurationStaxUnmarshaller.getInstance()
          .unmarshall(context);
      config.addConfiguration(entry.getKey(), entry.getValue());
    } else if (context.testExpression("QueueConfiguration", targetDepth)) {
      final Entry<String, NotificationConfiguration> entry = QueueConfigurationStaxUnmarshaller.getInstance()
          .unmarshall(context);
      config.addConfiguration(entry.getKey(), entry.getValue());
    } else if (context.testExpression("CloudFunctionConfiguration", targetDepth)) {
      final Entry<String, NotificationConfiguration> entry = LambdaConfigurationStaxUnmarshaller.getInstance()
          .unmarshall(context);
      config.addConfiguration(entry.getKey(), entry.getValue());
origin: aws-amplify/aws-sdk-android

/**
 * <p>
 * Sets the {@link BucketNotificationConfiguration.TopicConfiguration}.
 * </p>
 * <p>
 * Calling this method will overwrite any previously set
 * <code>TopicConfigurations</code> for this object.
 * </p>
 *
 * @param topicConfigurations A collection of topic configurations.
 * @deprecated
 * @see BucketNotificationConfiguration#setConfigurations(Map)
 */
@Deprecated
public void setTopicConfigurations(Collection<TopicConfiguration> topicConfigurations) {
  this.configurations.clear();
  if (topicConfigurations != null) {
    for (final TopicConfiguration topicConfiguration : topicConfigurations) {
      addConfiguration(UUID.randomUUID().toString(),
          topicConfiguration);
    }
  }
}
origin: com.amazonaws/aws-android-sdk-s3

@Override
public String toString() {
  return new Gson().toJson(this.getConfigurations());
}
com.amazonaws.services.s3.modelBucketNotificationConfiguration

Javadoc

Represents a bucket's notification configuration. The notification configuration is used to control reception of notifications for specific events for Amazon S3 buckets.

Using SNS as the delivery service, the notification configuration of an Amazon S3 bucket provides near real-time notifications of events the user is interested in. Notification is turned on by enabling configuration on a bucket, specifying the events and the SNS topic. This configuration can only be turned on by the bucket owner.

If a notification configuration already exists for the specified bucket, the new notification configuration will replace the existing notification configuration. To remove a notification configuration, pass an an empty configuration directly to AmazonS3#setBucketNotificationConfiguration(String,BucketNotificationConfiguration).

Note: Currently buckets may only have a single event and topic configuration.

Most used methods

  • <init>
    Creates a new bucket notification configuration containing the specified TopicConfigurations. Pas
  • addConfiguration
    Adds the given notification configuration to the BucketNotificationConfiguration object
  • getConfigurations
    Returns all the notification configurations associated with the Amazon S3 bucket.
  • setTopicConfigurations
    Sets the BucketNotificationConfiguration.TopicConfiguration. Calling this method will overwrite a
  • getConfigurationByName
    Returns the notification configuration for the given name.

Popular in Java

  • Reading from database using SQL prepared statement
  • getExternalFilesDir (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • setScale (BigDecimal)
  • Kernel (java.awt.image)
  • Socket (java.net)
    Provides a client-side TCP socket.
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now