| 1 | package VM::HetznerCloud::API::LoadBalancers; | ||
| 2 | |||
| 3 | # ABSTRACT: LoadBalancers | ||
| 4 | |||
| 5 | # --- | ||
| 6 | # This class is auto-generated by bin/get_hetzner_info.pl | ||
| 7 | # --- | ||
| 8 | |||
| 9 | 3 | ▶ | use v5.24; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | |||
| 11 | 3 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | 3 | ▶ | use Types::Standard qw(:all); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | |||
| 14 | 3 | ▶ | use Mojo::Base -strict, -signatures; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 15 | |||
| 16 | 3 | extends 'VM::HetznerCloud::APIBase'; | |
| 17 | |||
| 18 | 3 | ▶ | use utf8; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 19 | |||
| 20 | 3 | our $VERSION = '0.0.3'; # VERSION | |
| 21 | |||
| 22 | 0 | ▶ | has endpoint => ( is => 'ro', isa => Str, default => sub { 'load_balancers' } ); |
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||
| 23 | |||
| 24 | 0 | ▶ | sub list ($self, %params) { |
|
Subroutine
list: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 25 | 0 | my $request_params = { | |
| 26 | 'label_selector' => { | ||
| 27 | 'in' => 'query', | ||
| 28 | 'required' => 0, | ||
| 29 | 'validate' => 'string', | ||
| 30 | }, | ||
| 31 | 'name' => { | ||
| 32 | 'in' => 'query', | ||
| 33 | 'required' => 0, | ||
| 34 | 'validate' => 'string', | ||
| 35 | }, | ||
| 36 | 'sort' => { | ||
| 37 | 'in' => 'query', | ||
| 38 | 'required' => 0, | ||
| 39 | 'validate' => 'string', | ||
| 40 | }, | ||
| 41 | }; | ||
| 42 | |||
| 43 | 0 | return $self->_request( '', \%params, $request_params, { type => 'get', oid => '/load_balancers#get' } ); | |
| 44 | } | ||
| 45 | |||
| 46 | 0 | ▶ | sub create ($self, %params) { |
|
Subroutine
create: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 47 | 0 | my $request_params = {}; | |
| 48 | 0 | return $self->_request( '', \%params, $request_params, { type => 'post', oid => '/load_balancers#post' } ); | |
| 49 | } | ||
| 50 | |||
| 51 | 0 | ▶ | sub delete ($self, %params) { |
|
Subroutine
delete: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 52 | 0 | my $request_params = { | |
| 53 | 'id' => { | ||
| 54 | 'in' => 'path', | ||
| 55 | 'required' => 1, | ||
| 56 | 'validate' => 'int64', | ||
| 57 | }, | ||
| 58 | }; | ||
| 59 | |||
| 60 | 0 | return $self->_request( '/:id', \%params, $request_params, { type => 'delete', oid => '/load_balancers/{id}#delete' } ); | |
| 61 | } | ||
| 62 | |||
| 63 | 0 | ▶ | sub get ($self, %params) { |
|
Subroutine
get: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 64 | 0 | my $request_params = { | |
| 65 | 'id' => { | ||
| 66 | 'in' => 'path', | ||
| 67 | 'required' => 1, | ||
| 68 | 'validate' => 'int64', | ||
| 69 | }, | ||
| 70 | }; | ||
| 71 | |||
| 72 | 0 | return $self->_request( '/:id', \%params, $request_params, { type => 'get', oid => '/load_balancers/{id}#get' } ); | |
| 73 | } | ||
| 74 | |||
| 75 | 0 | ▶ | sub put ($self, %params) { |
|
Subroutine
put: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 76 | 0 | my $request_params = { | |
| 77 | 'id' => { | ||
| 78 | 'in' => 'path', | ||
| 79 | 'required' => 1, | ||
| 80 | 'validate' => 'int64', | ||
| 81 | }, | ||
| 82 | }; | ||
| 83 | |||
| 84 | 0 | return $self->_request( '/:id', \%params, $request_params, { type => 'put', oid => '/load_balancers/{id}#put' } ); | |
| 85 | } | ||
| 86 | |||
| 87 | 0 | ▶ | sub list_actions ($self, %params) { |
|
Subroutine
list_actions: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 88 | 0 | my $request_params = { | |
| 89 | 'id' => { | ||
| 90 | 'in' => 'path', | ||
| 91 | 'required' => 1, | ||
| 92 | 'validate' => 'int64', | ||
| 93 | }, | ||
| 94 | 'sort' => { | ||
| 95 | 'in' => 'query', | ||
| 96 | 'required' => 0, | ||
| 97 | 'validate' => 'string', | ||
| 98 | }, | ||
| 99 | 'status' => { | ||
| 100 | 'in' => 'query', | ||
| 101 | 'required' => 0, | ||
| 102 | 'validate' => 'string', | ||
| 103 | }, | ||
| 104 | }; | ||
| 105 | |||
| 106 | 0 | return $self->_request( '/:id/actions', \%params, $request_params, { type => 'get', oid => '/load_balancers/{id}/actions#get' } ); | |
| 107 | } | ||
| 108 | |||
| 109 | 0 | ▶ | sub add_service ($self, %params) { |
|
Subroutine
add_service: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 110 | 0 | my $request_params = { | |
| 111 | 'id' => { | ||
| 112 | 'in' => 'path', | ||
| 113 | 'required' => 1, | ||
| 114 | 'validate' => 'int64', | ||
| 115 | }, | ||
| 116 | }; | ||
| 117 | |||
| 118 | 0 | return $self->_request( '/:id/actions/add_service', \%params, $request_params, { type => 'post', oid => '/load_balancers/{id}/actions/add_service#post' } ); | |
| 119 | } | ||
| 120 | |||
| 121 | 0 | ▶ | sub add_target ($self, %params) { |
|
Subroutine
add_target: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 122 | 0 | my $request_params = { | |
| 123 | 'id' => { | ||
| 124 | 'in' => 'path', | ||
| 125 | 'required' => 1, | ||
| 126 | 'validate' => 'int64', | ||
| 127 | }, | ||
| 128 | }; | ||
| 129 | |||
| 130 | 0 | return $self->_request( '/:id/actions/add_target', \%params, $request_params, { type => 'post', oid => '/load_balancers/{id}/actions/add_target#post' } ); | |
| 131 | } | ||
| 132 | |||
| 133 | 0 | ▶ | sub attach_to_network ($self, %params) { |
|
Subroutine
attach_to_network: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 134 | 0 | my $request_params = { | |
| 135 | 'id' => { | ||
| 136 | 'in' => 'path', | ||
| 137 | 'required' => 1, | ||
| 138 | 'validate' => 'int64', | ||
| 139 | }, | ||
| 140 | }; | ||
| 141 | |||
| 142 | 0 | return $self->_request( '/:id/actions/attach_to_network', \%params, $request_params, { type => 'post', oid => '/load_balancers/{id}/actions/attach_to_network#post' } ); | |
| 143 | } | ||
| 144 | |||
| 145 | 0 | ▶ | sub change_algorithm ($self, %params) { |
|
Subroutine
change_algorithm: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 146 | 0 | my $request_params = { | |
| 147 | 'id' => { | ||
| 148 | 'in' => 'path', | ||
| 149 | 'required' => 1, | ||
| 150 | 'validate' => 'int64', | ||
| 151 | }, | ||
| 152 | }; | ||
| 153 | |||
| 154 | 0 | return $self->_request( '/:id/actions/change_algorithm', \%params, $request_params, { type => 'post', oid => '/load_balancers/{id}/actions/change_algorithm#post' } ); | |
| 155 | } | ||
| 156 | |||
| 157 | 0 | ▶ | sub change_dns_ptr ($self, %params) { |
|
Subroutine
change_dns_ptr: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 158 | 0 | my $request_params = { | |
| 159 | 'id' => { | ||
| 160 | 'in' => 'path', | ||
| 161 | 'required' => 1, | ||
| 162 | 'validate' => 'int64', | ||
| 163 | }, | ||
| 164 | }; | ||
| 165 | |||
| 166 | 0 | return $self->_request( '/:id/actions/change_dns_ptr', \%params, $request_params, { type => 'post', oid => '/load_balancers/{id}/actions/change_dns_ptr#post' } ); | |
| 167 | } | ||
| 168 | |||
| 169 | 0 | ▶ | sub change_protection ($self, %params) { |
|
Subroutine
change_protection: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 170 | 0 | my $request_params = { | |
| 171 | 'id' => { | ||
| 172 | 'in' => 'path', | ||
| 173 | 'required' => 1, | ||
| 174 | 'validate' => 'int64', | ||
| 175 | }, | ||
| 176 | }; | ||
| 177 | |||
| 178 | 0 | return $self->_request( '/:id/actions/change_protection', \%params, $request_params, { type => 'post', oid => '/load_balancers/{id}/actions/change_protection#post' } ); | |
| 179 | } | ||
| 180 | |||
| 181 | 0 | ▶ | sub change_type ($self, %params) { |
|
Subroutine
change_type: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 182 | 0 | my $request_params = { | |
| 183 | 'id' => { | ||
| 184 | 'in' => 'path', | ||
| 185 | 'required' => 1, | ||
| 186 | 'validate' => 'int64', | ||
| 187 | }, | ||
| 188 | }; | ||
| 189 | |||
| 190 | 0 | return $self->_request( '/:id/actions/change_type', \%params, $request_params, { type => 'post', oid => '/load_balancers/{id}/actions/change_type#post' } ); | |
| 191 | } | ||
| 192 | |||
| 193 | 0 | ▶ | sub delete_service ($self, %params) { |
|
Subroutine
delete_service: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 194 | 0 | my $request_params = { | |
| 195 | 'id' => { | ||
| 196 | 'in' => 'path', | ||
| 197 | 'required' => 1, | ||
| 198 | 'validate' => 'int64', | ||
| 199 | }, | ||
| 200 | }; | ||
| 201 | |||
| 202 | 0 | return $self->_request( '/:id/actions/delete_service', \%params, $request_params, { type => 'post', oid => '/load_balancers/{id}/actions/delete_service#post' } ); | |
| 203 | } | ||
| 204 | |||
| 205 | 0 | ▶ | sub detach_from_network ($self, %params) { |
|
Subroutine
detach_from_network: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 206 | 0 | my $request_params = { | |
| 207 | 'id' => { | ||
| 208 | 'in' => 'path', | ||
| 209 | 'required' => 1, | ||
| 210 | 'validate' => 'int64', | ||
| 211 | }, | ||
| 212 | }; | ||
| 213 | |||
| 214 | 0 | return $self->_request( '/:id/actions/detach_from_network', \%params, $request_params, { type => 'post', oid => '/load_balancers/{id}/actions/detach_from_network#post' } ); | |
| 215 | } | ||
| 216 | |||
| 217 | 0 | ▶ | sub disable_public_interface ($self, %params) { |
|
Subroutine
disable_public_interface: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 218 | 0 | my $request_params = { | |
| 219 | 'id' => { | ||
| 220 | 'in' => 'path', | ||
| 221 | 'required' => 1, | ||
| 222 | 'validate' => 'int64', | ||
| 223 | }, | ||
| 224 | }; | ||
| 225 | |||
| 226 | 0 | return $self->_request( '/:id/actions/disable_public_interface', \%params, $request_params, { type => 'post', oid => '/load_balancers/{id}/actions/disable_public_interface#post' } ); | |
| 227 | } | ||
| 228 | |||
| 229 | 0 | ▶ | sub enable_public_interface ($self, %params) { |
|
Subroutine
enable_public_interface: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 230 | 0 | my $request_params = { | |
| 231 | 'id' => { | ||
| 232 | 'in' => 'path', | ||
| 233 | 'required' => 1, | ||
| 234 | 'validate' => 'int64', | ||
| 235 | }, | ||
| 236 | }; | ||
| 237 | |||
| 238 | 0 | return $self->_request( '/:id/actions/enable_public_interface', \%params, $request_params, { type => 'post', oid => '/load_balancers/{id}/actions/enable_public_interface#post' } ); | |
| 239 | } | ||
| 240 | |||
| 241 | 0 | ▶ | sub remove_target ($self, %params) { |
|
Subroutine
remove_target: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 242 | 0 | my $request_params = { | |
| 243 | 'id' => { | ||
| 244 | 'in' => 'path', | ||
| 245 | 'required' => 1, | ||
| 246 | 'validate' => 'int64', | ||
| 247 | }, | ||
| 248 | }; | ||
| 249 | |||
| 250 | 0 | return $self->_request( '/:id/actions/remove_target', \%params, $request_params, { type => 'post', oid => '/load_balancers/{id}/actions/remove_target#post' } ); | |
| 251 | } | ||
| 252 | |||
| 253 | 0 | ▶ | sub update_service ($self, %params) { |
|
Subroutine
update_service: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 254 | 0 | my $request_params = { | |
| 255 | 'id' => { | ||
| 256 | 'in' => 'path', | ||
| 257 | 'required' => 1, | ||
| 258 | 'validate' => 'int64', | ||
| 259 | }, | ||
| 260 | }; | ||
| 261 | |||
| 262 | 0 | return $self->_request( '/:id/actions/update_service', \%params, $request_params, { type => 'post', oid => '/load_balancers/{id}/actions/update_service#post' } ); | |
| 263 | } | ||
| 264 | |||
| 265 | 0 | ▶ | sub get_actions ($self, %params) { |
|
Subroutine
get_actions: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 266 | 0 | my $request_params = { | |
| 267 | 'action_id' => { | ||
| 268 | 'in' => 'path', | ||
| 269 | 'required' => 1, | ||
| 270 | 'validate' => 'int64', | ||
| 271 | }, | ||
| 272 | 'id' => { | ||
| 273 | 'in' => 'path', | ||
| 274 | 'required' => 1, | ||
| 275 | 'validate' => 'int64', | ||
| 276 | }, | ||
| 277 | }; | ||
| 278 | |||
| 279 | 0 | return $self->_request( '/:id/actions/:action_id', \%params, $request_params, { type => 'get', oid => '/load_balancers/{id}/actions/{action_id}#get' } ); | |
| 280 | } | ||
| 281 | |||
| 282 | 0 | ▶ | sub list_metrics ($self, %params) { |
|
Subroutine
list_metrics: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 283 | 0 | my $request_params = { | |
| 284 | 'end' => { | ||
| 285 | 'in' => 'query', | ||
| 286 | 'required' => 1, | ||
| 287 | 'validate' => 'string', | ||
| 288 | }, | ||
| 289 | 'id' => { | ||
| 290 | 'in' => 'path', | ||
| 291 | 'required' => 1, | ||
| 292 | 'validate' => 'int64', | ||
| 293 | }, | ||
| 294 | 'start' => { | ||
| 295 | 'in' => 'query', | ||
| 296 | 'required' => 1, | ||
| 297 | 'validate' => 'string', | ||
| 298 | }, | ||
| 299 | 'step' => { | ||
| 300 | 'in' => 'query', | ||
| 301 | 'required' => 0, | ||
| 302 | 'validate' => 'string', | ||
| 303 | }, | ||
| 304 | 'type' => { | ||
| 305 | 'in' => 'query', | ||
| 306 | 'required' => 1, | ||
| 307 | 'validate' => 'string', | ||
| 308 | }, | ||
| 309 | }; | ||
| 310 | |||
| 311 | 0 | return $self->_request( '/:id/metrics', \%params, $request_params, { type => 'get', oid => '/load_balancers/{id}/metrics#get' } ); | |
| 312 | } | ||
| 313 | |||
| 314 | |||
| 315 | 3 | 1; | |
| 316 | |||
| 317 | __END__ | ||