blib/lib/Paws/LookoutMetrics/CreateAlert.pm untested

filter: Statementstmt 0.0% 0 / 16 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 18 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::LookoutMetrics::CreateAlert;
3 use Moose;
4 has Action => (is => 'ro', isa => 'Paws::LookoutMetrics::Action', required => 1);
5 has AlertDescription => (is => 'ro', isa => 'Str');
6 has AlertName => (is => 'ro', isa => 'Str', required => 1);
7 has AlertSensitivityThreshold => (is => 'ro', isa => 'Int', required => 1);
8 has AnomalyDetectorArn => (is => 'ro', isa => 'Str', required => 1);
9 has Tags => (is => 'ro', isa => 'Paws::LookoutMetrics::TagMap');
10  
11 use MooseX::ClassAttribute;
12  
13 class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateAlert');
14 class_has _api_uri => (isa => 'Str', is => 'ro', default => '/CreateAlert');
15 class_has _api_method => (isa => 'Str', is => 'ro', default => 'POST');
16 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::LookoutMetrics::CreateAlertResponse');
17 1;
18  
19 ### main pod documentation begin ###
20  
21 =head1 NAME
22  
23 Paws::LookoutMetrics::CreateAlert - Arguments for method CreateAlert on L<Paws::LookoutMetrics>
24  
25 =head1 DESCRIPTION
26  
27 This class represents the parameters used for calling the method CreateAlert on the
28 L<Amazon Lookout for Metrics|Paws::LookoutMetrics> service. Use the attributes of this class
29 as arguments to method CreateAlert.
30  
31 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateAlert.
32  
33 =head1 SYNOPSIS
34  
35 my $lookoutmetrics = Paws->service('LookoutMetrics');
36 my $CreateAlertResponse = $lookoutmetrics->CreateAlert(
37 Action => {
38 LambdaConfiguration => {
39 LambdaArn => 'MyArn', # max: 256
40 RoleArn => 'MyArn', # max: 256
41  
42 }, # OPTIONAL
43 SNSConfiguration => {
44 RoleArn => 'MyArn', # max: 256
45 SnsTopicArn => 'MyArn', # max: 256
46  
47 }, # OPTIONAL
48 },
49 AlertName => 'MyAlertName',
50 AlertSensitivityThreshold => 1,
51 AnomalyDetectorArn => 'MyArn',
52 AlertDescription => 'MyAlertDescription', # OPTIONAL
53 Tags => {
54 'MyTagKey' => 'MyTagValue', # key: min: 1, max: 128, value: max: 256
55 }, # OPTIONAL
56 );
57  
58 # Results:
59 my $AlertArn = $CreateAlertResponse->AlertArn;
60  
61 # Returns a L<Paws::LookoutMetrics::CreateAlertResponse> object.
62  
63 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.
64 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/lookoutmetrics/CreateAlert>
65  
66 =head1 ATTRIBUTES
67  
68  
69 =head2 B<REQUIRED> Action => L<Paws::LookoutMetrics::Action>
70  
71 Action that will be triggered when there is an alert.
72  
73  
74  
75 =head2 AlertDescription => Str
76  
77 A description of the alert.
78  
79  
80  
81 =head2 B<REQUIRED> AlertName => Str
82  
83 The name of the alert.
84  
85  
86  
87 =head2 B<REQUIRED> AlertSensitivityThreshold => Int
88  
89 An integer from 0 to 100 specifying the alert sensitivity threshold.
90  
91  
92  
93 =head2 B<REQUIRED> AnomalyDetectorArn => Str
94  
95 The ARN of the detector to which the alert is attached.
96  
97  
98  
99 =head2 Tags => L<Paws::LookoutMetrics::TagMap>
100  
101 A list of tags
102 (https://docs.aws.amazon.com/lookoutmetrics/latest/dev/detectors-tags.html)
103 to apply to the alert.
104  
105  
106  
107  
108 =head1 SEE ALSO
109  
110 This class forms part of L<Paws>, documenting arguments for method CreateAlert in L<Paws::LookoutMetrics>
111  
112 =head1 BUGS and CONTRIBUTIONS
113  
114 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
115  
116 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
117  
118 =cut
119