Skip to content

Latest commit

 

History

History
318 lines (196 loc) · 11.6 KB

s3_bucket_notification.md

File metadata and controls

318 lines (196 loc) · 11.6 KB
permalink
/s3_bucket_notification/

s3_bucket_notification

s3_bucket_notification represents the aws_s3_bucket_notification Terraform resource.

This package contains functions and utilities for setting up the resource using Jsonnet code.

Index

Fields

fn new

new()

aws.s3_bucket_notification.new injects a new aws_s3_bucket_notification Terraform resource block into the root module document.

Additionally, this inserts a private function into the _ref attribute that generates references to attributes of the resource. For example, if you added a new instance to the root using:

# arguments omitted for brevity
aws.s3_bucket_notification.new('some_id')

You can get the reference to the id field of the created aws.s3_bucket_notification using the reference:

$._ref.aws_s3_bucket_notification.some_id.get('id')

This is the same as directly entering "${ aws_s3_bucket_notification.some_id.id }" as the value.

NOTE: if you are chaining multiple resources together in a merge operation, you may not be able to use super, self, or $ to refer to the root object. Instead, make an explicit outer object using local.

Args:

  • resourceLabel (string): The name label of the block.
  • bucket (string): Set the bucket field on the resulting resource block.
  • eventbridge (bool): Set the eventbridge field on the resulting resource block. When null, the eventbridge field will be omitted from the resulting object.
  • lambda_function (list[obj]): Set the lambda_function field on the resulting resource block. When null, the lambda_function sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the aws.s3_bucket_notification.lambda_function.new constructor.
  • queue (list[obj]): Set the queue field on the resulting resource block. When null, the queue sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the aws.s3_bucket_notification.queue.new constructor.
  • topic (list[obj]): Set the topic field on the resulting resource block. When null, the topic sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the aws.s3_bucket_notification.topic.new constructor.

Returns:

  • A mixin object that injects the new resource into the root Terraform configuration.

fn newAttrs

newAttrs()

aws.s3_bucket_notification.newAttrs constructs a new object with attributes and blocks configured for the s3_bucket_notification Terraform resource.

Unlike aws.s3_bucket_notification.new, this function will not inject the resource block into the root Terraform document. Instead, this must be passed in as the attrs argument for the tf.withResource function to build a complete block.

This is most useful when you need to preprocess the attributes with functions, conditional, or looping logic prior to injecting into a complete block.

Args:

  • bucket (string): Set the bucket field on the resulting object.
  • eventbridge (bool): Set the eventbridge field on the resulting object. When null, the eventbridge field will be omitted from the resulting object.
  • lambda_function (list[obj]): Set the lambda_function field on the resulting object. When null, the lambda_function sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the aws.s3_bucket_notification.lambda_function.new constructor.
  • queue (list[obj]): Set the queue field on the resulting object. When null, the queue sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the aws.s3_bucket_notification.queue.new constructor.
  • topic (list[obj]): Set the topic field on the resulting object. When null, the topic sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the aws.s3_bucket_notification.topic.new constructor.

Returns:

  • An attribute object that can be used with tf.withResource to construct a new s3_bucket_notification resource into the root Terraform configuration.

fn withBucket

withBucket()

aws.string.withBucket constructs a mixin object that can be merged into the string Terraform resource block to set or update the bucket field.

Args:

  • resourceLabel (string): The name label of the block to update.
  • value (string): The value to set for the bucket field.

fn withEventbridge

withEventbridge()

aws.bool.withEventbridge constructs a mixin object that can be merged into the bool Terraform resource block to set or update the eventbridge field.

Args:

  • resourceLabel (string): The name label of the block to update.
  • value (bool): The value to set for the eventbridge field.

fn withLambdaFunction

withLambdaFunction()

aws.list[obj].withLambdaFunction constructs a mixin object that can be merged into the list[obj] Terraform resource block to set or update the lambda_function field.

This function will replace the array with the passed in value. If you wish to instead append the passed in value to the existing array, use the aws.list[obj].withLambdaFunctionMixin function.

Args:

  • resourceLabel (string): The name label of the block to update.
  • value (list[obj]): The value to set for the lambda_function field.

fn withLambdaFunctionMixin

withLambdaFunctionMixin()

aws.list[obj].withLambdaFunctionMixin constructs a mixin object that can be merged into the list[obj] Terraform resource block to set or update the lambda_function field.

This function will append the passed in array or object to the existing array. If you wish to instead replace the array with the passed in value, use the aws.list[obj].withLambdaFunction function.

Args:

  • resourceLabel (string): The name label of the block to update.
  • value (list[obj]): The value to set for the lambda_function field.

fn withQueue

withQueue()

aws.list[obj].withQueue constructs a mixin object that can be merged into the list[obj] Terraform resource block to set or update the queue field.

This function will replace the array with the passed in value. If you wish to instead append the passed in value to the existing array, use the aws.list[obj].withQueueMixin function.

Args:

  • resourceLabel (string): The name label of the block to update.
  • value (list[obj]): The value to set for the queue field.

fn withQueueMixin

withQueueMixin()

aws.list[obj].withQueueMixin constructs a mixin object that can be merged into the list[obj] Terraform resource block to set or update the queue field.

This function will append the passed in array or object to the existing array. If you wish to instead replace the array with the passed in value, use the aws.list[obj].withQueue function.

Args:

  • resourceLabel (string): The name label of the block to update.
  • value (list[obj]): The value to set for the queue field.

fn withTopic

withTopic()

aws.list[obj].withTopic constructs a mixin object that can be merged into the list[obj] Terraform resource block to set or update the topic field.

This function will replace the array with the passed in value. If you wish to instead append the passed in value to the existing array, use the aws.list[obj].withTopicMixin function.

Args:

  • resourceLabel (string): The name label of the block to update.
  • value (list[obj]): The value to set for the topic field.

fn withTopicMixin

withTopicMixin()

aws.list[obj].withTopicMixin constructs a mixin object that can be merged into the list[obj] Terraform resource block to set or update the topic field.

This function will append the passed in array or object to the existing array. If you wish to instead replace the array with the passed in value, use the aws.list[obj].withTopic function.

Args:

  • resourceLabel (string): The name label of the block to update.
  • value (list[obj]): The value to set for the topic field.

obj lambda_function

fn lambda_function.new

new()

aws.s3_bucket_notification.lambda_function.new constructs a new object with attributes and blocks configured for the lambda_function Terraform sub block.

Args:

  • events (list): Set the events field on the resulting object.
  • filter_prefix (string): Set the filter_prefix field on the resulting object. When null, the filter_prefix field will be omitted from the resulting object.
  • filter_suffix (string): Set the filter_suffix field on the resulting object. When null, the filter_suffix field will be omitted from the resulting object.
  • lambda_function_arn (string): Set the lambda_function_arn field on the resulting object. When null, the lambda_function_arn field will be omitted from the resulting object.

Returns:

  • An attribute object that represents the lambda_function sub block.

obj queue

fn queue.new

new()

aws.s3_bucket_notification.queue.new constructs a new object with attributes and blocks configured for the queue Terraform sub block.

Args:

  • events (list): Set the events field on the resulting object.
  • filter_prefix (string): Set the filter_prefix field on the resulting object. When null, the filter_prefix field will be omitted from the resulting object.
  • filter_suffix (string): Set the filter_suffix field on the resulting object. When null, the filter_suffix field will be omitted from the resulting object.
  • queue_arn (string): Set the queue_arn field on the resulting object.

Returns:

  • An attribute object that represents the queue sub block.

obj topic

fn topic.new

new()

aws.s3_bucket_notification.topic.new constructs a new object with attributes and blocks configured for the topic Terraform sub block.

Args:

  • events (list): Set the events field on the resulting object.
  • filter_prefix (string): Set the filter_prefix field on the resulting object. When null, the filter_prefix field will be omitted from the resulting object.
  • filter_suffix (string): Set the filter_suffix field on the resulting object. When null, the filter_suffix field will be omitted from the resulting object.
  • topic_arn (string): Set the topic_arn field on the resulting object.

Returns:

  • An attribute object that represents the topic sub block.