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

filter: Statementstmt 0.0% 0 / 20 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 22 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::IoT::CreateCustomMetric;
3 use Moose;
4 has ClientRequestToken => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'clientRequestToken', required => 1);
5 has DisplayName => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'displayName');
6 has MetricName => (is => 'ro', isa => 'Str', traits => ['ParamInURI'], uri_name => 'metricName', required => 1);
7 has MetricType => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'metricType', required => 1);
8 has Tags => (is => 'ro', isa => 'ArrayRef[Paws::IoT::Tag]', traits => ['NameInRequest'], request_name => 'tags');
9  
10 use MooseX::ClassAttribute;
11  
12 class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateCustomMetric');
13 class_has _api_uri => (isa => 'Str', is => 'ro', default => '/custom-metric/{metricName}');
14 class_has _api_method => (isa => 'Str', is => 'ro', default => 'POST');
15 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::IoT::CreateCustomMetricResponse');
16 1;
17  
18 ### main pod documentation begin ###
19  
20 =head1 NAME
21  
22 Paws::IoT::CreateCustomMetric - Arguments for method CreateCustomMetric on L<Paws::IoT>
23  
24 =head1 DESCRIPTION
25  
26 This class represents the parameters used for calling the method CreateCustomMetric on the
27 L<AWS IoT|Paws::IoT> service. Use the attributes of this class
28 as arguments to method CreateCustomMetric.
29  
30 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateCustomMetric.
31  
32 =head1 SYNOPSIS
33  
34 my $iot = Paws->service('IoT');
35 my $CreateCustomMetricResponse = $iot->CreateCustomMetric(
36 ClientRequestToken => 'MyClientRequestToken',
37 MetricName => 'MyMetricName',
38 MetricType => 'string-list',
39 DisplayName => 'MyCustomMetricDisplayName', # OPTIONAL
40 Tags => [
41 {
42 Key => 'MyTagKey', # min: 1, max: 128
43 Value => 'MyTagValue', # min: 1, max: 256; OPTIONAL
44 },
45 ...
46 ], # OPTIONAL
47 );
48  
49 # Results:
50 my $MetricArn = $CreateCustomMetricResponse->MetricArn;
51 my $MetricName = $CreateCustomMetricResponse->MetricName;
52  
53 # Returns a L<Paws::IoT::CreateCustomMetricResponse> 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/iot/CreateCustomMetric>
57  
58 =head1 ATTRIBUTES
59  
60  
61 =head2 B<REQUIRED> ClientRequestToken => Str
62  
63 Each custom metric must have a unique client request token. If you try
64 to create a new custom metric that already exists with a different
65 token, an exception occurs. If you omit this value, AWS SDKs will
66 automatically generate a unique client request.
67  
68  
69  
70 =head2 DisplayName => Str
71  
72 Field represents a friendly name in the console for the custom metric;
73 it doesn't have to be unique. Don't use this name as the metric
74 identifier in the device metric report. Can be updated once defined.
75  
76  
77  
78 =head2 B<REQUIRED> MetricName => Str
79  
80 The name of the custom metric. This will be used in the metric report
81 submitted from the device/thing. Shouldn't begin with C<aws:>. Cannot
82 be updated once defined.
83  
84  
85  
86 =head2 B<REQUIRED> MetricType => Str
87  
88 The type of the custom metric. Types include C<string-list>,
89 C<ip-address-list>, C<number-list>, and C<number>.
90  
91 Valid values are: C<"string-list">, C<"ip-address-list">, C<"number-list">, C<"number">
92  
93 =head2 Tags => ArrayRef[L<Paws::IoT::Tag>]
94  
95 Metadata that can be used to manage the custom metric.
96  
97  
98  
99  
100 =head1 SEE ALSO
101  
102 This class forms part of L<Paws>, documenting arguments for method CreateCustomMetric in L<Paws::IoT>
103  
104 =head1 BUGS and CONTRIBUTIONS
105  
106 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
107  
108 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
109  
110 =cut
111