class_docstr: Contains helper methods for managing EventBridge rules for a feature processor.
class_docstr_tok: ["Contains","helper","methods","for","managing","EventBridge","rules","for","a","feature","processor","."]
docstr: Creates an EventBridge Rule for a given target pipeline.
  
  Args:
      source_pipeline_events: The list of pipeline events that trigger the EventBridge Rule.
      target_pipeline: The name of the pipeline that is triggered by the EventBridge Rule.
      event_pattern: The EventBridge EventPattern that triggers the EventBridge Rule.
          If specified, will override source_pipeline_events.
      state: Indicates whether the rule is enabled or disabled.
  
  Returns:
      The Amazon Resource Name (ARN) of the rule.
docstr_tok: ["Creates","an","EventBridge","Rule","for","a","given","target","pipeline",".","Args",":","source_pipeline_events",":","The","list","of","pipeline","events","that","trigger","the","EventBridge","Rule",".","target_pipeline",":","The","name","of","the","pipeline","that","is","triggered","by","the","EventBridge","Rule",".","event_pattern",":","The","EventBridge","EventPattern","that","triggers","the","EventBridge","Rule",".","If","specified",",","will","override","source_pipeline_events",".","state",":","Indicates","whether","the","rule","is","enabled","or","disabled",".","Returns",":","The","Amazon","Resource","Name","(","ARN",")","of","the","rule","."]
code: def put_rule(
      self,
      source_pipeline_events: List[FeatureProcessorPipelineEvents],
      target_pipeline: str,
      event_pattern: str,
      state: str,
  ) -> str:
      """Creates an EventBridge Rule for a given target pipeline.
  
      Args:
          source_pipeline_events: The list of pipeline events that trigger the EventBridge Rule.
          target_pipeline: The name of the pipeline that is triggered by the EventBridge Rule.
          event_pattern: The EventBridge EventPattern that triggers the EventBridge Rule.
              If specified, will override source_pipeline_events.
          state: Indicates whether the rule is enabled or disabled.
  
      Returns:
          The Amazon Resource Name (ARN) of the rule.
      """
      self._validate_feature_processor_pipeline_events(
          source_pipeline_events
      )
      rule_name = target_pipeline
      _event_patterns = (
          event_pattern
          or self._generate_event_pattern_from_feature_processor_pipeline_events(
              source_pipeline_events
          )
      )
      rule_arn = self.event_bridge_rule_client.put_rule(
          Name=rule_name, EventPattern=_event_patterns, State=state
      )["RuleArn"]
      return rule_arn
  
imports: from __future__ import absolute_import
  import json
  import logging
  import re
  from typing import Dict, List, Tuple, Optional, Any
  import attr
  from botocore.exceptions import ClientError
  from botocore.paginate import PageIterator
  from sagemaker import Session
  from sagemaker.feature_store.feature_processor._feature_processor_pipeline_events import FeatureProcessorPipelineEvents
  from sagemaker.feature_store.feature_processor._constants import RESOURCE_NOT_FOUND_EXCEPTION, PIPELINE_ARN_REGEX_PATTERN, BASE_EVENT_PATTERN
  from sagemaker.feature_store.feature_processor._enums import FeatureProcessorPipelineExecutionStatus
  from sagemaker.utils import TagsDict
label_desc: Use image node_id 1 for calling the EventBridgeRuleHelper obj's underlying member method code with example usage: obj.put_rule(source_pipeline_events, target_pipeline, event_pattern, state) and returns: rule_arn