blib/lib/Paws/SageMakerA2IRuntime.pm untested

filter: Statementstmt 0.0% 0 / 48 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 12 Podpod 0.0% 0 / 11 totaltotal 0.0% 0 / 75 CC 3 SCAR 14.2
CC
3
Cov
0%
ListAllHumanLoops
12.0
service
2.0
signing_name
2.0
CRAP 4.1
1 package Paws::SageMakerA2IRuntime;
2 use Moose;
3 sub service { 'a2i-runtime.sagemaker' }
4 sub signing_name { 'sagemaker' }
5 sub version { '2019-11-07' }
6 sub flattened_arrays { 0 }
7 has max_attempts => (is => 'ro', isa => 'Int', default => 5);
8 has retry => (is => 'ro', isa => 'HashRef', default => sub {
9 { base => 'rand', type => 'exponential', growth_factor => 2 }
10 });
11 has retriables => (is => 'ro', isa => 'ArrayRef', default => sub { [
12 ] });
13  
14 with 'Paws::API::Caller', 'Paws::API::EndpointResolver', 'Paws::Net::V4Signature', 'Paws::Net::RestJsonCaller';
15  
16
17 sub DeleteHumanLoop {
18 my $self = shift;
19 my $call_object = $self->new_with_coercions('Paws::SageMakerA2IRuntime::DeleteHumanLoop', @_);
20 return $self->caller->do_call($self, $call_object);
21 }
22 sub DescribeHumanLoop {
23 my $self = shift;
24 my $call_object = $self->new_with_coercions('Paws::SageMakerA2IRuntime::DescribeHumanLoop', @_);
25 return $self->caller->do_call($self, $call_object);
26 }
27 sub ListHumanLoops {
28 my $self = shift;
29 my $call_object = $self->new_with_coercions('Paws::SageMakerA2IRuntime::ListHumanLoops', @_);
30 return $self->caller->do_call($self, $call_object);
31 }
32 sub StartHumanLoop {
33 my $self = shift;
34 my $call_object = $self->new_with_coercions('Paws::SageMakerA2IRuntime::StartHumanLoop', @_);
35 return $self->caller->do_call($self, $call_object);
36 }
37 sub StopHumanLoop {
38 my $self = shift;
39 my $call_object = $self->new_with_coercions('Paws::SageMakerA2IRuntime::StopHumanLoop', @_);
40 return $self->caller->do_call($self, $call_object);
41 }
42
43 sub ListAllHumanLoops {
44 my $self = shift;
45  
46 my $callback = shift @_ if (ref($_[0]) eq 'CODE');
47 my $result = $self->ListHumanLoops(@_);
48 my $next_result = $result;
49  
50 if (not defined $callback) {
51 while ($next_result->NextToken) {
52 $next_result = $self->ListHumanLoops(@_, NextToken => $next_result->NextToken);
53 push @{ $result->HumanLoopSummaries }, @{ $next_result->HumanLoopSummaries };
54 }
55 return $result;
56 } else {
57 while ($result->NextToken) {
58 $callback->($_ => 'HumanLoopSummaries') foreach (@{ $result->HumanLoopSummaries });
59 $result = $self->ListHumanLoops(@_, NextToken => $result->NextToken);
60 }
61 $callback->($_ => 'HumanLoopSummaries') foreach (@{ $result->HumanLoopSummaries });
62 }
63  
64 return undef
65 }
66  
67  
68 sub operations { qw/DeleteHumanLoop DescribeHumanLoop ListHumanLoops StartHumanLoop StopHumanLoop / }
69  
70 1;
71  
72 ### main pod documentation begin ###
73  
74 =head1 NAME
75  
76 Paws::SageMakerA2IRuntime - Perl Interface to AWS Amazon Augmented AI Runtime
77  
78 =head1 SYNOPSIS
79  
80 use Paws;
81  
82 my $obj = Paws->service('SageMakerA2IRuntime');
83 my $res = $obj->Method(
84 Arg1 => $val1,
85 Arg2 => [ 'V1', 'V2' ],
86 # if Arg3 is an object, the HashRef will be used as arguments to the constructor
87 # of the arguments type
88 Arg3 => { Att1 => 'Val1' },
89 # if Arg4 is an array of objects, the HashRefs will be passed as arguments to
90 # the constructor of the arguments type
91 Arg4 => [ { Att1 => 'Val1' }, { Att1 => 'Val2' } ],
92 );
93  
94 =head1 DESCRIPTION
95  
96 Amazon Augmented AI (Amazon A2I) adds the benefit of human judgment to
97 any machine learning application. When an AI application can't evaluate
98 data with a high degree of confidence, human reviewers can take over.
99 This human review is called a human review workflow. To create and
100 start a human review workflow, you need three resources: a I<worker
101 task template>, a I<flow definition>, and a I<human loop>.
102  
103 For information about these resources and prerequisites for using
104 Amazon A2I, see Get Started with Amazon Augmented AI
105 (https://docs.aws.amazon.com/sagemaker/latest/dg/a2i-getting-started.html)
106 in the Amazon SageMaker Developer Guide.
107  
108 This API reference includes information about API actions and data
109 types that you can use to interact with Amazon A2I programmatically.
110 Use this guide to:
111  
112 =over
113  
114 =item *
115  
116 Start a human loop with the C<StartHumanLoop> operation when using
117 Amazon A2I with a I<custom task type>. To learn more about the
118 difference between custom and built-in task types, see Use Task Types
119 (https://docs.aws.amazon.com/sagemaker/latest/dg/a2i-task-types-general.html).
120 To learn how to start a human loop using this API, see Create and Start
121 a Human Loop for a Custom Task Type
122 (https://docs.aws.amazon.com/sagemaker/latest/dg/a2i-start-human-loop.html#a2i-instructions-starthumanloop)
123 in the Amazon SageMaker Developer Guide.
124  
125 =item *
126  
127 Manage your human loops. You can list all human loops that you have
128 created, describe individual human loops, and stop and delete human
129 loops. To learn more, see Monitor and Manage Your Human Loop
130 (https://docs.aws.amazon.com/sagemaker/latest/dg/a2i-monitor-humanloop-results.html)
131 in the Amazon SageMaker Developer Guide.
132  
133 =back
134  
135 Amazon A2I integrates APIs from various AWS services to create and
136 start human review workflows for those services. To learn how Amazon
137 A2I uses these APIs, see Use APIs in Amazon A2I
138 (https://docs.aws.amazon.com/sagemaker/latest/dg/a2i-api-references.html)
139 in the Amazon SageMaker Developer Guide.
140  
141 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/a2i-runtime.sagemaker-2019-11-07>
142  
143  
144 =head1 METHODS
145  
146 =head2 DeleteHumanLoop
147  
148 =over
149  
150 =item HumanLoopName => Str
151  
152  
153 =back
154  
155 Each argument is described in detail in: L<Paws::SageMakerA2IRuntime::DeleteHumanLoop>
156  
157 Returns: a L<Paws::SageMakerA2IRuntime::DeleteHumanLoopResponse> instance
158  
159 Deletes the specified human loop for a flow definition.
160  
161 If the human loop was deleted, this operation will return a
162 C<ResourceNotFoundException>.
163  
164  
165 =head2 DescribeHumanLoop
166  
167 =over
168  
169 =item HumanLoopName => Str
170  
171  
172 =back
173  
174 Each argument is described in detail in: L<Paws::SageMakerA2IRuntime::DescribeHumanLoop>
175  
176 Returns: a L<Paws::SageMakerA2IRuntime::DescribeHumanLoopResponse> instance
177  
178 Returns information about the specified human loop. If the human loop
179 was deleted, this operation will return a C<ResourceNotFoundException>
180 error.
181  
182  
183 =head2 ListHumanLoops
184  
185 =over
186  
187 =item FlowDefinitionArn => Str
188  
189 =item [CreationTimeAfter => Str]
190  
191 =item [CreationTimeBefore => Str]
192  
193 =item [MaxResults => Int]
194  
195 =item [NextToken => Str]
196  
197 =item [SortOrder => Str]
198  
199  
200 =back
201  
202 Each argument is described in detail in: L<Paws::SageMakerA2IRuntime::ListHumanLoops>
203  
204 Returns: a L<Paws::SageMakerA2IRuntime::ListHumanLoopsResponse> instance
205  
206 Returns information about human loops, given the specified parameters.
207 If a human loop was deleted, it will not be included.
208  
209  
210 =head2 StartHumanLoop
211  
212 =over
213  
214 =item FlowDefinitionArn => Str
215  
216 =item HumanLoopInput => L<Paws::SageMakerA2IRuntime::HumanLoopInput>
217  
218 =item HumanLoopName => Str
219  
220 =item [DataAttributes => L<Paws::SageMakerA2IRuntime::HumanLoopDataAttributes>]
221  
222  
223 =back
224  
225 Each argument is described in detail in: L<Paws::SageMakerA2IRuntime::StartHumanLoop>
226  
227 Returns: a L<Paws::SageMakerA2IRuntime::StartHumanLoopResponse> instance
228  
229 Starts a human loop, provided that at least one activation condition is
230 met.
231  
232  
233 =head2 StopHumanLoop
234  
235 =over
236  
237 =item HumanLoopName => Str
238  
239  
240 =back
241  
242 Each argument is described in detail in: L<Paws::SageMakerA2IRuntime::StopHumanLoop>
243  
244 Returns: a L<Paws::SageMakerA2IRuntime::StopHumanLoopResponse> instance
245  
246 Stops the specified human loop.
247  
248  
249  
250  
251 =head1 PAGINATORS
252  
253 Paginator methods are helpers that repetively call methods that return partial results
254  
255 =head2 ListAllHumanLoops(sub { },FlowDefinitionArn => Str, [CreationTimeAfter => Str, CreationTimeBefore => Str, MaxResults => Int, NextToken => Str, SortOrder => Str])
256  
257 =head2 ListAllHumanLoops(FlowDefinitionArn => Str, [CreationTimeAfter => Str, CreationTimeBefore => Str, MaxResults => Int, NextToken => Str, SortOrder => Str])
258  
259  
260 If passed a sub as first parameter, it will call the sub for each element found in :
261  
262 - HumanLoopSummaries, passing the object as the first parameter, and the string 'HumanLoopSummaries' as the second parameter
263  
264 If not, it will return a a L<Paws::SageMakerA2IRuntime::ListHumanLoopsResponse> instance with all the C<param>s; from all the responses. Please take into account that this mode can potentially consume vasts ammounts of memory.
265  
266  
267  
268  
269  
270 =head1 SEE ALSO
271  
272 This service class forms part of L<Paws>
273  
274 =head1 BUGS and CONTRIBUTIONS
275  
276 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
277  
278 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
279  
280 =cut
281