Class EventPattern.Builder

java.lang.Object
software.amazon.awscdk.services.events.EventPattern.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<EventPattern>
Enclosing interface:
EventPattern

@Stability(Stable) public static final class EventPattern.Builder extends Object implements software.amazon.jsii.Builder<EventPattern>
A builder for EventPattern
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • account

      @Stability(Stable) public EventPattern.Builder account(List<String> account)
      Sets the value of EventPattern.getAccount()
      Parameters:
      account - The 12-digit number identifying an AWS account.
      Returns:
      this
    • detail

      @Stability(Stable) public EventPattern.Builder detail(Map<String,? extends Object> detail)
      Sets the value of EventPattern.getDetail()
      Parameters:
      detail - A JSON object, whose content is at the discretion of the service originating the event.
      Returns:
      this
    • detailType

      @Stability(Stable) public EventPattern.Builder detailType(List<String> detailType)
      Parameters:
      detailType - Identifies, in combination with the source field, the fields and values that appear in the detail field. Represents the "detail-type" event field.
      Returns:
      this
    • id

      @Stability(Stable) public EventPattern.Builder id(List<String> id)
      Sets the value of EventPattern.getId()
      Parameters:
      id - A unique value is generated for every event. This can be helpful in tracing events as they move through rules to targets, and are processed.
      Returns:
      this
    • region

      @Stability(Stable) public EventPattern.Builder region(List<String> region)
      Sets the value of EventPattern.getRegion()
      Parameters:
      region - Identifies the AWS region where the event originated.
      Returns:
      this
    • resources

      @Stability(Stable) public EventPattern.Builder resources(List<String> resources)
      Sets the value of EventPattern.getResources()
      Parameters:
      resources - This JSON array contains ARNs that identify resources that are involved in the event. Inclusion of these ARNs is at the discretion of the service.

      For example, Amazon EC2 instance state-changes include Amazon EC2 instance ARNs, Auto Scaling events include ARNs for both instances and Auto Scaling groups, but API calls with AWS CloudTrail do not include resource ARNs.

      Returns:
      this
    • source

      @Stability(Stable) public EventPattern.Builder source(List<String> source)
      Sets the value of EventPattern.getSource()
      Parameters:
      source - Identifies the service that sourced the event. All events sourced from within AWS begin with "aws." Customer-generated events can have any value here, as long as it doesn't begin with "aws." We recommend the use of Java package-name style reverse domain-name strings.

      To find the correct value for source for an AWS service, see the table in AWS Service Namespaces. For example, the source value for Amazon CloudFront is aws.cloudfront.

      Returns:
      this
    • time

      @Stability(Stable) public EventPattern.Builder time(List<String> time)
      Sets the value of EventPattern.getTime()
      Parameters:
      time - The event timestamp, which can be specified by the service originating the event. If the event spans a time interval, the service might choose to report the start time, so this value can be noticeably before the time the event is actually received.
      Returns:
      this
    • version

      @Stability(Stable) public EventPattern.Builder version(List<String> version)
      Sets the value of EventPattern.getVersion()
      Parameters:
      version - By default, this is set to 0 (zero) in all events.
      Returns:
      this
    • build

      @Stability(Stable) public EventPattern build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<EventPattern>
      Returns:
      a new instance of EventPattern
      Throws:
      NullPointerException - if any required attribute was not provided