blib/lib/Paws/Chime/CreateSipRule.pm untested

filter: Statementstmt 0.0% 0 / 15 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 17 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::Chime::CreateSipRule;
3 use Moose;
4 has Disabled => (is => 'ro', isa => 'Bool');
5 has Name => (is => 'ro', isa => 'Str', required => 1);
6 has TargetApplications => (is => 'ro', isa => 'ArrayRef[Paws::Chime::SipRuleTargetApplication]', required => 1);
7 has TriggerType => (is => 'ro', isa => 'Str', required => 1);
8 has TriggerValue => (is => 'ro', isa => 'Str', required => 1);
9  
10 use MooseX::ClassAttribute;
11  
12 class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateSipRule');
13 class_has _api_uri => (isa => 'Str', is => 'ro', default => '/sip-rules');
14 class_has _api_method => (isa => 'Str', is => 'ro', default => 'POST');
15 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::Chime::CreateSipRuleResponse');
16 1;
17  
18 ### main pod documentation begin ###
19  
20 =head1 NAME
21  
22 Paws::Chime::CreateSipRule - Arguments for method CreateSipRule on L<Paws::Chime>
23  
24 =head1 DESCRIPTION
25  
26 This class represents the parameters used for calling the method CreateSipRule on the
27 L<Amazon Chime|Paws::Chime> service. Use the attributes of this class
28 as arguments to method CreateSipRule.
29  
30 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateSipRule.
31  
32 =head1 SYNOPSIS
33  
34 my $chime = Paws->service('Chime');
35 my $CreateSipRuleResponse = $chime->CreateSipRule(
36 Name => 'MySipRuleName',
37 TargetApplications => [
38 {
39 AwsRegion => 'MyString', # OPTIONAL
40 Priority => 1, # min: 1; OPTIONAL
41 SipMediaApplicationId => 'MyNonEmptyString', # OPTIONAL
42 },
43 ...
44 ],
45 TriggerType => 'ToPhoneNumber',
46 TriggerValue => 'MyNonEmptyString',
47 Disabled => 1, # OPTIONAL
48 );
49  
50 # Results:
51 my $SipRule = $CreateSipRuleResponse->SipRule;
52  
53 # Returns a L<Paws::Chime::CreateSipRuleResponse> object.
54  
55 Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object.
56 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/chime/CreateSipRule>
57  
58 =head1 ATTRIBUTES
59  
60  
61 =head2 Disabled => Bool
62  
63 Enables or disables a rule. You must disable rules before you can
64 delete them.
65  
66  
67  
68 =head2 B<REQUIRED> Name => Str
69  
70 The name of the SIP rule.
71  
72  
73  
74 =head2 B<REQUIRED> TargetApplications => ArrayRef[L<Paws::Chime::SipRuleTargetApplication>]
75  
76 List of SIP media applications with priority and AWS Region. Only one
77 SIP application per AWS Region can be used.
78  
79  
80  
81 =head2 B<REQUIRED> TriggerType => Str
82  
83 The type of trigger assigned to the SIP rule in C<TriggerValue>,
84 currently C<RequestUriHostname> or C<ToPhoneNumber>.
85  
86 Valid values are: C<"ToPhoneNumber">, C<"RequestUriHostname">
87  
88 =head2 B<REQUIRED> TriggerValue => Str
89  
90 If C<TriggerType> is C<RequestUriHostname>, the value can be the
91 outbound host name of an Amazon Chime Voice Connector. If
92 C<TriggerType> is C<ToPhoneNumber>, the value can be a customer-owned
93 phone number in the E164 format. The C<SipMediaApplication> specified
94 in the C<SipRule> is triggered if the request URI in an incoming SIP
95 request matches the C<RequestUriHostname>, or if the C<To> header in
96 the incoming SIP request matches the C<ToPhoneNumber> value.
97  
98  
99  
100  
101 =head1 SEE ALSO
102  
103 This class forms part of L<Paws>, documenting arguments for method CreateSipRule in L<Paws::Chime>
104  
105 =head1 BUGS and CONTRIBUTIONS
106  
107 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
108  
109 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
110  
111 =cut
112