Skip to main content

sip_rules

Creates, updates, deletes, gets or lists a sip_rules resource.

Overview

Namesip_rules
TypeResource
Idaws.chime_sdk_voice.sip_rules

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
created_timestampstring (date-time)The time at which the SIP rule was created, in ISO 8601 format.
disabledbooleanIndicates whether the SIP rule is enabled or disabled. You must disable a rule before you can delete it.
namestringA SIP rule's name. (pattern: <code>[a-zA-Z0-9 _.-]+</code>)
sip_rule_idstringA SIP rule's ID. (pattern: <code>.\S.</code>)
target_applicationsarrayThe target SIP media application and other details, such as priority and AWS Region, to be specified in the SIP rule. Only one SIP rule per AWS Region can be provided.
trigger_typestringThe type of trigger set for a SIP rule, either a phone number or a URI request host name. (ToPhoneNumber, RequestUriHostname)
trigger_valuestringThe value set for a SIP rule's trigger type. Either a phone number or a URI hostname. (pattern: <code>.\S.</code>)
updated_timestampstring (date-time)The time at which the SIP rule was updated, in ISO 8601 format.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_sip_ruleselectsip_rule_id, regionRetrieves the details of a SIP rule, such as the rule ID, name, triggers, and target endpoints.
list_sip_rulesselectregionsip-media-application, max-results, next-tokenLists the SIP rules under the administrator's AWS account.
create_sip_ruleinsertregion, TriggerType, TriggerValue, TargetApplicationsCreates a SIP rule, which can be used to run a SIP media application as a target for a specific trigger type. For more information about SIP rules, see Managing SIP media applications and rules in the Amazon Chime SDK Administrator Guide.
update_sip_ruleupdatesip_rule_id, regionUpdates the details of the specified SIP rule.
delete_sip_ruledeletesip_rule_id, regionDeletes a SIP rule.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)
sip_rule_idstringThe SIP rule ID.
max-resultsintegerThe maximum number of results to return in a single call. Defaults to 100.
next-tokenstringThe token used to return the next page of results.
sip-media-applicationstringThe SIP media application ID.

SELECT examples

Retrieves the details of a SIP rule, such as the rule ID, name, triggers, and target endpoints.

SELECT
created_timestamp,
disabled,
name,
sip_rule_id,
target_applications,
trigger_type,
trigger_value,
updated_timestamp
FROM aws.chime_sdk_voice.sip_rules
WHERE sip_rule_id = '{{ sip_rule_id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a SIP rule, which can be used to run a SIP media application as a target for a specific trigger type. For more information about SIP rules, see Managing SIP media applications and rules in the Amazon Chime SDK Administrator Guide.

INSERT INTO aws.chime_sdk_voice.sip_rules (
Name,
TriggerType,
TriggerValue,
Disabled,
TargetApplications,
region
)
SELECT
'{{ Name }}',
'{{ TriggerType }}' /* required */,
'{{ TriggerValue }}' /* required */,
{{ Disabled }},
'{{ TargetApplications }}' /* required */,
'{{ region }}'
RETURNING
sip_rule
;

UPDATE examples

Updates the details of the specified SIP rule.

UPDATE aws.chime_sdk_voice.sip_rules
SET
Name = '{{ Name }}',
Disabled = {{ Disabled }},
TargetApplications = '{{ TargetApplications }}'
WHERE
sip_rule_id = '{{ sip_rule_id }}' --required
AND region = '{{ region }}' --required
RETURNING
sip_rule;

DELETE examples

Deletes a SIP rule.

DELETE FROM aws.chime_sdk_voice.sip_rules
WHERE sip_rule_id = '{{ sip_rule_id }}' --required
AND region = '{{ region }}' --required
;