blib/lib/Paws/MarketplaceMetering/MeterUsage.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::MarketplaceMetering::MeterUsage;
3 use Moose;
4 has DryRun => (is => 'ro', isa => 'Bool');
5 has ProductCode => (is => 'ro', isa => 'Str', required => 1);
6 has Timestamp => (is => 'ro', isa => 'Str', required => 1);
7 has UsageAllocations => (is => 'ro', isa => 'ArrayRef[Paws::MarketplaceMetering::UsageAllocation]');
8 has UsageDimension => (is => 'ro', isa => 'Str', required => 1);
9 has UsageQuantity => (is => 'ro', isa => 'Int');
10  
11 use MooseX::ClassAttribute;
12  
13 class_has _api_call => (isa => 'Str', is => 'ro', default => 'MeterUsage');
14 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::MarketplaceMetering::MeterUsageResult');
15 class_has _result_key => (isa => 'Str', is => 'ro');
16 1;
17  
18 ### main pod documentation begin ###
19  
20 =head1 NAME
21  
22 Paws::MarketplaceMetering::MeterUsage - Arguments for method MeterUsage on L<Paws::MarketplaceMetering>
23  
24 =head1 DESCRIPTION
25  
26 This class represents the parameters used for calling the method MeterUsage on the
27 L<AWSMarketplace Metering|Paws::MarketplaceMetering> service. Use the attributes of this class
28 as arguments to method MeterUsage.
29  
30 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to MeterUsage.
31  
32 =head1 SYNOPSIS
33  
34 my $metering.marketplace = Paws->service('MarketplaceMetering');
35 my $MeterUsageResult = $metering . marketplace->MeterUsage(
36 ProductCode => 'MyProductCode',
37 Timestamp => '1970-01-01T01:00:00',
38 UsageDimension => 'MyUsageDimension',
39 DryRun => 1, # OPTIONAL
40 UsageAllocations => [
41 {
42 AllocatedUsageQuantity => 1, # max: 2147483647
43 Tags => [
44 {
45 Key => 'MyTagKey', # min: 1, max: 100
46 Value => 'MyTagValue', # min: 1, max: 256
47  
48 },
49 ...
50 ], # min: 1, max: 5; OPTIONAL
51 },
52 ...
53 ], # OPTIONAL
54 UsageQuantity => 1, # OPTIONAL
55 );
56  
57 # Results:
58 my $MeteringRecordId = $MeterUsageResult->MeteringRecordId;
59  
60 # Returns a L<Paws::MarketplaceMetering::MeterUsageResult> object.
61  
62 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.
63 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/metering.marketplace/MeterUsage>
64  
65 =head1 ATTRIBUTES
66  
67  
68 =head2 DryRun => Bool
69  
70 Checks whether you have the permissions required for the action, but
71 does not make the request. If you have the permissions, the request
72 returns DryRunOperation; otherwise, it returns UnauthorizedException.
73 Defaults to C<false> if not specified.
74  
75  
76  
77 =head2 B<REQUIRED> ProductCode => Str
78  
79 Product code is used to uniquely identify a product in AWS Marketplace.
80 The product code should be the same as the one used during the
81 publishing of a new product.
82  
83  
84  
85 =head2 B<REQUIRED> Timestamp => Str
86  
87 Timestamp, in UTC, for which the usage is being reported. Your
88 application can meter usage for up to one hour in the past. Make sure
89 the timestamp value is not before the start of the software usage.
90  
91  
92  
93 =head2 UsageAllocations => ArrayRef[L<Paws::MarketplaceMetering::UsageAllocation>]
94  
95 The set of UsageAllocations to submit.
96  
97 The sum of all UsageAllocation quantities must equal the UsageQuantity
98 of the MeterUsage request, and each UsageAllocation must have a unique
99 set of tags (include no tags).
100  
101  
102  
103 =head2 B<REQUIRED> UsageDimension => Str
104  
105 It will be one of the fcp dimension name provided during the publishing
106 of the product.
107  
108  
109  
110 =head2 UsageQuantity => Int
111  
112 Consumption value for the hour. Defaults to C<0> if not specified.
113  
114  
115  
116  
117 =head1 SEE ALSO
118  
119 This class forms part of L<Paws>, documenting arguments for method MeterUsage in L<Paws::MarketplaceMetering>
120  
121 =head1 BUGS and CONTRIBUTIONS
122  
123 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
124  
125 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
126  
127 =cut
128