SdkvoiceSipRule

class SdkvoiceSipRule : KotlinCustomResource

A SIP rule associates your SIP media application with a phone number or a Request URI hostname. You can associate a SIP rule with more than one SIP media application. Each application then runs only that rule.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.chime.SdkvoiceSipRule("example", {
name: "example-sip-rule",
triggerType: "RequestUriHostname",
triggerValue: example_voice_connector.outboundHostName,
targetApplications: [{
priority: 1,
sipMediaApplicationId: example_sma.id,
awsRegion: "us-east-1",
}],
});
import pulumi
import pulumi_aws as aws
example = aws.chime.SdkvoiceSipRule("example",
name="example-sip-rule",
trigger_type="RequestUriHostname",
trigger_value=example_voice_connector["outboundHostName"],
target_applications=[{
"priority": 1,
"sip_media_application_id": example_sma["id"],
"aws_region": "us-east-1",
}])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Chime.SdkvoiceSipRule("example", new()
{
Name = "example-sip-rule",
TriggerType = "RequestUriHostname",
TriggerValue = example_voice_connector.OutboundHostName,
TargetApplications = new[]
{
new Aws.Chime.Inputs.SdkvoiceSipRuleTargetApplicationArgs
{
Priority = 1,
SipMediaApplicationId = example_sma.Id,
AwsRegion = "us-east-1",
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/chime"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := chime.NewSdkvoiceSipRule(ctx, "example", &chime.SdkvoiceSipRuleArgs{
Name: pulumi.String("example-sip-rule"),
TriggerType: pulumi.String("RequestUriHostname"),
TriggerValue: pulumi.Any(example_voice_connector.OutboundHostName),
TargetApplications: chime.SdkvoiceSipRuleTargetApplicationArray{
&chime.SdkvoiceSipRuleTargetApplicationArgs{
Priority: pulumi.Int(1),
SipMediaApplicationId: pulumi.Any(example_sma.Id),
AwsRegion: pulumi.String("us-east-1"),
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.chime.SdkvoiceSipRule;
import com.pulumi.aws.chime.SdkvoiceSipRuleArgs;
import com.pulumi.aws.chime.inputs.SdkvoiceSipRuleTargetApplicationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new SdkvoiceSipRule("example", SdkvoiceSipRuleArgs.builder()
.name("example-sip-rule")
.triggerType("RequestUriHostname")
.triggerValue(example_voice_connector.outboundHostName())
.targetApplications(SdkvoiceSipRuleTargetApplicationArgs.builder()
.priority(1)
.sipMediaApplicationId(example_sma.id())
.awsRegion("us-east-1")
.build())
.build());
}
}
resources:
example:
type: aws:chime:SdkvoiceSipRule
properties:
name: example-sip-rule
triggerType: RequestUriHostname
triggerValue: ${["example-voice-connector"].outboundHostName}
targetApplications:
- priority: 1
sipMediaApplicationId: ${["example-sma"].id}
awsRegion: us-east-1

Import

Using pulumi import, import a ChimeSDKVoice SIP Rule using the id. For example:

$ pulumi import aws:chime/sdkvoiceSipRule:SdkvoiceSipRule example abcdef123456

Properties

Link copied to clipboard
val disabled: Output<Boolean>?

Enables or disables a rule. You must disable rules before you can delete them.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<String>

The name of the SIP rule.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

List of SIP media applications with priority and AWS Region. Only one SIP application per AWS Region can be used. See target_applications.

Link copied to clipboard
val triggerType: Output<String>

The type of trigger assigned to the SIP rule in trigger_value. Valid values are RequestUriHostname or ToPhoneNumber.

Link copied to clipboard
val triggerValue: Output<String>

If trigger_type is RequestUriHostname, the value can be the outbound host name of an Amazon Chime Voice Connector. If trigger_type is ToPhoneNumber, the value can be a customer-owned phone number in the E164 format. The Sip Media Application specified in the Sip Rule is triggered if the request URI in an incoming SIP request matches the RequestUriHostname, or if the "To" header in the incoming SIP request matches the ToPhoneNumber value. The following arguments are optional:

Link copied to clipboard
val urn: Output<String>