blib/lib/Paws/IoT/CreateSecurityProfile.pm untested

filter: Statementstmt 0.0% 0 / 24 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 26 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::IoT::CreateSecurityProfile;
3 use Moose;
4 has AdditionalMetricsToRetain => (is => 'ro', isa => 'ArrayRef[Str|Undef]', traits => ['NameInRequest'], request_name => 'additionalMetricsToRetain');
5 has AdditionalMetricsToRetainV2 => (is => 'ro', isa => 'ArrayRef[Paws::IoT::MetricToRetain]', traits => ['NameInRequest'], request_name => 'additionalMetricsToRetainV2');
6 has AlertTargets => (is => 'ro', isa => 'Paws::IoT::AlertTargets', traits => ['NameInRequest'], request_name => 'alertTargets');
7 has Behaviors => (is => 'ro', isa => 'ArrayRef[Paws::IoT::Behavior]', traits => ['NameInRequest'], request_name => 'behaviors');
8 has SecurityProfileDescription => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'securityProfileDescription');
9 has SecurityProfileName => (is => 'ro', isa => 'Str', traits => ['ParamInURI'], uri_name => 'securityProfileName', required => 1);
10 has Tags => (is => 'ro', isa => 'ArrayRef[Paws::IoT::Tag]', traits => ['NameInRequest'], request_name => 'tags');
11  
12 use MooseX::ClassAttribute;
13  
14 class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateSecurityProfile');
15 class_has _api_uri => (isa => 'Str', is => 'ro', default => '/security-profiles/{securityProfileName}');
16 class_has _api_method => (isa => 'Str', is => 'ro', default => 'POST');
17 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::IoT::CreateSecurityProfileResponse');
18 1;
19  
20 ### main pod documentation begin ###
21  
22 =head1 NAME
23  
24 Paws::IoT::CreateSecurityProfile - Arguments for method CreateSecurityProfile on L<Paws::IoT>
25  
26 =head1 DESCRIPTION
27  
28 This class represents the parameters used for calling the method CreateSecurityProfile on the
29 L<AWS IoT|Paws::IoT> service. Use the attributes of this class
30 as arguments to method CreateSecurityProfile.
31  
32 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateSecurityProfile.
33  
34 =head1 SYNOPSIS
35  
36 my $iot = Paws->service('IoT');
37 my $CreateSecurityProfileResponse = $iot->CreateSecurityProfile(
38 SecurityProfileName => 'MySecurityProfileName',
39 AdditionalMetricsToRetain => [ 'MyBehaviorMetric', ... ], # OPTIONAL
40 AdditionalMetricsToRetainV2 => [
41 {
42 Metric => 'MyBehaviorMetric',
43 MetricDimension => {
44 DimensionName => 'MyDimensionName', # min: 1, max: 128
45 Operator => 'IN', # values: IN, NOT_IN; OPTIONAL
46 }, # OPTIONAL
47 },
48 ...
49 ], # OPTIONAL
50 AlertTargets => {
51 'SNS' => {
52 AlertTargetArn => 'MyAlertTargetArn',
53 RoleArn => 'MyRoleArn', # min: 20, max: 2048
54  
55 }, # key: values: SNS
56 }, # OPTIONAL
57 Behaviors => [
58 {
59 Name => 'MyBehaviorName', # min: 1, max: 128
60 Criteria => {
61 ComparisonOperator => 'less-than'
62 , # values: less-than, less-than-equals, greater-than, greater-than-equals, in-cidr-set, not-in-cidr-set, in-port-set, not-in-port-set, in-set, not-in-set; OPTIONAL
63 ConsecutiveDatapointsToAlarm => 1, # min: 1, max: 10; OPTIONAL
64 ConsecutiveDatapointsToClear => 1, # min: 1, max: 10; OPTIONAL
65 DurationSeconds => 1, # OPTIONAL
66 MlDetectionConfig => {
67 ConfidenceLevel => 'LOW', # values: LOW, MEDIUM, HIGH
68  
69 }, # OPTIONAL
70 StatisticalThreshold => {
71 Statistic => 'MyEvaluationStatistic', # OPTIONAL
72 }, # OPTIONAL
73 Value => {
74 Cidrs => [
75 'MyCidr', ... # min: 2, max: 43
76 ], # OPTIONAL
77 Count => 1, # OPTIONAL
78 Number => 1, # OPTIONAL
79 Numbers => [
80 1, ... # OPTIONAL
81 ], # OPTIONAL
82 Ports => [
83 1, ... # max: 65535
84 ], # OPTIONAL
85 Strings => [ 'MystringValue', ... ], # OPTIONAL
86 }, # OPTIONAL
87 }, # OPTIONAL
88 Metric => 'MyBehaviorMetric',
89 MetricDimension => {
90 DimensionName => 'MyDimensionName', # min: 1, max: 128
91 Operator => 'IN', # values: IN, NOT_IN; OPTIONAL
92 }, # OPTIONAL
93 SuppressAlerts => 1, # OPTIONAL
94 },
95 ...
96 ], # OPTIONAL
97 SecurityProfileDescription => 'MySecurityProfileDescription', # OPTIONAL
98 Tags => [
99 {
100 Key => 'MyTagKey', # min: 1, max: 128
101 Value => 'MyTagValue', # min: 1, max: 256; OPTIONAL
102 },
103 ...
104 ], # OPTIONAL
105 );
106  
107 # Results:
108 my $SecurityProfileArn = $CreateSecurityProfileResponse->SecurityProfileArn;
109 my $SecurityProfileName =
110 $CreateSecurityProfileResponse->SecurityProfileName;
111  
112 # Returns a L<Paws::IoT::CreateSecurityProfileResponse> object.
113  
114 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.
115 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/iot/CreateSecurityProfile>
116  
117 =head1 ATTRIBUTES
118  
119  
120 =head2 AdditionalMetricsToRetain => ArrayRef[Str|Undef]
121  
122 I<Please use CreateSecurityProfileRequest$additionalMetricsToRetainV2
123 instead.>
124  
125 A list of metrics whose data is retained (stored). By default, data is
126 retained for any metric used in the profile's C<behaviors>, but it is
127 also retained for any metric specified here. Can be used with custom
128 metrics; cannot be used with dimensions.
129  
130  
131  
132 =head2 AdditionalMetricsToRetainV2 => ArrayRef[L<Paws::IoT::MetricToRetain>]
133  
134 A list of metrics whose data is retained (stored). By default, data is
135 retained for any metric used in the profile's C<behaviors>, but it is
136 also retained for any metric specified here. Can be used with custom
137 metrics; cannot be used with dimensions.
138  
139  
140  
141 =head2 AlertTargets => L<Paws::IoT::AlertTargets>
142  
143 Specifies the destinations to which alerts are sent. (Alerts are always
144 sent to the console.) Alerts are generated when a device (thing)
145 violates a behavior.
146  
147  
148  
149 =head2 Behaviors => ArrayRef[L<Paws::IoT::Behavior>]
150  
151 Specifies the behaviors that, when violated by a device (thing), cause
152 an alert.
153  
154  
155  
156 =head2 SecurityProfileDescription => Str
157  
158 A description of the security profile.
159  
160  
161  
162 =head2 B<REQUIRED> SecurityProfileName => Str
163  
164 The name you are giving to the security profile.
165  
166  
167  
168 =head2 Tags => ArrayRef[L<Paws::IoT::Tag>]
169  
170 Metadata that can be used to manage the security profile.
171  
172  
173  
174  
175 =head1 SEE ALSO
176  
177 This class forms part of L<Paws>, documenting arguments for method CreateSecurityProfile in L<Paws::IoT>
178  
179 =head1 BUGS and CONTRIBUTIONS
180  
181 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
182  
183 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
184  
185 =cut
186