create_rule
¶
create_rule(
instance_id: InstanceId,
name: RuleName,
trigger_event_source: RuleTriggerEventSource,
function: RuleFunction,
actions: RuleActions,
publish_status: RulePublishStatus,
*,
config_overrides: Optional[ConnectClientConfig] = None,
pre_evaluation_filters: Optional[PreEvaluationFilters] = None,
client_token: Optional[ClientToken] = None,
tags: Optional[TagMap] = None,
) -> CreateRuleResponse
Creates a rule for the specified Connect Customer instance.
Use the Rules Function language to code conditions for the rule.
Parameters:
-
instance_id(InstanceId) –The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
-
name(RuleName) –A unique name for the rule.
-
trigger_event_source(RuleTriggerEventSource) –The event source to trigger the rule.
-
function(RuleFunction) –The conditions of the rule.
-
actions(RuleActions) –A list of actions to be run when the rule is triggered.
-
publish_status(RulePublishStatus) –The publish status of the rule.
-
pre_evaluation_filters(Optional[PreEvaluationFilters], default:None) –The pre-evaluation filters for the rule, that restrict the rule to be applied to only certain resources based on the resource's attributes, such as tags assigned to a contact. The pre-evaluation filters are applied even before rule conditions are evaluated and are used to enforce tag-based-access-control while applying rules.
-
client_token(Optional[ClientToken], default:None) –A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.
-
tags(Optional[TagMap], default:None) –The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.
Raises:
-
AccessDeniedException–You do not have sufficient permissions to perform this action.
-
InternalServiceException–Request processing failed because of an error or failure with the service.
-
InvalidRequestException–The request is not valid.
-
ResourceConflictException–A resource already has that name.
-
ResourceNotFoundException–The specified resource was not found.
-
ServiceQuotaExceededException–The service quota has been exceeded.
-
ThrottlingException–The throttling limit has been exceeded.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_connect/_services/connect.py
5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 | |