File Coverage

blib/lib/Paws/CodeCommit.pm
Criterion Covered Total %
statement 3 3 100.0
branch n/a
condition n/a
subroutine 1 1 100.0
pod n/a
total 4 4 100.0


line stmt bran cond sub pod time code
1             package Paws::CodeCommit;
2 1     1   3113 use Moose;
  1         2  
  1         10  
3             sub service { 'codecommit' }
4             sub version { '2015-04-13' }
5             sub target_prefix { 'CodeCommit_20150413' }
6             sub json_version { "1.1" }
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::JsonCaller', 'Paws::Net::JsonResponse';
15              
16            
17             sub BatchGetRepositories {
18             my $self = shift;
19             my $call_object = $self->new_with_coercions('Paws::CodeCommit::BatchGetRepositories', @_);
20             return $self->caller->do_call($self, $call_object);
21             }
22             sub CreateBranch {
23             my $self = shift;
24             my $call_object = $self->new_with_coercions('Paws::CodeCommit::CreateBranch', @_);
25             return $self->caller->do_call($self, $call_object);
26             }
27             sub CreateRepository {
28             my $self = shift;
29             my $call_object = $self->new_with_coercions('Paws::CodeCommit::CreateRepository', @_);
30             return $self->caller->do_call($self, $call_object);
31             }
32             sub DeleteRepository {
33             my $self = shift;
34             my $call_object = $self->new_with_coercions('Paws::CodeCommit::DeleteRepository', @_);
35             return $self->caller->do_call($self, $call_object);
36             }
37             sub GetBlob {
38             my $self = shift;
39             my $call_object = $self->new_with_coercions('Paws::CodeCommit::GetBlob', @_);
40             return $self->caller->do_call($self, $call_object);
41             }
42             sub GetBranch {
43             my $self = shift;
44             my $call_object = $self->new_with_coercions('Paws::CodeCommit::GetBranch', @_);
45             return $self->caller->do_call($self, $call_object);
46             }
47             sub GetCommit {
48             my $self = shift;
49             my $call_object = $self->new_with_coercions('Paws::CodeCommit::GetCommit', @_);
50             return $self->caller->do_call($self, $call_object);
51             }
52             sub GetDifferences {
53             my $self = shift;
54             my $call_object = $self->new_with_coercions('Paws::CodeCommit::GetDifferences', @_);
55             return $self->caller->do_call($self, $call_object);
56             }
57             sub GetRepository {
58             my $self = shift;
59             my $call_object = $self->new_with_coercions('Paws::CodeCommit::GetRepository', @_);
60             return $self->caller->do_call($self, $call_object);
61             }
62             sub GetRepositoryTriggers {
63             my $self = shift;
64             my $call_object = $self->new_with_coercions('Paws::CodeCommit::GetRepositoryTriggers', @_);
65             return $self->caller->do_call($self, $call_object);
66             }
67             sub ListBranches {
68             my $self = shift;
69             my $call_object = $self->new_with_coercions('Paws::CodeCommit::ListBranches', @_);
70             return $self->caller->do_call($self, $call_object);
71             }
72             sub ListRepositories {
73             my $self = shift;
74             my $call_object = $self->new_with_coercions('Paws::CodeCommit::ListRepositories', @_);
75             return $self->caller->do_call($self, $call_object);
76             }
77             sub PutRepositoryTriggers {
78             my $self = shift;
79             my $call_object = $self->new_with_coercions('Paws::CodeCommit::PutRepositoryTriggers', @_);
80             return $self->caller->do_call($self, $call_object);
81             }
82             sub TestRepositoryTriggers {
83             my $self = shift;
84             my $call_object = $self->new_with_coercions('Paws::CodeCommit::TestRepositoryTriggers', @_);
85             return $self->caller->do_call($self, $call_object);
86             }
87             sub UpdateDefaultBranch {
88             my $self = shift;
89             my $call_object = $self->new_with_coercions('Paws::CodeCommit::UpdateDefaultBranch', @_);
90             return $self->caller->do_call($self, $call_object);
91             }
92             sub UpdateRepositoryDescription {
93             my $self = shift;
94             my $call_object = $self->new_with_coercions('Paws::CodeCommit::UpdateRepositoryDescription', @_);
95             return $self->caller->do_call($self, $call_object);
96             }
97             sub UpdateRepositoryName {
98             my $self = shift;
99             my $call_object = $self->new_with_coercions('Paws::CodeCommit::UpdateRepositoryName', @_);
100             return $self->caller->do_call($self, $call_object);
101             }
102            
103             sub ListAllBranches {
104             my $self = shift;
105              
106             my $callback = shift @_ if (ref($_[0]) eq 'CODE');
107             my $result = $self->ListBranches(@_);
108             my $next_result = $result;
109              
110             if (not defined $callback) {
111             while ($next_result->nextToken) {
112             $next_result = $self->ListBranches(@_, nextToken => $next_result->nextToken);
113             push @{ $result->branches }, @{ $next_result->branches };
114             }
115             return $result;
116             } else {
117             while ($result->nextToken) {
118             $callback->($_ => 'branches') foreach (@{ $result->branches });
119             $result = $self->ListBranches(@_, nextToken => $result->nextToken);
120             }
121             $callback->($_ => 'branches') foreach (@{ $result->branches });
122             }
123              
124             return undef
125             }
126             sub ListAllRepositories {
127             my $self = shift;
128              
129             my $callback = shift @_ if (ref($_[0]) eq 'CODE');
130             my $result = $self->ListRepositories(@_);
131             my $next_result = $result;
132              
133             if (not defined $callback) {
134             while ($next_result->nextToken) {
135             $next_result = $self->ListRepositories(@_, nextToken => $next_result->nextToken);
136             push @{ $result->repositories }, @{ $next_result->repositories };
137             }
138             return $result;
139             } else {
140             while ($result->nextToken) {
141             $callback->($_ => 'repositories') foreach (@{ $result->repositories });
142             $result = $self->ListRepositories(@_, nextToken => $result->nextToken);
143             }
144             $callback->($_ => 'repositories') foreach (@{ $result->repositories });
145             }
146              
147             return undef
148             }
149              
150              
151             sub operations { qw/BatchGetRepositories CreateBranch CreateRepository DeleteRepository GetBlob GetBranch GetCommit GetDifferences GetRepository GetRepositoryTriggers ListBranches ListRepositories PutRepositoryTriggers TestRepositoryTriggers UpdateDefaultBranch UpdateRepositoryDescription UpdateRepositoryName / }
152              
153             1;
154              
155             ### main pod documentation begin ###
156              
157             =head1 NAME
158              
159             Paws::CodeCommit - Perl Interface to AWS AWS CodeCommit
160              
161             =head1 SYNOPSIS
162              
163             use Paws;
164              
165             my $obj = Paws->service('CodeCommit');
166             my $res = $obj->Method(
167             Arg1 => $val1,
168             Arg2 => [ 'V1', 'V2' ],
169             # if Arg3 is an object, the HashRef will be used as arguments to the constructor
170             # of the arguments type
171             Arg3 => { Att1 => 'Val1' },
172             # if Arg4 is an array of objects, the HashRefs will be passed as arguments to
173             # the constructor of the arguments type
174             Arg4 => [ { Att1 => 'Val1' }, { Att1 => 'Val2' } ],
175             );
176              
177             =head1 DESCRIPTION
178              
179             AWS CodeCommit
180              
181             This is the I<AWS CodeCommit API Reference>. This reference provides
182             descriptions of the operations and data types for AWS CodeCommit API
183             along with usage examples.
184              
185             You can use the AWS CodeCommit API to work with the following objects:
186              
187             Repositories, by calling the following:
188              
189             =over
190              
191             =item *
192              
193             BatchGetRepositories, which returns information about one or more
194             repositories associated with your AWS account
195              
196             =item *
197              
198             CreateRepository, which creates an AWS CodeCommit repository
199              
200             =item *
201              
202             DeleteRepository, which deletes an AWS CodeCommit repository
203              
204             =item *
205              
206             GetRepository, which returns information about a specified repository
207              
208             =item *
209              
210             ListRepositories, which lists all AWS CodeCommit repositories
211             associated with your AWS account
212              
213             =item *
214              
215             UpdateRepositoryDescription, which sets or updates the description of
216             the repository
217              
218             =item *
219              
220             UpdateRepositoryName, which changes the name of the repository. If you
221             change the name of a repository, no other users of that repository will
222             be able to access it until you send them the new HTTPS or SSH URL to
223             use.
224              
225             =back
226              
227             Branches, by calling the following:
228              
229             =over
230              
231             =item *
232              
233             CreateBranch, which creates a new branch in a specified repository
234              
235             =item *
236              
237             GetBranch, which returns information about a specified branch
238              
239             =item *
240              
241             ListBranches, which lists all branches for a specified repository
242              
243             =item *
244              
245             UpdateDefaultBranch, which changes the default branch for a repository
246              
247             =back
248              
249             Information about committed code in a repository, by calling the
250             following:
251              
252             =over
253              
254             =item *
255              
256             GetBlob, which returns the base-64 encoded content of an individual Git
257             blob object within a repository
258              
259             =item *
260              
261             GetCommit, which returns information about a commit, including commit
262             messages and author and committer information
263              
264             =item *
265              
266             GetDifferences, which returns information about the differences in a
267             valid commit specifier (such as a branch, tag, HEAD, commit ID or other
268             fully qualified reference)
269              
270             =back
271              
272             Triggers, by calling the following:
273              
274             =over
275              
276             =item *
277              
278             GetRepositoryTriggers, which returns information about triggers
279             configured for a repository
280              
281             =item *
282              
283             PutRepositoryTriggers, which replaces all triggers for a repository and
284             can be used to create or delete triggers
285              
286             =item *
287              
288             TestRepositoryTriggers, which tests the functionality of a repository
289             trigger by sending data to the trigger target
290              
291             =back
292              
293             For information about how to use AWS CodeCommit, see the AWS CodeCommit
294             User Guide.
295              
296             =head1 METHODS
297              
298             =head2 BatchGetRepositories(RepositoryNames => ArrayRef[Str|Undef])
299              
300             Each argument is described in detail in: L<Paws::CodeCommit::BatchGetRepositories>
301              
302             Returns: a L<Paws::CodeCommit::BatchGetRepositoriesOutput> instance
303              
304             Returns information about one or more repositories.
305              
306             The description field for a repository accepts all HTML characters and
307             all valid Unicode characters. Applications that do not HTML-encode the
308             description and display it in a web page could expose users to
309             potentially malicious code. Make sure that you HTML-encode the
310             description field in any application that uses this API to display the
311             repository description on a web page.
312              
313              
314             =head2 CreateBranch(BranchName => Str, CommitId => Str, RepositoryName => Str)
315              
316             Each argument is described in detail in: L<Paws::CodeCommit::CreateBranch>
317              
318             Returns: nothing
319              
320             Creates a new branch in a repository and points the branch to a commit.
321              
322             Calling the create branch operation does not set a repository's default
323             branch. To do this, call the update default branch operation.
324              
325              
326             =head2 CreateRepository(RepositoryName => Str, [RepositoryDescription => Str])
327              
328             Each argument is described in detail in: L<Paws::CodeCommit::CreateRepository>
329              
330             Returns: a L<Paws::CodeCommit::CreateRepositoryOutput> instance
331              
332             Creates a new, empty repository.
333              
334              
335             =head2 DeleteRepository(RepositoryName => Str)
336              
337             Each argument is described in detail in: L<Paws::CodeCommit::DeleteRepository>
338              
339             Returns: a L<Paws::CodeCommit::DeleteRepositoryOutput> instance
340              
341             Deletes a repository. If a specified repository was already deleted, a
342             null repository ID will be returned.
343              
344             Deleting a repository also deletes all associated objects and metadata.
345             After a repository is deleted, all future push calls to the deleted
346             repository will fail.
347              
348              
349             =head2 GetBlob(BlobId => Str, RepositoryName => Str)
350              
351             Each argument is described in detail in: L<Paws::CodeCommit::GetBlob>
352              
353             Returns: a L<Paws::CodeCommit::GetBlobOutput> instance
354              
355             Returns the base-64 encoded content of an individual blob within a
356             repository.
357              
358              
359             =head2 GetBranch([BranchName => Str, RepositoryName => Str])
360              
361             Each argument is described in detail in: L<Paws::CodeCommit::GetBranch>
362              
363             Returns: a L<Paws::CodeCommit::GetBranchOutput> instance
364              
365             Returns information about a repository branch, including its name and
366             the last commit ID.
367              
368              
369             =head2 GetCommit(CommitId => Str, RepositoryName => Str)
370              
371             Each argument is described in detail in: L<Paws::CodeCommit::GetCommit>
372              
373             Returns: a L<Paws::CodeCommit::GetCommitOutput> instance
374              
375             Returns information about a commit, including commit message and
376             committer information.
377              
378              
379             =head2 GetDifferences(AfterCommitSpecifier => Str, RepositoryName => Str, [AfterPath => Str, BeforeCommitSpecifier => Str, BeforePath => Str, MaxResults => Int, NextToken => Str])
380              
381             Each argument is described in detail in: L<Paws::CodeCommit::GetDifferences>
382              
383             Returns: a L<Paws::CodeCommit::GetDifferencesOutput> instance
384              
385             Returns information about the differences in a valid commit specifier
386             (such as a branch, tag, HEAD, commit ID or other fully qualified
387             reference). Results can be limited to a specified path.
388              
389              
390             =head2 GetRepository(RepositoryName => Str)
391              
392             Each argument is described in detail in: L<Paws::CodeCommit::GetRepository>
393              
394             Returns: a L<Paws::CodeCommit::GetRepositoryOutput> instance
395              
396             Returns information about a repository.
397              
398             The description field for a repository accepts all HTML characters and
399             all valid Unicode characters. Applications that do not HTML-encode the
400             description and display it in a web page could expose users to
401             potentially malicious code. Make sure that you HTML-encode the
402             description field in any application that uses this API to display the
403             repository description on a web page.
404              
405              
406             =head2 GetRepositoryTriggers(RepositoryName => Str)
407              
408             Each argument is described in detail in: L<Paws::CodeCommit::GetRepositoryTriggers>
409              
410             Returns: a L<Paws::CodeCommit::GetRepositoryTriggersOutput> instance
411              
412             Gets information about triggers configured for a repository.
413              
414              
415             =head2 ListBranches(RepositoryName => Str, [NextToken => Str])
416              
417             Each argument is described in detail in: L<Paws::CodeCommit::ListBranches>
418              
419             Returns: a L<Paws::CodeCommit::ListBranchesOutput> instance
420              
421             Gets information about one or more branches in a repository.
422              
423              
424             =head2 ListRepositories([NextToken => Str, Order => Str, SortBy => Str])
425              
426             Each argument is described in detail in: L<Paws::CodeCommit::ListRepositories>
427              
428             Returns: a L<Paws::CodeCommit::ListRepositoriesOutput> instance
429              
430             Gets information about one or more repositories.
431              
432              
433             =head2 PutRepositoryTriggers(RepositoryName => Str, Triggers => ArrayRef[L<Paws::CodeCommit::RepositoryTrigger>])
434              
435             Each argument is described in detail in: L<Paws::CodeCommit::PutRepositoryTriggers>
436              
437             Returns: a L<Paws::CodeCommit::PutRepositoryTriggersOutput> instance
438              
439             Replaces all triggers for a repository. This can be used to create or
440             delete triggers.
441              
442              
443             =head2 TestRepositoryTriggers(RepositoryName => Str, Triggers => ArrayRef[L<Paws::CodeCommit::RepositoryTrigger>])
444              
445             Each argument is described in detail in: L<Paws::CodeCommit::TestRepositoryTriggers>
446              
447             Returns: a L<Paws::CodeCommit::TestRepositoryTriggersOutput> instance
448              
449             Tests the functionality of repository triggers by sending information
450             to the trigger target. If real data is available in the repository, the
451             test will send data from the last commit. If no data is available,
452             sample data will be generated.
453              
454              
455             =head2 UpdateDefaultBranch(DefaultBranchName => Str, RepositoryName => Str)
456              
457             Each argument is described in detail in: L<Paws::CodeCommit::UpdateDefaultBranch>
458              
459             Returns: nothing
460              
461             Sets or changes the default branch name for the specified repository.
462              
463             If you use this operation to change the default branch name to the
464             current default branch name, a success message is returned even though
465             the default branch did not change.
466              
467              
468             =head2 UpdateRepositoryDescription(RepositoryName => Str, [RepositoryDescription => Str])
469              
470             Each argument is described in detail in: L<Paws::CodeCommit::UpdateRepositoryDescription>
471              
472             Returns: nothing
473              
474             Sets or changes the comment or description for a repository.
475              
476             The description field for a repository accepts all HTML characters and
477             all valid Unicode characters. Applications that do not HTML-encode the
478             description and display it in a web page could expose users to
479             potentially malicious code. Make sure that you HTML-encode the
480             description field in any application that uses this API to display the
481             repository description on a web page.
482              
483              
484             =head2 UpdateRepositoryName(NewName => Str, OldName => Str)
485              
486             Each argument is described in detail in: L<Paws::CodeCommit::UpdateRepositoryName>
487              
488             Returns: nothing
489              
490             Renames a repository. The repository name must be unique across the
491             calling AWS account. In addition, repository names are limited to 100
492             alphanumeric, dash, and underscore characters, and cannot include
493             certain characters. The suffix ".git" is prohibited. For a full
494             description of the limits on repository names, see Limits in the AWS
495             CodeCommit User Guide.
496              
497              
498              
499              
500             =head1 PAGINATORS
501              
502             Paginator methods are helpers that repetively call methods that return partial results
503              
504             =head2 ListAllBranches(sub { },RepositoryName => Str, [NextToken => Str])
505              
506             =head2 ListAllBranches(RepositoryName => Str, [NextToken => Str])
507              
508              
509             If passed a sub as first parameter, it will call the sub for each element found in :
510              
511             - branches, passing the object as the first parameter, and the string 'branches' as the second parameter
512              
513             If not, it will return a a L<Paws::CodeCommit::ListBranchesOutput> 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.
514              
515              
516             =head2 ListAllRepositories(sub { },[NextToken => Str, Order => Str, SortBy => Str])
517              
518             =head2 ListAllRepositories([NextToken => Str, Order => Str, SortBy => Str])
519              
520              
521             If passed a sub as first parameter, it will call the sub for each element found in :
522              
523             - repositories, passing the object as the first parameter, and the string 'repositories' as the second parameter
524              
525             If not, it will return a a L<Paws::CodeCommit::ListRepositoriesOutput> 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.
526              
527              
528              
529              
530              
531             =head1 SEE ALSO
532              
533             This service class forms part of L<Paws>
534              
535             =head1 BUGS and CONTRIBUTIONS
536              
537             The source code is located here: https://github.com/pplu/aws-sdk-perl
538              
539             Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues
540              
541             =cut
542