create_rule
async
¶
create_rule(
instance_id: InstanceId,
name: RuleName,
trigger_event_source: RuleTriggerEventSource,
function: RuleFunction,
actions: RuleActions,
publish_status: RulePublishStatus,
*,
config_overrides: Optional[AsyncConnectClientConfig] = 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/async_connect.py
5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 | |