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: Attach target pipeline to an event based trigger.
  
  Args:
      rule_name: The name of the EventBridge Rule.
      target_pipeline: The name of the pipeline that is triggered by the EventBridge Rule.
      target_pipeline_parameters: The list of parameters to start execution of a pipeline.
      role_arn: The Amazon Resource Name (ARN) of the IAM role associated with the rule.
docstr_tok: ["Attach","target","pipeline","to","an","event","based","trigger",".","Args",":","rule_name",":","The","name","of","the","EventBridge","Rule",".","target_pipeline",":","The","name","of","the","pipeline","that","is","triggered","by","the","EventBridge","Rule",".","target_pipeline_parameters",":","The","list","of","parameters","to","start","execution","of","a","pipeline",".","role_arn",":","The","Amazon","Resource","Name","(","ARN",")","of","the","IAM","role","associated","with","the","rule","."]
code: def put_target(
      self,
      rule_name: str,
      target_pipeline: str,
      target_pipeline_parameters: Dict[str, str],
      role_arn: str,
  ) -> None:
      """Attach target pipeline to an event based trigger.
  
      Args:
          rule_name: The name of the EventBridge Rule.
          target_pipeline: The name of the pipeline that is triggered by the EventBridge Rule.
          target_pipeline_parameters: The list of parameters to start execution of a pipeline.
          role_arn: The Amazon Resource Name (ARN) of the IAM role associated with the rule.
      """
      target_pipeline_arn_and_name = (
          self._generate_pipeline_arn_and_name(target_pipeline)
      )
      target_pipeline_name = target_pipeline_arn_and_name[
          "pipeline_name"
      ]
      target_pipeline_arn = target_pipeline_arn_and_name["pipeline_arn"]
      target_request_dict = {
          "Id": target_pipeline_name,
          "Arn": target_pipeline_arn,
          "RoleArn": role_arn,
      }
      if target_pipeline_parameters:
          target_request_dict["SageMakerPipelineParameters"] = {
              "PipelineParameterList": target_pipeline_parameters
          }
      put_targets_response = self.event_bridge_rule_client.put_targets(
          Rule=rule_name,
          Targets=[target_request_dict],
      )
      if put_targets_response["FailedEntryCount"] != 0:
          error_msg = put_targets_response["FailedEntries"][0][
              "ErrorMessage"
          ]
          raise Exception(
              f"Failed to add target pipeline to rule. Failure reason: {error_msg}"
          )
  
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 2 for calling the EventBridgeRuleHelper obj's underlying member method code with example usage: obj.put_target(rule_name, target_pipeline, target_pipeline_parameters, role_arn) without return types