| 1 | package Paws::Prometheus; | ||
| 2 | use Moose; | ||
| 3 | sub service { 'aps' } | ||
| 4 | sub signing_name { 'aps' } | ||
| 5 | sub version { '2020-08-01' } | ||
| 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 CreateWorkspace { | ||
| 18 | my $self = shift; | ||
| 19 | my $call_object = $self->new_with_coercions('Paws::Prometheus::CreateWorkspace', @_); | ||
| 20 | return $self->caller->do_call($self, $call_object); | ||
| 21 | } | ||
| 22 | sub DeleteWorkspace { | ||
| 23 | my $self = shift; | ||
| 24 | my $call_object = $self->new_with_coercions('Paws::Prometheus::DeleteWorkspace', @_); | ||
| 25 | return $self->caller->do_call($self, $call_object); | ||
| 26 | } | ||
| 27 | sub DescribeWorkspace { | ||
| 28 | my $self = shift; | ||
| 29 | my $call_object = $self->new_with_coercions('Paws::Prometheus::DescribeWorkspace', @_); | ||
| 30 | return $self->caller->do_call($self, $call_object); | ||
| 31 | } | ||
| 32 | sub ListWorkspaces { | ||
| 33 | my $self = shift; | ||
| 34 | my $call_object = $self->new_with_coercions('Paws::Prometheus::ListWorkspaces', @_); | ||
| 35 | return $self->caller->do_call($self, $call_object); | ||
| 36 | } | ||
| 37 | sub UpdateWorkspaceAlias { | ||
| 38 | my $self = shift; | ||
| 39 | my $call_object = $self->new_with_coercions('Paws::Prometheus::UpdateWorkspaceAlias', @_); | ||
| 40 | return $self->caller->do_call($self, $call_object); | ||
| 41 | } | ||
| 42 | |||
| 43 | sub ListAllWorkspaces { | ||
| 44 | my $self = shift; | ||
| 45 | |||
| 46 | my $callback = shift @_ if (ref($_[0]) eq 'CODE'); | ||
| 47 | my $result = $self->ListWorkspaces(@_); | ||
| 48 | my $next_result = $result; | ||
| 49 | |||
| 50 | if (not defined $callback) { | ||
| 51 | while ($next_result->nextToken) { | ||
| 52 | $next_result = $self->ListWorkspaces(@_, nextToken => $next_result->nextToken); | ||
| 53 | push @{ $result->workspaces }, @{ $next_result->workspaces }; | ||
| 54 | } | ||
| 55 | return $result; | ||
| 56 | } else { | ||
| 57 | while ($result->nextToken) { | ||
| 58 | $callback->($_ => 'workspaces') foreach (@{ $result->workspaces }); | ||
| 59 | $result = $self->ListWorkspaces(@_, nextToken => $result->nextToken); | ||
| 60 | } | ||
| 61 | $callback->($_ => 'workspaces') foreach (@{ $result->workspaces }); | ||
| 62 | } | ||
| 63 | |||
| 64 | return undef | ||
| 65 | } | ||
| 66 | |||
| 67 | |||
| 68 | sub operations { qw/CreateWorkspace DeleteWorkspace DescribeWorkspace ListWorkspaces UpdateWorkspaceAlias / } | ||
| 69 | |||
| 70 | 1; | ||
| 71 | |||
| 72 | ### main pod documentation begin ### | ||
| 73 | |||
| 74 | =head1 NAME | ||
| 75 | |||
| 76 | Paws::Prometheus - Perl Interface to AWS Amazon Prometheus Service | ||
| 77 | |||
| 78 | =head1 SYNOPSIS | ||
| 79 | |||
| 80 | use Paws; | ||
| 81 | |||
| 82 | my $obj = Paws->service('Prometheus'); | ||
| 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 Managed Service for Prometheus | ||
| 97 | |||
| 98 | For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/aps-2020-08-01> | ||
| 99 | |||
| 100 | |||
| 101 | =head1 METHODS | ||
| 102 | |||
| 103 | =head2 CreateWorkspace | ||
| 104 | |||
| 105 | =over | ||
| 106 | |||
| 107 | =item [Alias => Str] | ||
| 108 | |||
| 109 | =item [ClientToken => Str] | ||
| 110 | |||
| 111 | |||
| 112 | =back | ||
| 113 | |||
| 114 | Each argument is described in detail in: L<Paws::Prometheus::CreateWorkspace> | ||
| 115 | |||
| 116 | Returns: a L<Paws::Prometheus::CreateWorkspaceResponse> instance | ||
| 117 | |||
| 118 | Creates a new AMP workspace. | ||
| 119 | |||
| 120 | |||
| 121 | =head2 DeleteWorkspace | ||
| 122 | |||
| 123 | =over | ||
| 124 | |||
| 125 | =item WorkspaceId => Str | ||
| 126 | |||
| 127 | =item [ClientToken => Str] | ||
| 128 | |||
| 129 | |||
| 130 | =back | ||
| 131 | |||
| 132 | Each argument is described in detail in: L<Paws::Prometheus::DeleteWorkspace> | ||
| 133 | |||
| 134 | Returns: nothing | ||
| 135 | |||
| 136 | Deletes an AMP workspace. | ||
| 137 | |||
| 138 | |||
| 139 | =head2 DescribeWorkspace | ||
| 140 | |||
| 141 | =over | ||
| 142 | |||
| 143 | =item WorkspaceId => Str | ||
| 144 | |||
| 145 | |||
| 146 | =back | ||
| 147 | |||
| 148 | Each argument is described in detail in: L<Paws::Prometheus::DescribeWorkspace> | ||
| 149 | |||
| 150 | Returns: a L<Paws::Prometheus::DescribeWorkspaceResponse> instance | ||
| 151 | |||
| 152 | Describes an existing AMP workspace. | ||
| 153 | |||
| 154 | |||
| 155 | =head2 ListWorkspaces | ||
| 156 | |||
| 157 | =over | ||
| 158 | |||
| 159 | =item [Alias => Str] | ||
| 160 | |||
| 161 | =item [MaxResults => Int] | ||
| 162 | |||
| 163 | =item [NextToken => Str] | ||
| 164 | |||
| 165 | |||
| 166 | =back | ||
| 167 | |||
| 168 | Each argument is described in detail in: L<Paws::Prometheus::ListWorkspaces> | ||
| 169 | |||
| 170 | Returns: a L<Paws::Prometheus::ListWorkspacesResponse> instance | ||
| 171 | |||
| 172 | Lists all AMP workspaces, including workspaces being created or | ||
| 173 | deleted. | ||
| 174 | |||
| 175 | |||
| 176 | =head2 UpdateWorkspaceAlias | ||
| 177 | |||
| 178 | =over | ||
| 179 | |||
| 180 | =item WorkspaceId => Str | ||
| 181 | |||
| 182 | =item [Alias => Str] | ||
| 183 | |||
| 184 | =item [ClientToken => Str] | ||
| 185 | |||
| 186 | |||
| 187 | =back | ||
| 188 | |||
| 189 | Each argument is described in detail in: L<Paws::Prometheus::UpdateWorkspaceAlias> | ||
| 190 | |||
| 191 | Returns: nothing | ||
| 192 | |||
| 193 | Updates an AMP workspace alias. | ||
| 194 | |||
| 195 | |||
| 196 | |||
| 197 | |||
| 198 | =head1 PAGINATORS | ||
| 199 | |||
| 200 | Paginator methods are helpers that repetively call methods that return partial results | ||
| 201 | |||
| 202 | =head2 ListAllWorkspaces(sub { },[Alias => Str, MaxResults => Int, NextToken => Str]) | ||
| 203 | |||
| 204 | =head2 ListAllWorkspaces([Alias => Str, MaxResults => Int, NextToken => Str]) | ||
| 205 | |||
| 206 | |||
| 207 | If passed a sub as first parameter, it will call the sub for each element found in : | ||
| 208 | |||
| 209 | - workspaces, passing the object as the first parameter, and the string 'workspaces' as the second parameter | ||
| 210 | |||
| 211 | If not, it will return a a L<Paws::Prometheus::ListWorkspacesResponse> 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. | ||
| 212 | |||
| 213 | |||
| 214 | |||
| 215 | |||
| 216 | |||
| 217 | =head1 SEE ALSO | ||
| 218 | |||
| 219 | This service class forms part of L<Paws> | ||
| 220 | |||
| 221 | =head1 BUGS and CONTRIBUTIONS | ||
| 222 | |||
| 223 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 224 | |||
| 225 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 226 | |||
| 227 | =cut | ||
| 228 |