File Coverage

blib/lib/Net/Async/WebService/lxd.pm
Criterion Covered Total %
statement 78 236 33.0
branch 4 68 5.8
condition 0 20 0.0
subroutine 23 231 9.9
pod 0 2 0.0
total 105 557 18.8


line stmt bran cond sub pod time code
1              
2             use strict;
3 3     3   319091 use warnings;
  3         29  
  3         88  
4 3     3   15  
  3         3  
  3         71  
5             use JSON;
6 3     3   13 use Data::Dumper;
  3         5  
  3         16  
7 3     3   248  
  3         5  
  3         822  
8             my ($elf, $lxd, %params) = @_;
9             my $wait = delete $params{wait} // 1;
10 0     0   0 my $f = $lxd->instance_state( project => $elf->{project}, name => $elf->{name} );
11 0   0     0  
12 0         0 if ($wait) {
13             return $f->get;
14 0 0       0 } else {
15 0         0 return $f;
16             }
17 0         0 }
18              
19             return _action(shift, shift, "restart", @_);
20             }
21             return _action(shift, shift, "start", @_);
22 0     0   0 }
23             return _action(shift, shift, "stop", @_);
24             }
25 0     0   0 return _action(shift, shift, "freeze", @_);
26             }
27             return _action(shift, shift, "unfreeze", @_);
28 0     0   0 }
29              
30             my ($elf, $lxd, $action, %params) = @_;
31 0     0   0 $params{stateful} //= JSON::false;
32             $params{force} //= JSON::false;
33             $params{timeout} //= 30;
34 0     0   0 my $wait = delete $params{wait} // 1;
35              
36             my $f = $lxd->instance_state( project => $elf->{project},
37             name => $elf->{name},
38 0     0   0 body => {
39 0   0     0 action => $action,
40 0   0     0 %params,
41 0   0     0 } );
42 0   0     0 if ($wait) {
43             return $f->get;
44             } else {
45             return $f;
46 0         0 }
47             }
48              
49             1;
50 0 0       0  
51 0         0  
52             use strict;
53 0         0 use warnings;
54              
55             use Data::Dumper;
56             $Data::Dumper::Indent = 1;
57              
58             our $VERSION = '0.03';
59              
60             use Encode qw(encode_utf8);
61 3     3   17 use JSON;
  3         4  
  3         42  
62 3     3   11 use HTTP::Status qw(:constants);
  3         4  
  3         60  
63              
64 3     3   12 use Moose;
  3         4  
  3         131  
65              
66              
67             use Log::Log4perl qw(:easy);
68             Log::Log4perl->easy_init($DEBUG);
69 3     3   1241 no warnings 'once';
  3         33442  
  3         218  
70 3     3   21 our $log = Log::Log4perl->get_logger("nawl");
  3         5  
  3         17  
71 3     3   1483  
  3         10539  
  3         958  
72              
73 3     3   1374 has 'loop' => (isa => 'IO::Async::Loop', is => 'ro' );
  3         1108759  
  3         20  
74             has '_http' => (isa => 'Net::Async::HTTP', is => 'ro' );
75             has 'endpoint' => (isa => 'Str', is => 'ro' );
76 3     3   20705 has '_SSL_' => (isa => 'HashRef', default => sub { {} }, is => 'rw');
  3         109651  
  3         17  
77             has 'polling_time' => (isa => 'Int', default => 1, is => 'rw' );
78 3     3   1909 has '_timer' => (isa => 'IO::Async::Timer::Periodic', is => 'ro' );
  3         4  
  3         779  
79             has '_pendings' => (isa => 'HashRef', default => sub { {} }, is => 'rw');
80              
81             # need it for now
82             has 'project' => (isa => 'Str', is => 'ro');
83              
84             around BUILDARGS => sub {
85             my $orig = shift;
86             my $class = shift;
87              
88             my %options = @_; # capture all options
89             my %SSL = map { $_ => delete $options{$_} } # remove any SSL_ related ones
90             grep { $_ =~ m/^SSL_/ }
91             keys %options;
92             return $class->$orig (%options,
93             '_SSL_' => \%SSL, # tuck them into ONE hash
94             );
95             };
96              
97              
98             my $elf = shift;
99            
100             use Net::Async::HTTP;
101             my $http = Net::Async::HTTP->new(
102             %{ $elf->{'_SSL_'} } # expand all SSL related options
103             );
104             #-- add http resolver
105             $elf->{loop}->add( $http );
106             $elf->{_http} = $http; # keep it handy
107             #-- add timer for background operation
108 0     0 0 0 use IO::Async::Timer::Periodic;
109             my $timer = IO::Async::Timer::Periodic->new(
110 3     3   1561 interval => $elf->{polling_time},
  3         262300  
  3         198  
111             on_tick => sub {
112 0         0 my $pendings = $elf->{_pendings};
  0         0  
113             #warn "current pendings ".Dumper [ keys %$pendings ];
114             if (scalar %$pendings) { # only if we have open issues
115 0         0 my $ops = $elf->operations_recursion1( $elf->{project}? (project => $elf->{project}) : () )->get;
116 0         0 #warn "analyzing operations ".Dumper $ops;
117             foreach my $op (@{ $ops->{success} }, @{ $ops->{failure} }) {
118 3     3   1633 next unless $pendings->{ $op->{id} }; # we must be waiting for it, others will be ignored
  3         2144  
  3         1573  
119             if ($op->{status} eq 'Success') { # the good guys
120             my $res;
121             if (my $outs = $op->{metadata}->{output}) { # if there is something which produced some output
122 0     0   0 foreach my $log (values %$outs) { # iterate over all the REST uris
123             $log =~ m{/instances/(.+?)/logs/(.+\.(stdout|stderr))}; # fetch container and log file from it # TODO: relax?
124 0 0       0 my $name = $1;
125 0 0       0 my $logfile = $2;
126             my $key = $3;
127 0         0 $res->{$key} = $elf->instance_log( # fetch the actual contents
  0         0  
  0         0  
128 0 0       0 $elf->{project} ? (project => $elf->{project}) : (),
129 0 0       0 name => $name,
    0          
130 0         0 filename => $logfile,
131 0 0       0 )->get;
132 0         0 $elf->delete_instance_log( # clean up
133 0         0 $elf->{project} ? (project => $elf->{project}) : (),
134 0         0 name => $name,
135 0         0 filename => $logfile,
136 0         0 )->get;
137             }
138 0 0       0 # } elsif ($op->{metadata} && scalar %{ $op->{metadata} }) { # if there is something interesting here
139             # $res = $op->{metadata}; # not sure whether we ever arrive here
140             } else {
141             $res = 'success'; # boring
142             }
143 0 0       0 $pendings->{ $op->{id} }->{future}->done( $res ); # now it's done
144              
145             } elsif ($op->{status} eq 'Failure') {
146             $pendings->{ $op->{id} }->{future}->fail( $op->{err}, $pendings->{ $op->{id} }->{options} );
147              
148             } else {
149             $log->die("we should not be here");
150             }
151 0         0 delete $pendings->{ $op->{id} }; # delete this id from the local pendings
152             # $elf->delete_operation( id => $op->{id} )->get; # purge operation from server
153 0         0 }
154              
155              
156 0         0 # map { delete $pendings->{ $_->{id} } } # delete this id from the local pendings
157             # map { $pendings->{ $_->{id} }->{future}->done( 'success' ) && $_ } # tunnel id, and set the future to done
158             # grep { $pendings->{ $_->{id} } } # only look at those pendings we have open
159 0         0 # #map { warn Dumper $_ && $_ }
160             # @{ $ops->{success} }; # iterate over all recent success
161 0         0  
162             # map { delete $pendings->{ $_->{id} } } # delete this id from the local pendings
163             # #map { warn Dumper $_ }
164             # map { $pendings->{ $_->{id} }->{future}->fail( $_->{err} ) && $_ } # tunnel id, and set the future to fail
165             # grep { $pendings->{$_->{id}} } # only look at those pendings we have open
166             # @{ $ops->{failure} }; # iterate over all recent failures
167             # # ignore the running ops
168             }
169              
170             },
171             );
172             $elf->{loop}->add( $timer );
173             $timer->start;
174             $elf->{_timer} = $timer;
175             }
176              
177             my $yaml = shift;
178              
179             $yaml =~ s|(\S+?(\{\S+?\}\S*?)+?):|"$1":|msg;
180             # $yaml =~ s|(x-go-name)|"$1"|g;
181 0         0 $yaml =~ s{( +- )(description)}{"$1\n" . " " x length($1) . $2 }esg;
182 0         0 foreach my $attr (qw(description title example)) {
183 0         0 $yaml =~ s{((\ +)($attr):([^\n]+?))(\n(\ +)(.+?)\n)}
184 0         0 { $1
185             . ( $4 eq ' |-' # or length($2) == 1
186             ? ( $5 )
187             :
188 3     3   7 # length($2)." ".length($6). " for $3 $5 $7".
189             ( length($2) >= length($6)
190 3         17040617 ? $5
191             : " $7\n"
192 3         5673 )
  990         9721  
193 3         17 )
194 9 100       771 }xegs;
  9552 100       66921  
195             }
196             $yaml =~ s/^-/ -/msg;
197             $yaml = "---\n$yaml";
198             }
199              
200             my $data = do { local $/; <DATA> };
201             my $yaml = _fix_broken_YAML( $data );
202             # write_file('/tmp/xxx.yaml', $yaml);
203              
204             use YAML;
205             our $rest_api = YAML::Load( $yaml );
206 3         425 #warn Dumper [ sort keys %{ $rest_api->{paths} } ];
207 3         2162 #warn scalar keys %{ $rest_api->{paths} }; #exit;
208              
209             my $POST_translations = {
210             instances_post => 'create_instance' , # Creates a new instance on LXD.
211             images_aliases_post => 'add_images_alias' , # Creates a new image alias.
212             storage_pool_volumes_type_snapshot_post => 'rename_storage_pool_volumes_type_snapshot' , # Renames a storage volume snapshot.
213             storage_pools_post => 'create_storage_pool' , # Creates a new storage pool.
214 3     3   1186 instance_snapshot_post => 'migrate_instance_snapshot' , # Renames or migrates an instance snapshot to another server.
  3         16218  
  3         3458  
215             storage_pool_volumes_type_backup_post => 'rename_storage_pool_volumes_type_backup' , # Renames a storage volume backup.
216             images_secret_post => 'initiate_image_upload' , # This generates a background operation including a secret one time key
217             images_post_untrusted => 'push_image_untrusted' , # Pushes the data to the target image server.
218             instance_snapshots_post => 'create_instance_snapshot' , # Creates a new snapshot.
219             profiles_post => 'create_profile' , # Creates a new profile.
220             instance_files_post => 'create_instance_file' , # Creates a new file in the instance.
221             instance_post => 'migrate_instance' , # Renames, moves an instance between pools or migrates an instance to another server.
222             cluster_members_post => 'add_cluster_member' , # Requests a join token to add a cluster member.
223             instance_console_post => 'connect_instance_console' , # Connects to the console of an instance.
224             cluster_group_post => 'rename_cluster_group' , # Renames an existing cluster group.
225             network_zone_records_post => 'create_network_zone_record' , # Creates a new network zone record.
226             storage_pool_volume_type_post => 'migrate_storage_pool_volume_type' , # Renames, moves a storage volume between pools or migrates an instance to another server.
227             storage_pool_volumes_post => 'create_storage_pool_volume' , # Creates a new storage volume.
228             profile_post => 'rename_profile' , # Renames an existing profile.
229             images_export_post => 'push_images_export' , # Gets LXD to connect to a remote server and push the image to it.
230             certificates_post => 'add_certificate' , # Adds a certificate to the trust store.
231             network_zones_post => 'create_network_zone' , # Creates a new network zone.
232             certificates_post_untrusted => 'add_certificate_untrusted' , # Adds a certificate to the trust store as an untrusted user.
233             instance_backup_post => 'rename_instance_backup' , # Renames an instance backup.
234             instance_metadata_templates_post => 'create_instance_metadata_template' , # Creates a new image template file for the instance.
235             cluster_groups_post => 'create_cluster_group' , # Creates a new cluster group.
236             project_post => 'rename_project' , # Renames an existing project.
237             network_post => 'rename_network' , # Renames an existing network.
238             instance_exec_post => 'execute_in_instance' , # Executes a command inside an instance.
239             instance_backups_post => 'create_instance_backup' , # Creates a new backup.
240             cluster_member_state_post => 'restore_cluster_member_state' , # Evacuates or restores a cluster member.
241             images_post => 'create_image' , # Adds a new image to the image store.
242             cluster_member_post => 'rename_cluster_member' , # Renames an existing cluster member.
243             network_peers_post => 'create_network_peer' , # Initiates/creates a new network peering.
244             networks_post => 'create_network' , # Creates a new network.
245             images_alias_post => 'rename_images_alias' , # Renames an existing image alias.
246             projects_post => 'create_project' , # Creates a new project.
247             network_forwards_post => 'create_network_forward' , # Creates a new network address forward.
248             storage_pool_volumes_type_backups_post => 'create_storage_pool_volumes_backup' , # Creates a new storage volume backup.
249             network_acl_post => 'rename_network_acl' , # Renames an existing network ACL.
250             storage_pool_volumes_type_snapshots_post => 'create_storage_pool_volumes_snapshot' , # Creates a new storage volume snapshot.
251             storage_pool_volumes_type_post => 'create_storage_pool_volumes_type' , # Creates a new storage volume (type specific endpoint).
252             images_refresh_post => 'update_images_refresh' , # This causes LXD to check the image source server for an updated
253             network_acls_post => 'create_network_acl' , # Creates a new network ACL.
254             };
255              
256             my $meta = __PACKAGE__->meta;
257             our $META; # association between methods and what is in the spec
258              
259             my %uniq_methods; # make sure we do not duplicate method by name
260             foreach my $path ( keys %{ $rest_api->{paths} } ) {
261             my $op = $rest_api->{paths}->{ $path };
262             my @path_fields = $path =~ m/\{(.+?)\}/g; # name, id, etc.
263              
264            
265             if ($op->{get} && $op->{put}) { # possibly both can be mapped to ONE method
266             my %get_params = map { $_->{name} => $_ }
267             grep { $_->{in} eq 'query' }
268             @{ $op->{get}->{parameters} };
269             my %put_params = map { $_->{name} => $_ }
270             grep { $_->{in} eq 'query' }
271             @{ $op->{put}->{parameters} };
272             my %body_params = map { $_->{name} => $_ }
273             grep { $_->{in} eq 'body' }
274             @{ $op->{put}->{parameters} };
275             # TODO test params
276             my $opId = $op->{get}->{operationId}; $opId =~ s/_get//;
277             #warn "$opId ".Dumper \%body_params;
278             $meta->add_method( $opId => _generate_method( $path, $opId, \%get_params, $op->{get}, 'GET' ));
279             $META->{$opId} = { path => $path,
280             name => $opId,
281             opid => [ $op->{get}->{operationId}, $op->{put}->{operationId} ],
282             params => \%get_params,
283             body => \%body_params,
284             fields => \@path_fields,
285             op => [ $op->{get}, $op->{put} ],
286             tags => $op->{get}->{tags},
287             method => 'GETPUT' };
288             $uniq_methods{ $opId }++ and $log->logdie( "Internal error: duplicated $opId" );
289              
290             } elsif ($op->{get}) { # only GET
291             my %get_params = map { $_->{name} => $_ }
292             grep { $_->{in} eq 'query' }
293             @{ $op->{get}->{parameters} };
294             my $opId = $op->{get}->{operationId}; $opId =~ s/_get//;
295             $meta->add_method( $opId => _generate_method( $path, $opId, \%get_params, $op->{get}, 'GET') );
296             $META->{$opId} = { path => $path,
297             name => $opId,
298             opid => $op->{get}->{operationId},
299             params => \%get_params,
300             fields => \@path_fields,
301             op => $op,
302             tags => $op->{get}->{tags},
303             method => 'GET' };
304             $uniq_methods{ $opId }++ and $log->logdie( "Internal error: duplicated $opId" );
305              
306             } elsif ($op->{put}) { # only PUT
307             my %put_params = map { $_->{name} => $_ }
308             grep { $_->{in} eq 'query' }
309             @{ $op->{put}->{parameters} };
310             my %body_params = map { $_->{name} => $_ }
311             grep { $_->{in} eq 'body' }
312             @{ $op->{put}->{parameters} };
313             my $opId = $op->{put}->{operationId}; $opId =~ s/(.+)_put/update_$1/;
314             $meta->add_method( $opId => _generate_method( $path, $opId, \%put_params, $op->{put}, 'PUT') );
315             $META->{$opId} = { path => $path,
316             name => $opId,
317             opid => $op->{put}->{operationId},
318             params => \%put_params,
319             body => \%body_params,
320             fields => \@path_fields,
321             op => $op,
322             tags => $op->{put}->{tags},
323             method => 'PUT' };
324             $uniq_methods{ $opId }++ and $log->logdie( "Internal error: duplicated $opId" );
325              
326             } else { # neither nor
327             }
328              
329             if ($op->{post}) {
330             my %post_params = map { $_->{name} => $_ }
331             grep { $_->{in} eq 'query' }
332             @{ $op->{post}->{parameters} };
333             my %body_params = map { $_->{name} => $_ }
334             grep { $_->{in} eq 'body' }
335             @{ $op->{post}->{parameters} };
336             my $opId = $POST_translations->{$op->{post}->{operationId}}
337             or $log->logdie( "no post translation for $op->{post}->{operationId}" );
338             #my $description = $op->{post}->{description}; $description =~ s/\n.+//s;
339             #warn sprintf "%45s => %-50s, # %-60s", $op->{post}->{operationId}, $opId, $description;
340             $meta->add_method( $opId => _generate_method( $path, $opId, \%post_params, $op->{post}, 'POST') );
341             $META->{$opId} = { path => $path,
342             name => $opId,
343             opid => $op->{post}->{operationId},
344             params => \%post_params,
345             body => \%body_params,
346             fields => \@path_fields,
347             op => $op,
348             tags => $op->{post}->{tags},
349             method => 'POST' };
350             $uniq_methods{ $opId }++ and $log->logdie( "Internal error: duplicated $opId" );
351             }
352             if ($op->{delete}) {
353             my %params = map { $_->{name} => $_ }
354             grep { $_->{in} eq 'query' }
355             @{ $op->{delete}->{parameters} };
356             my $opId = $op->{delete}->{operationId}; $opId =~ s/(.+)_delete/delete_$1/;
357             #my $description = $op->{post}->{description}; $description =~ s/\n.+//s;
358             #warn sprintf "%45s => %-50s, # %-60s", $op->{post}->{operationId}, $opId, $description;
359             $meta->add_method( $opId => _generate_method( $path, $opId, \%params, $op->{delete}, 'DELETE') );
360             $META->{$opId} = { path => $path,
361             name => $opId,
362             opid => $op->{delete}->{operationId},
363             params => \%params,
364             fields => \@path_fields,
365             op => $op,
366             tags => $op->{delete}->{tags},
367             method => 'DELETE' };
368             $uniq_methods{ $opId }++ and $log->logdie( "Internal error: duplicated $opId" );
369             }
370             if ($op->{patch}) {
371             my %params = map { $_->{name} => $_ }
372             grep { $_->{in} eq 'query' }
373             @{ $op->{patch}->{parameters} };
374             my %body_params = map { $_->{name} => $_ }
375             grep { $_->{in} eq 'body' }
376             @{ $op->{patch}->{parameters} };
377             my $opId = $op->{patch}->{operationId}; $opId =~ s/(.+)_patch/modify_$1/;
378             #my $description = $op->{post}->{description}; $description =~ s/\n.+//s;
379             #warn sprintf "%45s => %-50s, # %-60s", $op->{post}->{operationId}, $opId, $description;
380             $meta->add_method( $opId => _generate_method( $path, $opId, \%params, $op->{patch}, 'PATCH') );
381             $META->{$opId} = { path => $path,
382             name => $opId,
383             opid => $op->{patch}->{operationId},
384             params => \%params,
385             body => \%body_params,
386             fields => \@path_fields,
387             op => $op,
388             tags => $op->{patch}->{tags},
389             method => 'PATCH' };
390             $uniq_methods{ $opId }++ and $log->logdie( "Internal error: duplicated $opId" );
391             }
392             }
393             #warn Dumper \%uniq_methods;
394              
395             my $path = shift;
396             my $id = shift;
397             my $params = shift;
398             my $op = shift;
399             my $method = shift;
400              
401             #warn Dumper [ caller ] unless $method;
402             #warn "generate $method $path -> $id";
403             #warn Dumper [ $path, $op ] if $path eq '/1.0/instances/{name}'; # =~ /instance/;
404             return sub {
405             my $elf = shift;
406 582     582   668 my %options = @_;
407 582         611 my %orig_options = %options; # copy it, as we may need to capture this in pending operations
408 582         558 #warn "sub options".Dumper \%options;
409 582         557  
410 582         603 my $fullpath = $path;
411             $fullpath =~ s/{(\w+)}/ delete $options{$1} /eg;
412             #warn "$path -> $fullpath";
413             # $params->{$_} or die "parameter '$_' not valid for '$path'" for keys %options; # TODO validation
414             #warn "params ".Dumper $params;
415              
416 0     0     my $wantheaders = delete $options{wantheaders};
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
417 0            
418 0           use URI;
419             my $uri = URI->new( $elf->{endpoint} . $fullpath );
420             #warn ">>> uri $uri";
421 0           $uri->query_form( $uri->query_form, # if we already have params (it happens)
422 0           # add _query_ params we received
  0            
423             map { $_ => $options{$_} }
424             grep { $params->{$_} or $_ eq 'recursion' } # allow also any recursion
425             grep { $_ ne 'body' } # body param does not go into the uri
426             keys %options
427 0           );
428              
429 3     3   27 my $req = HTTP::Request->new( ($options{body} && $method eq 'GET' ? 'PUT' : $method), # basic request, will be refined below
  3         12  
  3         388  
430 0           $uri );
431              
432             $options{headers}->{'Content-Type'} //= 'application/json; charset=UTF-8'; # if none is given, we assume that JSON is meant
433             $req->headers->header( %{ $options{headers} }); # set all headers
434 0            
435 0 0         # work on content body
436 0           if ($options{body}) {
  0            
437             use feature 'switch';
438             no warnings 'experimental';
439             for ($options{headers}->{'Content-Type'}) {
440 0 0 0       when ('application/json; charset=UTF-8') {
441             $req->content( encode_utf8(encode_json( $options{body} )) ) }
442              
443 0   0       when ('application/octet-stream') {
444 0           $req->content_ref( \ $options{body} ) } # pass in reference to avoid copying
  0            
445              
446             default {
447 0 0         $log->logdie( "cannot handle body with ".$options{headers}->{'Content-Type'} ) }
448 3     3   20 }
  3         6  
  3         383  
449 3     3   18 }
  3         5  
  3         1805  
450 0            
451 0           $log->debug( ">>> "._substr($req->as_string, 2000, '...') );
452 0            
453             my $f = $elf->{loop}->new_future;
454 0           $elf->{_http}->do_request( request => $req,
455 0           on_response => sub {
456             my $resp = $_[0];
457 0           $log->debug( "<<< "._substr($resp->as_string, 2000, '...') );
458 0           if ($resp->is_success) { # the HTTP req was handled ok
459             if ($resp->content_type eq 'application/json') {
460             my $data = from_json ($resp->content); # so there should be a solid json
461             if ($data->{type} eq 'sync') { # we are finished with the operation
462 0           if ($data->{status_code} == 200) { # and everything is ok from the lxd side
463             $f->done( ($data->{metadata} // lc($data->{status})), # that would be the result
464 0           ($wantheaders ? $resp->headers : ())); # and headers if required by the caller
465             } else {
466             $f->fail( $data->{error}, \%orig_options ); # lxd sent an error (and we add the calling params)
467 0     0     }
468 0           } else { # the only other option: we are not finished on the lxd server
469 0 0         #warn "not sync response ".Dumper $data;
    0          
470 0 0         $log->debug( "pending operation: ".$data->{metadata}->{description} );
    0          
    0          
471 0            
472 0 0         # my @ws = _create_websockets( $elf, $data->{metadata}->{metadata}->{fds}, $data->{operation} )
473 0 0         # if ($data->{metadata}->{class} eq 'websocket');
474 0 0 0        
475             $elf->{_pendings}->{ $data->{metadata}->{id} } = {
476             operation => $data->{operation},
477 0           future => $f,
478             options => \%orig_options, # we most likely want to know at some point WHAT we planned to do
479             # websockets => \@ws,
480             };
481 0           }
482             } elsif ($resp->content_type =~ qr/multipart/) {
483             die "for now"; # FIX ME
484             # use File::Slurp;
485             # write_file('/tmp/mime.txt', $resp->content);
486              
487             # use MIME::Parser;
488 0           # my $parser = new MIME::Parser;
489             # eval {
490             # my $entity = $parser->parse_data($msg);
491             # $entity->dump_skeleton;
492              
493             # my %data;
494 0           # foreach my $p ($entity->parts) {
495             # my $dispo = $p->head->get('Content-Disposition');
496             # $dispo =~ /name="(.+?)"/;
497             # my $name = $1;
498             # if ($p->effective_type eq 'application/octet-stream') {
499             # $data{$name} = $p->body;
500             # } else {
501             # die;
502             # }
503             # }
504              
505             $f->done("whatever");
506            
507             } elsif ($resp->content_type eq 'application/octet-stream') {
508             $f->done( $resp->content, # that would be the result,
509             $wantheaders ? $resp->headers : ()); # and headers if required by the caller
510              
511             } else {
512             $log->logdie( "unhandled content type: ".$resp->content_type );
513             }
514              
515             } elsif (my $c = $resp->content) {
516 0           my $data = from_json ($c);
517             $f->fail( $data->{error}, \%orig_options );
518              
519 0 0         } else {
520             $f->fail( $resp->status_line, \%orig_options ); # something happened on the transport level
521             }
522             },
523 0           );
524             return $f;
525             }
526             }
527 0            
528 0           # sub _create_websockets {
529             # my $elf = shift;
530             # my $fds = shift;
531 0           # my $op = shift;
532            
533             # my $HOST = "192.168.3.50";
534 0           # my $PORT = 8443;
535 0            
536             # my @ws;
537 582         2940 # foreach my $key (keys %$fds) {
538              
539             # use Net::Async::WebSocket::Client;
540             # my $ws = Net::Async::WebSocket::Client->new(
541             # on_raw_frame => sub {
542             # my ( $self, $frame ) = @_;
543             # warn "XXXXXXXXXXXXXXXX recv $key $self $frame ";
544             # warn Dumper $frame;
545             # },
546             # );
547             # $elf->{loop}->add( $ws );
548             # push @ws, $ws;
549              
550             # my $url = "wss://$HOST:$PORT".$op.'/websocket?secret='.$fds->{$key};
551             # warn "ws $key $op -> $url";
552             # $ws->connect(
553             # SSL_cert_file => $elf->client_cert_file,
554             # SSL_key_file => $elf->client_key_file,
555             # SSL_fingerprint => $elf->server_fingerprint,
556             # url => $url,
557             # on_connected => sub { warn "connected websocket $key"; });
558             # }
559             # return @ws;
560             # }
561              
562              
563              
564             my ($s, $l, $r) = @_;
565             #warn "<<<$s<<< $l, $r";
566             return $s unless length($s) > $l;
567             substr($s, $l, 10000000, $r);
568             #warn " >>>$s<<<";
569             return $s;
570             }
571              
572             # warn "###########";
573             # for my $method ( $meta->get_all_methods ) {
574             # warn $method->fully_qualified_name;
575             # }
576 0     0      
577             my $SPEC_base = 'https://linuxcontainers.org/lxd/api/master/#';
578 0 0          
579 0           # print Dumper $rest_api;
580             my %tags;
581 0           map { $tags{$_}++ }
582             map { @{ $_->{tags} } } values %$META;
583             my @tags = keys %tags;
584              
585             use File::Slurp;
586              
587             my $pod = q{
588             =head1 NAME
589              
590             Net::Async::WebService::lxd - REST client (asynchronous) for lxd Linux containers
591              
592             =head1 SYNOPSIS
593 0     0 0    
594 0           use IO::Async::Loop;
595 0           my $loop = IO::Async::Loop->new;
  0            
  0            
596 0            
597             use Net::Async::WebService::lxd;
598 3     3   1858 my $lxd = Net::Async::WebService::lxd->new( loop => $loop,
  3         32626  
  3         1407  
599             endpoint => 'https://192.168.0.50:8443',
600 0           SSL_cert_file => "t/client.crt",
601             SSL_key_file => "t/client.key",
602             SSL_fingerprint => 'sha1$92:DD:63:F8:99:C4:5F:82:59:52:82:A9:09:C8:57:F0:67:56:B0:1B',
603             );
604             $lxd->create_instance(
605             body => {
606             architecture => 'x86_64',
607             profiles => [ 'default' ],
608             name => 'test1',
609             source => { type => 'image',
610             fingerprint => '6dc6aa7c8c00' }, # image already exists in image store
611             config => {},
612             } )->get; # wait for it
613             # container is still stopped
614             $lxd->instance_state( name => 'test1',
615             body => {
616             action => "start",
617             force => JSON::false,
618             stateful => JSON::false,
619             timeout => 30,
620             } )->get; # wait for it
621              
622              
623             =head1 INTERFACE
624              
625             =head2 Constructor
626              
627             The constructor returns a handle to one LXD server. It's address is specified via an B<endpoint>
628             parameter, be it of an HTTPS or of a UNIX socket kind.
629              
630             If you are working with a non-default LXD project in mind, then you should also provide that
631             project's name with the B<project> parameter. Background operation polling will make use of
632             that. Note, that when invoking any of the methods here, you will still have to specify that project,
633             unless it is the C<default> one, of course.
634              
635             As we are operating under an L<IO::Async> regime here, the handle also needs a B<loop> parameter to
636             the central event loop. The handle will also regularily poll autonomously the server which
637             operations are still running or have completed. The optional parameter B<polling_time> controls how
638             often that will occur; it will default to 1 sec, if not provided.
639              
640             As LXD can be accessed remotely only via HTTPS, TLS (SSL) parameters must be provided. These will be
641             forwarded directly to
642             L<IO::Socket::SSL|https://metacpan.org/pod/IO::Socket::SSL#Description-Of-Methods>. But, specifically,
643             one should consider to provide:
644              
645             =over
646              
647             =item * B<client certificate>, via a proper subset of C<SSL_cert_file>, C<SSL_key_file>, C<SSL_cert> and C<SSL_key>.
648             (Look at the L</HINTS> section to generate such a certificate for LXD.)
649              
650             =item * B<server fingerprint>, via C<SSL_fingerprint>
651             (Look at the L</HINTS> section how to figure this out.)
652              
653             =back
654              
655             =head2 Methods
656              
657             All methods below are automatically generated from the L<LXD REST API Spec|https://raw.githubusercontent.com/lxc/lxd/master/doc/rest-api.yaml>.
658             They should work with API version 1.0.
659              
660              
661             Let's dissect method invocations with this example:
662              
663             my $f = $lxd->instance_state( name => 'test1' );
664             my $r = $f->get;
665              
666             =over
667              
668             =item *
669              
670             All invocations return a L<Future>. Thus they can be combined, sequenced, run in "parallel", etc. If
671             you need to wait for a definite result, then you will block the flow with C<-E<gt>get>.
672              
673             Polling is done behind the scenes and will watch for all operations which either succeeded or
674             failed. Those will mark the associated future as C<done> or C<failed>. Normally, you will never need
675             to use the methods for 'Operations' yourself; they are still offered as fallback.
676              
677             =item *
678              
679             The result of each fully completed invocation is either
680              
681             =over
682              
683             =item *
684              
685             the string C<success>, or
686              
687             =item *
688              
689             a Perl HASH ref which reflects the JSON data sent from the LXD server. Note, that Booleans have to
690             be treated special, by using C<JSON::false> and C<JSON::true>. Otherwise, they follow B<exactly> the
691             structure in the specification.
692              
693             =item *
694              
695             or a HASH ref with keys C<stdin> and C<stdout> if this is a result of the C<execute_in_instance>
696             method.
697              
698             =back
699              
700             =item *
701              
702             If an operation failed, then the associated future will be failed, together with the reason of the
703             failure from the server. If you do not cater with that, then this will - as usual with C<IO::Async> -
704             raise an exception, with the failure as string.
705              
706             =item *
707              
708             Methods named like the type of server object (e.g. C<cluster>, C<certificate>, C<image>) are
709             normally "getter/setter" methods. The getter obviously returns the state of the object. The method
710             becomes a setter, if the additional C<body> field together with a Perl HASH ref is passed:
711              
712             my $f = $lxd->instance_state( name => 'test1',
713             body => {
714             action => "start",
715             force => JSON::false,
716             stateful => JSON::false,
717             timeout => 30,
718             } );
719              
720             That HASH ref also follows the structure outlined in the specification for that particular endpoint.
721              
722             How a specific object is addressed, is detailed in each method below; usually you provide a C<name>,
723             C<id>, C<fingerprint>, or similar. You may also have to provide a C<project>, if not being the
724             I<default project>.
725              
726             =item *
727              
728             Methods named like a plural of type of server object (e.g. C<certificates>) normally return a list
729             of identifiers for such objects.
730              
731             =item *
732              
733             Many methods request changes in the LXD server. The names are taken from the specification, but are
734             adapted to better reflect what is intended:
735              
736             =over
737              
738             =item *
739              
740             Methods which change the state of the remote object usually are called C<modify>_I<something>.
741              
742             =item *
743              
744             Methods which add a new object to a collection are usually called C<add>_I<something>, or
745             C<create>_I<something>, depending on how it sounds better.
746              
747             =item *
748              
749             Methods which remove an object from a collection are usually called C<delete>_I<something>.
750              
751             =back
752              
753             =back
754              
755             };
756              
757             foreach my $tag (sort @tags) {
758             my $Tag = ucfirst( $tag );
759             $Tag =~ s/-/ /g;
760             $Tag =~ s/acl/ACL/;
761             $Tag =~ s/( \S)/ uc($1)/ge;
762              
763             $pod .= qq{=head2 $Tag
764              
765             =over
766              
767             };
768              
769             foreach my $method (sort { $a->{name} cmp $b->{name} }
770 0           grep { $_->{tags}->[0] eq $tag } # this chapter
771 0           values %$META ) { # all
772 0           $pod .= qq{=item * B<$method->{name}>
773 0            
774 0           };
  0            
775             #$pod .= Dumper $method;
776 0           if ($method->{method} eq 'GETPUT') {
777             $pod .= $method->{op}->[0]->{description};
778             # $pod .= qq{ [L <Spec|${SPEC_base}/$method->{tags}->[0]/$method->{opid}->[0]> ]};
779             $pod .= "\n\n";
780             $pod .= $method->{op}->[1]->{description};
781             # $pod .= qq{ [L <Spec|${SPEC_base}/$method->{tags}->[0]/$method->{opid}->[1]> ]};
782 0           $pod .= "\n\n";
  0            
783 0           } else {
784             $pod .= $method->{op}->{ lc( $method->{method} ) }->{description};
785 0            
786             $log->debug( "XXXX $method->{opid} ") unless $method->{tags}->[0];
787             $log->debug( "YYYY $method->{opid} ".Dumper $method) unless $method->{opid};
788              
789 0 0         # $pod .= qq{ [L <Spec|${SPEC_base}/$method->{tags}->[0]/$method->{opid}> ]};
790 0           $pod .= "\n\n";
791             }
792 0           $pod .= q{=over
793 0            
794             };
795 0           foreach my $p (sort @{ $method->{fields} }) {
796             $pod .= qq{=item C<$p>: string, required
797 0            
798             };
799 0 0         }
800 0 0         foreach my $p (sort keys %{ $method->{params} }) {
801             # my $params = ref($method->{op}) eq 'ARRAY' ? $method->{op}->[1]->{parameters} : $method->{op}->{parameters};
802             #$pod .= Dumper $params;
803 0           my $docp = $method->{params}->{$p};
804             #$pod .= Dumper $docp;
805 0           $pod .= qq{=item C<$p>: } . ($docp->{type} ? $docp->{type} : "see Spec") . ', ' . ($docp->{required} ? "required" : "optional") . q{
806              
807             };
808 0           }
  0            
809 0           #warn "xxxx".Dumper $method->{body};
810             foreach my $p (sort keys %{ $method->{body} }) {
811             #warn "\\_ $p";
812             # my $params = ref($method->{op}) eq 'ARRAY' ? $method->{op}->[1]->{parameters} : $method->{op}->{parameters};
813 0           #$pod .= Dumper $params;
  0            
814             my $docp = $method->{body}->{$p};
815             #warn "\\_ ".Dumper $docp;
816 0           #$pod .= Dumper $docp;
817             $pod .= qq{=item C<body>: $p};
818 0 0         $pod .= ', ' . ($docp->{required} ? "required" : "optional");
    0          
819             if ($docp->{type}) {
820             $pod .= ", ".$docp->{type};
821             } elsif ($docp->{schema}) {
822             if (my $s = $docp->{schema}->{'$ref'}) {
823 0           $s =~ s{\#/definitions/}{};
  0            
824              
825             my $h = shift;
826             use YAML qw(Dump);
827 0           return
828             "\n\n"
829             # ."=begin text\n"
830 0           .( join "\n",
831 0 0         map { " $_" }
832 0 0         grep { $_ !~ /x-go-/ }
    0          
833 0           grep { $_ !~ /---/ }
834             split /\n/,
835 0 0         Dump ($h)
836 0           )
837             # ."\n=end text\n"
838             ;
839 0     0     }
840 3     3   23  
  3         7  
  3         1439  
841             $pod .= _format_yaml_pod( $rest_api->{definitions}->{$s} );
842             } else {
843             $pod .= _format_yaml_pod( $docp->{schema} );
844             }
845 0           } else {
846 0           $pod .= "see Spec";
847 0           }
  0            
848             $pod .= "\n\n";
849             }
850              
851             $pod .= q{
852              
853             =back
854              
855 0           };
856             }
857 0          
858             $pod .= q{
859              
860 0           =back
861              
862 0           };
863              
864             }
865 0            
866             $pod .= q{
867              
868             =head1 PSEUDO OBJECT ORIENTATION
869              
870             Just for the sake of experimentation, I added a sub-package C<lxd::instance>. To add OO-flavour, you
871             simply bless the instance HASH with it:
872 0            
873             my $r = $lxd->instance( name => "my-container" )->get;
874             my $i = bless $r, 'lxd::instance';
875              
876             From then on, the following methods can operate on it:
877              
878             =over
879              
880 0           =item * C<restart>
881              
882             =item * C<start>
883              
884             =item * C<freeze>
885              
886             =item * C<unfreeze>
887              
888             =item * C<stop>
889              
890             =item * C<state>
891              
892             =back
893              
894             Well, I'm not a big fan of objects.
895              
896              
897             =head1 EXAMPLES
898              
899             I encourage you to look at the C<02_instances.t> test suite. It will show a complete life cycle for
900             containers.
901              
902             =head1 SEE ALSO
903              
904             =over
905              
906             =item * L<Linux::LXC>
907              
908             uses actually the existing lxc client to get the information
909              
910             =item * L<https://github.com/jipipayo/Linux-REST-LXD>
911              
912             pretty old, never persued
913              
914             =back
915              
916              
917             =head1 HINTS
918              
919             =over
920              
921             =item * How to generate an SSL client certificate for LXD
922              
923             First, I found one client certificate (plus the key) in my installation at:
924              
925             /root/snap/lxd/common/config/
926              
927             Alternatively, L<you can run your own small CA, generate a .crt and .key for a client, and then
928             add it to lxd to trust it|https://serverfault.com/questions/882880/authenticate-to-lxd-rest-api-over-network-certificate-auth-keeps-failing>.
929              
930             More on this topic is L<here|https://linuxcontainers.org/lxd/docs/master/authentication/>
931              
932             =item * How to find the SSL fingerprint for an LXD server
933              
934             With recent versions of LXD this is fairly easy:
935              
936             $ lxc info|grep fingerprint
937              
938             It is a SHA256 hash, so you will have to prefix it with C<sha256$> (no blanks) when you pass it to C<SSL_fingerprint>.
939              
940             Alternatively, you can try to find the server certificate and use C<openssl> to derive a fingerprint of your choice.
941              
942             =back
943              
944             =head1 ISSUES
945              
946             Open issues are probably best put onto L<Github|https://github.com/drrrho/net-async-webservice-lxd>
947              
948             =head1 AUTHOR
949              
950             Robert Barta, C<< <rho at devc.at> >>
951              
952             =head1 CREDITS
953              
954             L<IO::Async>, L<Net::Async::HTTP>, L<IO::Socket::SSL> and friends are amazing.
955              
956             =head1 LICENSE AND COPYRIGHT
957              
958             Copyright 2022 Robert Barta.
959              
960             }
961             .
962             read_file("LICENSE")
963             ;
964             print $pod;
965             }
966              
967              
968             1; # End of Net::Async::WebService::lxd
969              
970             definitions:
971             Certificate:
972             description: Certificate represents a LXD certificate
973             properties:
974             certificate:
975             description: The certificate itself, as PEM encoded X509
976             example: X509 PEM certificate
977             type: string
978 0           x-go-name: Certificate
979             fingerprint:
980             description: SHA256 fingerprint of the certificate
981             example: fd200419b271f1dc2a5591b693cc5774b7f234e1ff8c6b78ad703b6888fe2b69
982             readOnly: true
983             type: string
984             x-go-name: Fingerprint
985             name:
986             description: Name associated with the certificate
987             example: castiana
988             type: string
989             x-go-name: Name
990             projects:
991             description: List of allowed projects (applies when restricted)
992             example:
993             - default
994             - foo
995             - bar
996             items:
997             type: string
998             type: array
999             x-go-name: Projects
1000             restricted:
1001             description: Whether to limit the certificate to listed projects
1002             example: true
1003             type: boolean
1004             x-go-name: Restricted
1005             type:
1006             description: Usage type for the certificate (only client currently)
1007             example: client
1008             type: string
1009             x-go-name: Type
1010             type: object
1011             x-go-package: github.com/lxc/lxd/shared/api
1012             CertificateAddToken:
1013             properties:
1014             addresses:
1015             description: The addresses of the server
1016             example:
1017             - 10.98.30.229:8443
1018             items:
1019             type: string
1020             type: array
1021             x-go-name: Addresses
1022             client_name:
1023             description: The name of the new client
1024             example: user@host
1025             type: string
1026             x-go-name: ClientName
1027             fingerprint:
1028             description: The fingerprint of the network certificate
1029             example: 57bb0ff4340b5bb28517e062023101adf788c37846dc8b619eb2c3cb4ef29436
1030             type: string
1031             x-go-name: Fingerprint
1032             secret:
1033             description: The random join secret
1034             example: 2b2284d44db32675923fe0d2020477e0e9be11801ff70c435e032b97028c35cd
1035             type: string
1036             x-go-name: Secret
1037             title: CertificateAddToken represents the fields contained within an encoded certificate
1038             add token.
1039             type: object
1040             x-go-package: github.com/lxc/lxd/shared/api
1041             CertificatePut:
1042             description: CertificatePut represents the modifiable fields of a LXD certificate
1043             properties:
1044             certificate:
1045             description: The certificate itself, as PEM encoded X509
1046             example: X509 PEM certificate
1047             type: string
1048             x-go-name: Certificate
1049             name:
1050             description: Name associated with the certificate
1051             example: castiana
1052             type: string
1053             x-go-name: Name
1054             projects:
1055             description: List of allowed projects (applies when restricted)
1056             example:
1057             - default
1058             - foo
1059             - bar
1060             items:
1061             type: string
1062             type: array
1063             x-go-name: Projects
1064             restricted:
1065             description: Whether to limit the certificate to listed projects
1066             example: true
1067             type: boolean
1068             x-go-name: Restricted
1069             type:
1070             description: Usage type for the certificate (only client currently)
1071             example: client
1072             type: string
1073             x-go-name: Type
1074             type: object
1075             x-go-package: github.com/lxc/lxd/shared/api
1076             CertificatesPost:
1077             description: CertificatesPost represents the fields of a new LXD certificate
1078             properties:
1079             certificate:
1080             description: The certificate itself, as PEM encoded X509
1081             example: X509 PEM certificate
1082             type: string
1083             x-go-name: Certificate
1084             name:
1085             description: Name associated with the certificate
1086             example: castiana
1087             type: string
1088             x-go-name: Name
1089             password:
1090             description: Server trust password (used to add an untrusted client)
1091             example: blah
1092             type: string
1093             x-go-name: Password
1094             projects:
1095             description: List of allowed projects (applies when restricted)
1096             example:
1097             - default
1098             - foo
1099             - bar
1100             items:
1101             type: string
1102             type: array
1103             x-go-name: Projects
1104             restricted:
1105             description: Whether to limit the certificate to listed projects
1106             example: true
1107             type: boolean
1108             x-go-name: Restricted
1109             token:
1110             description: Whether to create a certificate add token
1111             example: true
1112             type: boolean
1113             x-go-name: Token
1114             type:
1115             description: Usage type for the certificate (only client currently)
1116             example: client
1117             type: string
1118             x-go-name: Type
1119             type: object
1120             x-go-package: github.com/lxc/lxd/shared/api
1121             Cluster:
1122             properties:
1123             enabled:
1124             description: Whether clustering is enabled
1125             example: true
1126             type: boolean
1127             x-go-name: Enabled
1128             member_config:
1129             description: List of member configuration keys (used during join)
1130             example: []
1131             items:
1132             $ref: '#/definitions/ClusterMemberConfigKey'
1133             type: array
1134             x-go-name: MemberConfig
1135             server_name:
1136             description: Name of the cluster member answering the request
1137             example: lxd01
1138             type: string
1139             x-go-name: ServerName
1140             title: Cluster represents high-level information about a LXD cluster.
1141             type: object
1142             x-go-package: github.com/lxc/lxd/shared/api
1143             ClusterCertificatePut:
1144             description: ClusterCertificatePut represents the certificate and key pair for
1145             all members in a LXD Cluster
1146             properties:
1147             cluster_certificate:
1148             description: The new certificate (X509 PEM encoded) for the cluster
1149             example: X509 PEM certificate
1150             type: string
1151             x-go-name: ClusterCertificate
1152             cluster_certificate_key:
1153             description: The new certificate key (X509 PEM encoded) for the cluster
1154             example: X509 PEM certificate key
1155             type: string
1156             x-go-name: ClusterCertificateKey
1157             type: object
1158             x-go-package: github.com/lxc/lxd/shared/api
1159             ClusterGroup:
1160             properties:
1161             description:
1162             description: The description of the cluster group
1163             example: amd64 servers
1164             type: string
1165             x-go-name: Description
1166             members:
1167             description: List of members in this group
1168             example:
1169             - node1
1170             - node3
1171             items:
1172             type: string
1173             type: array
1174             x-go-name: Members
1175             name:
1176             description: The new name of the cluster group
1177             example: group1
1178             type: string
1179             x-go-name: Name
1180             title: ClusterGroup represents a cluster group.
1181             type: object
1182             x-go-package: github.com/lxc/lxd/shared/api
1183             ClusterGroupPost:
1184             properties:
1185             name:
1186             description: The new name of the cluster group
1187             example: group1
1188             type: string
1189             x-go-name: Name
1190             title: ClusterGroupPost represents the fields required to rename a cluster group.
1191             type: object
1192             x-go-package: github.com/lxc/lxd/shared/api
1193             ClusterGroupPut:
1194             properties:
1195             description:
1196             description: The description of the cluster group
1197             example: amd64 servers
1198             type: string
1199             x-go-name: Description
1200             members:
1201             description: List of members in this group
1202             example:
1203             - node1
1204             - node3
1205             items:
1206             type: string
1207             type: array
1208             x-go-name: Members
1209             title: ClusterGroupPut represents the modifiable fields of a cluster group.
1210             type: object
1211             x-go-package: github.com/lxc/lxd/shared/api
1212             ClusterGroupsPost:
1213             properties:
1214             description:
1215             description: The description of the cluster group
1216             example: amd64 servers
1217             type: string
1218             x-go-name: Description
1219             members:
1220             description: List of members in this group
1221             example:
1222             - node1
1223             - node3
1224             items:
1225             type: string
1226             type: array
1227             x-go-name: Members
1228             name:
1229             description: The new name of the cluster group
1230             example: group1
1231             type: string
1232             x-go-name: Name
1233             title: ClusterGroupsPost represents the fields available for a new cluster group.
1234             type: object
1235             x-go-package: github.com/lxc/lxd/shared/api
1236             ClusterMember:
1237             properties:
1238             architecture:
1239             description: The primary architecture of the cluster member
1240             example: x86_64
1241             type: string
1242             x-go-name: Architecture
1243             config:
1244             additionalProperties:
1245             type: string
1246             description: Additional configuration information
1247             example:
1248             scheduler.instance: all
1249             type: object
1250             x-go-name: Config
1251             database:
1252             description: Whether the cluster member is a database server
1253             example: true
1254             type: boolean
1255             x-go-name: Database
1256             description:
1257             description: Cluster member description
1258             example: AMD Epyc 32c/64t
1259             type: string
1260             x-go-name: Description
1261             failure_domain:
1262             description: Name of the failure domain for this cluster member
1263             example: rack1
1264             type: string
1265             x-go-name: FailureDomain
1266             groups:
1267             description: List of cluster groups this member belongs to
1268             example:
1269             - group1
1270             - group2
1271             items:
1272             type: string
1273             type: array
1274             x-go-name: Groups
1275             message:
1276             description: Additional status information
1277             example: fully operational
1278             type: string
1279             x-go-name: Message
1280             roles:
1281             description: List of roles held by this cluster member
1282             example:
1283             - database
1284             items:
1285             type: string
1286             type: array
1287             x-go-name: Roles
1288             server_name:
1289             description: Name of the cluster member
1290             example: lxd01
1291             type: string
1292             x-go-name: ServerName
1293             status:
1294             description: Current status
1295             example: Online
1296             type: string
1297             x-go-name: Status
1298             url:
1299             description: URL at which the cluster member can be reached
1300             example: https://10.0.0.1:8443
1301             type: string
1302             x-go-name: URL
1303             title: ClusterMember represents the a LXD node in the cluster.
1304             type: object
1305             x-go-package: github.com/lxc/lxd/shared/api
1306             ClusterMemberConfigKey:
1307             description: |-
1308             The Value field is empty when getting clustering information with GET
1309             1.0/cluster, and should be filled by the joining node when performing a PUT
1310             1.0/cluster join request.
1311             properties:
1312             description:
1313             description: A human friendly description key
1314             example: '"source" property for storage pool "local"'
1315             type: string
1316             x-go-name: Description
1317             entity:
1318             description: The kind of configuration key (network, storage-pool, ...)
1319             example: storage-pool
1320             type: string
1321             x-go-name: Entity
1322             key:
1323             description: The name of the key
1324             example: source
1325             type: string
1326             x-go-name: Key
1327             name:
1328             description: The name of the object requiring this key
1329             example: local
1330             type: string
1331             x-go-name: Name
1332             value:
1333             description: The value on the answering cluster member
1334             example: /dev/sdb
1335             type: string
1336             x-go-name: Value
1337             title: |-
1338             ClusterMemberConfigKey represents a single config key that a new member of
1339             the cluster is required to provide when joining.
1340             type: object
1341             x-go-package: github.com/lxc/lxd/shared/api
1342             ClusterMemberJoinToken:
1343             properties:
1344             addresses:
1345             description: The addresses of existing online cluster members
1346             example:
1347             - 10.98.30.229:8443
1348             items:
1349             type: string
1350             type: array
1351             x-go-name: Addresses
1352             fingerprint:
1353             description: The fingerprint of the network certificate
1354             example: 57bb0ff4340b5bb28517e062023101adf788c37846dc8b619eb2c3cb4ef29436
1355             type: string
1356             x-go-name: Fingerprint
1357             secret:
1358             description: The random join secret.
1359             example: 2b2284d44db32675923fe0d2020477e0e9be11801ff70c435e032b97028c35cd
1360             type: string
1361             x-go-name: Secret
1362             server_name:
1363             description: The name of the new cluster member
1364             example: lxd02
1365             type: string
1366             x-go-name: ServerName
1367             title: ClusterMemberJoinToken represents the fields contained within an encoded
1368             cluster member join token.
1369             type: object
1370             x-go-package: github.com/lxc/lxd/shared/api
1371             ClusterMemberPost:
1372             properties:
1373             server_name:
1374             description: The new name of the cluster member
1375             example: lxd02
1376             type: string
1377             x-go-name: ServerName
1378             title: ClusterMemberPost represents the fields required to rename a LXD node.
1379             type: object
1380             x-go-package: github.com/lxc/lxd/shared/api
1381             ClusterMemberPut:
1382             description: ClusterMemberPut represents the the modifiable fields of a LXD cluster
1383             member
1384             properties:
1385             config:
1386             additionalProperties:
1387             type: string
1388             description: Additional configuration information
1389             example:
1390             scheduler.instance: all
1391             type: object
1392             x-go-name: Config
1393             description:
1394             description: Cluster member description
1395             example: AMD Epyc 32c/64t
1396             type: string
1397             x-go-name: Description
1398             failure_domain:
1399             description: Name of the failure domain for this cluster member
1400             example: rack1
1401             type: string
1402             x-go-name: FailureDomain
1403             groups:
1404             description: List of cluster groups this member belongs to
1405             example:
1406             - group1
1407             - group2
1408             items:
1409             type: string
1410             type: array
1411             x-go-name: Groups
1412             roles:
1413             description: List of roles held by this cluster member
1414             example:
1415             - database
1416             items:
1417             type: string
1418             type: array
1419             x-go-name: Roles
1420             type: object
1421             x-go-package: github.com/lxc/lxd/shared/api
1422             ClusterMemberStatePost:
1423             properties:
1424             action:
1425             description: The action to be performed. Valid actions are "evacuate" and
1426             "restore".
1427             example: evacuate
1428             type: string
1429             x-go-name: Action
1430             title: ClusterMemberStatePost represents the fields required to evacuate a cluster
1431             member.
1432             type: object
1433             x-go-package: github.com/lxc/lxd/shared/api
1434             ClusterMembersPost:
1435             properties:
1436             server_name:
1437             description: The name of the new cluster member
1438             example: lxd02
1439             type: string
1440             x-go-name: ServerName
1441             title: ClusterMembersPost represents the fields required to request a join token
1442             to add a member to the cluster.
1443             type: object
1444             x-go-package: github.com/lxc/lxd/shared/api
1445             ClusterPut:
1446             description: |-
1447             ClusterPut represents the fields required to bootstrap or join a LXD
1448             cluster.
1449             properties:
1450             cluster_address:
1451             description: The address of the cluster you wish to join
1452             example: 10.0.0.1:8443
1453             type: string
1454             x-go-name: ClusterAddress
1455             cluster_certificate:
1456             description: The expected certificate (X509 PEM encoded) for the cluster
1457             example: X509 PEM certificate
1458             type: string
1459             x-go-name: ClusterCertificate
1460             cluster_password:
1461             description: The trust password of the cluster you're trying to join
1462             example: blah
1463             type: string
1464             x-go-name: ClusterPassword
1465             enabled:
1466             description: Whether clustering is enabled
1467             example: true
1468             type: boolean
1469             x-go-name: Enabled
1470             member_config:
1471             description: List of member configuration keys (used during join)
1472             example: []
1473             items:
1474             $ref: '#/definitions/ClusterMemberConfigKey'
1475             type: array
1476             x-go-name: MemberConfig
1477             server_address:
1478             description: The local address to use for cluster communication
1479             example: 10.0.0.2:8443
1480             type: string
1481             x-go-name: ServerAddress
1482             server_name:
1483             description: Name of the cluster member answering the request
1484             example: lxd01
1485             type: string
1486             x-go-name: ServerName
1487             type: object
1488             x-go-package: github.com/lxc/lxd/shared/api
1489             Event:
1490             description: Event represents an event entry (over websocket)
1491             properties:
1492             location:
1493             description: Originating cluster member
1494             example: lxd01
1495             type: string
1496             x-go-name: Location
1497             metadata:
1498             description: JSON encoded metadata (see EventLogging, EventLifecycle or Operation)
1499             example:
1500             action: instance-started
1501             context: {}
1502             source: /1.0/instances/c1
1503             type: object
1504             x-go-name: Metadata
1505             project:
1506             description: Project the event belongs to.
1507             example: default
1508             type: string
1509             x-go-name: Project
1510             timestamp:
1511             description: Time at which the event was sent
1512             example: "2021-02-24T19:00:45.452649098-05:00"
1513             format: date-time
1514             type: string
1515             x-go-name: Timestamp
1516             type:
1517             description: Event type (one of operation, logging or lifecycle)
1518             example: lifecycle
1519             type: string
1520             x-go-name: Type
1521             type: object
1522             x-go-package: github.com/lxc/lxd/shared/api
1523             Image:
1524             description: Image represents a LXD image
1525             properties:
1526             aliases:
1527             description: List of aliases
1528             items:
1529             $ref: '#/definitions/ImageAlias'
1530             type: array
1531             x-go-name: Aliases
1532             architecture:
1533             description: Architecture
1534             example: x86_64
1535             type: string
1536             x-go-name: Architecture
1537             auto_update:
1538             description: Whether the image should auto-update when a new build is available
1539             example: true
1540             type: boolean
1541             x-go-name: AutoUpdate
1542             cached:
1543             description: Whether the image is an automatically cached remote image
1544             example: true
1545             type: boolean
1546             x-go-name: Cached
1547             created_at:
1548             description: When the image was originally created
1549             example: "2021-03-23T20:00:00-04:00"
1550             format: date-time
1551             type: string
1552             x-go-name: CreatedAt
1553             expires_at:
1554             description: When the image becomes obsolete
1555             example: "2025-03-23T20:00:00-04:00"
1556             format: date-time
1557             type: string
1558             x-go-name: ExpiresAt
1559             filename:
1560             description: Original filename
1561             example: 06b86454720d36b20f94e31c6812e05ec51c1b568cf3a8abd273769d213394bb.rootfs
1562             type: string
1563             x-go-name: Filename
1564             fingerprint:
1565             description: Full SHA-256 fingerprint
1566             example: 06b86454720d36b20f94e31c6812e05ec51c1b568cf3a8abd273769d213394bb
1567             type: string
1568             x-go-name: Fingerprint
1569             last_used_at:
1570             description: Last time the image was used
1571             example: "2021-03-22T20:39:00.575185384-04:00"
1572             format: date-time
1573             type: string
1574             x-go-name: LastUsedAt
1575             profiles:
1576             description: List of profiles to use when creating from this image (if none
1577             provided by user)
1578             example:
1579             - default
1580             items:
1581             type: string
1582             type: array
1583             x-go-name: Profiles
1584             properties:
1585             additionalProperties:
1586             type: string
1587             description: Descriptive properties
1588             example:
1589             os: Ubuntu
1590             release: focal
1591             variant: cloud
1592             type: object
1593             x-go-name: Properties
1594             public:
1595             description: Whether the image is available to unauthenticated users
1596             example: false
1597             type: boolean
1598             x-go-name: Public
1599             size:
1600             description: Size of the image in bytes
1601             example: 272237676
1602             format: int64
1603             type: integer
1604             x-go-name: Size
1605             type:
1606             description: Type of image (container or virtual-machine)
1607             example: container
1608             type: string
1609             x-go-name: Type
1610             update_source:
1611             $ref: '#/definitions/ImageSource'
1612             uploaded_at:
1613             description: When the image was added to this LXD server
1614             example: "2021-03-24T14:18:15.115036787-04:00"
1615             format: date-time
1616             type: string
1617             x-go-name: UploadedAt
1618             type: object
1619             x-go-package: github.com/lxc/lxd/shared/api
1620             ImageAlias:
1621             description: ImageAlias represents an alias from the alias list of a LXD image
1622             properties:
1623             description:
1624             description: Description of the alias
1625             example: Our preferred Ubuntu image
1626             type: string
1627             x-go-name: Description
1628             name:
1629             description: Name of the alias
1630             example: ubuntu-20.04
1631             type: string
1632             x-go-name: Name
1633             type: object
1634             x-go-package: github.com/lxc/lxd/shared/api
1635             ImageAliasesEntry:
1636             description: ImageAliasesEntry represents a LXD image alias
1637             properties:
1638             description:
1639             description: Alias description
1640             example: Our preferred Ubuntu image
1641             type: string
1642             x-go-name: Description
1643             name:
1644             description: Alias name
1645             example: ubuntu-20.04
1646             type: string
1647             x-go-name: Name
1648             target:
1649             description: Target fingerprint for the alias
1650             example: 06b86454720d36b20f94e31c6812e05ec51c1b568cf3a8abd273769d213394bb
1651             type: string
1652             x-go-name: Target
1653             type:
1654             description: Alias type (container or virtual-machine)
1655             example: container
1656             type: string
1657             x-go-name: Type
1658             type: object
1659             x-go-package: github.com/lxc/lxd/shared/api
1660             ImageAliasesEntryPost:
1661             description: ImageAliasesEntryPost represents the required fields to rename a
1662             LXD image alias
1663             properties:
1664             name:
1665             description: Alias name
1666             example: ubuntu-20.04
1667             type: string
1668             x-go-name: Name
1669             type: object
1670             x-go-package: github.com/lxc/lxd/shared/api
1671             ImageAliasesEntryPut:
1672             description: ImageAliasesEntryPut represents the modifiable fields of a LXD image
1673             alias
1674             properties:
1675             description:
1676             description: Alias description
1677             example: Our preferred Ubuntu image
1678             type: string
1679             x-go-name: Description
1680             target:
1681             description: Target fingerprint for the alias
1682             example: 06b86454720d36b20f94e31c6812e05ec51c1b568cf3a8abd273769d213394bb
1683             type: string
1684             x-go-name: Target
1685             type: object
1686             x-go-package: github.com/lxc/lxd/shared/api
1687             ImageAliasesPost:
1688             description: ImageAliasesPost represents a new LXD image alias
1689             properties:
1690             description:
1691             description: Alias description
1692             example: Our preferred Ubuntu image
1693             type: string
1694             x-go-name: Description
1695             name:
1696             description: Alias name
1697             example: ubuntu-20.04
1698             type: string
1699             x-go-name: Name
1700             target:
1701             description: Target fingerprint for the alias
1702             example: 06b86454720d36b20f94e31c6812e05ec51c1b568cf3a8abd273769d213394bb
1703             type: string
1704             x-go-name: Target
1705             type:
1706             description: Alias type (container or virtual-machine)
1707             example: container
1708             type: string
1709             x-go-name: Type
1710             type: object
1711             x-go-package: github.com/lxc/lxd/shared/api
1712             ImageExportPost:
1713             description: ImageExportPost represents the fields required to export a LXD image
1714             properties:
1715             aliases:
1716             description: List of aliases to set on the image
1717             items:
1718             $ref: '#/definitions/ImageAlias'
1719             type: array
1720             x-go-name: Aliases
1721             certificate:
1722             description: Remote server certificate
1723             example: X509 PEM certificate
1724             type: string
1725             x-go-name: Certificate
1726             secret:
1727             description: Image receive secret
1728             example: RANDOM-STRING
1729             type: string
1730             x-go-name: Secret
1731             target:
1732             description: Target server URL
1733             example: https://1.2.3.4:8443
1734             type: string
1735             x-go-name: Target
1736             type: object
1737             x-go-package: github.com/lxc/lxd/shared/api
1738             ImageMetadata:
1739             description: ImageMetadata represents LXD image metadata (used in image tarball)
1740             properties:
1741             architecture:
1742             description: Architecture name
1743             example: x86_64
1744             type: string
1745             x-go-name: Architecture
1746             creation_date:
1747             description: Image creation data (as UNIX epoch)
1748             example: 1620655439
1749             format: int64
1750             type: integer
1751             x-go-name: CreationDate
1752             expiry_date:
1753             description: Image expiry data (as UNIX epoch)
1754             example: 1620685757
1755             format: int64
1756             type: integer
1757             x-go-name: ExpiryDate
1758             properties:
1759             additionalProperties:
1760             type: string
1761             description: Descriptive properties
1762             example:
1763             os: Ubuntu
1764             release: focal
1765             variant: cloud
1766             type: object
1767             x-go-name: Properties
1768             templates:
1769             additionalProperties:
1770             $ref: '#/definitions/ImageMetadataTemplate'
1771             description: Template for files in the image
1772             type: object
1773             x-go-name: Templates
1774             type: object
1775             x-go-package: github.com/lxc/lxd/shared/api
1776             ImageMetadataTemplate:
1777             description: ImageMetadataTemplate represents a template entry in image metadata
1778             (used in image tarball)
1779             properties:
1780             create_only:
1781             description: Whether to trigger only if the file is missing
1782             example: false
1783             type: boolean
1784             x-go-name: CreateOnly
1785             properties:
1786             additionalProperties:
1787             type: string
1788             description: Key/value properties to pass to the template
1789             example:
1790             foo: bar
1791             type: object
1792             x-go-name: Properties
1793             template:
1794             description: The template itself as a valid pongo2 template
1795             example: pongo2-template
1796             type: string
1797             x-go-name: Template
1798             when:
1799             description: When to trigger the template (create, copy or start)
1800             example: create
1801             items:
1802             type: string
1803             type: array
1804             x-go-name: When
1805             type: object
1806             x-go-package: github.com/lxc/lxd/shared/api
1807             ImagePut:
1808             description: ImagePut represents the modifiable fields of a LXD image
1809             properties:
1810             auto_update:
1811             description: Whether the image should auto-update when a new build is available
1812             example: true
1813             type: boolean
1814             x-go-name: AutoUpdate
1815             expires_at:
1816             description: When the image becomes obsolete
1817             example: "2025-03-23T20:00:00-04:00"
1818             format: date-time
1819             type: string
1820             x-go-name: ExpiresAt
1821             profiles:
1822             description: List of profiles to use when creating from this image (if none
1823             provided by user)
1824             example:
1825             - default
1826             items:
1827             type: string
1828             type: array
1829             x-go-name: Profiles
1830             properties:
1831             additionalProperties:
1832             type: string
1833             description: Descriptive properties
1834             example:
1835             os: Ubuntu
1836             release: focal
1837             variant: cloud
1838             type: object
1839             x-go-name: Properties
1840             public:
1841             description: Whether the image is available to unauthenticated users
1842             example: false
1843             type: boolean
1844             x-go-name: Public
1845             type: object
1846             x-go-package: github.com/lxc/lxd/shared/api
1847             ImageSource:
1848             description: ImageSource represents the source of a LXD image
1849             properties:
1850             alias:
1851             description: Source alias to download from
1852             example: focal
1853             type: string
1854             x-go-name: Alias
1855             certificate:
1856             description: Source server certificate (if not trusted by system CA)
1857             example: X509 PEM certificate
1858             type: string
1859             x-go-name: Certificate
1860             image_type:
1861             description: Type of image (container or virtual-machine)
1862             example: container
1863             type: string
1864             x-go-name: ImageType
1865             protocol:
1866             description: Source server protocol
1867             example: simplestreams
1868             type: string
1869             x-go-name: Protocol
1870             server:
1871             description: URL of the source server
1872             example: https://images.linuxcontainers.org
1873             type: string
1874             x-go-name: Server
1875             type: object
1876             x-go-package: github.com/lxc/lxd/shared/api
1877             ImagesPost:
1878             description: ImagesPost represents the fields available for a new LXD image
1879             properties:
1880             aliases:
1881             description: Aliases to add to the image
1882             example:
1883             - name: foo
1884             - name: bar
1885             items:
1886             $ref: '#/definitions/ImageAlias'
1887             type: array
1888             x-go-name: Aliases
1889             auto_update:
1890             description: Whether the image should auto-update when a new build is available
1891             example: true
1892             type: boolean
1893             x-go-name: AutoUpdate
1894             compression_algorithm:
1895             description: Compression algorithm to use when turning an instance into an
1896             image
1897             example: gzip
1898             type: string
1899             x-go-name: CompressionAlgorithm
1900             expires_at:
1901             description: When the image becomes obsolete
1902             example: "2025-03-23T20:00:00-04:00"
1903             format: date-time
1904             type: string
1905             x-go-name: ExpiresAt
1906             filename:
1907             description: Original filename of the image
1908             example: lxd.tar.xz
1909             type: string
1910             x-go-name: Filename
1911             profiles:
1912             description: List of profiles to use when creating from this image (if none
1913             provided by user)
1914             example:
1915             - default
1916             items:
1917             type: string
1918             type: array
1919             x-go-name: Profiles
1920             properties:
1921             additionalProperties:
1922             type: string
1923             description: Descriptive properties
1924             example:
1925             os: Ubuntu
1926             release: focal
1927             variant: cloud
1928             type: object
1929             x-go-name: Properties
1930             public:
1931             description: Whether the image is available to unauthenticated users
1932             example: false
1933             type: boolean
1934             x-go-name: Public
1935             source:
1936             $ref: '#/definitions/ImagesPostSource'
1937             type: object
1938             x-go-package: github.com/lxc/lxd/shared/api
1939             ImagesPostSource:
1940             description: ImagesPostSource represents the source of a new LXD image
1941             properties:
1942             alias:
1943             description: Source alias to download from
1944             example: focal
1945             type: string
1946             x-go-name: Alias
1947             certificate:
1948             description: Source server certificate (if not trusted by system CA)
1949             example: X509 PEM certificate
1950             type: string
1951             x-go-name: Certificate
1952             fingerprint:
1953             description: Source image fingerprint (for type "image")
1954             example: 8ae945c52bb2f2df51c923b04022312f99bbb72c356251f54fa89ea7cf1df1d0
1955             type: string
1956             x-go-name: Fingerprint
1957             image_type:
1958             description: Type of image (container or virtual-machine)
1959             example: container
1960             type: string
1961             x-go-name: ImageType
1962             mode:
1963             description: Transfer mode (push or pull)
1964             example: pull
1965             type: string
1966             x-go-name: Mode
1967             name:
1968             description: Instance name (for type "instance" or "snapshot")
1969             example: c1/snap0
1970             type: string
1971             x-go-name: Name
1972             project:
1973             description: Source project name
1974             example: project1
1975             type: string
1976             x-go-name: Project
1977             protocol:
1978             description: Source server protocol
1979             example: simplestreams
1980             type: string
1981             x-go-name: Protocol
1982             secret:
1983             description: Source image server secret token (when downloading private images)
1984             example: RANDOM-STRING
1985             type: string
1986             x-go-name: Secret
1987             server:
1988             description: URL of the source server
1989             example: https://images.linuxcontainers.org
1990             type: string
1991             x-go-name: Server
1992             type:
1993             description: Type of image source (instance, snapshot, image or url)
1994             example: instance
1995             type: string
1996             x-go-name: Type
1997             url:
1998             description: Source URL (for type "url")
1999             example: https://some-server.com/some-directory/
2000             type: string
2001             x-go-name: URL
2002             type: object
2003             x-go-package: github.com/lxc/lxd/shared/api
2004             Instance:
2005             properties:
2006             architecture:
2007             description: Architecture name
2008             example: x86_64
2009             type: string
2010             x-go-name: Architecture
2011             config:
2012             additionalProperties:
2013             type: string
2014             description: Instance configuration (see doc/instances.md)
2015             example:
2016             security.nesting: "true"
2017             type: object
2018             x-go-name: Config
2019             created_at:
2020             description: Instance creation timestamp
2021             example: "2021-03-23T20:00:00-04:00"
2022             format: date-time
2023             type: string
2024             x-go-name: CreatedAt
2025             description:
2026             description: Instance description
2027             example: My test instance
2028             type: string
2029             x-go-name: Description
2030             devices:
2031             additionalProperties:
2032             additionalProperties:
2033             type: string
2034             type: object
2035             description: Instance devices (see doc/instances.md)
2036             example:
2037             root:
2038             path: /
2039             pool: default
2040             type: disk
2041             type: object
2042             x-go-name: Devices
2043             ephemeral:
2044             description: Whether the instance is ephemeral (deleted on shutdown)
2045             example: false
2046             type: boolean
2047             x-go-name: Ephemeral
2048             expanded_config:
2049             additionalProperties:
2050             type: string
2051             description: Expanded configuration (all profiles and local config merged)
2052             example:
2053             security.nesting: "true"
2054             type: object
2055             x-go-name: ExpandedConfig
2056             expanded_devices:
2057             additionalProperties:
2058             additionalProperties:
2059             type: string
2060             type: object
2061             description: Expanded devices (all profiles and local devices merged)
2062             example:
2063             root:
2064             path: /
2065             pool: default
2066             type: disk
2067             type: object
2068             x-go-name: ExpandedDevices
2069             last_used_at:
2070             description: Last start timestamp
2071             example: "2021-03-23T20:00:00-04:00"
2072             format: date-time
2073             type: string
2074             x-go-name: LastUsedAt
2075             location:
2076             description: What cluster member this instance is located on
2077             example: lxd01
2078             type: string
2079             x-go-name: Location
2080             name:
2081             description: Instance name
2082             example: foo
2083             type: string
2084             x-go-name: Name
2085             profiles:
2086             description: List of profiles applied to the instance
2087             example:
2088             - default
2089             items:
2090             type: string
2091             type: array
2092             x-go-name: Profiles
2093             project:
2094             description: Instance project name
2095             example: foo
2096             type: string
2097             x-go-name: Project
2098             restore:
2099             description: If set, instance will be restored to the provided snapshot name
2100             example: snap0
2101             type: string
2102             x-go-name: Restore
2103             stateful:
2104             description: Whether the instance currently has saved state on disk
2105             example: false
2106             type: boolean
2107             x-go-name: Stateful
2108             status:
2109             description: Instance status (see instance_state)
2110             example: Running
2111             type: string
2112             x-go-name: Status
2113             status_code:
2114             $ref: '#/definitions/StatusCode'
2115             type:
2116             description: The type of instance (container or virtual-machine)
2117             example: container
2118             type: string
2119             x-go-name: Type
2120             title: Instance represents a LXD instance.
2121             type: object
2122             x-go-package: github.com/lxc/lxd/shared/api
2123             InstanceBackup:
2124             properties:
2125             container_only:
2126             description: Whether to ignore snapshots (deprecated, use instance_only)
2127             example: false
2128             type: boolean
2129             x-go-name: ContainerOnly
2130             created_at:
2131             description: When the backup was cerated
2132             example: "2021-03-23T16:38:37.753398689-04:00"
2133             format: date-time
2134             type: string
2135             x-go-name: CreatedAt
2136             expires_at:
2137             description: When the backup expires (gets auto-deleted)
2138             example: "2021-03-23T17:38:37.753398689-04:00"
2139             format: date-time
2140             type: string
2141             x-go-name: ExpiresAt
2142             instance_only:
2143             description: Whether to ignore snapshots
2144             example: false
2145             type: boolean
2146             x-go-name: InstanceOnly
2147             name:
2148             description: Backup name
2149             example: backup0
2150             type: string
2151             x-go-name: Name
2152             optimized_storage:
2153             description: Whether to use a pool-optimized binary format (instead of plain
2154             tarball)
2155             example: true
2156             type: boolean
2157             x-go-name: OptimizedStorage
2158             title: InstanceBackup represents a LXD instance backup.
2159             type: object
2160             x-go-package: github.com/lxc/lxd/shared/api
2161             InstanceBackupPost:
2162             properties:
2163             name:
2164             description: New backup name
2165             example: backup1
2166             type: string
2167             x-go-name: Name
2168             title: InstanceBackupPost represents the fields available for the renaming of
2169             a instance backup.
2170             type: object
2171             x-go-package: github.com/lxc/lxd/shared/api
2172             InstanceBackupsPost:
2173             properties:
2174             compression_algorithm:
2175             description: What compression algorithm to use
2176             example: gzip
2177             type: string
2178             x-go-name: CompressionAlgorithm
2179             container_only:
2180             description: Whether to ignore snapshots (deprecated, use instance_only)
2181             example: false
2182             type: boolean
2183             x-go-name: ContainerOnly
2184             expires_at:
2185             description: When the backup expires (gets auto-deleted)
2186             example: "2021-03-23T17:38:37.753398689-04:00"
2187             format: date-time
2188             type: string
2189             x-go-name: ExpiresAt
2190             instance_only:
2191             description: Whether to ignore snapshots
2192             example: false
2193             type: boolean
2194             x-go-name: InstanceOnly
2195             name:
2196             description: Backup name
2197             example: backup0
2198             type: string
2199             x-go-name: Name
2200             optimized_storage:
2201             description: Whether to use a pool-optimized binary format (instead of plain
2202             tarball)
2203             example: true
2204             type: boolean
2205             x-go-name: OptimizedStorage
2206             title: InstanceBackupsPost represents the fields available for a new LXD instance
2207             backup.
2208             type: object
2209             x-go-package: github.com/lxc/lxd/shared/api
2210             InstanceConsolePost:
2211             properties:
2212             height:
2213             description: Console height in rows (console type only)
2214             example: 24
2215             format: int64
2216             type: integer
2217             x-go-name: Height
2218             type:
2219             description: Type of console to attach to (console or vga)
2220             example: console
2221             type: string
2222             x-go-name: Type
2223             width:
2224             description: Console width in columns (console type only)
2225             example: 80
2226             format: int64
2227             type: integer
2228             x-go-name: Width
2229             title: InstanceConsolePost represents a LXD instance console request.
2230             type: object
2231             x-go-package: github.com/lxc/lxd/shared/api
2232             InstanceExecPost:
2233             properties:
2234             command:
2235             description: Command and its arguments
2236             example:
2237             - bash
2238             items:
2239             type: string
2240             type: array
2241             x-go-name: Command
2242             cwd:
2243             description: Current working directory for the command
2244             example: /home/foo/
2245             type: string
2246             x-go-name: Cwd
2247             environment:
2248             additionalProperties:
2249             type: string
2250             description: Additional environment to pass to the command
2251             example:
2252             FOO: BAR
2253             type: object
2254             x-go-name: Environment
2255             group:
2256             description: GID of the user to spawn the command as
2257             example: 1000
2258             format: uint32
2259             type: integer
2260             x-go-name: Group
2261             height:
2262             description: Terminal height in rows (for interactive)
2263             example: 24
2264             format: int64
2265             type: integer
2266             x-go-name: Height
2267             interactive:
2268             description: Whether the command is to be spawned in interactive mode (singled
2269             PTY instead of 3 PIPEs)
2270             example: true
2271             type: boolean
2272             x-go-name: Interactive
2273             record-output:
2274             description: Whether to capture the output for later download (requires non-interactive)
2275             type: boolean
2276             x-go-name: RecordOutput
2277             user:
2278             description: UID of the user to spawn the command as
2279             example: 1000
2280             format: uint32
2281             type: integer
2282             x-go-name: User
2283             wait-for-websocket:
2284             description: Whether to wait for all websockets to be connected before spawning
2285             the command
2286             example: true
2287             type: boolean
2288             x-go-name: WaitForWS
2289             width:
2290             description: Terminal width in characters (for interactive)
2291             example: 80
2292             format: int64
2293             type: integer
2294             x-go-name: Width
2295             title: InstanceExecPost represents a LXD instance exec request.
2296             type: object
2297             x-go-package: github.com/lxc/lxd/shared/api
2298             InstanceFull:
2299             properties:
2300             architecture:
2301             description: Architecture name
2302             example: x86_64
2303             type: string
2304             x-go-name: Architecture
2305             backups:
2306             description: List of backups.
2307             items:
2308             $ref: '#/definitions/InstanceBackup'
2309             type: array
2310             x-go-name: Backups
2311             config:
2312             additionalProperties:
2313             type: string
2314             description: Instance configuration (see doc/instances.md)
2315             example:
2316             security.nesting: "true"
2317             type: object
2318             x-go-name: Config
2319             created_at:
2320             description: Instance creation timestamp
2321             example: "2021-03-23T20:00:00-04:00"
2322             format: date-time
2323             type: string
2324             x-go-name: CreatedAt
2325             description:
2326             description: Instance description
2327             example: My test instance
2328             type: string
2329             x-go-name: Description
2330             devices:
2331             additionalProperties:
2332             additionalProperties:
2333             type: string
2334             type: object
2335             description: Instance devices (see doc/instances.md)
2336             example:
2337             root:
2338             path: /
2339             pool: default
2340             type: disk
2341             type: object
2342             x-go-name: Devices
2343             ephemeral:
2344             description: Whether the instance is ephemeral (deleted on shutdown)
2345             example: false
2346             type: boolean
2347             x-go-name: Ephemeral
2348             expanded_config:
2349             additionalProperties:
2350             type: string
2351             description: Expanded configuration (all profiles and local config merged)
2352             example:
2353             security.nesting: "true"
2354             type: object
2355             x-go-name: ExpandedConfig
2356             expanded_devices:
2357             additionalProperties:
2358             additionalProperties:
2359             type: string
2360             type: object
2361             description: Expanded devices (all profiles and local devices merged)
2362             example:
2363             root:
2364             path: /
2365             pool: default
2366             type: disk
2367             type: object
2368             x-go-name: ExpandedDevices
2369             last_used_at:
2370             description: Last start timestamp
2371             example: "2021-03-23T20:00:00-04:00"
2372             format: date-time
2373             type: string
2374             x-go-name: LastUsedAt
2375             location:
2376             description: What cluster member this instance is located on
2377             example: lxd01
2378             type: string
2379             x-go-name: Location
2380             name:
2381             description: Instance name
2382             example: foo
2383             type: string
2384             x-go-name: Name
2385             profiles:
2386             description: List of profiles applied to the instance
2387             example:
2388             - default
2389             items:
2390             type: string
2391             type: array
2392             x-go-name: Profiles
2393             project:
2394             description: Instance project name
2395             example: foo
2396             type: string
2397             x-go-name: Project
2398             restore:
2399             description: If set, instance will be restored to the provided snapshot name
2400             example: snap0
2401             type: string
2402             x-go-name: Restore
2403             snapshots:
2404             description: List of snapshots.
2405             items:
2406             $ref: '#/definitions/InstanceSnapshot'
2407             type: array
2408             x-go-name: Snapshots
2409             state:
2410             $ref: '#/definitions/InstanceState'
2411             stateful:
2412             description: Whether the instance currently has saved state on disk
2413             example: false
2414             type: boolean
2415             x-go-name: Stateful
2416             status:
2417             description: Instance status (see instance_state)
2418             example: Running
2419             type: string
2420             x-go-name: Status
2421             status_code:
2422             $ref: '#/definitions/StatusCode'
2423             type:
2424             description: The type of instance (container or virtual-machine)
2425             example: container
2426             type: string
2427             x-go-name: Type
2428             title: InstanceFull is a combination of Instance, InstanceBackup, InstanceState
2429             and InstanceSnapshot.
2430             type: object
2431             x-go-package: github.com/lxc/lxd/shared/api
2432             InstancePost:
2433             properties:
2434             container_only:
2435             description: Whether snapshots should be discarded (migration only, deprecated,
2436             use instance_only)
2437             example: false
2438             type: boolean
2439             x-go-name: ContainerOnly
2440             instance_only:
2441             description: Whether snapshots should be discarded (migration only)
2442             example: false
2443             type: boolean
2444             x-go-name: InstanceOnly
2445             live:
2446             description: Whether to perform a live migration (migration only)
2447             example: false
2448             type: boolean
2449             x-go-name: Live
2450             migration:
2451             description: Whether the instance is being migrated to another server
2452             example: false
2453             type: boolean
2454             x-go-name: Migration
2455             name:
2456             description: New name for the instance
2457             example: bar
2458             type: string
2459             x-go-name: Name
2460             pool:
2461             description: Target pool for local cross-pool move
2462             example: baz
2463             type: string
2464             x-go-name: Pool
2465             project:
2466             description: Target project for local cross-project move
2467             example: foo
2468             type: string
2469             x-go-name: Project
2470             target:
2471             $ref: '#/definitions/InstancePostTarget'
2472             title: InstancePost represents the fields required to rename/move a LXD instance.
2473             type: object
2474             x-go-package: github.com/lxc/lxd/shared/api
2475             InstancePostTarget:
2476             properties:
2477             certificate:
2478             description: The certificate of the migration target
2479             example: X509 PEM certificate
2480             type: string
2481             x-go-name: Certificate
2482             operation:
2483             description: The operation URL on the remote target
2484             example: https://1.2.3.4:8443/1.0/operations/5e8e1638-5345-4c2d-bac9-2c79c8577292
2485             type: string
2486             x-go-name: Operation
2487             secrets:
2488             additionalProperties:
2489             type: string
2490             description: Migration websockets credentials
2491             example:
2492             criu: random-string
2493             migration: random-string
2494             type: object
2495             x-go-name: Websockets
2496             title: InstancePostTarget represents the migration target host and operation.
2497             type: object
2498             x-go-package: github.com/lxc/lxd/shared/api
2499             InstancePut:
2500             properties:
2501             architecture:
2502             description: Architecture name
2503             example: x86_64
2504             type: string
2505             x-go-name: Architecture
2506             config:
2507             additionalProperties:
2508             type: string
2509             description: Instance configuration (see doc/instances.md)
2510             example:
2511             security.nesting: "true"
2512             type: object
2513             x-go-name: Config
2514             description:
2515             description: Instance description
2516             example: My test instance
2517             type: string
2518             x-go-name: Description
2519             devices:
2520             additionalProperties:
2521             additionalProperties:
2522             type: string
2523             type: object
2524             description: Instance devices (see doc/instances.md)
2525             example:
2526             root:
2527             path: /
2528             pool: default
2529             type: disk
2530             type: object
2531             x-go-name: Devices
2532             ephemeral:
2533             description: Whether the instance is ephemeral (deleted on shutdown)
2534             example: false
2535             type: boolean
2536             x-go-name: Ephemeral
2537             profiles:
2538             description: List of profiles applied to the instance
2539             example:
2540             - default
2541             items:
2542             type: string
2543             type: array
2544             x-go-name: Profiles
2545             restore:
2546             description: If set, instance will be restored to the provided snapshot name
2547             example: snap0
2548             type: string
2549             x-go-name: Restore
2550             stateful:
2551             description: Whether the instance currently has saved state on disk
2552             example: false
2553             type: boolean
2554             x-go-name: Stateful
2555             title: InstancePut represents the modifiable fields of a LXD instance.
2556             type: object
2557             x-go-package: github.com/lxc/lxd/shared/api
2558             InstanceSnapshot:
2559             properties:
2560             architecture:
2561             description: Architecture name
2562             example: x86_64
2563             type: string
2564             x-go-name: Architecture
2565             config:
2566             additionalProperties:
2567             type: string
2568             description: Instance configuration (see doc/instances.md)
2569             example:
2570             security.nesting: "true"
2571             type: object
2572             x-go-name: Config
2573             created_at:
2574             description: Instance creation timestamp
2575             example: "2021-03-23T20:00:00-04:00"
2576             format: date-time
2577             type: string
2578             x-go-name: CreatedAt
2579             devices:
2580             additionalProperties:
2581             additionalProperties:
2582             type: string
2583             type: object
2584             description: Instance devices (see doc/instances.md)
2585             example:
2586             root:
2587             path: /
2588             pool: default
2589             type: disk
2590             type: object
2591             x-go-name: Devices
2592             ephemeral:
2593             description: Whether the instance is ephemeral (deleted on shutdown)
2594             example: false
2595             type: boolean
2596             x-go-name: Ephemeral
2597             expanded_config:
2598             additionalProperties:
2599             type: string
2600             description: Expanded configuration (all profiles and local config merged)
2601             example:
2602             security.nesting: "true"
2603             type: object
2604             x-go-name: ExpandedConfig
2605             expanded_devices:
2606             additionalProperties:
2607             additionalProperties:
2608             type: string
2609             type: object
2610             description: Expanded devices (all profiles and local devices merged)
2611             example:
2612             root:
2613             path: /
2614             pool: default
2615             type: disk
2616             type: object
2617             x-go-name: ExpandedDevices
2618             expires_at:
2619             description: When the snapshot expires (gets auto-deleted)
2620             example: "2021-03-23T17:38:37.753398689-04:00"
2621             format: date-time
2622             type: string
2623             x-go-name: ExpiresAt
2624             last_used_at:
2625             description: Last start timestamp
2626             example: "2021-03-23T20:00:00-04:00"
2627             format: date-time
2628             type: string
2629             x-go-name: LastUsedAt
2630             name:
2631             description: Snapshot name
2632             example: foo
2633             type: string
2634             x-go-name: Name
2635             profiles:
2636             description: List of profiles applied to the instance
2637             example:
2638             - default
2639             items:
2640             type: string
2641             type: array
2642             x-go-name: Profiles
2643             size:
2644             description: Size of the snapshot in bytes
2645             example: 143360
2646             format: int64
2647             type: integer
2648             x-go-name: Size
2649             stateful:
2650             description: Whether the instance currently has saved state on disk
2651             example: false
2652             type: boolean
2653             x-go-name: Stateful
2654             title: InstanceSnapshot represents a LXD instance snapshot.
2655             type: object
2656             x-go-package: github.com/lxc/lxd/shared/api
2657             InstanceSnapshotPost:
2658             properties:
2659             live:
2660             description: Whether to perform a live migration (requires migration)
2661             example: false
2662             type: boolean
2663             x-go-name: Live
2664             migration:
2665             description: Whether this is a migration request
2666             example: false
2667             type: boolean
2668             x-go-name: Migration
2669             name:
2670             description: New name for the snapshot
2671             example: foo
2672             type: string
2673             x-go-name: Name
2674             target:
2675             $ref: '#/definitions/InstancePostTarget'
2676             title: InstanceSnapshotPost represents the fields required to rename/move a LXD
2677             instance snapshot.
2678             type: object
2679             x-go-package: github.com/lxc/lxd/shared/api
2680             InstanceSnapshotPut:
2681             properties:
2682             expires_at:
2683             description: When the snapshot expires (gets auto-deleted)
2684             example: "2021-03-23T17:38:37.753398689-04:00"
2685             format: date-time
2686             type: string
2687             x-go-name: ExpiresAt
2688             title: InstanceSnapshotPut represents the modifiable fields of a LXD instance
2689             snapshot.
2690             type: object
2691             x-go-package: github.com/lxc/lxd/shared/api
2692             InstanceSnapshotsPost:
2693             properties:
2694             expires_at:
2695             description: When the snapshot expires (gets auto-deleted)
2696             example: "2021-03-23T17:38:37.753398689-04:00"
2697             format: date-time
2698             type: string
2699             x-go-name: ExpiresAt
2700             name:
2701             description: Snapshot name
2702             example: snap0
2703             type: string
2704             x-go-name: Name
2705             stateful:
2706             description: Whether the snapshot should include runtime state
2707             example: false
2708             type: boolean
2709             x-go-name: Stateful
2710             title: InstanceSnapshotsPost represents the fields available for a new LXD instance
2711             snapshot.
2712             type: object
2713             x-go-package: github.com/lxc/lxd/shared/api
2714             InstanceSource:
2715             properties:
2716             alias:
2717             description: Image alias name (for image source)
2718             example: ubuntu/20.04
2719             type: string
2720             x-go-name: Alias
2721             allow_inconsistent:
2722             description: Whether to ignore errors when copying (e.g. for volatile files)
2723             example: false
2724             type: boolean
2725             x-go-name: AllowInconsistent
2726             base-image:
2727             description: Base image fingerprint (for faster migration)
2728             example: ed56997f7c5b48e8d78986d2467a26109be6fb9f2d92e8c7b08eb8b6cec7629a
2729             type: string
2730             x-go-name: BaseImage
2731             certificate:
2732             description: Certificate (for remote images or migration)
2733             example: X509 PEM certificate
2734             type: string
2735             x-go-name: Certificate
2736             container_only:
2737             description: Whether the copy should skip the snapshots (for copy, deprecated,
2738             use instance_only)
2739             example: false
2740             type: boolean
2741             x-go-name: ContainerOnly
2742             fingerprint:
2743             description: Image fingerprint (for image source)
2744             example: ed56997f7c5b48e8d78986d2467a26109be6fb9f2d92e8c7b08eb8b6cec7629a
2745             type: string
2746             x-go-name: Fingerprint
2747             instance_only:
2748             description: Whether the copy should skip the snapshots (for copy)
2749             example: false
2750             type: boolean
2751             x-go-name: InstanceOnly
2752             live:
2753             description: Whether this is a live migration (for migration)
2754             example: false
2755             type: boolean
2756             x-go-name: Live
2757             mode:
2758             description: Whether to use pull or push mode (for migration)
2759             example: pull
2760             type: string
2761             x-go-name: Mode
2762             operation:
2763             description: Remote operation URL (for migration)
2764             example: https://1.2.3.4:8443/1.0/operations/1721ae08-b6a8-416a-9614-3f89302466e1
2765             type: string
2766             x-go-name: Operation
2767             project:
2768             description: Source project name (for copy and local image)
2769             example: blah
2770             type: string
2771             x-go-name: Project
2772             properties:
2773             additionalProperties:
2774             type: string
2775             description: Image filters (for image source)
2776             example:
2777             os: Ubuntu
2778             release: focal
2779             variant: cloud
2780             type: object
2781             x-go-name: Properties
2782             protocol:
2783             description: Protocol name (for remote image)
2784             example: simplestreams
2785             type: string
2786             x-go-name: Protocol
2787             refresh:
2788             description: Whether this is refreshing an existing instance (for migration
2789             and copy)
2790             example: false
2791             type: boolean
2792             x-go-name: Refresh
2793             secret:
2794             description: Remote server secret (for remote private images)
2795             example: RANDOM-STRING
2796             type: string
2797             x-go-name: Secret
2798             secrets:
2799             additionalProperties:
2800             type: string
2801             description: Map of migration websockets (for migration)
2802             example:
2803             criu: RANDOM-STRING
2804             rsync: RANDOM-STRING
2805             type: object
2806             x-go-name: Websockets
2807             server:
2808             description: Remote server URL (for remote images)
2809             example: https://images.linuxcontainers.org
2810             type: string
2811             x-go-name: Server
2812             source:
2813             description: Existing instance name or snapshot (for copy)
2814             example: foo/snap0
2815             type: string
2816             x-go-name: Source
2817             type:
2818             description: Source type
2819             example: image
2820             type: string
2821             x-go-name: Type
2822             title: InstanceSource represents the creation source for a new instance.
2823             type: object
2824             x-go-package: github.com/lxc/lxd/shared/api
2825             InstanceState:
2826             properties:
2827             cpu:
2828             $ref: '#/definitions/InstanceStateCPU'
2829             disk:
2830             additionalProperties:
2831             $ref: '#/definitions/InstanceStateDisk'
2832             description: Dict of disk usage
2833             type: object
2834             x-go-name: Disk
2835             memory:
2836             $ref: '#/definitions/InstanceStateMemory'
2837             network:
2838             additionalProperties:
2839             $ref: '#/definitions/InstanceStateNetwork'
2840             description: Dict of network usage
2841             type: object
2842             x-go-name: Network
2843             pid:
2844             description: PID of the runtime
2845             example: 7281
2846             format: int64
2847             type: integer
2848             x-go-name: Pid
2849             processes:
2850             description: Number of processes in the instance
2851             example: 50
2852             format: int64
2853             type: integer
2854             x-go-name: Processes
2855             status:
2856             description: Current status (Running, Stopped, Frozen or Error)
2857             example: Running
2858             type: string
2859             x-go-name: Status
2860             status_code:
2861             $ref: '#/definitions/StatusCode'
2862             title: InstanceState represents a LXD instance's state.
2863             type: object
2864             x-go-package: github.com/lxc/lxd/shared/api
2865             InstanceStateCPU:
2866             properties:
2867             usage:
2868             description: CPU usage in nanoseconds
2869             example: 3637691016
2870             format: int64
2871             type: integer
2872             x-go-name: Usage
2873             title: InstanceStateCPU represents the cpu information section of a LXD instance's
2874             state.
2875             type: object
2876             x-go-package: github.com/lxc/lxd/shared/api
2877             InstanceStateDisk:
2878             properties:
2879             usage:
2880             description: Disk usage in bytes
2881             example: 502239232
2882             format: int64
2883             type: integer
2884             x-go-name: Usage
2885             title: InstanceStateDisk represents the disk information section of a LXD instance's
2886             state.
2887             type: object
2888             x-go-package: github.com/lxc/lxd/shared/api
2889             InstanceStateMemory:
2890             properties:
2891             swap_usage:
2892             description: SWAP usage in bytes
2893             example: 12297557
2894             format: int64
2895             type: integer
2896             x-go-name: SwapUsage
2897             swap_usage_peak:
2898             description: Peak SWAP usage in bytes
2899             example: 12297557
2900             format: int64
2901             type: integer
2902             x-go-name: SwapUsagePeak
2903             usage:
2904             description: Memory usage in bytes
2905             example: 73248768
2906             format: int64
2907             type: integer
2908             x-go-name: Usage
2909             usage_peak:
2910             description: Peak memory usage in bytes
2911             example: 73785344
2912             format: int64
2913             type: integer
2914             x-go-name: UsagePeak
2915             title: InstanceStateMemory represents the memory information section of a LXD
2916             instance's state.
2917             type: object
2918             x-go-package: github.com/lxc/lxd/shared/api
2919             InstanceStateNetwork:
2920             properties:
2921             addresses:
2922             description: List of IP addresses
2923             items:
2924             $ref: '#/definitions/InstanceStateNetworkAddress'
2925             type: array
2926             x-go-name: Addresses
2927             counters:
2928             $ref: '#/definitions/InstanceStateNetworkCounters'
2929             host_name:
2930             description: Name of the interface on the host
2931             example: vethbbcd39c7
2932             type: string
2933             x-go-name: HostName
2934             hwaddr:
2935             description: MAC address
2936             example: 00:16:3e:0c:ee:dd
2937             type: string
2938             x-go-name: Hwaddr
2939             mtu:
2940             description: MTU (maximum transmit unit) for the interface
2941             example: 1500
2942             format: int64
2943             type: integer
2944             x-go-name: Mtu
2945             state:
2946             description: Administrative state of the interface (up/down)
2947             example: up
2948             type: string
2949             x-go-name: State
2950             type:
2951             description: Type of interface (broadcast, loopback, point-to-point, ...)
2952             example: broadcast
2953             type: string
2954             x-go-name: Type
2955             title: InstanceStateNetwork represents the network information section of a LXD
2956             instance's state.
2957             type: object
2958             x-go-package: github.com/lxc/lxd/shared/api
2959             InstanceStateNetworkAddress:
2960             description: |-
2961             InstanceStateNetworkAddress represents a network address as part of the network section of a LXD
2962             instance's state.
2963             properties:
2964             address:
2965             description: IP address
2966             example: fd42:4c81:5770:1eaf:216:3eff:fe0c:eedd
2967             type: string
2968             x-go-name: Address
2969             family:
2970             description: Network family (inet or inet6)
2971             example: inet6
2972             type: string
2973             x-go-name: Family
2974             netmask:
2975             description: Network mask
2976             example: "64"
2977             type: string
2978             x-go-name: Netmask
2979             scope:
2980             description: Address scope (local, link or global)
2981             example: global
2982             type: string
2983             x-go-name: Scope
2984             type: object
2985             x-go-package: github.com/lxc/lxd/shared/api
2986             InstanceStateNetworkCounters:
2987             description: |-
2988             InstanceStateNetworkCounters represents packet counters as part of the network section of a LXD
2989             instance's state.
2990             properties:
2991             bytes_received:
2992             description: Number of bytes received
2993             example: 192021
2994             format: int64
2995             type: integer
2996             x-go-name: BytesReceived
2997             bytes_sent:
2998             description: Number of bytes sent
2999             example: 10888579
3000             format: int64
3001             type: integer
3002             x-go-name: BytesSent
3003             errors_received:
3004             description: Number of errors received
3005             example: 14
3006             format: int64
3007             type: integer
3008             x-go-name: ErrorsReceived
3009             errors_sent:
3010             description: Number of errors sent
3011             example: 41
3012             format: int64
3013             type: integer
3014             x-go-name: ErrorsSent
3015             packets_dropped_inbound:
3016             description: Number of inbound packets dropped
3017             example: 179
3018             format: int64
3019             type: integer
3020             x-go-name: PacketsDroppedInbound
3021             packets_dropped_outbound:
3022             description: Number of outbound packets dropped
3023             example: 541
3024             format: int64
3025             type: integer
3026             x-go-name: PacketsDroppedOutbound
3027             packets_received:
3028             description: Number of packets received
3029             example: 1748
3030             format: int64
3031             type: integer
3032             x-go-name: PacketsReceived
3033             packets_sent:
3034             description: Number of packets sent
3035             example: 964
3036             format: int64
3037             type: integer
3038             x-go-name: PacketsSent
3039             type: object
3040             x-go-package: github.com/lxc/lxd/shared/api
3041             InstanceStatePut:
3042             properties:
3043             action:
3044             description: State change action (start, stop, restart, freeze, unfreeze)
3045             example: start
3046             type: string
3047             x-go-name: Action
3048             force:
3049             description: Whether to force the action (for stop and restart)
3050             example: false
3051             type: boolean
3052             x-go-name: Force
3053             stateful:
3054             description: Whether to store the runtime state (for stop)
3055             example: false
3056             type: boolean
3057             x-go-name: Stateful
3058             timeout:
3059             description: How long to wait (in s) before giving up (when force isn't set)
3060             example: 30
3061             format: int64
3062             type: integer
3063             x-go-name: Timeout
3064             title: InstanceStatePut represents the modifiable fields of a LXD instance's state.
3065             type: object
3066             x-go-package: github.com/lxc/lxd/shared/api
3067             InstanceType:
3068             title: InstanceType represents the type if instance being returned or requested
3069             via the API.
3070             type: string
3071             x-go-package: github.com/lxc/lxd/shared/api
3072             InstancesPost:
3073             properties:
3074             architecture:
3075             description: Architecture name
3076             example: x86_64
3077             type: string
3078             x-go-name: Architecture
3079             config:
3080             additionalProperties:
3081             type: string
3082             description: Instance configuration (see doc/instances.md)
3083             example:
3084             security.nesting: "true"
3085             type: object
3086             x-go-name: Config
3087             description:
3088             description: Instance description
3089             example: My test instance
3090             type: string
3091             x-go-name: Description
3092             devices:
3093             additionalProperties:
3094             additionalProperties:
3095             type: string
3096             type: object
3097             description: Instance devices (see doc/instances.md)
3098             example:
3099             root:
3100             path: /
3101             pool: default
3102             type: disk
3103             type: object
3104             x-go-name: Devices
3105             ephemeral:
3106             description: Whether the instance is ephemeral (deleted on shutdown)
3107             example: false
3108             type: boolean
3109             x-go-name: Ephemeral
3110             instance_type:
3111             description: Cloud instance type (AWS, GCP, Azure, ...) to emulate with limits
3112             example: t1.micro
3113             type: string
3114             x-go-name: InstanceType
3115             name:
3116             description: Instance name
3117             example: foo
3118             type: string
3119             x-go-name: Name
3120             profiles:
3121             description: List of profiles applied to the instance
3122             example:
3123             - default
3124             items:
3125             type: string
3126             type: array
3127             x-go-name: Profiles
3128             restore:
3129             description: If set, instance will be restored to the provided snapshot name
3130             example: snap0
3131             type: string
3132             x-go-name: Restore
3133             source:
3134             $ref: '#/definitions/InstanceSource'
3135             stateful:
3136             description: Whether the instance currently has saved state on disk
3137             example: false
3138             type: boolean
3139             x-go-name: Stateful
3140             type:
3141             $ref: '#/definitions/InstanceType'
3142             title: InstancesPost represents the fields available for a new LXD instance.
3143             type: object
3144             x-go-package: github.com/lxc/lxd/shared/api
3145             InstancesPut:
3146             properties:
3147             state:
3148             $ref: '#/definitions/InstanceStatePut'
3149             title: InstancesPut represents the fields available for a mass update.
3150             type: object
3151             x-go-package: github.com/lxc/lxd/shared/api
3152             Network:
3153             description: Network represents a LXD network
3154             properties:
3155             config:
3156             additionalProperties:
3157             type: string
3158             description: Network configuration map (refer to doc/networks.md)
3159             example:
3160             ipv4.address: 10.0.0.1/24
3161             ipv4.nat: "true"
3162             ipv6.address: none
3163             type: object
3164             x-go-name: Config
3165             description:
3166             description: Description of the profile
3167             example: My new LXD bridge
3168             type: string
3169             x-go-name: Description
3170             locations:
3171             description: Cluster members on which the network has been defined
3172             example:
3173             - lxd01
3174             - lxd02
3175             - lxd03
3176             items:
3177             type: string
3178             readOnly: true
3179             type: array
3180             x-go-name: Locations
3181             managed:
3182             description: Whether this is a LXD managed network
3183             example: true
3184             readOnly: true
3185             type: boolean
3186             x-go-name: Managed
3187             name:
3188             description: The network name
3189             example: lxdbr0
3190             readOnly: true
3191             type: string
3192             x-go-name: Name
3193             status:
3194             description: The state of the network (for managed network in clusters)
3195             example: Created
3196             readOnly: true
3197             type: string
3198             x-go-name: Status
3199             type:
3200             description: The network type
3201             example: bridge
3202             readOnly: true
3203             type: string
3204             x-go-name: Type
3205             used_by:
3206             description: List of URLs of objects using this profile
3207             example:
3208             - /1.0/profiles/default
3209             - /1.0/instances/c1
3210             items:
3211             type: string
3212             readOnly: true
3213             type: array
3214             x-go-name: UsedBy
3215             type: object
3216             x-go-package: github.com/lxc/lxd/shared/api
3217             NetworkACL:
3218             properties:
3219             config:
3220             additionalProperties:
3221             type: string
3222             description: ACL configuration map (refer to doc/network-acls.md)
3223             example:
3224             user.mykey: foo
3225             type: object
3226             x-go-name: Config
3227             description:
3228             description: Description of the ACL
3229             example: Web servers
3230             type: string
3231             x-go-name: Description
3232             egress:
3233             description: List of egress rules (order independent)
3234             items:
3235             $ref: '#/definitions/NetworkACLRule'
3236             type: array
3237             x-go-name: Egress
3238             ingress:
3239             description: List of ingress rules (order independent)
3240             items:
3241             $ref: '#/definitions/NetworkACLRule'
3242             type: array
3243             x-go-name: Ingress
3244             name:
3245             description: The new name for the ACL
3246             example: bar
3247             type: string
3248             x-go-name: Name
3249             used_by:
3250             description: List of URLs of objects using this profile
3251             example:
3252             - /1.0/instances/c1
3253             - /1.0/instances/v1
3254             - /1.0/networks/lxdbr0
3255             items:
3256             type: string
3257             readOnly: true
3258             type: array
3259             x-go-name: UsedBy
3260             title: NetworkACL used for displaying an ACL.
3261             type: object
3262             x-go-package: github.com/lxc/lxd/shared/api
3263             NetworkACLPost:
3264             properties:
3265             name:
3266             description: The new name for the ACL
3267             example: bar
3268             type: string
3269             x-go-name: Name
3270             title: NetworkACLPost used for renaming an ACL.
3271             type: object
3272             x-go-package: github.com/lxc/lxd/shared/api
3273             NetworkACLPut:
3274             properties:
3275             config:
3276             additionalProperties:
3277             type: string
3278             description: ACL configuration map (refer to doc/network-acls.md)
3279             example:
3280             user.mykey: foo
3281             type: object
3282             x-go-name: Config
3283             description:
3284             description: Description of the ACL
3285             example: Web servers
3286             type: string
3287             x-go-name: Description
3288             egress:
3289             description: List of egress rules (order independent)
3290             items:
3291             $ref: '#/definitions/NetworkACLRule'
3292             type: array
3293             x-go-name: Egress
3294             ingress:
3295             description: List of ingress rules (order independent)
3296             items:
3297             $ref: '#/definitions/NetworkACLRule'
3298             type: array
3299             x-go-name: Ingress
3300             title: NetworkACLPut used for updating an ACL.
3301             type: object
3302             x-go-package: github.com/lxc/lxd/shared/api
3303             NetworkACLRule:
3304             description: Refer to doc/network-acls.md for details.
3305             properties:
3306             action:
3307             description: Action to perform on rule match
3308             example: allow
3309             type: string
3310             x-go-name: Action
3311             description:
3312             description: Description of the rule
3313             example: Allow DNS queries to Google DNS
3314             type: string
3315             x-go-name: Description
3316             destination:
3317             description: Destination address
3318             example: 8.8.8.8/32,8.8.4.4/32
3319             type: string
3320             x-go-name: Destination
3321             destination_port:
3322             description: Destination port
3323             example: "53"
3324             type: string
3325             x-go-name: DestinationPort
3326             icmp_code:
3327             description: ICMP message code (for ICMP protocol)
3328             example: "0"
3329             type: string
3330             x-go-name: ICMPCode
3331             icmp_type:
3332             description: Type of ICMP message (for ICMP protocol)
3333             example: "8"
3334             type: string
3335             x-go-name: ICMPType
3336             protocol:
3337             description: Protocol
3338             example: udp
3339             type: string
3340             x-go-name: Protocol
3341             source:
3342             description: Source address
3343             example: '@internal'
3344             type: string
3345             x-go-name: Source
3346             source_port:
3347             description: Source port
3348             example: "1234"
3349             type: string
3350             x-go-name: SourcePort
3351             state:
3352             description: State of the rule
3353             example: enabled
3354             type: string
3355             x-go-name: State
3356             title: NetworkACLRule represents a single rule in an ACL ruleset.
3357             type: object
3358             x-go-package: github.com/lxc/lxd/shared/api
3359             NetworkACLsPost:
3360             properties:
3361             config:
3362             additionalProperties:
3363             type: string
3364             description: ACL configuration map (refer to doc/network-acls.md)
3365             example:
3366             user.mykey: foo
3367             type: object
3368             x-go-name: Config
3369             description:
3370             description: Description of the ACL
3371             example: Web servers
3372             type: string
3373             x-go-name: Description
3374             egress:
3375             description: List of egress rules (order independent)
3376             items:
3377             $ref: '#/definitions/NetworkACLRule'
3378             type: array
3379             x-go-name: Egress
3380             ingress:
3381             description: List of ingress rules (order independent)
3382             items:
3383             $ref: '#/definitions/NetworkACLRule'
3384             type: array
3385             x-go-name: Ingress
3386             name:
3387             description: The new name for the ACL
3388             example: bar
3389             type: string
3390             x-go-name: Name
3391             title: NetworkACLsPost used for creating an ACL.
3392             type: object
3393             x-go-package: github.com/lxc/lxd/shared/api
3394             NetworkForward:
3395             properties:
3396             config:
3397             additionalProperties:
3398             type: string
3399             description: Forward configuration map (refer to doc/network-forwards.md)
3400             example:
3401             user.mykey: foo
3402             type: object
3403             x-go-name: Config
3404             description:
3405             description: Description of the forward listen IP
3406             example: My public IP forward
3407             type: string
3408             x-go-name: Description
3409             listen_address:
3410             description: The listen address of the forward
3411             example: 192.0.2.1
3412             type: string
3413             x-go-name: ListenAddress
3414             location:
3415             description: What cluster member this record was found on
3416             example: lxd01
3417             type: string
3418             x-go-name: Location
3419             ports:
3420             description: Port forwards (optional)
3421             items:
3422             $ref: '#/definitions/NetworkForwardPort'
3423             type: array
3424             x-go-name: Ports
3425             title: NetworkForward used for displaying an network address forward.
3426             type: object
3427             x-go-package: github.com/lxc/lxd/shared/api
3428             NetworkForwardPort:
3429             description: NetworkForwardPort represents a port specification in a network address
3430             forward
3431             properties:
3432             description:
3433             description: Description of the forward port
3434             example: My web server forward
3435             type: string
3436             x-go-name: Description
3437             listen_port:
3438             description: ListenPort(s) to forward (comma delimited ranges)
3439             example: 80,81,8080-8090
3440             type: string
3441             x-go-name: ListenPort
3442             protocol:
3443             description: Protocol for port forward (either tcp or udp)
3444             example: tcp
3445             type: string
3446             x-go-name: Protocol
3447             target_address:
3448             description: TargetAddress to forward ListenPorts to
3449             example: 198.51.100.2
3450             type: string
3451             x-go-name: TargetAddress
3452             target_port:
3453             description: TargetPort(s) to forward ListenPorts to (allows for many-to-one)
3454             example: 80,81,8080-8090
3455             type: string
3456             x-go-name: TargetPort
3457             type: object
3458             x-go-package: github.com/lxc/lxd/shared/api
3459             NetworkForwardPut:
3460             description: NetworkForwardPut represents the modifiable fields of a LXD network
3461             address forward
3462             properties:
3463             config:
3464             additionalProperties:
3465             type: string
3466             description: Forward configuration map (refer to doc/network-forwards.md)
3467             example:
3468             user.mykey: foo
3469             type: object
3470             x-go-name: Config
3471             description:
3472             description: Description of the forward listen IP
3473             example: My public IP forward
3474             type: string
3475             x-go-name: Description
3476             ports:
3477             description: Port forwards (optional)
3478             items:
3479             $ref: '#/definitions/NetworkForwardPort'
3480             type: array
3481             x-go-name: Ports
3482             type: object
3483             x-go-package: github.com/lxc/lxd/shared/api
3484             NetworkForwardsPost:
3485             description: NetworkForwardsPost represents the fields of a new LXD network address
3486             forward
3487             properties:
3488             config:
3489             additionalProperties:
3490             type: string
3491             description: Forward configuration map (refer to doc/network-forwards.md)
3492             example:
3493             user.mykey: foo
3494             type: object
3495             x-go-name: Config
3496             description:
3497             description: Description of the forward listen IP
3498             example: My public IP forward
3499             type: string
3500             x-go-name: Description
3501             listen_address:
3502             description: The listen address of the forward
3503             example: 192.0.2.1
3504             type: string
3505             x-go-name: ListenAddress
3506             ports:
3507             description: Port forwards (optional)
3508             items:
3509             $ref: '#/definitions/NetworkForwardPort'
3510             type: array
3511             x-go-name: Ports
3512             type: object
3513             x-go-package: github.com/lxc/lxd/shared/api
3514             NetworkLease:
3515             description: NetworkLease represents a DHCP lease
3516             properties:
3517             address:
3518             description: The IP address
3519             example: 10.0.0.98
3520             type: string
3521             x-go-name: Address
3522             hostname:
3523             description: The hostname associated with the record
3524             example: c1
3525             type: string
3526             x-go-name: Hostname
3527             hwaddr:
3528             description: The MAC address
3529             example: 00:16:3e:2c:89:d9
3530             type: string
3531             x-go-name: Hwaddr
3532             location:
3533             description: What cluster member this record was found on
3534             example: lxd01
3535             type: string
3536             x-go-name: Location
3537             type:
3538             description: The type of record (static or dynamic)
3539             example: dynamic
3540             type: string
3541             x-go-name: Type
3542             type: object
3543             x-go-package: github.com/lxc/lxd/shared/api
3544             NetworkPeer:
3545             properties:
3546             config:
3547             additionalProperties:
3548             type: string
3549             description: Peer configuration map (refer to doc/network-peers.md)
3550             example:
3551             user.mykey: foo
3552             type: object
3553             x-go-name: Config
3554             description:
3555             description: Description of the peer
3556             example: Peering with network1 in project1
3557             type: string
3558             x-go-name: Description
3559             name:
3560             description: Name of the peer
3561             example: project1-network1
3562             readOnly: true
3563             type: string
3564             x-go-name: Name
3565             status:
3566             description: The state of the peering
3567             example: Pending
3568             readOnly: true
3569             type: string
3570             x-go-name: Status
3571             target_network:
3572             description: Name of the target network
3573             example: network1
3574             readOnly: true
3575             type: string
3576             x-go-name: TargetNetwork
3577             target_project:
3578             description: Name of the target project
3579             example: project1
3580             readOnly: true
3581             type: string
3582             x-go-name: TargetProject
3583             used_by:
3584             description: List of URLs of objects using this network peering
3585             example:
3586             - /1.0/network-acls/test
3587             - /1.0/network-acls/foo
3588             items:
3589             type: string
3590             readOnly: true
3591             type: array
3592             x-go-name: UsedBy
3593             title: NetworkPeer used for displaying a LXD network peering.
3594             type: object
3595             x-go-package: github.com/lxc/lxd/shared/api
3596             NetworkPeerPut:
3597             description: NetworkPeerPut represents the modifiable fields of a LXD network
3598             peering
3599             properties:
3600             config:
3601             additionalProperties:
3602             type: string
3603             description: Peer configuration map (refer to doc/network-peers.md)
3604             example:
3605             user.mykey: foo
3606             type: object
3607             x-go-name: Config
3608             description:
3609             description: Description of the peer
3610             example: Peering with network1 in project1
3611             type: string
3612             x-go-name: Description
3613             type: object
3614             x-go-package: github.com/lxc/lxd/shared/api
3615             NetworkPeersPost:
3616             description: NetworkPeersPost represents the fields of a new LXD network peering
3617             properties:
3618             config:
3619             additionalProperties:
3620             type: string
3621             description: Peer configuration map (refer to doc/network-peers.md)
3622             example:
3623             user.mykey: foo
3624             type: object
3625             x-go-name: Config
3626             description:
3627             description: Description of the peer
3628             example: Peering with network1 in project1
3629             type: string
3630             x-go-name: Description
3631             name:
3632             description: Name of the peer
3633             example: project1-network1
3634             type: string
3635             x-go-name: Name
3636             target_network:
3637             description: Name of the target network
3638             example: network1
3639             type: string
3640             x-go-name: TargetNetwork
3641             target_project:
3642             description: Name of the target project
3643             example: project1
3644             type: string
3645             x-go-name: TargetProject
3646             type: object
3647             x-go-package: github.com/lxc/lxd/shared/api
3648             NetworkPost:
3649             description: NetworkPost represents the fields required to rename a LXD network
3650             properties:
3651             name:
3652             description: The new name for the network
3653             example: lxdbr1
3654             type: string
3655             x-go-name: Name
3656             type: object
3657             x-go-package: github.com/lxc/lxd/shared/api
3658             NetworkPut:
3659             description: NetworkPut represents the modifiable fields of a LXD network
3660             properties:
3661             config:
3662             additionalProperties:
3663             type: string
3664             description: Network configuration map (refer to doc/networks.md)
3665             example:
3666             ipv4.address: 10.0.0.1/24
3667             ipv4.nat: "true"
3668             ipv6.address: none
3669             type: object
3670             x-go-name: Config
3671             description:
3672             description: Description of the profile
3673             example: My new LXD bridge
3674             type: string
3675             x-go-name: Description
3676             type: object
3677             x-go-package: github.com/lxc/lxd/shared/api
3678             NetworkState:
3679             description: NetworkState represents the network state
3680             properties:
3681             addresses:
3682             description: List of addresses
3683             items:
3684             $ref: '#/definitions/NetworkStateAddress'
3685             type: array
3686             x-go-name: Addresses
3687             bond:
3688             $ref: '#/definitions/NetworkStateBond'
3689             bridge:
3690             $ref: '#/definitions/NetworkStateBridge'
3691             counters:
3692             $ref: '#/definitions/NetworkStateCounters'
3693             hwaddr:
3694             description: MAC address
3695             example: 00:16:3e:5a:83:57
3696             type: string
3697             x-go-name: Hwaddr
3698             mtu:
3699             description: MTU
3700             example: 1500
3701             format: int64
3702             type: integer
3703             x-go-name: Mtu
3704             ovn:
3705             $ref: '#/definitions/NetworkStateOVN'
3706             state:
3707             description: Link state
3708             example: up
3709             type: string
3710             x-go-name: State
3711             type:
3712             description: Interface type
3713             example: broadcast
3714             type: string
3715             x-go-name: Type
3716             vlan:
3717             $ref: '#/definitions/NetworkStateVLAN'
3718             type: object
3719             x-go-package: github.com/lxc/lxd/shared/api
3720             NetworkStateAddress:
3721             description: NetworkStateAddress represents a network address
3722             properties:
3723             address:
3724             description: IP address
3725             example: 10.0.0.1
3726             type: string
3727             x-go-name: Address
3728             family:
3729             description: Address family
3730             example: inet
3731             type: string
3732             x-go-name: Family
3733             netmask:
3734             description: IP netmask (CIDR)
3735             example: "24"
3736             type: string
3737             x-go-name: Netmask
3738             scope:
3739             description: Address scope
3740             example: global
3741             type: string
3742             x-go-name: Scope
3743             type: object
3744             x-go-package: github.com/lxc/lxd/shared/api
3745             NetworkStateBond:
3746             description: NetworkStateBond represents bond specific state
3747             properties:
3748             down_delay:
3749             description: Delay on link down (ms)
3750             example: 0
3751             format: uint64
3752             type: integer
3753             x-go-name: DownDelay
3754             lower_devices:
3755             description: List of devices that are part of the bond
3756             example:
3757             - eth0
3758             - eth1
3759             items:
3760             type: string
3761             type: array
3762             x-go-name: LowerDevices
3763             mii_frequency:
3764             description: How often to check for link state (ms)
3765             example: 100
3766             format: uint64
3767             type: integer
3768             x-go-name: MIIFrequency
3769             mii_state:
3770             description: Bond link state
3771             example: up
3772             type: string
3773             x-go-name: MIIState
3774             mode:
3775             description: Bonding mode
3776             example: 802.3ad
3777             type: string
3778             x-go-name: Mode
3779             transmit_policy:
3780             description: Transmit balancing policy
3781             example: layer3+4
3782             type: string
3783             x-go-name: TransmitPolicy
3784             up_delay:
3785             description: Delay on link up (ms)
3786             example: 0
3787             format: uint64
3788             type: integer
3789             x-go-name: UpDelay
3790             type: object
3791             x-go-package: github.com/lxc/lxd/shared/api
3792             NetworkStateBridge:
3793             description: NetworkStateBridge represents bridge specific state
3794             properties:
3795             forward_delay:
3796             description: Delay on port join (ms)
3797             example: 1500
3798             format: uint64
3799             type: integer
3800             x-go-name: ForwardDelay
3801             id:
3802             description: Bridge ID
3803             example: 8000.0a0f7c6edbd9
3804             type: string
3805             x-go-name: ID
3806             stp:
3807             description: Whether STP is enabled
3808             example: false
3809             type: boolean
3810             x-go-name: STP
3811             upper_devices:
3812             description: List of devices that are in the bridge
3813             example:
3814             - eth0
3815             - eth1
3816             items:
3817             type: string
3818             type: array
3819             x-go-name: UpperDevices
3820             vlan_default:
3821             description: Default VLAN ID
3822             example: 1
3823             format: uint64
3824             type: integer
3825             x-go-name: VLANDefault
3826             vlan_filtering:
3827             description: Whether VLAN filtering is enabled
3828             example: false
3829             type: boolean
3830             x-go-name: VLANFiltering
3831             type: object
3832             x-go-package: github.com/lxc/lxd/shared/api
3833             NetworkStateCounters:
3834             description: NetworkStateCounters represents packet counters
3835             properties:
3836             bytes_received:
3837             description: Number of bytes received
3838             example: 250542118
3839             format: int64
3840             type: integer
3841             x-go-name: BytesReceived
3842             bytes_sent:
3843             description: Number of bytes sent
3844             example: 17524040140
3845             format: int64
3846             type: integer
3847             x-go-name: BytesSent
3848             packets_received:
3849             description: Number of packets received
3850             example: 1182515
3851             format: int64
3852             type: integer
3853             x-go-name: PacketsReceived
3854             packets_sent:
3855             description: Number of packets sent
3856             example: 1567934
3857             format: int64
3858             type: integer
3859             x-go-name: PacketsSent
3860             type: object
3861             x-go-package: github.com/lxc/lxd/shared/api
3862             NetworkStateOVN:
3863             description: NetworkStateOVN represents OVN specific state
3864             properties:
3865             chassis:
3866             description: OVN network chassis name
3867             type: string
3868             x-go-name: Chassis
3869             type: object
3870             x-go-package: github.com/lxc/lxd/shared/api
3871             NetworkStateVLAN:
3872             description: NetworkStateVLAN represents VLAN specific state
3873             properties:
3874             lower_device:
3875             description: Parent device
3876             example: eth0
3877             type: string
3878             x-go-name: LowerDevice
3879             vid:
3880             description: VLAN ID
3881             example: 100
3882             format: uint64
3883             type: integer
3884             x-go-name: VID
3885             type: object
3886             x-go-package: github.com/lxc/lxd/shared/api
3887             NetworkZone:
3888             properties:
3889             config:
3890             additionalProperties:
3891             type: string
3892             description: Zone configuration map (refer to doc/network-zones.md)
3893             example:
3894             user.mykey: foo
3895             type: object
3896             x-go-name: Config
3897             description:
3898             description: Description of the network zone
3899             example: Internal domain
3900             type: string
3901             x-go-name: Description
3902             name:
3903             description: The name of the zone (DNS domain name)
3904             example: example.net
3905             type: string
3906             x-go-name: Name
3907             used_by:
3908             description: List of URLs of objects using this network zone
3909             example:
3910             - /1.0/networks/foo
3911             - /1.0/networks/bar
3912             items:
3913             type: string
3914             readOnly: true
3915             type: array
3916             x-go-name: UsedBy
3917             title: NetworkZone represents a network zone (DNS).
3918             type: object
3919             x-go-package: github.com/lxc/lxd/shared/api
3920             NetworkZonePut:
3921             description: NetworkZonePut represents the modifiable fields of a LXD network
3922             zone
3923             properties:
3924             config:
3925             additionalProperties:
3926             type: string
3927             description: Zone configuration map (refer to doc/network-zones.md)
3928             example:
3929             user.mykey: foo
3930             type: object
3931             x-go-name: Config
3932             description:
3933             description: Description of the network zone
3934             example: Internal domain
3935             type: string
3936             x-go-name: Description
3937             type: object
3938             x-go-package: github.com/lxc/lxd/shared/api
3939             NetworkZoneRecord:
3940             properties:
3941             config:
3942             additionalProperties:
3943             type: string
3944             description: Advanced configuration for the record
3945             example:
3946             user.mykey: foo
3947             type: object
3948             x-go-name: Config
3949             description:
3950             description: Description of the record
3951             example: SPF record
3952             type: string
3953             x-go-name: Description
3954             entries:
3955             description: Entries in the record
3956             items:
3957             $ref: '#/definitions/NetworkZoneRecordEntry'
3958             type: array
3959             x-go-name: Entries
3960             name:
3961             description: The name of the record
3962             example: '@'
3963             type: string
3964             x-go-name: Name
3965             title: NetworkZoneRecord represents a network zone (DNS) record.
3966             type: object
3967             x-go-package: github.com/lxc/lxd/shared/api
3968             NetworkZoneRecordEntry:
3969             description: NetworkZoneRecordEntry represents the fields in a record entry
3970             properties:
3971             ttl:
3972             description: TTL for the entry
3973             example: 3600
3974             format: uint64
3975             type: integer
3976             x-go-name: TTL
3977             type:
3978             description: Type of DNS entry
3979             example: TXT
3980             type: string
3981             x-go-name: Type
3982             value:
3983             description: Value for the record
3984             example: v=spf1 mx ~all
3985             type: string
3986             x-go-name: Value
3987             type: object
3988             x-go-package: github.com/lxc/lxd/shared/api
3989             NetworkZoneRecordPut:
3990             description: NetworkZoneRecordPut represents the modifiable fields of a LXD network
3991             zone record
3992             properties:
3993             config:
3994             additionalProperties:
3995             type: string
3996             description: Advanced configuration for the record
3997             example:
3998             user.mykey: foo
3999             type: object
4000             x-go-name: Config
4001             description:
4002             description: Description of the record
4003             example: SPF record
4004             type: string
4005             x-go-name: Description
4006             entries:
4007             description: Entries in the record
4008             items:
4009             $ref: '#/definitions/NetworkZoneRecordEntry'
4010             type: array
4011             x-go-name: Entries
4012             type: object
4013             x-go-package: github.com/lxc/lxd/shared/api
4014             NetworkZoneRecordsPost:
4015             description: NetworkZoneRecordsPost represents the fields of a new LXD network
4016             zone record
4017             properties:
4018             config:
4019             additionalProperties:
4020             type: string
4021             description: Advanced configuration for the record
4022             example:
4023             user.mykey: foo
4024             type: object
4025             x-go-name: Config
4026             description:
4027             description: Description of the record
4028             example: SPF record
4029             type: string
4030             x-go-name: Description
4031             entries:
4032             description: Entries in the record
4033             items:
4034             $ref: '#/definitions/NetworkZoneRecordEntry'
4035             type: array
4036             x-go-name: Entries
4037             name:
4038             description: The record name in the zone
4039             example: '@'
4040             type: string
4041             x-go-name: Name
4042             type: object
4043             x-go-package: github.com/lxc/lxd/shared/api
4044             NetworkZonesPost:
4045             description: NetworkZonesPost represents the fields of a new LXD network zone
4046             properties:
4047             config:
4048             additionalProperties:
4049             type: string
4050             description: Zone configuration map (refer to doc/network-zones.md)
4051             example:
4052             user.mykey: foo
4053             type: object
4054             x-go-name: Config
4055             description:
4056             description: Description of the network zone
4057             example: Internal domain
4058             type: string
4059             x-go-name: Description
4060             name:
4061             description: The name of the zone (DNS domain name)
4062             example: example.net
4063             type: string
4064             x-go-name: Name
4065             type: object
4066             x-go-package: github.com/lxc/lxd/shared/api
4067             NetworksPost:
4068             description: NetworksPost represents the fields of a new LXD network
4069             properties:
4070             config:
4071             additionalProperties:
4072             type: string
4073             description: Network configuration map (refer to doc/networks.md)
4074             example:
4075             ipv4.address: 10.0.0.1/24
4076             ipv4.nat: "true"
4077             ipv6.address: none
4078             type: object
4079             x-go-name: Config
4080             description:
4081             description: Description of the profile
4082             example: My new LXD bridge
4083             type: string
4084             x-go-name: Description
4085             name:
4086             description: The name of the new network
4087             example: lxdbr1
4088             type: string
4089             x-go-name: Name
4090             type:
4091             description: The network type (refer to doc/networks.md)
4092             example: bridge
4093             type: string
4094             x-go-name: Type
4095             type: object
4096             x-go-package: github.com/lxc/lxd/shared/api
4097             Operation:
4098             description: Operation represents a LXD background operation
4099             properties:
4100             class:
4101             description: Type of operation (task, token or websocket)
4102             example: websocket
4103             type: string
4104             x-go-name: Class
4105             created_at:
4106             description: Operation creation time
4107             example: "2021-03-23T17:38:37.753398689-04:00"
4108             format: date-time
4109             type: string
4110             x-go-name: CreatedAt
4111             description:
4112             description: Description of the operation
4113             example: Executing command
4114             type: string
4115             x-go-name: Description
4116             err:
4117             description: Operation error mesage
4118             example: Some error message
4119             type: string
4120             x-go-name: Err
4121             id:
4122             description: UUID of the operation
4123             example: 6916c8a6-9b7d-4abd-90b3-aedfec7ec7da
4124             type: string
4125             x-go-name: ID
4126             location:
4127             description: What cluster member this record was found on
4128             example: lxd01
4129             type: string
4130             x-go-name: Location
4131             may_cancel:
4132             description: Whether the operation can be canceled
4133             example: false
4134             type: boolean
4135             x-go-name: MayCancel
4136             metadata:
4137             additionalProperties:
4138             type: object
4139             description: Operation specific metadata
4140             example:
4141             command:
4142             - bash
4143             environment:
4144             HOME: /root
4145             LANG: C.UTF-8
4146             PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
4147             TERM: xterm
4148             USER: root
4149             fds:
4150             "0": da3046cf02c0116febf4ef3fe4eaecdf308e720c05e5a9c730ce1a6f15417f66
4151             "1": 05896879d8692607bd6e4a09475667da3b5f6714418ab0ee0e5720b4c57f754b
4152             interactive: true
4153             type: object
4154             x-go-name: Metadata
4155             resources:
4156             additionalProperties:
4157             items:
4158             type: string
4159             type: array
4160             description: Affected resourcs
4161             example:
4162             containers:
4163             - /1.0/containers/foo
4164             instances:
4165             - /1.0/instances/foo
4166             type: object
4167             x-go-name: Resources
4168             status:
4169             description: Status name
4170             example: Running
4171             type: string
4172             x-go-name: Status
4173             status_code:
4174             $ref: '#/definitions/StatusCode'
4175             updated_at:
4176             description: Operation last change
4177             example: "2021-03-23T17:38:37.753398689-04:00"
4178             format: date-time
4179             type: string
4180             x-go-name: UpdatedAt
4181             type: object
4182             x-go-package: github.com/lxc/lxd/shared/api
4183             Profile:
4184             description: Profile represents a LXD profile
4185             properties:
4186             config:
4187             additionalProperties:
4188             type: string
4189             description: Instance configuration map (refer to doc/instances.md)
4190             example:
4191             limits.cpu: "4"
4192             limits.memory: 4GiB
4193             type: object
4194             x-go-name: Config
4195             description:
4196             description: Description of the profile
4197             example: Medium size instances
4198             type: string
4199             x-go-name: Description
4200             devices:
4201             additionalProperties:
4202             additionalProperties:
4203             type: string
4204             type: object
4205             description: List of devices
4206             example:
4207             eth0:
4208             name: eth0
4209             network: lxdbr0
4210             type: nic
4211             root:
4212             path: /
4213             pool: default
4214             type: disk
4215             type: object
4216             x-go-name: Devices
4217             name:
4218             description: The profile name
4219             example: foo
4220             readOnly: true
4221             type: string
4222             x-go-name: Name
4223             used_by:
4224             description: List of URLs of objects using this profile
4225             example:
4226             - /1.0/instances/c1
4227             - /1.0/instances/v1
4228             items:
4229             type: string
4230             readOnly: true
4231             type: array
4232             x-go-name: UsedBy
4233             type: object
4234             x-go-package: github.com/lxc/lxd/shared/api
4235             ProfilePost:
4236             description: ProfilePost represents the fields required to rename a LXD profile
4237             properties:
4238             name:
4239             description: The new name for the profile
4240             example: bar
4241             type: string
4242             x-go-name: Name
4243             type: object
4244             x-go-package: github.com/lxc/lxd/shared/api
4245             ProfilePut:
4246             description: ProfilePut represents the modifiable fields of a LXD profile
4247             properties:
4248             config:
4249             additionalProperties:
4250             type: string
4251             description: Instance configuration map (refer to doc/instances.md)
4252             example:
4253             limits.cpu: "4"
4254             limits.memory: 4GiB
4255             type: object
4256             x-go-name: Config
4257             description:
4258             description: Description of the profile
4259             example: Medium size instances
4260             type: string
4261             x-go-name: Description
4262             devices:
4263             additionalProperties:
4264             additionalProperties:
4265             type: string
4266             type: object
4267             description: List of devices
4268             example:
4269             eth0:
4270             name: eth0
4271             network: lxdbr0
4272             type: nic
4273             root:
4274             path: /
4275             pool: default
4276             type: disk
4277             type: object
4278             x-go-name: Devices
4279             type: object
4280             x-go-package: github.com/lxc/lxd/shared/api
4281             ProfilesPost:
4282             description: ProfilesPost represents the fields of a new LXD profile
4283             properties:
4284             config:
4285             additionalProperties:
4286             type: string
4287             description: Instance configuration map (refer to doc/instances.md)
4288             example:
4289             limits.cpu: "4"
4290             limits.memory: 4GiB
4291             type: object
4292             x-go-name: Config
4293             description:
4294             description: Description of the profile
4295             example: Medium size instances
4296             type: string
4297             x-go-name: Description
4298             devices:
4299             additionalProperties:
4300             additionalProperties:
4301             type: string
4302             type: object
4303             description: List of devices
4304             example:
4305             eth0:
4306             name: eth0
4307             network: lxdbr0
4308             type: nic
4309             root:
4310             path: /
4311             pool: default
4312             type: disk
4313             type: object
4314             x-go-name: Devices
4315             name:
4316             description: The name of the new profile
4317             example: foo
4318             type: string
4319             x-go-name: Name
4320             type: object
4321             x-go-package: github.com/lxc/lxd/shared/api
4322             Project:
4323             description: Project represents a LXD project
4324             properties:
4325             config:
4326             additionalProperties:
4327             type: string
4328             description: Project configuration map (refer to doc/projects.md)
4329             example:
4330             features.networks: "false"
4331             features.profiles: "true"
4332             type: object
4333             x-go-name: Config
4334             description:
4335             description: Description of the project
4336             example: My new project
4337             type: string
4338             x-go-name: Description
4339             name:
4340             description: The project name
4341             example: foo
4342             readOnly: true
4343             type: string
4344             x-go-name: Name
4345             used_by:
4346             description: List of URLs of objects using this project
4347             example:
4348             - /1.0/images/0e60015346f06627f10580d56ac7fffd9ea775f6d4f25987217d5eed94910a20
4349             - /1.0/instances/c1
4350             - /1.0/networks/lxdbr0
4351             - /1.0/profiles/default
4352             - /1.0/storage-pools/default/volumes/custom/blah
4353             items:
4354             type: string
4355             readOnly: true
4356             type: array
4357             x-go-name: UsedBy
4358             type: object
4359             x-go-package: github.com/lxc/lxd/shared/api
4360             ProjectPost:
4361             description: ProjectPost represents the fields required to rename a LXD project
4362             properties:
4363             name:
4364             description: The new name for the project
4365             example: bar
4366             type: string
4367             x-go-name: Name
4368             type: object
4369             x-go-package: github.com/lxc/lxd/shared/api
4370             ProjectPut:
4371             description: ProjectPut represents the modifiable fields of a LXD project
4372             properties:
4373             config:
4374             additionalProperties:
4375             type: string
4376             description: Project configuration map (refer to doc/projects.md)
4377             example:
4378             features.networks: "false"
4379             features.profiles: "true"
4380             type: object
4381             x-go-name: Config
4382             description:
4383             description: Description of the project
4384             example: My new project
4385             type: string
4386             x-go-name: Description
4387             type: object
4388             x-go-package: github.com/lxc/lxd/shared/api
4389             ProjectState:
4390             description: ProjectState represents the current running state of a LXD project
4391             properties:
4392             resources:
4393             additionalProperties:
4394             $ref: '#/definitions/ProjectStateResource'
4395             description: Allocated and used resources
4396             example:
4397             containers:
4398             limit: 10
4399             usage: 4
4400             cpu:
4401             limit: 20
4402             usage: 16
4403             readOnly: true
4404             type: object
4405             x-go-name: Resources
4406             type: object
4407             x-go-package: github.com/lxc/lxd/shared/api
4408             ProjectStateResource:
4409             description: ProjectStateResource represents the state of a particular resource
4410             in a LXD project
4411             properties:
4412             Limit:
4413             description: Limit for the resource (-1 if none)
4414             example: 10
4415             format: int64
4416             type: integer
4417             Usage:
4418             description: Current usage for the resource
4419             example: 4
4420             format: int64
4421             type: integer
4422             type: object
4423             x-go-package: github.com/lxc/lxd/shared/api
4424             ProjectsPost:
4425             description: ProjectsPost represents the fields of a new LXD project
4426             properties:
4427             config:
4428             additionalProperties:
4429             type: string
4430             description: Project configuration map (refer to doc/projects.md)
4431             example:
4432             features.networks: "false"
4433             features.profiles: "true"
4434             type: object
4435             x-go-name: Config
4436             description:
4437             description: Description of the project
4438             example: My new project
4439             type: string
4440             x-go-name: Description
4441             name:
4442             description: The name of the new project
4443             example: foo
4444             type: string
4445             x-go-name: Name
4446             type: object
4447             x-go-package: github.com/lxc/lxd/shared/api
4448             Resources:
4449             description: Resources represents the system resources available for LXD
4450             properties:
4451             cpu:
4452             $ref: '#/definitions/ResourcesCPU'
4453             gpu:
4454             $ref: '#/definitions/ResourcesGPU'
4455             memory:
4456             $ref: '#/definitions/ResourcesMemory'
4457             network:
4458             $ref: '#/definitions/ResourcesNetwork'
4459             pci:
4460             $ref: '#/definitions/ResourcesPCI'
4461             storage:
4462             $ref: '#/definitions/ResourcesStorage'
4463             system:
4464             $ref: '#/definitions/ResourcesSystem'
4465             usb:
4466             $ref: '#/definitions/ResourcesUSB'
4467             type: object
4468             x-go-package: github.com/lxc/lxd/shared/api
4469             ResourcesCPU:
4470             description: ResourcesCPU represents the cpu resources available on the system
4471             properties:
4472             architecture:
4473             description: Architecture name
4474             example: x86_64
4475             type: string
4476             x-go-name: Architecture
4477             sockets:
4478             description: List of CPU sockets
4479             items:
4480             $ref: '#/definitions/ResourcesCPUSocket'
4481             type: array
4482             x-go-name: Sockets
4483             total:
4484             description: Total number of CPU threads (from all sockets and cores)
4485             example: 1
4486             format: uint64
4487             type: integer
4488             x-go-name: Total
4489             type: object
4490             x-go-package: github.com/lxc/lxd/shared/api
4491             ResourcesCPUCache:
4492             description: ResourcesCPUCache represents a CPU cache
4493             properties:
4494             level:
4495             description: Cache level (usually a number from 1 to 3)
4496             example: 1
4497             format: uint64
4498             type: integer
4499             x-go-name: Level
4500             size:
4501             description: Size of the cache (in bytes)
4502             example: 32768
4503             format: uint64
4504             type: integer
4505             x-go-name: Size
4506             type:
4507             description: Type of cache (Data, Instruction, Unified, ...)
4508             example: Data
4509             type: string
4510             x-go-name: Type
4511             type: object
4512             x-go-package: github.com/lxc/lxd/shared/api
4513             ResourcesCPUCore:
4514             description: ResourcesCPUCore represents a CPU core on the system
4515             properties:
4516             core:
4517             description: Core identifier within the socket
4518             example: 0
4519             format: uint64
4520             type: integer
4521             x-go-name: Core
4522             die:
4523             description: What die the CPU is a part of (for chiplet designs)
4524             example: 0
4525             format: uint64
4526             type: integer
4527             x-go-name: Die
4528             frequency:
4529             description: Current frequency
4530             example: 3500
4531             format: uint64
4532             type: integer
4533             x-go-name: Frequency
4534             threads:
4535             description: List of threads
4536             items:
4537             $ref: '#/definitions/ResourcesCPUThread'
4538             type: array
4539             x-go-name: Threads
4540             type: object
4541             x-go-package: github.com/lxc/lxd/shared/api
4542             ResourcesCPUSocket:
4543             description: ResourcesCPUSocket represents a CPU socket on the system
4544             properties:
4545             cache:
4546             description: List of CPU caches
4547             items:
4548             $ref: '#/definitions/ResourcesCPUCache'
4549             type: array
4550             x-go-name: Cache
4551             cores:
4552             description: List of CPU cores
4553             items:
4554             $ref: '#/definitions/ResourcesCPUCore'
4555             type: array
4556             x-go-name: Cores
4557             frequency:
4558             description: Current CPU frequency (Mhz)
4559             example: 3499
4560             format: uint64
4561             type: integer
4562             x-go-name: Frequency
4563             frequency_minimum:
4564             description: Minimum CPU frequency (Mhz)
4565             example: 400
4566             format: uint64
4567             type: integer
4568             x-go-name: FrequencyMinimum
4569             frequency_turbo:
4570             description: Maximum CPU frequency (Mhz)
4571             example: 3500
4572             format: uint64
4573             type: integer
4574             x-go-name: FrequencyTurbo
4575             name:
4576             description: Product name
4577             example: Intel(R) Core(TM) i5-7300U CPU @ 2.60GHz
4578             type: string
4579             x-go-name: Name
4580             socket:
4581             description: Socket number
4582             example: 0
4583             format: uint64
4584             type: integer
4585             x-go-name: Socket
4586             vendor:
4587             description: Vendor name
4588             example: GenuineIntel
4589             type: string
4590             x-go-name: Vendor
4591             type: object
4592             x-go-package: github.com/lxc/lxd/shared/api
4593             ResourcesCPUThread:
4594             description: ResourcesCPUThread represents a CPU thread on the system
4595             properties:
4596             id:
4597             description: Thread ID (used for CPU pinning)
4598             example: 0
4599             format: int64
4600             type: integer
4601             x-go-name: ID
4602             isolated:
4603             description: Whether the thread has been isolated (outside of normal scheduling)
4604             example: false
4605             type: boolean
4606             x-go-name: Isolated
4607             numa_node:
4608             description: NUMA node the thread is a part of
4609             example: 0
4610             format: uint64
4611             type: integer
4612             x-go-name: NUMANode
4613             online:
4614             description: Whether the thread is online (enabled)
4615             example: true
4616             type: boolean
4617             x-go-name: Online
4618             thread:
4619             description: Thread identifier within the core
4620             example: 0
4621             format: uint64
4622             type: integer
4623             x-go-name: Thread
4624             type: object
4625             x-go-package: github.com/lxc/lxd/shared/api
4626             ResourcesGPU:
4627             description: ResourcesGPU represents the GPU resources available on the system
4628             properties:
4629             cards:
4630             description: List of GPUs
4631             items:
4632             $ref: '#/definitions/ResourcesGPUCard'
4633             type: array
4634             x-go-name: Cards
4635             total:
4636             description: Total number of GPUs
4637             example: 1
4638             format: uint64
4639             type: integer
4640             x-go-name: Total
4641             type: object
4642             x-go-package: github.com/lxc/lxd/shared/api
4643             ResourcesGPUCard:
4644             description: ResourcesGPUCard represents a GPU card on the system
4645             properties:
4646             driver:
4647             description: Kernel driver currently associated with the GPU
4648             example: i915
4649             type: string
4650             x-go-name: Driver
4651             driver_version:
4652             description: Version of the kernel driver
4653             example: 5.8.0-36-generic
4654             type: string
4655             x-go-name: DriverVersion
4656             drm:
4657             $ref: '#/definitions/ResourcesGPUCardDRM'
4658             mdev:
4659             additionalProperties:
4660             $ref: '#/definitions/ResourcesGPUCardMdev'
4661             description: Map of available mediated device profiles
4662             example: null
4663             type: object
4664             x-go-name: Mdev
4665             numa_node:
4666             description: NUMA node the GPU is a part of
4667             example: 0
4668             format: uint64
4669             type: integer
4670             x-go-name: NUMANode
4671             nvidia:
4672             $ref: '#/definitions/ResourcesGPUCardNvidia'
4673             pci_address:
4674             description: PCI address
4675             example: "0000:00:02.0"
4676             type: string
4677             x-go-name: PCIAddress
4678             product:
4679             description: Name of the product
4680             example: HD Graphics 620
4681             type: string
4682             x-go-name: Product
4683             product_id:
4684             description: PCI ID of the product
4685             example: "5916"
4686             type: string
4687             x-go-name: ProductID
4688             sriov:
4689             $ref: '#/definitions/ResourcesGPUCardSRIOV'
4690             usb_address:
4691             description: USB address (for USB cards)
4692             example: "2:7"
4693             type: string
4694             x-go-name: USBAddress
4695             vendor:
4696             description: Name of the vendor
4697             example: Intel Corporation
4698             type: string
4699             x-go-name: Vendor
4700             vendor_id:
4701             description: PCI ID of the vendor
4702             example: "8086"
4703             type: string
4704             x-go-name: VendorID
4705             type: object
4706             x-go-package: github.com/lxc/lxd/shared/api
4707             ResourcesGPUCardDRM:
4708             description: ResourcesGPUCardDRM represents the Linux DRM configuration of the
4709             GPU
4710             properties:
4711             card_device:
4712             description: Card device number
4713             example: "226:0"
4714             type: string
4715             x-go-name: CardDevice
4716             card_name:
4717             description: Card device name
4718             example: card0
4719             type: string
4720             x-go-name: CardName
4721             control_device:
4722             description: Control device number
4723             example: "226:0"
4724             type: string
4725             x-go-name: ControlDevice
4726             control_name:
4727             description: Control device name
4728             example: controlD64
4729             type: string
4730             x-go-name: ControlName
4731             id:
4732             description: DRM card ID
4733             example: 0
4734             format: uint64
4735             type: integer
4736             x-go-name: ID
4737             render_device:
4738             description: Render device number
4739             example: 226:128
4740             type: string
4741             x-go-name: RenderDevice
4742             render_name:
4743             description: Render device name
4744             example: renderD128
4745             type: string
4746             x-go-name: RenderName
4747             type: object
4748             x-go-package: github.com/lxc/lxd/shared/api
4749             ResourcesGPUCardMdev:
4750             description: ResourcesGPUCardMdev represents the mediated devices configuration
4751             of the GPU
4752             properties:
4753             api:
4754             description: The mechanism used by this device
4755             example: vfio-pci
4756             type: string
4757             x-go-name: API
4758             available:
4759             description: Number of available devices of this profile
4760             example: 2
4761             format: uint64
4762             type: integer
4763             x-go-name: Available
4764             description:
4765             description: Profile description
4766             example: 'low_gm_size: 128MB\nhigh_gm_size: 512MB\nfence: 4\nresolution: 1920x1200\nweight:
4767             4'
4768             type: string
4769             x-go-name: Description
4770             devices:
4771             description: List of active devices (UUIDs)
4772             example:
4773             - 42200aac-0977-495c-8c9e-6c51b9092a01
4774             - b4950c00-1437-41d9-88f6-28d61cf9b9ef
4775             items:
4776             type: string
4777             type: array
4778             x-go-name: Devices
4779             name:
4780             description: Profile name
4781             example: i915-GVTg_V5_8
4782             type: string
4783             x-go-name: Name
4784             type: object
4785             x-go-package: github.com/lxc/lxd/shared/api
4786             ResourcesGPUCardNvidia:
4787             description: ResourcesGPUCardNvidia represents additional information for NVIDIA
4788             GPUs
4789             properties:
4790             architecture:
4791             description: Architecture (generation)
4792             example: "3.5"
4793             type: string
4794             x-go-name: Architecture
4795             brand:
4796             description: Brand name
4797             example: GeForce
4798             type: string
4799             x-go-name: Brand
4800             card_device:
4801             description: Card device number
4802             example: "195:0"
4803             type: string
4804             x-go-name: CardDevice
4805             card_name:
4806             description: Card device name
4807             example: nvidia0
4808             type: string
4809             x-go-name: CardName
4810             cuda_version:
4811             description: Version of the CUDA API
4812             example: "11.0"
4813             type: string
4814             x-go-name: CUDAVersion
4815             model:
4816             description: Model name
4817             example: GeForce GT 730
4818             type: string
4819             x-go-name: Model
4820             nvrm_version:
4821             description: Version of the NVRM (usually driver version)
4822             example: 450.102.04
4823             type: string
4824             x-go-name: NVRMVersion
4825             uuid:
4826             description: GPU UUID
4827             example: GPU-6ddadebd-dafe-2db9-f10f-125719770fd3
4828             type: string
4829             x-go-name: UUID
4830             type: object
4831             x-go-package: github.com/lxc/lxd/shared/api
4832             ResourcesGPUCardSRIOV:
4833             description: ResourcesGPUCardSRIOV represents the SRIOV configuration of the GPU
4834             properties:
4835             current_vfs:
4836             description: Number of VFs currently configured
4837             example: 0
4838             format: uint64
4839             type: integer
4840             x-go-name: CurrentVFs
4841             maximum_vfs:
4842             description: Maximum number of supported VFs
4843             example: 0
4844             format: uint64
4845             type: integer
4846             x-go-name: MaximumVFs
4847             vfs:
4848             description: List of VFs (as additional GPU devices)
4849             example: null
4850             items:
4851             $ref: '#/definitions/ResourcesGPUCard'
4852             type: array
4853             x-go-name: VFs
4854             type: object
4855             x-go-package: github.com/lxc/lxd/shared/api
4856             ResourcesMemory:
4857             description: ResourcesMemory represents the memory resources available on the
4858             system
4859             properties:
4860             hugepages_size:
4861             description: Size of memory huge pages (bytes)
4862             example: 2097152
4863             format: uint64
4864             type: integer
4865             x-go-name: HugepagesSize
4866             hugepages_total:
4867             description: Total of memory huge pages (bytes)
4868             example: 429284917248
4869             format: uint64
4870             type: integer
4871             x-go-name: HugepagesTotal
4872             hugepages_used:
4873             description: Used memory huge pages (bytes)
4874             example: 429284917248
4875             format: uint64
4876             type: integer
4877             x-go-name: HugepagesUsed
4878             nodes:
4879             description: List of NUMA memory nodes
4880             example: null
4881             items:
4882             $ref: '#/definitions/ResourcesMemoryNode'
4883             type: array
4884             x-go-name: Nodes
4885             total:
4886             description: Total system memory (bytes)
4887             example: 687194767360
4888             format: uint64
4889             type: integer
4890             x-go-name: Total
4891             used:
4892             description: Used system memory (bytes)
4893             example: 557450502144
4894             format: uint64
4895             type: integer
4896             x-go-name: Used
4897             type: object
4898             x-go-package: github.com/lxc/lxd/shared/api
4899             ResourcesMemoryNode:
4900             description: ResourcesMemoryNode represents the node-specific memory resources
4901             available on the system
4902             properties:
4903             hugepages_total:
4904             description: Total of memory huge pages (bytes)
4905             example: 214536552448
4906             format: uint64
4907             type: integer
4908             x-go-name: HugepagesTotal
4909             hugepages_used:
4910             description: Used memory huge pages (bytes)
4911             example: 214536552448
4912             format: uint64
4913             type: integer
4914             x-go-name: HugepagesUsed
4915             numa_node:
4916             description: NUMA node identifier
4917             example: 0
4918             format: uint64
4919             type: integer
4920             x-go-name: NUMANode
4921             total:
4922             description: Total system memory (bytes)
4923             example: 343597383680
4924             format: uint64
4925             type: integer
4926             x-go-name: Total
4927             used:
4928             description: Used system memory (bytes)
4929             example: 264880439296
4930             format: uint64
4931             type: integer
4932             x-go-name: Used
4933             type: object
4934             x-go-package: github.com/lxc/lxd/shared/api
4935             ResourcesNetwork:
4936             description: ResourcesNetwork represents the network cards available on the system
4937             properties:
4938             cards:
4939             description: List of network cards
4940             items:
4941             $ref: '#/definitions/ResourcesNetworkCard'
4942             type: array
4943             x-go-name: Cards
4944             total:
4945             description: Total number of network cards
4946             example: 1
4947             format: uint64
4948             type: integer
4949             x-go-name: Total
4950             type: object
4951             x-go-package: github.com/lxc/lxd/shared/api
4952             ResourcesNetworkCard:
4953             description: ResourcesNetworkCard represents a network card on the system
4954             properties:
4955             driver:
4956             description: Kernel driver currently associated with the card
4957             example: atlantic
4958             type: string
4959             x-go-name: Driver
4960             driver_version:
4961             description: Version of the kernel driver
4962             example: 5.8.0-36-generic
4963             type: string
4964             x-go-name: DriverVersion
4965             firmware_version:
4966             description: Current firmware version
4967             example: 3.1.100
4968             type: string
4969             x-go-name: FirmwareVersion
4970             numa_node:
4971             description: NUMA node the card is a part of
4972             example: 0
4973             format: uint64
4974             type: integer
4975             x-go-name: NUMANode
4976             pci_address:
4977             description: PCI address (for PCI cards)
4978             example: 0000:0d:00.0
4979             type: string
4980             x-go-name: PCIAddress
4981             ports:
4982             description: List of ports on the card
4983             items:
4984             $ref: '#/definitions/ResourcesNetworkCardPort'
4985             type: array
4986             x-go-name: Ports
4987             product:
4988             description: Name of the product
4989             example: AQC107 NBase-T/IEEE
4990             type: string
4991             x-go-name: Product
4992             product_id:
4993             description: PCI ID of the product
4994             example: 87b1
4995             type: string
4996             x-go-name: ProductID
4997             sriov:
4998             $ref: '#/definitions/ResourcesNetworkCardSRIOV'
4999             usb_address:
5000             description: USB address (for USB cards)
5001             example: "2:7"
5002             type: string
5003             x-go-name: USBAddress
5004             vendor:
5005             description: Name of the vendor
5006             example: Aquantia Corp.
5007             type: string
5008             x-go-name: Vendor
5009             vendor_id:
5010             description: PCI ID of the vendor
5011             example: 1d6a
5012             type: string
5013             x-go-name: VendorID
5014             type: object
5015             x-go-package: github.com/lxc/lxd/shared/api
5016             ResourcesNetworkCardPort:
5017             description: ResourcesNetworkCardPort represents a network port on the system
5018             properties:
5019             address:
5020             description: MAC address
5021             example: 00:23:a4:01:01:6f
5022             type: string
5023             x-go-name: Address
5024             auto_negotiation:
5025             description: Whether auto negotiation is used
5026             example: true
5027             type: boolean
5028             x-go-name: AutoNegotiation
5029             id:
5030             description: Port identifier (interface name)
5031             example: eth0
5032             type: string
5033             x-go-name: ID
5034             infiniband:
5035             $ref: '#/definitions/ResourcesNetworkCardPortInfiniband'
5036             link_detected:
5037             description: Whether a link was detected
5038             example: true
5039             type: boolean
5040             x-go-name: LinkDetected
5041             link_duplex:
5042             description: Duplex type
5043             example: full
5044             type: string
5045             x-go-name: LinkDuplex
5046             link_speed:
5047             description: Current speed (Mbit/s)
5048             example: 10000
5049             format: uint64
5050             type: integer
5051             x-go-name: LinkSpeed
5052             port:
5053             description: Port number
5054             example: 0
5055             format: uint64
5056             type: integer
5057             x-go-name: Port
5058             port_type:
5059             description: Current port type
5060             example: twisted pair
5061             type: string
5062             x-go-name: PortType
5063             protocol:
5064             description: Transport protocol
5065             example: ethernet
5066             type: string
5067             x-go-name: Protocol
5068             supported_modes:
5069             description: List of supported modes
5070             example:
5071             - 100baseT/Full
5072             - 1000baseT/Full
5073             - 2500baseT/Full
5074             - 5000baseT/Full
5075             - 10000baseT/Full
5076             items:
5077             type: string
5078             type: array
5079             x-go-name: SupportedModes
5080             supported_ports:
5081             description: List of supported port types
5082             example:
5083             - twisted pair
5084             items:
5085             type: string
5086             type: array
5087             x-go-name: SupportedPorts
5088             transceiver_type:
5089             description: Type of transceiver used
5090             example: internal
5091             type: string
5092             x-go-name: TransceiverType
5093             type: object
5094             x-go-package: github.com/lxc/lxd/shared/api
5095             ResourcesNetworkCardPortInfiniband:
5096             description: ResourcesNetworkCardPortInfiniband represents the Linux Infiniband
5097             configuration for the port
5098             properties:
5099             issm_device:
5100             description: ISSM device number
5101             example: 231:64
5102             type: string
5103             x-go-name: IsSMDevice
5104             issm_name:
5105             description: ISSM device name
5106             example: issm0
5107             type: string
5108             x-go-name: IsSMName
5109             mad_device:
5110             description: MAD device number
5111             example: "231:0"
5112             type: string
5113             x-go-name: MADDevice
5114             mad_name:
5115             description: MAD device name
5116             example: umad0
5117             type: string
5118             x-go-name: MADName
5119             verb_device:
5120             description: Verb device number
5121             example: 231:192
5122             type: string
5123             x-go-name: VerbDevice
5124             verb_name:
5125             description: Verb device name
5126             example: uverbs0
5127             type: string
5128             x-go-name: VerbName
5129             type: object
5130             x-go-package: github.com/lxc/lxd/shared/api
5131             ResourcesNetworkCardSRIOV:
5132             description: ResourcesNetworkCardSRIOV represents the SRIOV configuration of the
5133             network card
5134             properties:
5135             current_vfs:
5136             description: Number of VFs currently configured
5137             example: 0
5138             format: uint64
5139             type: integer
5140             x-go-name: CurrentVFs
5141             maximum_vfs:
5142             description: Maximum number of supported VFs
5143             example: 0
5144             format: uint64
5145             type: integer
5146             x-go-name: MaximumVFs
5147             vfs:
5148             description: List of VFs (as additional Network devices)
5149             example: null
5150             items:
5151             $ref: '#/definitions/ResourcesNetworkCard'
5152             type: array
5153             x-go-name: VFs
5154             type: object
5155             x-go-package: github.com/lxc/lxd/shared/api
5156             ResourcesPCI:
5157             description: ResourcesPCI represents the PCI devices available on the system
5158             properties:
5159             devices:
5160             description: List of PCI devices
5161             items:
5162             $ref: '#/definitions/ResourcesPCIDevice'
5163             type: array
5164             x-go-name: Devices
5165             total:
5166             description: Total number of PCI devices
5167             example: 1
5168             format: uint64
5169             type: integer
5170             x-go-name: Total
5171             type: object
5172             x-go-package: github.com/lxc/lxd/shared/api
5173             ResourcesPCIDevice:
5174             description: ResourcesPCIDevice represents a PCI device
5175             properties:
5176             driver:
5177             description: Kernel driver currently associated with the GPU
5178             example: mgag200
5179             type: string
5180             x-go-name: Driver
5181             driver_version:
5182             description: Version of the kernel driver
5183             example: 5.8.0-36-generic
5184             type: string
5185             x-go-name: DriverVersion
5186             iommu_group:
5187             description: IOMMU group number
5188             example: 20
5189             format: uint64
5190             type: integer
5191             x-go-name: IOMMUGroup
5192             numa_node:
5193             description: NUMA node the card is a part of
5194             example: 0
5195             format: uint64
5196             type: integer
5197             x-go-name: NUMANode
5198             pci_address:
5199             description: PCI address
5200             example: "0000:07:03.0"
5201             type: string
5202             x-go-name: PCIAddress
5203             product:
5204             description: Name of the product
5205             example: MGA G200eW WPCM450
5206             type: string
5207             x-go-name: Product
5208             product_id:
5209             description: PCI ID of the product
5210             example: "0532"
5211             type: string
5212             x-go-name: ProductID
5213             vendor:
5214             description: Name of the vendor
5215             example: Matrox Electronics Systems Ltd.
5216             type: string
5217             x-go-name: Vendor
5218             vendor_id:
5219             description: PCI ID of the vendor
5220             example: 102b
5221             type: string
5222             x-go-name: VendorID
5223             type: object
5224             x-go-package: github.com/lxc/lxd/shared/api
5225             ResourcesStorage:
5226             description: ResourcesStorage represents the local storage
5227             properties:
5228             disks:
5229             description: List of disks
5230             items:
5231             $ref: '#/definitions/ResourcesStorageDisk'
5232             type: array
5233             x-go-name: Disks
5234             total:
5235             description: Total number of partitions
5236             example: 1
5237             format: uint64
5238             type: integer
5239             x-go-name: Total
5240             type: object
5241             x-go-package: github.com/lxc/lxd/shared/api
5242             ResourcesStorageDisk:
5243             description: ResourcesStorageDisk represents a disk
5244             properties:
5245             block_size:
5246             description: Block size
5247             example: 512
5248             format: uint64
5249             type: integer
5250             x-go-name: BlockSize
5251             device:
5252             description: Device number
5253             example: "259:0"
5254             type: string
5255             x-go-name: Device
5256             device_id:
5257             description: Device by-id identifier
5258             example: nvme-eui.0000000001000000e4d25cafae2e4c00
5259             type: string
5260             x-go-name: DeviceID
5261             device_path:
5262             description: Device by-path identifier
5263             example: pci-0000:05:00.0-nvme-1
5264             type: string
5265             x-go-name: DevicePath
5266             firmware_version:
5267             description: Current firmware version
5268             example: PSF121C
5269             type: string
5270             x-go-name: FirmwareVersion
5271             id:
5272             description: ID of the disk (device name)
5273             example: nvme0n1
5274             type: string
5275             x-go-name: ID
5276             model:
5277             description: Disk model name
5278             example: INTEL SSDPEKKW256G7
5279             type: string
5280             x-go-name: Model
5281             numa_node:
5282             description: NUMA node the disk is a part of
5283             example: 0
5284             format: uint64
5285             type: integer
5286             x-go-name: NUMANode
5287             partitions:
5288             description: List of partitions
5289             items:
5290             $ref: '#/definitions/ResourcesStorageDiskPartition'
5291             type: array
5292             x-go-name: Partitions
5293             pci_address:
5294             description: PCI address
5295             example: "0000:05:00.0"
5296             type: string
5297             x-go-name: PCIAddress
5298             read_only:
5299             description: Whether the disk is read-only
5300             example: false
5301             type: boolean
5302             x-go-name: ReadOnly
5303             removable:
5304             description: Whether the disk is removable (hot-plug)
5305             example: false
5306             type: boolean
5307             x-go-name: Removable
5308             rpm:
5309             description: Rotation speed (RPM)
5310             example: 0
5311             format: uint64
5312             type: integer
5313             x-go-name: RPM
5314             serial:
5315             description: Serial number
5316             example: BTPY63440ARH256D
5317             type: string
5318             x-go-name: Serial
5319             size:
5320             description: Total size of the disk (bytes)
5321             example: 256060514304
5322             format: uint64
5323             type: integer
5324             x-go-name: Size
5325             type:
5326             description: Storage type
5327             example: nvme
5328             type: string
5329             x-go-name: Type
5330             usb_address:
5331             description: USB address
5332             example: "3:5"
5333             type: string
5334             x-go-name: USBAddress
5335             wwn:
5336             description: WWN identifier
5337             example: eui.0000000001000000e4d25cafae2e4c00
5338             type: string
5339             x-go-name: WWN
5340             type: object
5341             x-go-package: github.com/lxc/lxd/shared/api
5342             ResourcesStorageDiskPartition:
5343             description: ResourcesStorageDiskPartition represents a partition on a disk
5344             properties:
5345             device:
5346             description: Device number
5347             example: "259:1"
5348             type: string
5349             x-go-name: Device
5350             id:
5351             description: ID of the partition (device name)
5352             example: nvme0n1p1
5353             type: string
5354             x-go-name: ID
5355             partition:
5356             description: Partition number
5357             example: 1
5358             format: uint64
5359             type: integer
5360             x-go-name: Partition
5361             read_only:
5362             description: Whether the partition is read-only
5363             example: false
5364             type: boolean
5365             x-go-name: ReadOnly
5366             size:
5367             description: Size of the partition (bytes)
5368             example: 254933278208
5369             format: uint64
5370             type: integer
5371             x-go-name: Size
5372             type: object
5373             x-go-package: github.com/lxc/lxd/shared/api
5374             ResourcesStoragePool:
5375             description: ResourcesStoragePool represents the resources available to a given
5376             storage pool
5377             properties:
5378             inodes:
5379             $ref: '#/definitions/ResourcesStoragePoolInodes'
5380             space:
5381             $ref: '#/definitions/ResourcesStoragePoolSpace'
5382             type: object
5383             x-go-package: github.com/lxc/lxd/shared/api
5384             ResourcesStoragePoolInodes:
5385             description: ResourcesStoragePoolInodes represents the inodes available to a given
5386             storage pool
5387             properties:
5388             total:
5389             description: Total inodes
5390             example: 30709993797
5391             format: uint64
5392             type: integer
5393             x-go-name: Total
5394             used:
5395             description: Used inodes
5396             example: 23937695
5397             format: uint64
5398             type: integer
5399             x-go-name: Used
5400             type: object
5401             x-go-package: github.com/lxc/lxd/shared/api
5402             ResourcesStoragePoolSpace:
5403             description: ResourcesStoragePoolSpace represents the space available to a given
5404             storage pool
5405             properties:
5406             total:
5407             description: Total disk space (bytes)
5408             example: 420100937728
5409             format: uint64
5410             type: integer
5411             x-go-name: Total
5412             used:
5413             description: Used disk space (bytes)
5414             example: 343537419776
5415             format: uint64
5416             type: integer
5417             x-go-name: Used
5418             type: object
5419             x-go-package: github.com/lxc/lxd/shared/api
5420             ResourcesSystem:
5421             description: ResourcesSystem represents the system
5422             properties:
5423             chassis:
5424             $ref: '#/definitions/ResourcesSystemChassis'
5425             family:
5426             description: System family
5427             example: ThinkPad X1 Carbon 5th
5428             type: string
5429             x-go-name: Family
5430             firmware:
5431             $ref: '#/definitions/ResourcesSystemFirmware'
5432             motherboard:
5433             $ref: '#/definitions/ResourcesSystemMotherboard'
5434             product:
5435             description: System model
5436             example: 20HRCTO1WW
5437             type: string
5438             x-go-name: Product
5439             serial:
5440             description: System serial number
5441             example: PY3DD4X9
5442             type: string
5443             x-go-name: Serial
5444             sku:
5445             description: |-
5446             System nanufacturer SKU
5447             LENOVO_MT_20HR_BU_Think_FM_ThinkPad X1 Carbon 5th
5448             type: string
5449             x-go-name: Sku
5450             type:
5451             description: System type (unknown, physical, virtual-machine, container, ...)
5452             example: physical
5453             type: string
5454             x-go-name: Type
5455             uuid:
5456             description: System UUID
5457             example: 7fa1c0cc-2271-11b2-a85c-aab32a05d71a
5458             type: string
5459             x-go-name: UUID
5460             vendor:
5461             description: System vendor
5462             example: LENOVO
5463             type: string
5464             x-go-name: Vendor
5465             version:
5466             description: System version
5467             example: ThinkPad X1 Carbon 5th
5468             type: string
5469             x-go-name: Version
5470             type: object
5471             x-go-package: github.com/lxc/lxd/shared/api
5472             ResourcesSystemChassis:
5473             description: ResourcesSystemChassis represents the system chassis
5474             properties:
5475             serial:
5476             description: Chassis serial number
5477             example: PY3DD4X9
5478             type: string
5479             x-go-name: Serial
5480             type:
5481             description: Chassis type
5482             example: Notebook
5483             type: string
5484             x-go-name: Type
5485             vendor:
5486             description: Chassis vendor
5487             example: Lenovo
5488             type: string
5489             x-go-name: Vendor
5490             version:
5491             description: Chassis version/revision
5492             example: None
5493             type: string
5494             x-go-name: Version
5495             type: object
5496             x-go-package: github.com/lxc/lxd/shared/api
5497             ResourcesSystemFirmware:
5498             description: ResourcesSystemFirmware represents the system firmware
5499             properties:
5500             date:
5501             description: Firmware build date
5502             example: 10/14/2020
5503             type: string
5504             x-go-name: Date
5505             vendor:
5506             description: Firmware vendor
5507             example: Lenovo
5508             type: string
5509             x-go-name: Vendor
5510             version:
5511             description: Firmware version
5512             example: N1MET64W (1.49)
5513             type: string
5514             x-go-name: Version
5515             type: object
5516             x-go-package: github.com/lxc/lxd/shared/api
5517             ResourcesSystemMotherboard:
5518             description: ResourcesSystemMotherboard represents the motherboard
5519             properties:
5520             product:
5521             description: Motherboard model
5522             example: 20HRCTO1WW
5523             type: string
5524             x-go-name: Product
5525             serial:
5526             description: Motherboard serial number
5527             example: L3CF4FX003A
5528             type: string
5529             x-go-name: Serial
5530             vendor:
5531             description: Motherboard vendor
5532             example: Lenovo
5533             type: string
5534             x-go-name: Vendor
5535             version:
5536             description: Motherboard version/revision
5537             example: None
5538             type: string
5539             x-go-name: Version
5540             type: object
5541             x-go-package: github.com/lxc/lxd/shared/api
5542             ResourcesUSB:
5543             description: ResourcesUSB represents the USB devices available on the system
5544             properties:
5545             devices:
5546             description: List of USB devices
5547             items:
5548             $ref: '#/definitions/ResourcesUSBDevice'
5549             type: array
5550             x-go-name: Devices
5551             total:
5552             description: Total number of USB devices
5553             example: 1
5554             format: uint64
5555             type: integer
5556             x-go-name: Total
5557             type: object
5558             x-go-package: github.com/lxc/lxd/shared/api
5559             ResourcesUSBDevice:
5560             description: ResourcesUSBDevice represents a USB device
5561             properties:
5562             bus_address:
5563             description: USB address (bus)
5564             example: 1
5565             format: uint64
5566             type: integer
5567             x-go-name: BusAddress
5568             device_address:
5569             description: USB address (device)
5570             example: 3
5571             format: uint64
5572             type: integer
5573             x-go-name: DeviceAddress
5574             interfaces:
5575             description: List of USB interfaces
5576             items:
5577             $ref: '#/definitions/ResourcesUSBDeviceInterface'
5578             type: array
5579             x-go-name: Interfaces
5580             product:
5581             description: Name of the product
5582             example: Hermon USB hidmouse Device
5583             type: string
5584             x-go-name: Product
5585             product_id:
5586             description: USB ID of the product
5587             example: "2221"
5588             type: string
5589             x-go-name: ProductID
5590             speed:
5591             description: Transfer speed (Mbit/s)
5592             example: 12
5593             format: double
5594             type: number
5595             x-go-name: Speed
5596             vendor:
5597             description: Name of the vendor
5598             example: ATEN International Co., Ltd
5599             type: string
5600             x-go-name: Vendor
5601             vendor_id:
5602             description: USB ID of the vendor
5603             example: "0557"
5604             type: string
5605             x-go-name: VendorID
5606             type: object
5607             x-go-package: github.com/lxc/lxd/shared/api
5608             ResourcesUSBDeviceInterface:
5609             description: ResourcesUSBDeviceInterface represents a USB device interface
5610             properties:
5611             class:
5612             description: Class of USB interface
5613             example: Human Interface Device
5614             type: string
5615             x-go-name: Class
5616             class_id:
5617             description: ID of the USB interface class
5618             example: 3
5619             format: uint64
5620             type: integer
5621             x-go-name: ClassID
5622             driver:
5623             description: Kernel driver currently associated with the device
5624             example: usbhid
5625             type: string
5626             x-go-name: Driver
5627             driver_version:
5628             description: Version of the kernel driver
5629             example: 5.8.0-36-generic
5630             type: string
5631             x-go-name: DriverVersion
5632             number:
5633             description: Interface number
5634             example: 0
5635             format: uint64
5636             type: integer
5637             x-go-name: Number
5638             subclass:
5639             description: Sub class of the interface
5640             example: Boot Interface Subclass
5641             type: string
5642             x-go-name: SubClass
5643             subclass_id:
5644             description: ID of the USB interface sub class
5645             example: 1
5646             format: uint64
5647             type: integer
5648             x-go-name: SubClassID
5649             type: object
5650             x-go-package: github.com/lxc/lxd/shared/api
5651             Server:
5652             description: Server represents a LXD server
5653             properties:
5654             api_extensions:
5655             description: List of supported API extensions
5656             example:
5657             - etag
5658             - patch
5659             - network
5660             - storage
5661             items:
5662             type: string
5663             readOnly: true
5664             type: array
5665             x-go-name: APIExtensions
5666             api_status:
5667             description: Support status of the current API (one of "devel", "stable" or
5668             "deprecated")
5669             example: stable
5670             readOnly: true
5671             type: string
5672             x-go-name: APIStatus
5673             api_version:
5674             description: API version number
5675             example: "1.0"
5676             readOnly: true
5677             type: string
5678             x-go-name: APIVersion
5679             auth:
5680             description: Whether the client is trusted (one of "trusted" or "untrusted")
5681             example: untrusted
5682             readOnly: true
5683             type: string
5684             x-go-name: Auth
5685             auth_methods:
5686             description: List of supported authentication methods
5687             example:
5688             - tls
5689             - candid
5690             items:
5691             type: string
5692             readOnly: true
5693             type: array
5694             x-go-name: AuthMethods
5695             config:
5696             additionalProperties:
5697             type: object
5698             description: Server configuration map (refer to doc/server.md)
5699             example:
5700             core.https_address: :8443
5701             core.trust_password: true
5702             type: object
5703             x-go-name: Config
5704             environment:
5705             $ref: '#/definitions/ServerEnvironment'
5706             public:
5707             description: Whether the server is public-only (only public endpoints are
5708             implemented)
5709             example: false
5710             readOnly: true
5711             type: boolean
5712             x-go-name: Public
5713             type: object
5714             x-go-package: github.com/lxc/lxd/shared/api
5715             ServerEnvironment:
5716             description: ServerEnvironment represents the read-only environment fields of
5717             a LXD server
5718             properties:
5719             addresses:
5720             description: List of addresses the server is listening on
5721             example:
5722             - :8443
5723             items:
5724             type: string
5725             type: array
5726             x-go-name: Addresses
5727             architectures:
5728             description: List of architectures supported by the server
5729             example:
5730             - x86_64
5731             - i686
5732             items:
5733             type: string
5734             type: array
5735             x-go-name: Architectures
5736             certificate:
5737             description: Server certificate as PEM encoded X509
5738             example: X509 PEM certificate
5739             type: string
5740             x-go-name: Certificate
5741             certificate_fingerprint:
5742             description: Server certificate fingerprint as SHA256
5743             example: fd200419b271f1dc2a5591b693cc5774b7f234e1ff8c6b78ad703b6888fe2b69
5744             type: string
5745             x-go-name: CertificateFingerprint
5746             driver:
5747             description: List of supported instance drivers (separate by " | ")
5748             example: lxc | qemu
5749             type: string
5750             x-go-name: Driver
5751             driver_version:
5752             description: List of supported instance driver versions (separate by " | ")
5753             example: 4.0.7 | 5.2.0
5754             type: string
5755             x-go-name: DriverVersion
5756             firewall:
5757             description: Current firewall driver
5758             example: nftables
5759             type: string
5760             x-go-name: Firewall
5761             kernel:
5762             description: OS kernel name
5763             example: Linux
5764             type: string
5765             x-go-name: Kernel
5766             kernel_architecture:
5767             description: OS kernel architecture
5768             example: x86_64
5769             type: string
5770             x-go-name: KernelArchitecture
5771             kernel_features:
5772             additionalProperties:
5773             type: string
5774             description: Map of kernel features that were tested on startup
5775             example:
5776             netnsid_getifaddrs: "true"
5777             seccomp_listener: "true"
5778             type: object
5779             x-go-name: KernelFeatures
5780             kernel_version:
5781             description: Kernel version
5782             example: 5.4.0-36-generic
5783             type: string
5784             x-go-name: KernelVersion
5785             lxc_features:
5786             additionalProperties:
5787             type: string
5788             description: Map of LXC features that were tested on startup
5789             example:
5790             cgroup2: "true"
5791             devpts_fd: "true"
5792             pidfd: "true"
5793             type: object
5794             x-go-name: LXCFeatures
5795             os_name:
5796             description: Name of the operating system (Linux distribution)
5797             example: Ubuntu
5798             type: string
5799             x-go-name: OSName
5800             os_version:
5801             description: Version of the operating system (Linux distribution)
5802             example: "20.04"
5803             type: string
5804             x-go-name: OSVersion
5805             project:
5806             description: Current project name
5807             example: default
5808             type: string
5809             x-go-name: Project
5810             server:
5811             description: Server implementation name
5812             example: lxd
5813             type: string
5814             x-go-name: Server
5815             server_clustered:
5816             description: Whether the server is part of a cluster
5817             example: false
5818             type: boolean
5819             x-go-name: ServerClustered
5820             server_name:
5821             description: Server hostname
5822             example: castiana
5823             type: string
5824             x-go-name: ServerName
5825             server_pid:
5826             description: PID of the LXD process
5827             example: 1453969
5828             format: int64
5829             type: integer
5830             x-go-name: ServerPid
5831             server_version:
5832             description: Server version
5833             example: "4.11"
5834             type: string
5835             x-go-name: ServerVersion
5836             storage:
5837             description: List of active storage drivers (separate by " | ")
5838             example: dir | zfs
5839             type: string
5840             x-go-name: Storage
5841             storage_supported_drivers:
5842             description: List of supported storage drivers
5843             items:
5844             $ref: '#/definitions/ServerStorageDriverInfo'
5845             type: array
5846             x-go-name: StorageSupportedDrivers
5847             storage_version:
5848             description: List of active storage driver versions (separate by " | ")
5849             example: 1 | 0.8.4-1ubuntu11
5850             type: string
5851             x-go-name: StorageVersion
5852             type: object
5853             x-go-package: github.com/lxc/lxd/shared/api
5854             ServerPut:
5855             description: ServerPut represents the modifiable fields of a LXD server configuration
5856             properties:
5857             config:
5858             additionalProperties:
5859             type: object
5860             description: Server configuration map (refer to doc/server.md)
5861             example:
5862             core.https_address: :8443
5863             core.trust_password: true
5864             type: object
5865             x-go-name: Config
5866             type: object
5867             x-go-package: github.com/lxc/lxd/shared/api
5868             ServerStorageDriverInfo:
5869             description: ServerStorageDriverInfo represents the read-only info about a storage
5870             driver
5871             properties:
5872             Name:
5873             description: Name of the driver
5874             example: zfs
5875             type: string
5876             Remote:
5877             description: Whether the driver has remote volumes
5878             example: false
5879             type: boolean
5880             Version:
5881             description: Version of the driver
5882             example: 0.8.4-1ubuntu11
5883             type: string
5884             type: object
5885             x-go-package: github.com/lxc/lxd/shared/api
5886             ServerUntrusted:
5887             description: ServerUntrusted represents a LXD server for an untrusted client
5888             properties:
5889             api_extensions:
5890             description: List of supported API extensions
5891             example:
5892             - etag
5893             - patch
5894             - network
5895             - storage
5896             items:
5897             type: string
5898             readOnly: true
5899             type: array
5900             x-go-name: APIExtensions
5901             api_status:
5902             description: Support status of the current API (one of "devel", "stable" or
5903             "deprecated")
5904             example: stable
5905             readOnly: true
5906             type: string
5907             x-go-name: APIStatus
5908             api_version:
5909             description: API version number
5910             example: "1.0"
5911             readOnly: true
5912             type: string
5913             x-go-name: APIVersion
5914             auth:
5915             description: Whether the client is trusted (one of "trusted" or "untrusted")
5916             example: untrusted
5917             readOnly: true
5918             type: string
5919             x-go-name: Auth
5920             auth_methods:
5921             description: List of supported authentication methods
5922             example:
5923             - tls
5924             - candid
5925             items:
5926             type: string
5927             readOnly: true
5928             type: array
5929             x-go-name: AuthMethods
5930             public:
5931             description: Whether the server is public-only (only public endpoints are
5932             implemented)
5933             example: false
5934             readOnly: true
5935             type: boolean
5936             x-go-name: Public
5937             type: object
5938             x-go-package: github.com/lxc/lxd/shared/api
5939             StatusCode:
5940             description: StatusCode represents a valid LXD operation and container status
5941             format: int64
5942             type: integer
5943             x-go-package: github.com/lxc/lxd/shared/api
5944             StoragePool:
5945             properties:
5946             config:
5947             additionalProperties:
5948             type: string
5949             description: Storage pool configuration map (refer to doc/storage.md)
5950             example:
5951             volume.block.filesystem: ext4
5952             volume.size: 50GiB
5953             type: object
5954             x-go-name: Config
5955             description:
5956             description: Description of the storage pool
5957             example: Local SSD pool
5958             type: string
5959             x-go-name: Description
5960             driver:
5961             description: Storage pool driver (btrfs, ceph, cephfs, dir, lvm or zfs)
5962             example: zfs
5963             type: string
5964             x-go-name: Driver
5965             locations:
5966             description: Cluster members on which the storage pool has been defined
5967             example:
5968             - lxd01
5969             - lxd02
5970             - lxd03
5971             items:
5972             type: string
5973             readOnly: true
5974             type: array
5975             x-go-name: Locations
5976             name:
5977             description: Storage pool name
5978             example: local
5979             type: string
5980             x-go-name: Name
5981             status:
5982             description: Pool status (Pending, Created, Errored or Unknown)
5983             example: Created
5984             readOnly: true
5985             type: string
5986             x-go-name: Status
5987             used_by:
5988             description: List of URLs of objects using this storage pool
5989             example:
5990             - /1.0/profiles/default
5991             - /1.0/instances/c1
5992             items:
5993             type: string
5994             type: array
5995             x-go-name: UsedBy
5996             title: StoragePool represents the fields of a LXD storage pool.
5997             type: object
5998             x-go-package: github.com/lxc/lxd/shared/api
5999             StoragePoolPut:
6000             properties:
6001             config:
6002             additionalProperties:
6003             type: string
6004             description: Storage pool configuration map (refer to doc/storage.md)
6005             example:
6006             volume.block.filesystem: ext4
6007             volume.size: 50GiB
6008             type: object
6009             x-go-name: Config
6010             description:
6011             description: Description of the storage pool
6012             example: Local SSD pool
6013             type: string
6014             x-go-name: Description
6015             title: StoragePoolPut represents the modifiable fields of a LXD storage pool.
6016             type: object
6017             x-go-package: github.com/lxc/lxd/shared/api
6018             StoragePoolVolumeBackup:
6019             description: StoragePoolVolumeBackup represents a LXD volume backup
6020             properties:
6021             created_at:
6022             description: When the backup was cerated
6023             example: "2021-03-23T16:38:37.753398689-04:00"
6024             format: date-time
6025             type: string
6026             x-go-name: CreatedAt
6027             expires_at:
6028             description: When the backup expires (gets auto-deleted)
6029             example: "2021-03-23T17:38:37.753398689-04:00"
6030             format: date-time
6031             type: string
6032             x-go-name: ExpiresAt
6033             name:
6034             description: Backup name
6035             example: backup0
6036             type: string
6037             x-go-name: Name
6038             optimized_storage:
6039             description: Whether to use a pool-optimized binary format (instead of plain
6040             tarball)
6041             example: true
6042             type: boolean
6043             x-go-name: OptimizedStorage
6044             volume_only:
6045             description: Whether to ignore snapshots
6046             example: false
6047             type: boolean
6048             x-go-name: VolumeOnly
6049             type: object
6050             x-go-package: github.com/lxc/lxd/shared/api
6051             StoragePoolVolumeBackupPost:
6052             description: StoragePoolVolumeBackupPost represents the fields available for the
6053             renaming of a volume backup
6054             properties:
6055             name:
6056             description: New backup name
6057             example: backup1
6058             type: string
6059             x-go-name: Name
6060             type: object
6061             x-go-package: github.com/lxc/lxd/shared/api
6062             StoragePoolVolumeBackupsPost:
6063             description: StoragePoolVolumeBackupsPost represents the fields available for
6064             a new LXD volume backup
6065             properties:
6066             compression_algorithm:
6067             description: What compression algorithm to use
6068             example: gzip
6069             type: string
6070             x-go-name: CompressionAlgorithm
6071             expires_at:
6072             description: When the backup expires (gets auto-deleted)
6073             example: "2021-03-23T17:38:37.753398689-04:00"
6074             format: date-time
6075             type: string
6076             x-go-name: ExpiresAt
6077             name:
6078             description: Backup name
6079             example: backup0
6080             type: string
6081             x-go-name: Name
6082             optimized_storage:
6083             description: Whether to use a pool-optimized binary format (instead of plain
6084             tarball)
6085             example: true
6086             type: boolean
6087             x-go-name: OptimizedStorage
6088             volume_only:
6089             description: Whether to ignore snapshots
6090             example: false
6091             type: boolean
6092             x-go-name: VolumeOnly
6093             type: object
6094             x-go-package: github.com/lxc/lxd/shared/api
6095             StoragePoolsPost:
6096             description: StoragePoolsPost represents the fields of a new LXD storage pool
6097             properties:
6098             config:
6099             additionalProperties:
6100             type: string
6101             description: Storage pool configuration map (refer to doc/storage.md)
6102             example:
6103             volume.block.filesystem: ext4
6104             volume.size: 50GiB
6105             type: object
6106             x-go-name: Config
6107             description:
6108             description: Description of the storage pool
6109             example: Local SSD pool
6110             type: string
6111             x-go-name: Description
6112             driver:
6113             description: Storage pool driver (btrfs, ceph, cephfs, dir, lvm or zfs)
6114             example: zfs
6115             type: string
6116             x-go-name: Driver
6117             name:
6118             description: Storage pool name
6119             example: local
6120             type: string
6121             x-go-name: Name
6122             type: object
6123             x-go-package: github.com/lxc/lxd/shared/api
6124             StorageVolume:
6125             properties:
6126             config:
6127             additionalProperties:
6128             type: string
6129             description: Storage volume configuration map (refer to doc/storage.md)
6130             example:
6131             size: 50GiB
6132             zfs.remove_snapshots: "true"
6133             type: object
6134             x-go-name: Config
6135             content_type:
6136             description: Volume content type (filesystem or block)
6137             example: filesystem
6138             type: string
6139             x-go-name: ContentType
6140             description:
6141             description: Description of the storage volume
6142             example: My custom volume
6143             type: string
6144             x-go-name: Description
6145             location:
6146             description: What cluster member this record was found on
6147             example: lxd01
6148             type: string
6149             x-go-name: Location
6150             name:
6151             description: Volume name
6152             example: foo
6153             type: string
6154             x-go-name: Name
6155             restore:
6156             description: Name of a snapshot to restore
6157             example: snap0
6158             type: string
6159             x-go-name: Restore
6160             type:
6161             description: Volume type
6162             example: custom
6163             type: string
6164             x-go-name: Type
6165             used_by:
6166             description: List of URLs of objects using this storage volume
6167             example:
6168             - /1.0/instances/blah
6169             items:
6170             type: string
6171             type: array
6172             x-go-name: UsedBy
6173             title: StorageVolume represents the fields of a LXD storage volume.
6174             type: object
6175             x-go-package: github.com/lxc/lxd/shared/api
6176             StorageVolumePost:
6177             description: StorageVolumePost represents the fields required to rename a LXD
6178             storage pool volume
6179             properties:
6180             migration:
6181             description: Initiate volume migration
6182             example: false
6183             type: boolean
6184             x-go-name: Migration
6185             name:
6186             description: New volume name
6187             example: foo
6188             type: string
6189             x-go-name: Name
6190             pool:
6191             description: New storage pool
6192             example: remote
6193             type: string
6194             x-go-name: Pool
6195             project:
6196             description: New project name
6197             example: foo
6198             type: string
6199             x-go-name: Project
6200             target:
6201             $ref: '#/definitions/StorageVolumePostTarget'
6202             volume_only:
6203             description: Whether snapshots should be discarded (migration only)
6204             example: false
6205             type: boolean
6206             x-go-name: VolumeOnly
6207             type: object
6208             x-go-package: github.com/lxc/lxd/shared/api
6209             StorageVolumePostTarget:
6210             description: StorageVolumePostTarget represents the migration target host and
6211             operation
6212             properties:
6213             certificate:
6214             description: The certificate of the migration target
6215             example: X509 PEM certificate
6216             type: string
6217             x-go-name: Certificate
6218             operation:
6219             description: Remote operation URL (for migration)
6220             example: https://1.2.3.4:8443/1.0/operations/1721ae08-b6a8-416a-9614-3f89302466e1
6221             type: string
6222             x-go-name: Operation
6223             secrets:
6224             additionalProperties:
6225             type: string
6226             description: Migration websockets credentials
6227             example:
6228             migration: random-string
6229             type: object
6230             x-go-name: Websockets
6231             type: object
6232             x-go-package: github.com/lxc/lxd/shared/api
6233             StorageVolumePut:
6234             description: StorageVolumePut represents the modifiable fields of a LXD storage
6235             volume
6236             properties:
6237             config:
6238             additionalProperties:
6239             type: string
6240             description: Storage volume configuration map (refer to doc/storage.md)
6241             example:
6242             size: 50GiB
6243             zfs.remove_snapshots: "true"
6244             type: object
6245             x-go-name: Config
6246             description:
6247             description: Description of the storage volume
6248             example: My custom volume
6249             type: string
6250             x-go-name: Description
6251             restore:
6252             description: Name of a snapshot to restore
6253             example: snap0
6254             type: string
6255             x-go-name: Restore
6256             type: object
6257             x-go-package: github.com/lxc/lxd/shared/api
6258             StorageVolumeSnapshot:
6259             description: StorageVolumeSnapshot represents a LXD storage volume snapshot
6260             properties:
6261             config:
6262             additionalProperties:
6263             type: string
6264             description: Storage volume configuration map (refer to doc/storage.md)
6265             example:
6266             size: 50GiB
6267             zfs.remove_snapshots: "true"
6268             type: object
6269             x-go-name: Config
6270             content_type:
6271             description: The content type (filesystem or block)
6272             example: filesystem
6273             type: string
6274             x-go-name: ContentType
6275             description:
6276             description: Description of the storage volume
6277             example: My custom volume
6278             type: string
6279             x-go-name: Description
6280             expires_at:
6281             description: When the snapshot expires (gets auto-deleted)
6282             example: "2021-03-23T17:38:37.753398689-04:00"
6283             format: date-time
6284             type: string
6285             x-go-name: ExpiresAt
6286             name:
6287             description: Snapshot name
6288             example: snap0
6289             type: string
6290             x-go-name: Name
6291             type: object
6292             x-go-package: github.com/lxc/lxd/shared/api
6293             StorageVolumeSnapshotPost:
6294             description: StorageVolumeSnapshotPost represents the fields required to rename/move
6295             a LXD storage volume snapshot
6296             properties:
6297             name:
6298             description: New snapshot name
6299             example: snap1
6300             type: string
6301             x-go-name: Name
6302             type: object
6303             x-go-package: github.com/lxc/lxd/shared/api
6304             StorageVolumeSnapshotPut:
6305             description: StorageVolumeSnapshotPut represents the modifiable fields of a LXD
6306             storage volume
6307             properties:
6308             description:
6309             description: Description of the storage volume
6310             example: My custom volume
6311             type: string
6312             x-go-name: Description
6313             expires_at:
6314             description: When the snapshot expires (gets auto-deleted)
6315             example: "2021-03-23T17:38:37.753398689-04:00"
6316             format: date-time
6317             type: string
6318             x-go-name: ExpiresAt
6319             type: object
6320             x-go-package: github.com/lxc/lxd/shared/api
6321             StorageVolumeSnapshotsPost:
6322             description: StorageVolumeSnapshotsPost represents the fields available for a
6323             new LXD storage volume snapshot
6324             properties:
6325             expires_at:
6326             description: When the snapshot expires (gets auto-deleted)
6327             example: "2021-03-23T17:38:37.753398689-04:00"
6328             format: date-time
6329             type: string
6330             x-go-name: ExpiresAt
6331             name:
6332             description: Snapshot name
6333             example: snap0
6334             type: string
6335             x-go-name: Name
6336             type: object
6337             x-go-package: github.com/lxc/lxd/shared/api
6338             StorageVolumeSource:
6339             description: StorageVolumeSource represents the creation source for a new storage
6340             volume
6341             properties:
6342             certificate:
6343             description: Certificate (for migration)
6344             example: X509 PEM certificate
6345             type: string
6346             x-go-name: Certificate
6347             mode:
6348             description: Whether to use pull or push mode (for migration)
6349             example: pull
6350             type: string
6351             x-go-name: Mode
6352             name:
6353             description: Source volume name (for copy)
6354             example: foo
6355             type: string
6356             x-go-name: Name
6357             operation:
6358             description: Remote operation URL (for migration)
6359             example: https://1.2.3.4:8443/1.0/operations/1721ae08-b6a8-416a-9614-3f89302466e1
6360             type: string
6361             x-go-name: Operation
6362             pool:
6363             description: Source storage pool (for copy)
6364             example: local
6365             type: string
6366             x-go-name: Pool
6367             project:
6368             description: Source project name
6369             example: foo
6370             type: string
6371             x-go-name: Project
6372             refresh:
6373             description: Whether existing destination volume should be refreshed
6374             example: false
6375             type: boolean
6376             x-go-name: Refresh
6377             secrets:
6378             additionalProperties:
6379             type: string
6380             description: Map of migration websockets (for migration)
6381             example:
6382             rsync: RANDOM-STRING
6383             type: object
6384             x-go-name: Websockets
6385             type:
6386             description: Source type (copy or migration)
6387             example: copy
6388             type: string
6389             x-go-name: Type
6390             volume_only:
6391             description: Whether snapshots should be discarded (for migration)
6392             example: false
6393             type: boolean
6394             x-go-name: VolumeOnly
6395             type: object
6396             x-go-package: github.com/lxc/lxd/shared/api
6397             StorageVolumeState:
6398             description: StorageVolumeState represents the live state of the volume
6399             properties:
6400             usage:
6401             $ref: '#/definitions/StorageVolumeStateUsage'
6402             type: object
6403             x-go-package: github.com/lxc/lxd/shared/api
6404             StorageVolumeStateUsage:
6405             description: StorageVolumeStateUsage represents the disk usage of a volume
6406             properties:
6407             used:
6408             description: Used space in bytes
6409             example: 1693552640
6410             format: uint64
6411             type: integer
6412             x-go-name: Used
6413             type: object
6414             x-go-package: github.com/lxc/lxd/shared/api
6415             StorageVolumesPost:
6416             description: StorageVolumesPost represents the fields of a new LXD storage pool
6417             volume
6418             properties:
6419             config:
6420             additionalProperties:
6421             type: string
6422             description: Storage volume configuration map (refer to doc/storage.md)
6423             example:
6424             size: 50GiB
6425             zfs.remove_snapshots: "true"
6426             type: object
6427             x-go-name: Config
6428             content_type:
6429             description: Volume content type (filesystem or block)
6430             example: filesystem
6431             type: string
6432             x-go-name: ContentType
6433             description:
6434             description: Description of the storage volume
6435             example: My custom volume
6436             type: string
6437             x-go-name: Description
6438             name:
6439             description: Volume name
6440             example: foo
6441             type: string
6442             x-go-name: Name
6443             restore:
6444             description: Name of a snapshot to restore
6445             example: snap0
6446             type: string
6447             x-go-name: Restore
6448             source:
6449             $ref: '#/definitions/StorageVolumeSource'
6450             type:
6451             description: Volume type (container, custom, image or virtual-machine)
6452             example: custom
6453             type: string
6454             x-go-name: Type
6455             type: object
6456             x-go-package: github.com/lxc/lxd/shared/api
6457             Warning:
6458             properties:
6459             count:
6460             description: The number of times this warning occurred
6461             example: 1
6462             format: int64
6463             type: integer
6464             x-go-name: Count
6465             entity_url:
6466             description: The entity affected by this warning
6467             example: /1.0/instances/c1?project=default
6468             type: string
6469             x-go-name: EntityURL
6470             first_seen_at:
6471             description: The first time this warning occurred
6472             example: "2021-03-23T17:38:37.753398689-04:00"
6473             format: date-time
6474             type: string
6475             x-go-name: FirstSeenAt
6476             last_message:
6477             description: The warning message
6478             example: Couldn't find the CGroup blkio.weight, disk priority will be ignored
6479             type: string
6480             x-go-name: LastMessage
6481             last_seen_at:
6482             description: The last time this warning occurred
6483             example: "2021-03-23T17:38:37.753398689-04:00"
6484             format: date-time
6485             type: string
6486             x-go-name: LastSeenAt
6487             location:
6488             description: What cluster member this warning occurred on
6489             example: node1
6490             type: string
6491             x-go-name: Location
6492             project:
6493             description: The project the warning occurred in
6494             example: default
6495             type: string
6496             x-go-name: Project
6497             severity:
6498             description: The severity of this warning
6499             example: low
6500             type: string
6501             x-go-name: Severity
6502             status:
6503             description: Status of the warning (new, acknowledged, or resolved)
6504             example: new
6505             type: string
6506             x-go-name: Status
6507             type:
6508             description: Type type of warning
6509             example: Couldn't find CGroup
6510             type: string
6511             x-go-name: Type
6512             uuid:
6513             description: UUID of the warning
6514             example: e9e9da0d-2538-4351-8047-46d4a8ae4dbb
6515             type: string
6516             x-go-name: UUID
6517             title: Warning represents a warning entry.
6518             type: object
6519             x-go-package: github.com/lxc/lxd/shared/api
6520             WarningPut:
6521             properties:
6522             status:
6523             description: Status of the warning (new, acknowledged, or resolved)
6524             example: new
6525             type: string
6526             x-go-name: Status
6527             title: WarningPut represents the modifiable fields of a warning.
6528             type: object
6529             x-go-package: github.com/lxc/lxd/shared/api
6530             info:
6531             contact:
6532             email: lxc-devel@lists.linuxcontainers.org
6533             name: LXD upstream
6534             url: https://github.com/lxc/lxd
6535             description: |-
6536             This is the REST API used by all LXD clients.
6537             Internal endpoints aren't included in this documentation.
6538              
6539             The LXD API is available over both a local unix+http and remote https API.
6540             Authentication for local users relies on group membership and access to the unix socket.
6541             For remote users, the default authentication method is TLS client
6542             certificates with a macaroon based (candid) authentication method also
6543             supported.
6544             license:
6545             name: Apache-2.0
6546             url: https://www.apache.org/licenses/LICENSE-2.0
6547             title: LXD external REST API
6548             version: "1.0"
6549             paths:
6550             /:
6551             get:
6552             description: |-
6553             Returns a list of supported API versions (URLs).
6554              
6555             Internal API endpoints are not reported as those aren't versioned and
6556             should only be used by LXD itself.
6557             operationId: api_get
6558             produces:
6559             - application/json
6560             responses:
6561             "200":
6562             description: API endpoints
6563             schema:
6564             description: Sync response
6565             properties:
6566             metadata:
6567             description: List of endpoints
6568             example:
6569             - /1.0
6570             items:
6571             type: string
6572             type: array
6573             status:
6574             description: Status description
6575             example: Success
6576             type: string
6577             status_code:
6578             description: Status code
6579             example: 200
6580             type: integer
6581             type:
6582             description: Response type
6583             example: sync
6584             type: string
6585             type: object
6586             summary: Get the supported API enpoints
6587             tags:
6588             - server
6589             /1.0:
6590             get:
6591             description: Shows the full server environment and configuration.
6592             operationId: server_get
6593             parameters:
6594             - description: Cluster member name
6595             example: lxd01
6596             in: query
6597             name: target
6598             type: string
6599             - description: Project name
6600             example: default
6601             in: query
6602             name: project
6603             type: string
6604             produces:
6605             - application/json
6606             responses:
6607             "200":
6608             description: Server environment and configuration
6609             schema:
6610             description: Sync response
6611             properties:
6612             metadata:
6613             $ref: '#/definitions/Server'
6614             status:
6615             description: Status description
6616             example: Success
6617             type: string
6618             status_code:
6619             description: Status code
6620             example: 200
6621             type: integer
6622             type:
6623             description: Response type
6624             example: sync
6625             type: string
6626             type: object
6627             "500":
6628             $ref: '#/responses/InternalServerError'
6629             summary: Get the server environment and configuration
6630             tags:
6631             - server
6632             patch:
6633             consumes:
6634             - application/json
6635             description: Updates a subset of the server configuration.
6636             operationId: server_patch
6637             parameters:
6638             - description: Cluster member name
6639             example: lxd01
6640             in: query
6641             name: target
6642             type: string
6643             - description: Server configuration
6644             in: body
6645             name: server
6646             required: true
6647             schema:
6648             $ref: '#/definitions/ServerPut'
6649             produces:
6650             - application/json
6651             responses:
6652             "200":
6653             $ref: '#/responses/EmptySyncResponse'
6654             "400":
6655             $ref: '#/responses/BadRequest'
6656             "403":
6657             $ref: '#/responses/Forbidden'
6658             "412":
6659             $ref: '#/responses/PreconditionFailed'
6660             "500":
6661             $ref: '#/responses/InternalServerError'
6662             summary: Partially update the server configuration
6663             tags:
6664             - server
6665             put:
6666             consumes:
6667             - application/json
6668             description: Updates the entire server configuration.
6669             operationId: server_put
6670             parameters:
6671             - description: Cluster member name
6672             example: lxd01
6673             in: query
6674             name: target
6675             type: string
6676             - description: Server configuration
6677             in: body
6678             name: server
6679             required: true
6680             schema:
6681             $ref: '#/definitions/ServerPut'
6682             produces:
6683             - application/json
6684             responses:
6685             "200":
6686             $ref: '#/responses/EmptySyncResponse'
6687             "400":
6688             $ref: '#/responses/BadRequest'
6689             "403":
6690             $ref: '#/responses/Forbidden'
6691             "412":
6692             $ref: '#/responses/PreconditionFailed'
6693             "500":
6694             $ref: '#/responses/InternalServerError'
6695             summary: Update the server configuration
6696             tags:
6697             - server
6698             /1.0/certificates:
6699             get:
6700             description: Returns a list of trusted certificates (URLs).
6701             operationId: certificates_get
6702             produces:
6703             - application/json
6704             responses:
6705             "200":
6706             description: API endpoints
6707             schema:
6708             description: Sync response
6709             properties:
6710             metadata:
6711             description: List of endpoints
6712             example: |-
6713             [
6714             "/1.0/certificates/390fdd27ed5dc2408edc11fe602eafceb6c025ddbad9341dfdcb1056a8dd98b1",
6715             "/1.0/certificates/22aee3f051f96abe6d7756892eecabf4b4b22e2ba877840a4ca981e9ea54030a"
6716             ]
6717             items:
6718             type: string
6719             type: array
6720             status:
6721             description: Status description
6722             example: Success
6723             type: string
6724             status_code:
6725             description: Status code
6726             example: 200
6727             type: integer
6728             type:
6729             description: Response type
6730             example: sync
6731             type: string
6732             type: object
6733             "403":
6734             $ref: '#/responses/Forbidden'
6735             "500":
6736             $ref: '#/responses/InternalServerError'
6737             summary: Get the trusted certificates
6738             tags:
6739             - certificates
6740             post:
6741             consumes:
6742             - application/json
6743             description: |-
6744             Adds a certificate to the trust store.
6745             In this mode, the `password` property is always ignored.
6746             operationId: certificates_post
6747             parameters:
6748             - description: Certificate
6749             in: body
6750             name: certificate
6751             required: true
6752             schema:
6753             $ref: '#/definitions/CertificatesPost'
6754             produces:
6755             - application/json
6756             responses:
6757             "200":
6758             $ref: '#/responses/EmptySyncResponse'
6759             "400":
6760             $ref: '#/responses/BadRequest'
6761             "403":
6762             $ref: '#/responses/Forbidden'
6763             "500":
6764             $ref: '#/responses/InternalServerError'
6765             summary: Add a trusted certificate
6766             tags:
6767             - certificates
6768             /1.0/certificates/{fingerprint}:
6769             delete:
6770             description: Removes the certificate from the trust store.
6771             operationId: certificate_delete
6772             produces:
6773             - application/json
6774             responses:
6775             "200":
6776             $ref: '#/responses/EmptySyncResponse'
6777             "400":
6778             $ref: '#/responses/BadRequest'
6779             "403":
6780             $ref: '#/responses/Forbidden'
6781             "500":
6782             $ref: '#/responses/InternalServerError'
6783             summary: Delete the trusted certificate
6784             tags:
6785             - certificates
6786             get:
6787             description: Gets a specific certificate entry from the trust store.
6788             operationId: certificate_get
6789             produces:
6790             - application/json
6791             responses:
6792             "200":
6793             description: Certificate
6794             schema:
6795             description: Sync response
6796             properties:
6797             metadata:
6798             $ref: '#/definitions/Certificate'
6799             status:
6800             description: Status description
6801             example: Success
6802             type: string
6803             status_code:
6804             description: Status code
6805             example: 200
6806             type: integer
6807             type:
6808             description: Response type
6809             example: sync
6810             type: string
6811             type: object
6812             "403":
6813             $ref: '#/responses/Forbidden'
6814             "500":
6815             $ref: '#/responses/InternalServerError'
6816             summary: Get the trusted certificate
6817             tags:
6818             - certificates
6819             patch:
6820             consumes:
6821             - application/json
6822             description: Updates a subset of the certificate configuration.
6823             operationId: certificate_patch
6824             parameters:
6825             - description: Certificate configuration
6826             in: body
6827             name: certificate
6828             required: true
6829             schema:
6830             $ref: '#/definitions/CertificatePut'
6831             produces:
6832             - application/json
6833             responses:
6834             "200":
6835             $ref: '#/responses/EmptySyncResponse'
6836             "400":
6837             $ref: '#/responses/BadRequest'
6838             "403":
6839             $ref: '#/responses/Forbidden'
6840             "412":
6841             $ref: '#/responses/PreconditionFailed'
6842             "500":
6843             $ref: '#/responses/InternalServerError'
6844             summary: Partially update the trusted certificate
6845             tags:
6846             - certificates
6847             put:
6848             consumes:
6849             - application/json
6850             description: Updates the entire certificate configuration.
6851             operationId: certificate_put
6852             parameters:
6853             - description: Certificate configuration
6854             in: body
6855             name: certificate
6856             required: true
6857             schema:
6858             $ref: '#/definitions/CertificatePut'
6859             produces:
6860             - application/json
6861             responses:
6862             "200":
6863             $ref: '#/responses/EmptySyncResponse'
6864             "400":
6865             $ref: '#/responses/BadRequest'
6866             "403":
6867             $ref: '#/responses/Forbidden'
6868             "412":
6869             $ref: '#/responses/PreconditionFailed'
6870             "500":
6871             $ref: '#/responses/InternalServerError'
6872             summary: Update the trusted certificate
6873             tags:
6874             - certificates
6875             /1.0/certificates?public:
6876             post:
6877             consumes:
6878             - application/json
6879             description: |-
6880             Adds a certificate to the trust store as an untrusted user.
6881             In this mode, the `password` property must be set to the correct value.
6882              
6883             The `certificate` field can be omitted in which case the TLS client
6884             certificate in use for the connection will be retrieved and added to the
6885             trust store.
6886              
6887             The `?public` part of the URL isn't required, it's simply used to
6888             separate the two behaviors of this endpoint.
6889             operationId: certificates_post_untrusted
6890             parameters:
6891             - description: Certificate
6892             in: body
6893             name: certificate
6894             required: true
6895             schema:
6896             $ref: '#/definitions/CertificatesPost'
6897             produces:
6898             - application/json
6899             responses:
6900             "200":
6901             $ref: '#/responses/EmptySyncResponse'
6902             "400":
6903             $ref: '#/responses/BadRequest'
6904             "403":
6905             $ref: '#/responses/Forbidden'
6906             "500":
6907             $ref: '#/responses/InternalServerError'
6908             summary: Add a trusted certificate
6909             tags:
6910             - certificates
6911             /1.0/certificates?recursion=1:
6912             get:
6913             description: Returns a list of trusted certificates (structs).
6914             operationId: certificates_get_recursion1
6915             produces:
6916             - application/json
6917             responses:
6918             "200":
6919             description: API endpoints
6920             schema:
6921             description: Sync response
6922             properties:
6923             metadata:
6924             description: List of certificates
6925             items:
6926             $ref: '#/definitions/Certificate'
6927             type: array
6928             status:
6929             description: Status description
6930             example: Success
6931             type: string
6932             status_code:
6933             description: Status code
6934             example: 200
6935             type: integer
6936             type:
6937             description: Response type
6938             example: sync
6939             type: string
6940             type: object
6941             "403":
6942             $ref: '#/responses/Forbidden'
6943             "500":
6944             $ref: '#/responses/InternalServerError'
6945             summary: Get the trusted certificates
6946             tags:
6947             - certificates
6948             /1.0/cluster:
6949             get:
6950             description: Gets the current cluster configuration.
6951             operationId: cluster_get
6952             produces:
6953             - application/json
6954             responses:
6955             "200":
6956             description: Cluster configuration
6957             schema:
6958             description: Sync response
6959             properties:
6960             metadata:
6961             $ref: '#/definitions/Cluster'
6962             status:
6963             description: Status description
6964             example: Success
6965             type: string
6966             status_code:
6967             description: Status code
6968             example: 200
6969             type: integer
6970             type:
6971             description: Response type
6972             example: sync
6973             type: string
6974             type: object
6975             "403":
6976             $ref: '#/responses/Forbidden'
6977             "500":
6978             $ref: '#/responses/InternalServerError'
6979             summary: Get the cluster configuration
6980             tags:
6981             - cluster
6982             put:
6983             consumes:
6984             - application/json
6985             description: Updates the entire cluster configuration.
6986             operationId: cluster_put
6987             parameters:
6988             - description: Cluster configuration
6989             in: body
6990             name: cluster
6991             required: true
6992             schema:
6993             $ref: '#/definitions/ClusterPut'
6994             produces:
6995             - application/json
6996             responses:
6997             "200":
6998             $ref: '#/responses/EmptySyncResponse'
6999             "400":
7000             $ref: '#/responses/BadRequest'
7001             "403":
7002             $ref: '#/responses/Forbidden'
7003             "412":
7004             $ref: '#/responses/PreconditionFailed'
7005             "500":
7006             $ref: '#/responses/InternalServerError'
7007             summary: Update the cluster configuration
7008             tags:
7009             - cluster
7010             /1.0/cluster/certificate:
7011             put:
7012             consumes:
7013             - application/json
7014             description: |-
7015             Replaces existing cluster certificate and reloads LXD on each cluster
7016             member.
7017             operationId: clustering_update_cert
7018             parameters:
7019             - description: Cluster certificate replace request
7020             in: body
7021             name: cluster
7022             required: true
7023             schema:
7024             $ref: '#/definitions/ClusterCertificatePut'
7025             produces:
7026             - application/json
7027             responses:
7028             "200":
7029             $ref: '#/responses/EmptySyncResponse'
7030             "400":
7031             $ref: '#/responses/BadRequest'
7032             "403":
7033             $ref: '#/responses/Forbidden'
7034             "500":
7035             $ref: '#/responses/InternalServerError'
7036             summary: Update the certificate for the cluster
7037             tags:
7038             - cluster
7039             /1.0/cluster/groups:
7040             get:
7041             description: Returns a list of cluster groups (URLs).
7042             operationId: cluster_groups_get
7043             produces:
7044             - application/json
7045             responses:
7046             "200":
7047             description: API endpoints
7048             schema:
7049             description: Sync response
7050             properties:
7051             metadata:
7052             description: List of endpoints
7053             example: |-
7054             [
7055             "/1.0/cluster/groups/lxd01",
7056             "/1.0/cluster/groups/lxd02"
7057             ]
7058             items:
7059             type: string
7060             type: array
7061             status:
7062             description: Status description
7063             example: Success
7064             type: string
7065             status_code:
7066             description: Status code
7067             example: 200
7068             type: integer
7069             type:
7070             description: Response type
7071             example: sync
7072             type: string
7073             type: object
7074             "403":
7075             $ref: '#/responses/Forbidden'
7076             "500":
7077             $ref: '#/responses/InternalServerError'
7078             summary: Get the cluster groups
7079             tags:
7080             - cluster-groups
7081             post:
7082             consumes:
7083             - application/json
7084             description: Creates a new cluster group.
7085             operationId: cluster_groups_post
7086             parameters:
7087             - description: Cluster group to create
7088             in: body
7089             name: cluster
7090             required: true
7091             schema:
7092             $ref: '#/definitions/ClusterGroupsPost'
7093             produces:
7094             - application/json
7095             responses:
7096             "200":
7097             $ref: '#/responses/EmptySyncResponse'
7098             "400":
7099             $ref: '#/responses/BadRequest'
7100             "403":
7101             $ref: '#/responses/Forbidden'
7102             "500":
7103             $ref: '#/responses/InternalServerError'
7104             summary: Create a cluster group.
7105             tags:
7106             - cluster
7107             /1.0/cluster/groups/{name}:
7108             delete:
7109             description: Removes the cluster group.
7110             operationId: cluster_group_delete
7111             produces:
7112             - application/json
7113             responses:
7114             "200":
7115             $ref: '#/responses/EmptySyncResponse'
7116             "400":
7117             $ref: '#/responses/BadRequest'
7118             "403":
7119             $ref: '#/responses/Forbidden'
7120             "500":
7121             $ref: '#/responses/InternalServerError'
7122             summary: Delete the cluster group.
7123             tags:
7124             - cluster-groups
7125             get:
7126             description: Gets a specific cluster group.
7127             operationId: cluster_group_get
7128             produces:
7129             - application/json
7130             responses:
7131             "200":
7132             description: Cluster group
7133             schema:
7134             description: Sync response
7135             properties:
7136             metadata:
7137             $ref: '#/definitions/ClusterGroup'
7138             status:
7139             description: Status description
7140             example: Success
7141             type: string
7142             status_code:
7143             description: Status code
7144             example: 200
7145             type: integer
7146             type:
7147             description: Response type
7148             example: sync
7149             type: string
7150             type: object
7151             "403":
7152             $ref: '#/responses/Forbidden'
7153             "500":
7154             $ref: '#/responses/InternalServerError'
7155             summary: Get the cluster group
7156             tags:
7157             - cluster-groups
7158             patch:
7159             consumes:
7160             - application/json
7161             description: Updates the cluster group configuration.
7162             operationId: cluster_group_patch
7163             parameters:
7164             - description: cluster group configuration
7165             in: body
7166             name: cluster group
7167             required: true
7168             schema:
7169             $ref: '#/definitions/ClusterGroupPut'
7170             produces:
7171             - application/json
7172             responses:
7173             "200":
7174             $ref: '#/responses/EmptySyncResponse'
7175             "400":
7176             $ref: '#/responses/BadRequest'
7177             "403":
7178             $ref: '#/responses/Forbidden'
7179             "412":
7180             $ref: '#/responses/PreconditionFailed'
7181             "500":
7182             $ref: '#/responses/InternalServerError'
7183             summary: Update the cluster group
7184             tags:
7185             - cluster-groups
7186             post:
7187             consumes:
7188             - application/json
7189             description: Renames an existing cluster group.
7190             operationId: cluster_group_post
7191             parameters:
7192             - description: Cluster group rename request
7193             in: body
7194             name: name
7195             required: true
7196             schema:
7197             $ref: '#/definitions/ClusterGroupPost'
7198             produces:
7199             - application/json
7200             responses:
7201             "200":
7202             $ref: '#/responses/EmptySyncResponse'
7203             "400":
7204             $ref: '#/responses/BadRequest'
7205             "403":
7206             $ref: '#/responses/Forbidden'
7207             "500":
7208             $ref: '#/responses/InternalServerError'
7209             summary: Rename the cluster group
7210             tags:
7211             - cluster-groups
7212             put:
7213             consumes:
7214             - application/json
7215             description: Updates the entire cluster group configuration.
7216             operationId: cluster_group_put
7217             parameters:
7218             - description: cluster group configuration
7219             in: body
7220             name: cluster group
7221             required: true
7222             schema:
7223             $ref: '#/definitions/ClusterGroupPut'
7224             produces:
7225             - application/json
7226             responses:
7227             "200":
7228             $ref: '#/responses/EmptySyncResponse'
7229             "400":
7230             $ref: '#/responses/BadRequest'
7231             "403":
7232             $ref: '#/responses/Forbidden'
7233             "412":
7234             $ref: '#/responses/PreconditionFailed'
7235             "500":
7236             $ref: '#/responses/InternalServerError'
7237             summary: Update the cluster group
7238             tags:
7239             - cluster-groups
7240             /1.0/cluster/groups?recursion=1:
7241             get:
7242             description: Returns a list of cluster groups (structs).
7243             operationId: cluster_groups_get_recursion1
7244             produces:
7245             - application/json
7246             responses:
7247             "200":
7248             description: API endpoints
7249             schema:
7250             description: Sync response
7251             properties:
7252             metadata:
7253             description: List of cluster groups
7254             items:
7255             $ref: '#/definitions/ClusterGroup'
7256             type: array
7257             status:
7258             description: Status description
7259             example: Success
7260             type: string
7261             status_code:
7262             description: Status code
7263             example: 200
7264             type: integer
7265             type:
7266             description: Response type
7267             example: sync
7268             type: string
7269             type: object
7270             "403":
7271             $ref: '#/responses/Forbidden'
7272             "500":
7273             $ref: '#/responses/InternalServerError'
7274             summary: Get the cluster groups
7275             tags:
7276             - cluster-groups
7277             /1.0/cluster/members:
7278             get:
7279             description: Returns a list of cluster members (URLs).
7280             operationId: cluster_members_get
7281             produces:
7282             - application/json
7283             responses:
7284             "200":
7285             description: API endpoints
7286             schema:
7287             description: Sync response
7288             properties:
7289             metadata:
7290             description: List of endpoints
7291             example: |-
7292             [
7293             "/1.0/cluster/members/lxd01",
7294             "/1.0/cluster/members/lxd02"
7295             ]
7296             items:
7297             type: string
7298             type: array
7299             status:
7300             description: Status description
7301             example: Success
7302             type: string
7303             status_code:
7304             description: Status code
7305             example: 200
7306             type: integer
7307             type:
7308             description: Response type
7309             example: sync
7310             type: string
7311             type: object
7312             "403":
7313             $ref: '#/responses/Forbidden'
7314             "500":
7315             $ref: '#/responses/InternalServerError'
7316             summary: Get the cluster members
7317             tags:
7318             - cluster
7319             post:
7320             consumes:
7321             - application/json
7322             description: Requests a join token to add a cluster member.
7323             operationId: cluster_members_post
7324             parameters:
7325             - description: Cluster member add request
7326             in: body
7327             name: cluster
7328             required: true
7329             schema:
7330             $ref: '#/definitions/ClusterMembersPost'
7331             produces:
7332             - application/json
7333             responses:
7334             "202":
7335             $ref: '#/responses/Operation'
7336             "400":
7337             $ref: '#/responses/BadRequest'
7338             "403":
7339             $ref: '#/responses/Forbidden'
7340             "500":
7341             $ref: '#/responses/InternalServerError'
7342             summary: Request a join token
7343             tags:
7344             - cluster
7345             /1.0/cluster/members/{name}:
7346             delete:
7347             description: Removes the member from the cluster.
7348             operationId: cluster_member_delete
7349             produces:
7350             - application/json
7351             responses:
7352             "200":
7353             $ref: '#/responses/EmptySyncResponse'
7354             "400":
7355             $ref: '#/responses/BadRequest'
7356             "403":
7357             $ref: '#/responses/Forbidden'
7358             "500":
7359             $ref: '#/responses/InternalServerError'
7360             summary: Delete the cluster member
7361             tags:
7362             - cluster
7363             get:
7364             description: Gets a specific cluster member.
7365             operationId: cluster_member_get
7366             produces:
7367             - application/json
7368             responses:
7369             "200":
7370             description: Profile
7371             schema:
7372             description: Sync response
7373             properties:
7374             metadata:
7375             $ref: '#/definitions/ClusterMember'
7376             status:
7377             description: Status description
7378             example: Success
7379             type: string
7380             status_code:
7381             description: Status code
7382             example: 200
7383             type: integer
7384             type:
7385             description: Response type
7386             example: sync
7387             type: string
7388             type: object
7389             "403":
7390             $ref: '#/responses/Forbidden'
7391             "500":
7392             $ref: '#/responses/InternalServerError'
7393             summary: Get the cluster member
7394             tags:
7395             - cluster
7396             patch:
7397             consumes:
7398             - application/json
7399             description: Updates a subset of the cluster member configuration.
7400             operationId: cluster_member_patch
7401             parameters:
7402             - description: Cluster member configuration
7403             in: body
7404             name: cluster
7405             required: true
7406             schema:
7407             $ref: '#/definitions/ClusterMemberPut'
7408             produces:
7409             - application/json
7410             responses:
7411             "200":
7412             $ref: '#/responses/EmptySyncResponse'
7413             "400":
7414             $ref: '#/responses/BadRequest'
7415             "403":
7416             $ref: '#/responses/Forbidden'
7417             "412":
7418             $ref: '#/responses/PreconditionFailed'
7419             "500":
7420             $ref: '#/responses/InternalServerError'
7421             summary: Partially update the cluster member
7422             tags:
7423             - cluster
7424             post:
7425             consumes:
7426             - application/json
7427             description: Renames an existing cluster member.
7428             operationId: cluster_member_post
7429             parameters:
7430             - description: Cluster member rename request
7431             in: body
7432             name: cluster
7433             required: true
7434             schema:
7435             $ref: '#/definitions/ClusterMemberPost'
7436             produces:
7437             - application/json
7438             responses:
7439             "200":
7440             $ref: '#/responses/EmptySyncResponse'
7441             "400":
7442             $ref: '#/responses/BadRequest'
7443             "403":
7444             $ref: '#/responses/Forbidden'
7445             "500":
7446             $ref: '#/responses/InternalServerError'
7447             summary: Rename the cluster member
7448             tags:
7449             - cluster
7450             put:
7451             consumes:
7452             - application/json
7453             description: Updates the entire cluster member configuration.
7454             operationId: cluster_member_put
7455             parameters:
7456             - description: Cluster member configuration
7457             in: body
7458             name: cluster
7459             required: true
7460             schema:
7461             $ref: '#/definitions/ClusterMemberPut'
7462             produces:
7463             - application/json
7464             responses:
7465             "200":
7466             $ref: '#/responses/EmptySyncResponse'
7467             "400":
7468             $ref: '#/responses/BadRequest'
7469             "403":
7470             $ref: '#/responses/Forbidden'
7471             "412":
7472             $ref: '#/responses/PreconditionFailed'
7473             "500":
7474             $ref: '#/responses/InternalServerError'
7475             summary: Update the cluster member
7476             tags:
7477             - cluster
7478             /1.0/cluster/members/{name}/state:
7479             post:
7480             consumes:
7481             - application/json
7482             description: Evacuates or restores a cluster member.
7483             operationId: cluster_member_state_post
7484             parameters:
7485             - description: Cluster member state
7486             in: body
7487             name: cluster
7488             required: true
7489             schema:
7490             $ref: '#/definitions/ClusterMemberStatePost'
7491             produces:
7492             - application/json
7493             responses:
7494             "202":
7495             $ref: '#/responses/Operation'
7496             "400":
7497             $ref: '#/responses/BadRequest'
7498             "403":
7499             $ref: '#/responses/Forbidden'
7500             "500":
7501             $ref: '#/responses/InternalServerError'
7502             summary: Evacuate or restore a cluster member
7503             tags:
7504             - cluster
7505             /1.0/cluster/members?recursion=1:
7506             get:
7507             description: Returns a list of cluster members (structs).
7508             operationId: cluster_members_get_recursion1
7509             produces:
7510             - application/json
7511             responses:
7512             "200":
7513             description: API endpoints
7514             schema:
7515             description: Sync response
7516             properties:
7517             metadata:
7518             description: List of cluster members
7519             items:
7520             $ref: '#/definitions/ClusterMember'
7521             type: array
7522             status:
7523             description: Status description
7524             example: Success
7525             type: string
7526             status_code:
7527             description: Status code
7528             example: 200
7529             type: integer
7530             type:
7531             description: Response type
7532             example: sync
7533             type: string
7534             type: object
7535             "403":
7536             $ref: '#/responses/Forbidden'
7537             "500":
7538             $ref: '#/responses/InternalServerError'
7539             summary: Get the cluster members
7540             tags:
7541             - cluster
7542             /1.0/events:
7543             get:
7544             description: Connects to the event API using websocket.
7545             operationId: events_get
7546             parameters:
7547             - description: Project name
7548             example: default
7549             in: query
7550             name: project
7551             type: string
7552             - description: Event type(s), comma separated (valid types are logging, operation
7553             or lifecycle)
7554             example: logging,lifecycle
7555             in: query
7556             name: type
7557             type: string
7558             produces:
7559             - application/json
7560             responses:
7561             "200":
7562             description: Websocket message (JSON)
7563             schema:
7564             $ref: '#/definitions/Event'
7565             "403":
7566             $ref: '#/responses/Forbidden'
7567             "500":
7568             $ref: '#/responses/InternalServerError'
7569             summary: Get the event stream
7570             tags:
7571             - server
7572             /1.0/images:
7573             get:
7574             description: Returns a list of images (URLs).
7575             operationId: images_get
7576             parameters:
7577             - description: Project name
7578             example: default
7579             in: query
7580             name: project
7581             type: string
7582             - description: Collection filter
7583             example: default
7584             in: query
7585             name: filter
7586             type: string
7587             produces:
7588             - application/json
7589             responses:
7590             "200":
7591             description: API endpoints
7592             schema:
7593             description: Sync response
7594             properties:
7595             metadata:
7596             description: List of endpoints
7597             example: |-
7598             [
7599             "/1.0/images/06b86454720d36b20f94e31c6812e05ec51c1b568cf3a8abd273769d213394bb",
7600             "/1.0/images/084dd79dd1360fd25a2479eb46674c2a5ef3022a40fe03c91ab3603e3402b8e1"
7601             ]
7602             items:
7603             type: string
7604             type: array
7605             status:
7606             description: Status description
7607             example: Success
7608             type: string
7609             status_code:
7610             description: Status code
7611             example: 200
7612             type: integer
7613             type:
7614             description: Response type
7615             example: sync
7616             type: string
7617             type: object
7618             "403":
7619             $ref: '#/responses/Forbidden'
7620             "500":
7621             $ref: '#/responses/InternalServerError'
7622             summary: Get the images
7623             tags:
7624             - images
7625             post:
7626             consumes:
7627             - application/json
7628             description: Adds a new image to the image store.
7629             operationId: images_post
7630             parameters:
7631             - description: Project name
7632             example: default
7633             in: query
7634             name: project
7635             type: string
7636             - description: Image
7637             in: body
7638             name: image
7639             schema:
7640             $ref: '#/definitions/ImagesPost'
7641             - description: Raw image file
7642             in: body
7643             name: raw_image
7644             - description: Push secret for server to server communication
7645             example: RANDOM-STRING
7646             in: header
7647             name: X-LXD-secret
7648             schema:
7649             type: string
7650             - description: Expected fingerprint when pushing a raw image
7651             in: header
7652             name: X-LXD-fingerprint
7653             schema:
7654             type: string
7655             produces:
7656             - application/json
7657             responses:
7658             "202":
7659             $ref: '#/responses/Operation'
7660             "400":
7661             $ref: '#/responses/BadRequest'
7662             "403":
7663             $ref: '#/responses/Forbidden'
7664             "500":
7665             $ref: '#/responses/InternalServerError'
7666             summary: Add an image
7667             tags:
7668             - images
7669             /1.0/images/{fingerprint}:
7670             delete:
7671             description: Removes the image from the image store.
7672             operationId: image_delete
7673             parameters:
7674             - description: Project name
7675             example: default
7676             in: query
7677             name: project
7678             type: string
7679             produces:
7680             - application/json
7681             responses:
7682             "202":
7683             $ref: '#/responses/Operation'
7684             "400":
7685             $ref: '#/responses/BadRequest'
7686             "403":
7687             $ref: '#/responses/Forbidden'
7688             "500":
7689             $ref: '#/responses/InternalServerError'
7690             summary: Delete the image
7691             tags:
7692             - images
7693             get:
7694             description: Gets a specific image.
7695             operationId: image_get
7696             parameters:
7697             - description: Project name
7698             example: default
7699             in: query
7700             name: project
7701             type: string
7702             produces:
7703             - application/json
7704             responses:
7705             "200":
7706             description: Image
7707             schema:
7708             description: Sync response
7709             properties:
7710             metadata:
7711             $ref: '#/definitions/Image'
7712             status:
7713             description: Status description
7714             example: Success
7715             type: string
7716             status_code:
7717             description: Status code
7718             example: 200
7719             type: integer
7720             type:
7721             description: Response type
7722             example: sync
7723             type: string
7724             type: object
7725             "403":
7726             $ref: '#/responses/Forbidden'
7727             "500":
7728             $ref: '#/responses/InternalServerError'
7729             summary: Get the image
7730             tags:
7731             - images
7732             patch:
7733             consumes:
7734             - application/json
7735             description: Updates a subset of the image definition.
7736             operationId: image_patch
7737             parameters:
7738             - description: Project name
7739             example: default
7740             in: query
7741             name: project
7742             type: string
7743             - description: Image configuration
7744             in: body
7745             name: image
7746             required: true
7747             schema:
7748             $ref: '#/definitions/ImagePut'
7749             produces:
7750             - application/json
7751             responses:
7752             "200":
7753             $ref: '#/responses/EmptySyncResponse'
7754             "400":
7755             $ref: '#/responses/BadRequest'
7756             "403":
7757             $ref: '#/responses/Forbidden'
7758             "412":
7759             $ref: '#/responses/PreconditionFailed'
7760             "500":
7761             $ref: '#/responses/InternalServerError'
7762             summary: Partially update the image
7763             tags:
7764             - images
7765             put:
7766             consumes:
7767             - application/json
7768             description: Updates the entire image definition.
7769             operationId: image_put
7770             parameters:
7771             - description: Project name
7772             example: default
7773             in: query
7774             name: project
7775             type: string
7776             - description: Image configuration
7777             in: body
7778             name: image
7779             required: true
7780             schema:
7781             $ref: '#/definitions/ImagePut'
7782             produces:
7783             - application/json
7784             responses:
7785             "200":
7786             $ref: '#/responses/EmptySyncResponse'
7787             "400":
7788             $ref: '#/responses/BadRequest'
7789             "403":
7790             $ref: '#/responses/Forbidden'
7791             "412":
7792             $ref: '#/responses/PreconditionFailed'
7793             "500":
7794             $ref: '#/responses/InternalServerError'
7795             summary: Update the image
7796             tags:
7797             - images
7798             /1.0/images/{fingerprint}/export:
7799             get:
7800             description: |-
7801             Download the raw image file(s) from the server.
7802             If the image is in split format, a multipart http transfer occurs.
7803             operationId: image_export_get
7804             parameters:
7805             - description: Project name
7806             example: default
7807             in: query
7808             name: project
7809             type: string
7810             produces:
7811             - application/octet-stream
7812             - multipart/form-data
7813             responses:
7814             "200":
7815             description: Raw image data
7816             "403":
7817             $ref: '#/responses/Forbidden'
7818             "500":
7819             $ref: '#/responses/InternalServerError'
7820             summary: Get the raw image file(s)
7821             tags:
7822             - images
7823             post:
7824             description: Gets LXD to connect to a remote server and push the image to it.
7825             operationId: images_export_post
7826             parameters:
7827             - description: Project name
7828             example: default
7829             in: query
7830             name: project
7831             type: string
7832             - description: Image push request
7833             in: body
7834             name: image
7835             required: true
7836             schema:
7837             $ref: '#/definitions/ImageExportPost'
7838             produces:
7839             - application/json
7840             responses:
7841             "202":
7842             $ref: '#/responses/Operation'
7843             "403":
7844             $ref: '#/responses/Forbidden'
7845             "500":
7846             $ref: '#/responses/InternalServerError'
7847             summary: Make LXD push the image to a remote server
7848             tags:
7849             - images
7850             /1.0/images/{fingerprint}/export?public:
7851             get:
7852             description: |-
7853             Download the raw image file(s) of a public image from the server.
7854             If the image is in split format, a multipart http transfer occurs.
7855             operationId: image_export_get_untrusted
7856             parameters:
7857             - description: Project name
7858             example: default
7859             in: query
7860             name: project
7861             type: string
7862             - description: Secret token to retrieve a private image
7863             example: RANDOM-STRING
7864             in: query
7865             name: secret
7866             type: string
7867             produces:
7868             - application/octet-stream
7869             - multipart/form-data
7870             responses:
7871             "200":
7872             description: Raw image data
7873             "403":
7874             $ref: '#/responses/Forbidden'
7875             "500":
7876             $ref: '#/responses/InternalServerError'
7877             summary: Get the raw image file(s)
7878             tags:
7879             - images
7880             /1.0/images/{fingerprint}/refresh:
7881             post:
7882             description: |-
7883             This causes LXD to check the image source server for an updated
7884             version of the image and if available to refresh the local copy with the
7885             new version.
7886             operationId: images_refresh_post
7887             parameters:
7888             - description: Project name
7889             example: default
7890             in: query
7891             name: project
7892             type: string
7893             produces:
7894             - application/json
7895             responses:
7896             "202":
7897             $ref: '#/responses/Operation'
7898             "403":
7899             $ref: '#/responses/Forbidden'
7900             "500":
7901             $ref: '#/responses/InternalServerError'
7902             summary: Refresh an image
7903             tags:
7904             - images
7905             /1.0/images/{fingerprint}/secret:
7906             post:
7907             description: |-
7908             This generates a background operation including a secret one time key
7909             in its metadata which can be used to fetch this image from an untrusted
7910             client.
7911             operationId: images_secret_post
7912             parameters:
7913             - description: Project name
7914             example: default
7915             in: query
7916             name: project
7917             type: string
7918             produces:
7919             - application/json
7920             responses:
7921             "202":
7922             $ref: '#/responses/Operation'
7923             "403":
7924             $ref: '#/responses/Forbidden'
7925             "500":
7926             $ref: '#/responses/InternalServerError'
7927             summary: Generate secret for retrieval of the image by an untrusted client
7928             tags:
7929             - images
7930             /1.0/images/{fingerprint}?public:
7931             get:
7932             description: Gets a specific public image.
7933             operationId: image_get_untrusted
7934             parameters:
7935             - description: Project name
7936             example: default
7937             in: query
7938             name: project
7939             type: string
7940             - description: Secret token to retrieve a private image
7941             example: RANDOM-STRING
7942             in: query
7943             name: secret
7944             type: string
7945             produces:
7946             - application/json
7947             responses:
7948             "200":
7949             description: Image
7950             schema:
7951             description: Sync response
7952             properties:
7953             metadata:
7954             $ref: '#/definitions/Image'
7955             status:
7956             description: Status description
7957             example: Success
7958             type: string
7959             status_code:
7960             description: Status code
7961             example: 200
7962             type: integer
7963             type:
7964             description: Response type
7965             example: sync
7966             type: string
7967             type: object
7968             "403":
7969             $ref: '#/responses/Forbidden'
7970             "500":
7971             $ref: '#/responses/InternalServerError'
7972             summary: Get the public image
7973             tags:
7974             - images
7975             /1.0/images/aliases:
7976             get:
7977             description: Returns a list of image aliases (URLs).
7978             operationId: images_aliases_get
7979             parameters:
7980             - description: Project name
7981             example: default
7982             in: query
7983             name: project
7984             type: string
7985             produces:
7986             - application/json
7987             responses:
7988             "200":
7989             description: API endpoints
7990             schema:
7991             description: Sync response
7992             properties:
7993             metadata:
7994             description: List of endpoints
7995             example: |-
7996             [
7997             "/1.0/images/aliases/foo",
7998             "/1.0/images/aliases/bar1"
7999             ]
8000             items:
8001             type: string
8002             type: array
8003             status:
8004             description: Status description
8005             example: Success
8006             type: string
8007             status_code:
8008             description: Status code
8009             example: 200
8010             type: integer
8011             type:
8012             description: Response type
8013             example: sync
8014             type: string
8015             type: object
8016             "403":
8017             $ref: '#/responses/Forbidden'
8018             "500":
8019             $ref: '#/responses/InternalServerError'
8020             summary: Get the image aliases
8021             tags:
8022             - images
8023             post:
8024             consumes:
8025             - application/json
8026             description: Creates a new image alias.
8027             operationId: images_aliases_post
8028             parameters:
8029             - description: Project name
8030             example: default
8031             in: query
8032             name: project
8033             type: string
8034             - description: Image alias
8035             in: body
8036             name: image alias
8037             required: true
8038             schema:
8039             $ref: '#/definitions/ImageAliasesPost'
8040             produces:
8041             - application/json
8042             responses:
8043             "200":
8044             $ref: '#/responses/EmptySyncResponse'
8045             "400":
8046             $ref: '#/responses/BadRequest'
8047             "403":
8048             $ref: '#/responses/Forbidden'
8049             "500":
8050             $ref: '#/responses/InternalServerError'
8051             summary: Add an image alias
8052             tags:
8053             - images
8054             /1.0/images/aliases/{name}:
8055             delete:
8056             description: Deletes a specific image alias.
8057             operationId: image_alias_delete
8058             parameters:
8059             - description: Project name
8060             example: default
8061             in: query
8062             name: project
8063             type: string
8064             produces:
8065             - application/json
8066             responses:
8067             "200":
8068             $ref: '#/responses/EmptySyncResponse'
8069             "400":
8070             $ref: '#/responses/BadRequest'
8071             "403":
8072             $ref: '#/responses/Forbidden'
8073             "500":
8074             $ref: '#/responses/InternalServerError'
8075             summary: Delete the image alias
8076             tags:
8077             - images
8078             get:
8079             description: Gets a specific image alias.
8080             operationId: image_alias_get
8081             parameters:
8082             - description: Project name
8083             example: default
8084             in: query
8085             name: project
8086             type: string
8087             produces:
8088             - application/json
8089             responses:
8090             "200":
8091             description: Image alias
8092             schema:
8093             description: Sync response
8094             properties:
8095             metadata:
8096             $ref: '#/definitions/ImageAliasesEntry'
8097             status:
8098             description: Status description
8099             example: Success
8100             type: string
8101             status_code:
8102             description: Status code
8103             example: 200
8104             type: integer
8105             type:
8106             description: Response type
8107             example: sync
8108             type: string
8109             type: object
8110             "403":
8111             $ref: '#/responses/Forbidden'
8112             "500":
8113             $ref: '#/responses/InternalServerError'
8114             summary: Get the image alias
8115             tags:
8116             - images
8117             patch:
8118             consumes:
8119             - application/json
8120             description: Updates a subset of the image alias configuration.
8121             operationId: images_alias_patch
8122             parameters:
8123             - description: Project name
8124             example: default
8125             in: query
8126             name: project
8127             type: string
8128             - description: Image alias configuration
8129             in: body
8130             name: image alias
8131             required: true
8132             schema:
8133             $ref: '#/definitions/ImageAliasesEntryPut'
8134             produces:
8135             - application/json
8136             responses:
8137             "200":
8138             $ref: '#/responses/EmptySyncResponse'
8139             "400":
8140             $ref: '#/responses/BadRequest'
8141             "403":
8142             $ref: '#/responses/Forbidden'
8143             "412":
8144             $ref: '#/responses/PreconditionFailed'
8145             "500":
8146             $ref: '#/responses/InternalServerError'
8147             summary: Partially update the image alias
8148             tags:
8149             - images
8150             post:
8151             consumes:
8152             - application/json
8153             description: Renames an existing image alias.
8154             operationId: images_alias_post
8155             parameters:
8156             - description: Project name
8157             example: default
8158             in: query
8159             name: project
8160             type: string
8161             - description: Image alias rename request
8162             in: body
8163             name: image alias
8164             required: true
8165             schema:
8166             $ref: '#/definitions/ImageAliasesEntryPost'
8167             produces:
8168             - application/json
8169             responses:
8170             "200":
8171             $ref: '#/responses/EmptySyncResponse'
8172             "400":
8173             $ref: '#/responses/BadRequest'
8174             "403":
8175             $ref: '#/responses/Forbidden'
8176             "500":
8177             $ref: '#/responses/InternalServerError'
8178             summary: Rename the image alias
8179             tags:
8180             - images
8181             put:
8182             consumes:
8183             - application/json
8184             description: Updates the entire image alias configuration.
8185             operationId: images_aliases_put
8186             parameters:
8187             - description: Project name
8188             example: default
8189             in: query
8190             name: project
8191             type: string
8192             - description: Image alias configuration
8193             in: body
8194             name: image alias
8195             required: true
8196             schema:
8197             $ref: '#/definitions/ImageAliasesEntryPut'
8198             produces:
8199             - application/json
8200             responses:
8201             "200":
8202             $ref: '#/responses/EmptySyncResponse'
8203             "400":
8204             $ref: '#/responses/BadRequest'
8205             "403":
8206             $ref: '#/responses/Forbidden'
8207             "412":
8208             $ref: '#/responses/PreconditionFailed'
8209             "500":
8210             $ref: '#/responses/InternalServerError'
8211             summary: Update the image alias
8212             tags:
8213             - images
8214             /1.0/images/aliases/{name}?public:
8215             get:
8216             description: |-
8217             Gets a specific public image alias.
8218             This untrusted endpoint only works for aliases pointing to public images.
8219             operationId: image_alias_get_untrusted
8220             parameters:
8221             - description: Project name
8222             example: default
8223             in: query
8224             name: project
8225             type: string
8226             produces:
8227             - application/json
8228             responses:
8229             "200":
8230             description: Image alias
8231             schema:
8232             description: Sync response
8233             properties:
8234             metadata:
8235             $ref: '#/definitions/ImageAliasesEntry'
8236             status:
8237             description: Status description
8238             example: Success
8239             type: string
8240             status_code:
8241             description: Status code
8242             example: 200
8243             type: integer
8244             type:
8245             description: Response type
8246             example: sync
8247             type: string
8248             type: object
8249             "403":
8250             $ref: '#/responses/Forbidden'
8251             "500":
8252             $ref: '#/responses/InternalServerError'
8253             summary: Get the public image alias
8254             tags:
8255             - images
8256             /1.0/images/aliases?recursion=1:
8257             get:
8258             description: Returns a list of image aliases (structs).
8259             operationId: images_aliases_get_recursion1
8260             parameters:
8261             - description: Project name
8262             example: default
8263             in: query
8264             name: project
8265             type: string
8266             produces:
8267             - application/json
8268             responses:
8269             "200":
8270             description: API endpoints
8271             schema:
8272             description: Sync response
8273             properties:
8274             metadata:
8275             description: List of image aliases
8276             items:
8277             $ref: '#/definitions/ImageAliasesEntry'
8278             type: array
8279             status:
8280             description: Status description
8281             example: Success
8282             type: string
8283             status_code:
8284             description: Status code
8285             example: 200
8286             type: integer
8287             type:
8288             description: Response type
8289             example: sync
8290             type: string
8291             type: object
8292             "403":
8293             $ref: '#/responses/Forbidden'
8294             "500":
8295             $ref: '#/responses/InternalServerError'
8296             summary: Get the image aliases
8297             tags:
8298             - images
8299             /1.0/images?public:
8300             get:
8301             description: Returns a list of publicly available images (URLs).
8302             operationId: images_get_untrusted
8303             parameters:
8304             - description: Project name
8305             example: default
8306             in: query
8307             name: project
8308             type: string
8309             - description: Collection filter
8310             example: default
8311             in: query
8312             name: filter
8313             type: string
8314             produces:
8315             - application/json
8316             responses:
8317             "200":
8318             description: API endpoints
8319             schema:
8320             description: Sync response
8321             properties:
8322             metadata:
8323             description: List of endpoints
8324             example: |-
8325             [
8326             "/1.0/images/06b86454720d36b20f94e31c6812e05ec51c1b568cf3a8abd273769d213394bb",
8327             "/1.0/images/084dd79dd1360fd25a2479eb46674c2a5ef3022a40fe03c91ab3603e3402b8e1"
8328             ]
8329             items:
8330             type: string
8331             type: array
8332             status:
8333             description: Status description
8334             example: Success
8335             type: string
8336             status_code:
8337             description: Status code
8338             example: 200
8339             type: integer
8340             type:
8341             description: Response type
8342             example: sync
8343             type: string
8344             type: object
8345             "403":
8346             $ref: '#/responses/Forbidden'
8347             "500":
8348             $ref: '#/responses/InternalServerError'
8349             summary: Get the public images
8350             tags:
8351             - images
8352             post:
8353             consumes:
8354             - application/json
8355             description: |-
8356             Pushes the data to the target image server.
8357             This is meant for LXD to LXD communication where a new image entry is
8358             prepared on the target server and the source server is provided that URL
8359             and a secret token to push the image content over.
8360             operationId: images_post_untrusted
8361             parameters:
8362             - description: Project name
8363             example: default
8364             in: query
8365             name: project
8366             type: string
8367             - description: Image
8368             in: body
8369             name: image
8370             required: true
8371             schema:
8372             $ref: '#/definitions/ImagesPost'
8373             produces:
8374             - application/json
8375             responses:
8376             "200":
8377             $ref: '#/responses/EmptySyncResponse'
8378             "400":
8379             $ref: '#/responses/BadRequest'
8380             "403":
8381             $ref: '#/responses/Forbidden'
8382             "500":
8383             $ref: '#/responses/InternalServerError'
8384             summary: Add an image
8385             tags:
8386             - images
8387             /1.0/images?public&recursion=1:
8388             get:
8389             description: Returns a list of publicly available images (structs).
8390             operationId: images_get_recursion1_untrusted
8391             parameters:
8392             - description: Project name
8393             example: default
8394             in: query
8395             name: project
8396             type: string
8397             - description: Collection filter
8398             example: default
8399             in: query
8400             name: filter
8401             type: string
8402             produces:
8403             - application/json
8404             responses:
8405             "200":
8406             description: API endpoints
8407             schema:
8408             description: Sync response
8409             properties:
8410             metadata:
8411             description: List of images
8412             items:
8413             $ref: '#/definitions/Image'
8414             type: array
8415             status:
8416             description: Status description
8417             example: Success
8418             type: string
8419             status_code:
8420             description: Status code
8421             example: 200
8422             type: integer
8423             type:
8424             description: Response type
8425             example: sync
8426             type: string
8427             type: object
8428             "403":
8429             $ref: '#/responses/Forbidden'
8430             "500":
8431             $ref: '#/responses/InternalServerError'
8432             summary: Get the public images
8433             tags:
8434             - images
8435             /1.0/images?recursion=1:
8436             get:
8437             description: Returns a list of images (structs).
8438             operationId: images_get_recursion1
8439             parameters:
8440             - description: Project name
8441             example: default
8442             in: query
8443             name: project
8444             type: string
8445             - description: Collection filter
8446             example: default
8447             in: query
8448             name: filter
8449             type: string
8450             produces:
8451             - application/json
8452             responses:
8453             "200":
8454             description: API endpoints
8455             schema:
8456             description: Sync response
8457             properties:
8458             metadata:
8459             description: List of images
8460             items:
8461             $ref: '#/definitions/Image'
8462             type: array
8463             status:
8464             description: Status description
8465             example: Success
8466             type: string
8467             status_code:
8468             description: Status code
8469             example: 200
8470             type: integer
8471             type:
8472             description: Response type
8473             example: sync
8474             type: string
8475             type: object
8476             "403":
8477             $ref: '#/responses/Forbidden'
8478             "500":
8479             $ref: '#/responses/InternalServerError'
8480             summary: Get the images
8481             tags:
8482             - images
8483             /1.0/instances:
8484             get:
8485             description: Returns a list of instances (URLs).
8486             operationId: instances_get
8487             parameters:
8488             - description: Project name
8489             example: default
8490             in: query
8491             name: project
8492             type: string
8493             - description: Collection filter
8494             example: default
8495             in: query
8496             name: filter
8497             type: string
8498             - description: Retrieve instances from all projects
8499             in: query
8500             name: all-projects
8501             type: boolean
8502             produces:
8503             - application/json
8504             responses:
8505             "200":
8506             description: API endpoints
8507             schema:
8508             description: Sync response
8509             properties:
8510             metadata:
8511             description: List of endpoints
8512             example: |-
8513             [
8514             "/1.0/instances/foo",
8515             "/1.0/instances/bar"
8516             ]
8517             items:
8518             type: string
8519             type: array
8520             status:
8521             description: Status description
8522             example: Success
8523             type: string
8524             status_code:
8525             description: Status code
8526             example: 200
8527             type: integer
8528             type:
8529             description: Response type
8530             example: sync
8531             type: string
8532             type: object
8533             "403":
8534             $ref: '#/responses/Forbidden'
8535             "500":
8536             $ref: '#/responses/InternalServerError'
8537             summary: Get the instances
8538             tags:
8539             - instances
8540             post:
8541             consumes:
8542             - application/json
8543             description: |-
8544             Creates a new instance on LXD.
8545             Depending on the source, this can create an instance from an existing
8546             local image, remote image, existing local instance or snapshot, remote
8547             migration stream or backup file.
8548             operationId: instances_post
8549             parameters:
8550             - description: Project name
8551             example: default
8552             in: query
8553             name: project
8554             type: string
8555             - description: Cluster member
8556             example: default
8557             in: query
8558             name: target
8559             type: string
8560             - description: Instance request
8561             in: body
8562             name: instance
8563             schema:
8564             $ref: '#/definitions/InstancesPost'
8565             - description: Raw backup file
8566             in: body
8567             name: raw_backup
8568             produces:
8569             - application/json
8570             responses:
8571             "202":
8572             $ref: '#/responses/Operation'
8573             "400":
8574             $ref: '#/responses/BadRequest'
8575             "403":
8576             $ref: '#/responses/Forbidden'
8577             "500":
8578             $ref: '#/responses/InternalServerError'
8579             summary: Create a new instance
8580             tags:
8581             - instances
8582             put:
8583             consumes:
8584             - application/json
8585             description: Changes the running state of all instances.
8586             operationId: instances_put
8587             parameters:
8588             - description: Project name
8589             example: default
8590             in: query
8591             name: project
8592             type: string
8593             - description: State
8594             in: body
8595             name: state
8596             schema:
8597             $ref: '#/definitions/InstancesPut'
8598             produces:
8599             - application/json
8600             responses:
8601             "202":
8602             $ref: '#/responses/Operation'
8603             "400":
8604             $ref: '#/responses/BadRequest'
8605             "403":
8606             $ref: '#/responses/Forbidden'
8607             "500":
8608             $ref: '#/responses/InternalServerError'
8609             summary: Bulk instance state update
8610             tags:
8611             - instances
8612             /1.0/instances/{name}:
8613             delete:
8614             description: |-
8615             Deletes a specific instance.
8616              
8617             This also deletes anything owned by the instance such as snapshots and backups.
8618             operationId: instance_delete
8619             parameters:
8620             - description: Project name
8621             example: default
8622             in: query
8623             name: project
8624             type: string
8625             produces:
8626             - application/json
8627             responses:
8628             "202":
8629             $ref: '#/responses/Operation'
8630             "400":
8631             $ref: '#/responses/BadRequest'
8632             "403":
8633             $ref: '#/responses/Forbidden'
8634             "500":
8635             $ref: '#/responses/InternalServerError'
8636             summary: Delete an instance
8637             tags:
8638             - instances
8639             get:
8640             description: Gets a specific instance (basic struct).
8641             operationId: instance_get
8642             parameters:
8643             - description: Project name
8644             example: default
8645             in: query
8646             name: project
8647             type: string
8648             produces:
8649             - application/json
8650             responses:
8651             "200":
8652             description: Instance
8653             schema:
8654             description: Sync response
8655             properties:
8656             metadata:
8657             $ref: '#/definitions/Instance'
8658             status:
8659             description: Status description
8660             example: Success
8661             type: string
8662             status_code:
8663             description: Status code
8664             example: 200
8665             type: integer
8666             type:
8667             description: Response type
8668             example: sync
8669             type: string
8670             type: object
8671             "403":
8672             $ref: '#/responses/Forbidden'
8673             "500":
8674             $ref: '#/responses/InternalServerError'
8675             summary: Get the instance
8676             tags:
8677             - instances
8678             patch:
8679             consumes:
8680             - application/json
8681             description: Updates a subset of the instance configuration
8682             operationId: instance_patch
8683             parameters:
8684             - description: Project name
8685             example: default
8686             in: query
8687             name: project
8688             type: string
8689             - description: Update request
8690             in: body
8691             name: instance
8692             schema:
8693             $ref: '#/definitions/InstancePut'
8694             produces:
8695             - application/json
8696             responses:
8697             "200":
8698             $ref: '#/responses/EmptySyncResponse'
8699             "400":
8700             $ref: '#/responses/BadRequest'
8701             "403":
8702             $ref: '#/responses/Forbidden'
8703             "500":
8704             $ref: '#/responses/InternalServerError'
8705             summary: Partially update the instance
8706             tags:
8707             - instances
8708             post:
8709             consumes:
8710             - application/json
8711             description: |-
8712             Renames, moves an instance between pools or migrates an instance to another server.
8713              
8714             The returned operation metadata will vary based on what's requested.
8715             For rename or move within the same server, this is a simple background operation with progress data.
8716             For migration, in the push case, this will similarly be a background
8717             operation with progress data, for the pull case, it will be a websocket
8718             operation with a number of secrets to be passed to the target server.
8719             operationId: instance_post
8720             parameters:
8721             - description: Project name
8722             example: default
8723             in: query
8724             name: project
8725             type: string
8726             - description: Migration request
8727             in: body
8728             name: migration
8729             schema:
8730             $ref: '#/definitions/InstancePost'
8731             produces:
8732             - application/json
8733             responses:
8734             "202":
8735             $ref: '#/responses/Operation'
8736             "400":
8737             $ref: '#/responses/BadRequest'
8738             "403":
8739             $ref: '#/responses/Forbidden'
8740             "500":
8741             $ref: '#/responses/InternalServerError'
8742             summary: Rename or move/migrate an instance
8743             tags:
8744             - instances
8745             put:
8746             consumes:
8747             - application/json
8748             description: Updates the instance configuration or trigger a snapshot restore.
8749             operationId: instance_put
8750             parameters:
8751             - description: Project name
8752             example: default
8753             in: query
8754             name: project
8755             type: string
8756             - description: Update request
8757             in: body
8758             name: instance
8759             schema:
8760             $ref: '#/definitions/InstancePut'
8761             produces:
8762             - application/json
8763             responses:
8764             "202":
8765             $ref: '#/responses/Operation'
8766             "400":
8767             $ref: '#/responses/BadRequest'
8768             "403":
8769             $ref: '#/responses/Forbidden'
8770             "500":
8771             $ref: '#/responses/InternalServerError'
8772             summary: Update the instance
8773             tags:
8774             - instances
8775             /1.0/instances/{name}/backups:
8776             get:
8777             description: Returns a list of instance backups (URLs).
8778             operationId: instance_backups_get
8779             parameters:
8780             - description: Project name
8781             example: default
8782             in: query
8783             name: project
8784             type: string
8785             produces:
8786             - application/json
8787             responses:
8788             "200":
8789             description: API endpoints
8790             schema:
8791             description: Sync response
8792             properties:
8793             metadata:
8794             description: List of endpoints
8795             example: |-
8796             [
8797             "/1.0/instances/foo/backups/backup0",
8798             "/1.0/instances/foo/backups/backup1"
8799             ]
8800             items:
8801             type: string
8802             type: array
8803             status:
8804             description: Status description
8805             example: Success
8806             type: string
8807             status_code:
8808             description: Status code
8809             example: 200
8810             type: integer
8811             type:
8812             description: Response type
8813             example: sync
8814             type: string
8815             type: object
8816             "403":
8817             $ref: '#/responses/Forbidden'
8818             "500":
8819             $ref: '#/responses/InternalServerError'
8820             summary: Get the backups
8821             tags:
8822             - instances
8823             post:
8824             consumes:
8825             - application/json
8826             description: Creates a new backup.
8827             operationId: instance_backups_post
8828             parameters:
8829             - description: Project name
8830             example: default
8831             in: query
8832             name: project
8833             type: string
8834             - description: Backup request
8835             in: body
8836             name: backup
8837             schema:
8838             $ref: '#/definitions/InstanceBackupsPost'
8839             produces:
8840             - application/json
8841             responses:
8842             "202":
8843             $ref: '#/responses/Operation'
8844             "400":
8845             $ref: '#/responses/BadRequest'
8846             "403":
8847             $ref: '#/responses/Forbidden'
8848             "500":
8849             $ref: '#/responses/InternalServerError'
8850             summary: Create a backup
8851             tags:
8852             - instances
8853             /1.0/instances/{name}/backups/{backup}:
8854             delete:
8855             consumes:
8856             - application/json
8857             description: Deletes the instance backup.
8858             operationId: instance_backup_delete
8859             parameters:
8860             - description: Project name
8861             example: default
8862             in: query
8863             name: project
8864             type: string
8865             produces:
8866             - application/json
8867             responses:
8868             "202":
8869             $ref: '#/responses/Operation'
8870             "400":
8871             $ref: '#/responses/BadRequest'
8872             "403":
8873             $ref: '#/responses/Forbidden'
8874             "500":
8875             $ref: '#/responses/InternalServerError'
8876             summary: Delete a backup
8877             tags:
8878             - instances
8879             get:
8880             description: Gets a specific instance backup.
8881             operationId: instance_backup_get
8882             parameters:
8883             - description: Project name
8884             example: default
8885             in: query
8886             name: project
8887             type: string
8888             produces:
8889             - application/json
8890             responses:
8891             "200":
8892             description: Instance backup
8893             schema:
8894             description: Sync response
8895             properties:
8896             metadata:
8897             $ref: '#/definitions/InstanceBackup'
8898             status:
8899             description: Status description
8900             example: Success
8901             type: string
8902             status_code:
8903             description: Status code
8904             example: 200
8905             type: integer
8906             type:
8907             description: Response type
8908             example: sync
8909             type: string
8910             type: object
8911             "403":
8912             $ref: '#/responses/Forbidden'
8913             "500":
8914             $ref: '#/responses/InternalServerError'
8915             summary: Get the backup
8916             tags:
8917             - instances
8918             post:
8919             consumes:
8920             - application/json
8921             description: Renames an instance backup.
8922             operationId: instance_backup_post
8923             parameters:
8924             - description: Project name
8925             example: default
8926             in: query
8927             name: project
8928             type: string
8929             - description: Backup rename
8930             in: body
8931             name: backup
8932             schema:
8933             $ref: '#/definitions/InstanceBackupPost'
8934             produces:
8935             - application/json
8936             responses:
8937             "202":
8938             $ref: '#/responses/Operation'
8939             "400":
8940             $ref: '#/responses/BadRequest'
8941             "403":
8942             $ref: '#/responses/Forbidden'
8943             "500":
8944             $ref: '#/responses/InternalServerError'
8945             summary: Rename a backup
8946             tags:
8947             - instances
8948             /1.0/instances/{name}/backups/{backup}/export:
8949             get:
8950             description: Download the raw backup file(s) from the server.
8951             operationId: instance_backup_export
8952             parameters:
8953             - description: Project name
8954             example: default
8955             in: query
8956             name: project
8957             type: string
8958             produces:
8959             - application/octet-stream
8960             responses:
8961             "200":
8962             description: Raw image data
8963             "403":
8964             $ref: '#/responses/Forbidden'
8965             "500":
8966             $ref: '#/responses/InternalServerError'
8967             summary: Get the raw backup file(s)
8968             tags:
8969             - instances
8970             /1.0/instances/{name}/backups?recursion=1:
8971             get:
8972             description: Returns a list of instance backups (structs).
8973             operationId: instance_backups_get_recursion1
8974             parameters:
8975             - description: Project name
8976             example: default
8977             in: query
8978             name: project
8979             type: string
8980             produces:
8981             - application/json
8982             responses:
8983             "200":
8984             description: API endpoints
8985             schema:
8986             description: Sync response
8987             properties:
8988             metadata:
8989             description: List of instance backups
8990             items:
8991             $ref: '#/definitions/InstanceBackup'
8992             type: array
8993             status:
8994             description: Status description
8995             example: Success
8996             type: string
8997             status_code:
8998             description: Status code
8999             example: 200
9000             type: integer
9001             type:
9002             description: Response type
9003             example: sync
9004             type: string
9005             type: object
9006             "403":
9007             $ref: '#/responses/Forbidden'
9008             "500":
9009             $ref: '#/responses/InternalServerError'
9010             summary: Get the backups
9011             tags:
9012             - instances
9013             /1.0/instances/{name}/console:
9014             delete:
9015             description: Clears the console log buffer.
9016             operationId: instance_console_delete
9017             parameters:
9018             - description: Project name
9019             example: default
9020             in: query
9021             name: project
9022             type: string
9023             produces:
9024             - application/json
9025             responses:
9026             "200":
9027             $ref: '#/responses/EmptySyncResponse'
9028             "400":
9029             $ref: '#/responses/BadRequest'
9030             "403":
9031             $ref: '#/responses/Forbidden'
9032             "404":
9033             $ref: '#/responses/NotFound'
9034             "500":
9035             $ref: '#/responses/InternalServerError'
9036             summary: Clear the console log
9037             tags:
9038             - instances
9039             get:
9040             description: Gets the console log for the instance.
9041             operationId: instance_console_get
9042             parameters:
9043             - description: Project name
9044             example: default
9045             in: query
9046             name: project
9047             type: string
9048             produces:
9049             - application/json
9050             responses:
9051             "200":
9052             description: Raw console log
9053             "400":
9054             $ref: '#/responses/BadRequest'
9055             "403":
9056             $ref: '#/responses/Forbidden'
9057             "404":
9058             $ref: '#/responses/NotFound'
9059             "500":
9060             $ref: '#/responses/InternalServerError'
9061             summary: Get console log
9062             tags:
9063             - instances
9064             post:
9065             consumes:
9066             - application/json
9067             description: |-
9068             Connects to the console of an instance.
9069              
9070             The returned operation metadata will contain two websockets, one for data and one for control.
9071             operationId: instance_console_post
9072             parameters:
9073             - description: Project name
9074             example: default
9075             in: query
9076             name: project
9077             type: string
9078             - description: Console request
9079             in: body
9080             name: console
9081             schema:
9082             $ref: '#/definitions/InstanceConsolePost'
9083             produces:
9084             - application/json
9085             responses:
9086             "202":
9087             $ref: '#/responses/Operation'
9088             "400":
9089             $ref: '#/responses/BadRequest'
9090             "403":
9091             $ref: '#/responses/Forbidden'
9092             "500":
9093             $ref: '#/responses/InternalServerError'
9094             summary: Connect to console
9095             tags:
9096             - instances
9097             /1.0/instances/{name}/exec:
9098             post:
9099             consumes:
9100             - application/json
9101             description: |-
9102             Executes a command inside an instance.
9103              
9104             The returned operation metadata will contain either 2 or 4 websockets.
9105             In non-interactive mode, you'll get one websocket for each of stdin, stdout and stderr.
9106             In interactive mode, a single bi-directional websocket is used for stdin and stdout/stderr.
9107              
9108             An additional "control" socket is always added on top which can be used for out of band communication with LXD.
9109             This allows sending signals and window sizing information through.
9110             operationId: instance_exec_post
9111             parameters:
9112             - description: Project name
9113             example: default
9114             in: query
9115             name: project
9116             type: string
9117             - description: Exec request
9118             in: body
9119             name: exec
9120             schema:
9121             $ref: '#/definitions/InstanceExecPost'
9122             produces:
9123             - application/json
9124             responses:
9125             "202":
9126             $ref: '#/responses/Operation'
9127             "400":
9128             $ref: '#/responses/BadRequest'
9129             "403":
9130             $ref: '#/responses/Forbidden'
9131             "500":
9132             $ref: '#/responses/InternalServerError'
9133             summary: Run a command
9134             tags:
9135             - instances
9136             /1.0/instances/{name}/files:
9137             delete:
9138             description: Removes the file.
9139             operationId: instance_files_delete
9140             parameters:
9141             - description: Path to the file
9142             example: default
9143             in: query
9144             name: path
9145             type: string
9146             - description: Project name
9147             example: default
9148             in: query
9149             name: project
9150             type: string
9151             produces:
9152             - application/json
9153             responses:
9154             "200":
9155             $ref: '#/responses/EmptySyncResponse'
9156             "400":
9157             $ref: '#/responses/BadRequest'
9158             "403":
9159             $ref: '#/responses/Forbidden'
9160             "404":
9161             $ref: '#/responses/NotFound'
9162             "500":
9163             $ref: '#/responses/InternalServerError'
9164             summary: Delete a file
9165             tags:
9166             - instances
9167             get:
9168             description: Gets the file content. If it's a directory, a json list of files
9169             will be returned instead.
9170             operationId: instance_files_get
9171             parameters:
9172             - description: Path to the file
9173             example: default
9174             in: query
9175             name: path
9176             type: string
9177             - description: Project name
9178             example: default
9179             in: query
9180             name: project
9181             type: string
9182             produces:
9183             - application/json
9184             - application/octet-stream
9185             responses:
9186             "200":
9187             description: Raw file or directory listing
9188             headers:
9189             X-LXD-gid:
9190             description: File owner GID
9191             X-LXD-mode:
9192             description: Mode mask
9193             X-LXD-type:
9194             description: Type of file (file, symlink or directory)
9195             X-LXD-uid:
9196             description: File owner UID
9197             "400":
9198             $ref: '#/responses/BadRequest'
9199             "403":
9200             $ref: '#/responses/Forbidden'
9201             "404":
9202             $ref: '#/responses/NotFound'
9203             "500":
9204             $ref: '#/responses/InternalServerError'
9205             summary: Get a file
9206             tags:
9207             - instances
9208             post:
9209             consumes:
9210             - application/octet-stream
9211             description: Creates a new file in the instance.
9212             operationId: instance_files_post
9213             parameters:
9214             - description: Path to the file
9215             example: default
9216             in: query
9217             name: path
9218             type: string
9219             - description: Project name
9220             example: default
9221             in: query
9222             name: project
9223             type: string
9224             - description: Raw file content
9225             in: body
9226             name: raw_file
9227             - description: File owner UID
9228             example: 1000
9229             in: header
9230             name: X-LXD-uid
9231             schema:
9232             type: integer
9233             - description: File owner GID
9234             example: 1000
9235             in: header
9236             name: X-LXD-gid
9237             schema:
9238             type: integer
9239             - description: File mode
9240             example: 420
9241             in: header
9242             name: X-LXD-mode
9243             schema:
9244             type: integer
9245             - description: Type of file (file, symlink or directory)
9246             example: file
9247             in: header
9248             name: X-LXD-type
9249             schema:
9250             type: string
9251             - description: Write mode (overwrite or append)
9252             example: overwrite
9253             in: header
9254             name: X-LXD-write
9255             schema:
9256             type: string
9257             produces:
9258             - application/json
9259             responses:
9260             "200":
9261             $ref: '#/responses/EmptySyncResponse'
9262             "400":
9263             $ref: '#/responses/BadRequest'
9264             "403":
9265             $ref: '#/responses/Forbidden'
9266             "404":
9267             $ref: '#/responses/NotFound'
9268             "500":
9269             $ref: '#/responses/InternalServerError'
9270             summary: Create or replace a file
9271             tags:
9272             - instances
9273             /1.0/instances/{name}/logs:
9274             get:
9275             description: Returns a list of log files (URLs).
9276             operationId: instance_logs_get
9277             parameters:
9278             - description: Project name
9279             example: default
9280             in: query
9281             name: project
9282             type: string
9283             produces:
9284             - application/json
9285             responses:
9286             "200":
9287             description: API endpoints
9288             schema:
9289             description: Sync response
9290             properties:
9291             metadata:
9292             description: List of endpoints
9293             example: |-
9294             [
9295             "/1.0/instances/foo/logs/lxc.conf",
9296             "/1.0/instances/foo/logs/lxc.log"
9297             ]
9298             items:
9299             type: string
9300             type: array
9301             status:
9302             description: Status description
9303             example: Success
9304             type: string
9305             status_code:
9306             description: Status code
9307             example: 200
9308             type: integer
9309             type:
9310             description: Response type
9311             example: sync
9312             type: string
9313             type: object
9314             "403":
9315             $ref: '#/responses/Forbidden'
9316             "404":
9317             $ref: '#/responses/NotFound'
9318             "500":
9319             $ref: '#/responses/InternalServerError'
9320             summary: Get the log files
9321             tags:
9322             - instances
9323             /1.0/instances/{name}/logs/{filename}:
9324             delete:
9325             description: Removes the log file.
9326             operationId: instance_log_delete
9327             parameters:
9328             - description: Project name
9329             example: default
9330             in: query
9331             name: project
9332             type: string
9333             produces:
9334             - application/json
9335             responses:
9336             "200":
9337             $ref: '#/responses/EmptySyncResponse'
9338             "400":
9339             $ref: '#/responses/BadRequest'
9340             "403":
9341             $ref: '#/responses/Forbidden'
9342             "404":
9343             $ref: '#/responses/NotFound'
9344             "500":
9345             $ref: '#/responses/InternalServerError'
9346             summary: Delete the log file
9347             tags:
9348             - instances
9349             get:
9350             description: Gets the log file.
9351             operationId: instance_log_get
9352             parameters:
9353             - description: Project name
9354             example: default
9355             in: query
9356             name: project
9357             type: string
9358             produces:
9359             - application/json
9360             - application/octet-stream
9361             responses:
9362             "200":
9363             description: Raw file
9364             "400":
9365             $ref: '#/responses/BadRequest'
9366             "403":
9367             $ref: '#/responses/Forbidden'
9368             "404":
9369             $ref: '#/responses/NotFound'
9370             "500":
9371             $ref: '#/responses/InternalServerError'
9372             summary: Get the log file
9373             tags:
9374             - instances
9375             /1.0/instances/{name}/metadata:
9376             get:
9377             description: Gets the image metadata for the instance.
9378             operationId: instance_metadata_get
9379             parameters:
9380             - description: Project name
9381             example: default
9382             in: query
9383             name: project
9384             type: string
9385             produces:
9386             - application/json
9387             responses:
9388             "200":
9389             description: Image metadata
9390             schema:
9391             description: Sync response
9392             properties:
9393             metadata:
9394             $ref: '#/definitions/ImageMetadata'
9395             status:
9396             description: Status description
9397             example: Success
9398             type: string
9399             status_code:
9400             description: Status code
9401             example: 200
9402             type: integer
9403             type:
9404             description: Response type
9405             example: sync
9406             type: string
9407             type: object
9408             "403":
9409             $ref: '#/responses/Forbidden'
9410             "500":
9411             $ref: '#/responses/InternalServerError'
9412             summary: Get the instance image metadata
9413             tags:
9414             - instances
9415             patch:
9416             consumes:
9417             - application/json
9418             description: Updates a subset of the instance image metadata.
9419             operationId: instance_metadata_patch
9420             parameters:
9421             - description: Project name
9422             example: default
9423             in: query
9424             name: project
9425             type: string
9426             - description: Image metadata
9427             in: body
9428             name: metadata
9429             required: true
9430             schema:
9431             $ref: '#/definitions/ImageMetadata'
9432             produces:
9433             - application/json
9434             responses:
9435             "200":
9436             $ref: '#/responses/EmptySyncResponse'
9437             "400":
9438             $ref: '#/responses/BadRequest'
9439             "403":
9440             $ref: '#/responses/Forbidden'
9441             "412":
9442             $ref: '#/responses/PreconditionFailed'
9443             "500":
9444             $ref: '#/responses/InternalServerError'
9445             summary: Partially update the image metadata
9446             tags:
9447             - instances
9448             put:
9449             consumes:
9450             - application/json
9451             description: Updates the instance image metadata.
9452             operationId: instance_metadata_put
9453             parameters:
9454             - description: Project name
9455             example: default
9456             in: query
9457             name: project
9458             type: string
9459             - description: Image metadata
9460             in: body
9461             name: metadata
9462             required: true
9463             schema:
9464             $ref: '#/definitions/ImageMetadata'
9465             produces:
9466             - application/json
9467             responses:
9468             "200":
9469             $ref: '#/responses/EmptySyncResponse'
9470             "400":
9471             $ref: '#/responses/BadRequest'
9472             "403":
9473             $ref: '#/responses/Forbidden'
9474             "412":
9475             $ref: '#/responses/PreconditionFailed'
9476             "500":
9477             $ref: '#/responses/InternalServerError'
9478             summary: Update the image metadata
9479             tags:
9480             - instances
9481             /1.0/instances/{name}/metadata/templates:
9482             delete:
9483             description: Removes the template file.
9484             operationId: instance_metadata_templates_delete
9485             parameters:
9486             - description: Template name
9487             example: default
9488             in: query
9489             name: path
9490             type: string
9491             - description: Project name
9492             example: default
9493             in: query
9494             name: project
9495             type: string
9496             produces:
9497             - application/json
9498             responses:
9499             "200":
9500             $ref: '#/responses/EmptySyncResponse'
9501             "400":
9502             $ref: '#/responses/BadRequest'
9503             "403":
9504             $ref: '#/responses/Forbidden'
9505             "404":
9506             $ref: '#/responses/NotFound'
9507             "500":
9508             $ref: '#/responses/InternalServerError'
9509             summary: Delete a template file
9510             tags:
9511             - instances
9512             get:
9513             description: |-
9514             If no path specified, returns a list of template file names.
9515             If a path is specified, returns the file content.
9516             operationId: instance_metadata_templates_get
9517             parameters:
9518             - description: Project name
9519             example: default
9520             in: query
9521             name: project
9522             type: string
9523             - description: Template name
9524             example: hostname.tpl
9525             in: query
9526             name: path
9527             type: string
9528             produces:
9529             - application/json
9530             - application/octet-stream
9531             responses:
9532             "200":
9533             description: Raw template file or file listing
9534             "400":
9535             $ref: '#/responses/BadRequest'
9536             "403":
9537             $ref: '#/responses/Forbidden'
9538             "404":
9539             $ref: '#/responses/NotFound'
9540             "500":
9541             $ref: '#/responses/InternalServerError'
9542             summary: Get the template file names or a specific
9543             tags:
9544             - instances
9545             post:
9546             consumes:
9547             - application/octet-stream
9548             description: Creates a new image template file for the instance.
9549             operationId: instance_metadata_templates_post
9550             parameters:
9551             - description: Template name
9552             example: default
9553             in: query
9554             name: path
9555             type: string
9556             - description: Project name
9557             example: default
9558             in: query
9559             name: project
9560             type: string
9561             - description: Raw file content
9562             in: body
9563             name: raw_file
9564             produces:
9565             - application/json
9566             responses:
9567             "200":
9568             $ref: '#/responses/EmptySyncResponse'
9569             "400":
9570             $ref: '#/responses/BadRequest'
9571             "403":
9572             $ref: '#/responses/Forbidden'
9573             "404":
9574             $ref: '#/responses/NotFound'
9575             "500":
9576             $ref: '#/responses/InternalServerError'
9577             summary: Create or replace a template file
9578             tags:
9579             - instances
9580             /1.0/instances/{name}/snapshots:
9581             get:
9582             description: Returns a list of instance snapshots (URLs).
9583             operationId: instance_snapshots_get
9584             parameters:
9585             - description: Project name
9586             example: default
9587             in: query
9588             name: project
9589             type: string
9590             produces:
9591             - application/json
9592             responses:
9593             "200":
9594             description: API endpoints
9595             schema:
9596             description: Sync response
9597             properties:
9598             metadata:
9599             description: List of endpoints
9600             example: |-
9601             [
9602             "/1.0/instances/foo/snapshots/snap0",
9603             "/1.0/instances/foo/snapshots/snap1"
9604             ]
9605             items:
9606             type: string
9607             type: array
9608             status:
9609             description: Status description
9610             example: Success
9611             type: string
9612             status_code:
9613             description: Status code
9614             example: 200
9615             type: integer
9616             type:
9617             description: Response type
9618             example: sync
9619             type: string
9620             type: object
9621             "403":
9622             $ref: '#/responses/Forbidden'
9623             "500":
9624             $ref: '#/responses/InternalServerError'
9625             summary: Get the snapshots
9626             tags:
9627             - instances
9628             post:
9629             consumes:
9630             - application/json
9631             description: Creates a new snapshot.
9632             operationId: instance_snapshots_post
9633             parameters:
9634             - description: Project name
9635             example: default
9636             in: query
9637             name: project
9638             type: string
9639             - description: Snapshot request
9640             in: body
9641             name: snapshot
9642             schema:
9643             $ref: '#/definitions/InstanceSnapshotsPost'
9644             produces:
9645             - application/json
9646             responses:
9647             "202":
9648             $ref: '#/responses/Operation'
9649             "400":
9650             $ref: '#/responses/BadRequest'
9651             "403":
9652             $ref: '#/responses/Forbidden'
9653             "500":
9654             $ref: '#/responses/InternalServerError'
9655             summary: Create a snapshot
9656             tags:
9657             - instances
9658             /1.0/instances/{name}/snapshots/{snapshot}:
9659             delete:
9660             consumes:
9661             - application/json
9662             description: Deletes the instance snapshot.
9663             operationId: instance_snapshot_delete
9664             parameters:
9665             - description: Project name
9666             example: default
9667             in: query
9668             name: project
9669             type: string
9670             produces:
9671             - application/json
9672             responses:
9673             "202":
9674             $ref: '#/responses/Operation'
9675             "400":
9676             $ref: '#/responses/BadRequest'
9677             "403":
9678             $ref: '#/responses/Forbidden'
9679             "500":
9680             $ref: '#/responses/InternalServerError'
9681             summary: Delete a snapshot
9682             tags:
9683             - instances
9684             get:
9685             description: Gets a specific instance snapshot.
9686             operationId: instance_snapshot_get
9687             parameters:
9688             - description: Project name
9689             example: default
9690             in: query
9691             name: project
9692             type: string
9693             produces:
9694             - application/json
9695             responses:
9696             "200":
9697             description: Instance snapshot
9698             schema:
9699             description: Sync response
9700             properties:
9701             metadata:
9702             $ref: '#/definitions/InstanceSnapshot'
9703             status:
9704             description: Status description
9705             example: Success
9706             type: string
9707             status_code:
9708             description: Status code
9709             example: 200
9710             type: integer
9711             type:
9712             description: Response type
9713             example: sync
9714             type: string
9715             type: object
9716             "403":
9717             $ref: '#/responses/Forbidden'
9718             "500":
9719             $ref: '#/responses/InternalServerError'
9720             summary: Get the snapshot
9721             tags:
9722             - instances
9723             patch:
9724             consumes:
9725             - application/json
9726             description: Updates a subset of the snapshot config.
9727             operationId: instance_snapshot_patch
9728             parameters:
9729             - description: Project name
9730             example: default
9731             in: query
9732             name: project
9733             type: string
9734             - description: Snapshot update
9735             in: body
9736             name: snapshot
9737             schema:
9738             $ref: '#/definitions/InstanceSnapshotPut'
9739             produces:
9740             - application/json
9741             responses:
9742             "202":
9743             $ref: '#/responses/Operation'
9744             "400":
9745             $ref: '#/responses/BadRequest'
9746             "403":
9747             $ref: '#/responses/Forbidden'
9748             "500":
9749             $ref: '#/responses/InternalServerError'
9750             summary: Partially update snapshot
9751             tags:
9752             - instances
9753             post:
9754             consumes:
9755             - application/json
9756             description: |-
9757             Renames or migrates an instance snapshot to another server.
9758              
9759             The returned operation metadata will vary based on what's requested.
9760             For rename or move within the same server, this is a simple background operation with progress data.
9761             For migration, in the push case, this will similarly be a background
9762             operation with progress data, for the pull case, it will be a websocket
9763             operation with a number of secrets to be passed to the target server.
9764             operationId: instance_snapshot_post
9765             parameters:
9766             - description: Project name
9767             example: default
9768             in: query
9769             name: project
9770             type: string
9771             - description: Snapshot migration
9772             in: body
9773             name: snapshot
9774             schema:
9775             $ref: '#/definitions/InstanceSnapshotPost'
9776             produces:
9777             - application/json
9778             responses:
9779             "202":
9780             $ref: '#/responses/Operation'
9781             "400":
9782             $ref: '#/responses/BadRequest'
9783             "403":
9784             $ref: '#/responses/Forbidden'
9785             "500":
9786             $ref: '#/responses/InternalServerError'
9787             summary: Rename or move/migrate a snapshot
9788             tags:
9789             - instances
9790             put:
9791             consumes:
9792             - application/json
9793             description: Updates the snapshot config.
9794             operationId: instance_snapshot_put
9795             parameters:
9796             - description: Project name
9797             example: default
9798             in: query
9799             name: project
9800             type: string
9801             - description: Snapshot update
9802             in: body
9803             name: snapshot
9804             schema:
9805             $ref: '#/definitions/InstanceSnapshotPut'
9806             produces:
9807             - application/json
9808             responses:
9809             "202":
9810             $ref: '#/responses/Operation'
9811             "400":
9812             $ref: '#/responses/BadRequest'
9813             "403":
9814             $ref: '#/responses/Forbidden'
9815             "500":
9816             $ref: '#/responses/InternalServerError'
9817             summary: Update snapshot
9818             tags:
9819             - instances
9820             /1.0/instances/{name}/snapshots?recursion=1:
9821             get:
9822             description: Returns a list of instance snapshots (structs).
9823             operationId: instance_snapshots_get_recursion1
9824             parameters:
9825             - description: Project name
9826             example: default
9827             in: query
9828             name: project
9829             type: string
9830             produces:
9831             - application/json
9832             responses:
9833             "200":
9834             description: API endpoints
9835             schema:
9836             description: Sync response
9837             properties:
9838             metadata:
9839             description: List of instance snapshots
9840             items:
9841             $ref: '#/definitions/InstanceSnapshot'
9842             type: array
9843             status:
9844             description: Status description
9845             example: Success
9846             type: string
9847             status_code:
9848             description: Status code
9849             example: 200
9850             type: integer
9851             type:
9852             description: Response type
9853             example: sync
9854             type: string
9855             type: object
9856             "403":
9857             $ref: '#/responses/Forbidden'
9858             "500":
9859             $ref: '#/responses/InternalServerError'
9860             summary: Get the snapshots
9861             tags:
9862             - instances
9863             /1.0/instances/{name}/state:
9864             get:
9865             description: |-
9866             Gets the runtime state of the instance.
9867              
9868             This is a reasonably expensive call as it causes code to be run
9869             inside of the instance to retrieve the resource usage and network
9870             information.
9871             operationId: instance_state_get
9872             parameters:
9873             - description: Project name
9874             in: query
9875             name: project
9876             type: string
9877             produces:
9878             - application/json
9879             responses:
9880             "200":
9881             description: State
9882             schema:
9883             description: Sync response
9884             properties:
9885             metadata:
9886             $ref: '#/definitions/InstanceState'
9887             status:
9888             description: Status description
9889             example: Success
9890             type: string
9891             status_code:
9892             description: Status code
9893             example: 200
9894             type: integer
9895             type:
9896             description: Response type
9897             example: sync
9898             type: string
9899             type: object
9900             "400":
9901             $ref: '#/responses/BadRequest'
9902             "403":
9903             $ref: '#/responses/Forbidden'
9904             "500":
9905             $ref: '#/responses/InternalServerError'
9906             summary: Get the runtime state
9907             tags:
9908             - instances
9909             put:
9910             consumes:
9911             - application/json
9912             description: Changes the running state of the instance.
9913             operationId: instance_state_put
9914             parameters:
9915             - description: Project name
9916             example: default
9917             in: query
9918             name: project
9919             type: string
9920             - description: State
9921             in: body
9922             name: state
9923             schema:
9924             $ref: '#/definitions/InstanceStatePut'
9925             produces:
9926             - application/json
9927             responses:
9928             "202":
9929             $ref: '#/responses/Operation'
9930             "400":
9931             $ref: '#/responses/BadRequest'
9932             "403":
9933             $ref: '#/responses/Forbidden'
9934             "500":
9935             $ref: '#/responses/InternalServerError'
9936             summary: Change the state
9937             tags:
9938             - instances
9939             /1.0/instances/{name}?recursion=1:
9940             get:
9941             description: |-
9942             Gets a specific instance (full struct).
9943              
9944             recursion=1 also includes information about state, snapshots and backups.
9945             operationId: instance_get_recursion1
9946             parameters:
9947             - description: Project name
9948             example: default
9949             in: query
9950             name: project
9951             type: string
9952             produces:
9953             - application/json
9954             responses:
9955             "200":
9956             description: Instance
9957             schema:
9958             description: Sync response
9959             properties:
9960             metadata:
9961             $ref: '#/definitions/Instance'
9962             status:
9963             description: Status description
9964             example: Success
9965             type: string
9966             status_code:
9967             description: Status code
9968             example: 200
9969             type: integer
9970             type:
9971             description: Response type
9972             example: sync
9973             type: string
9974             type: object
9975             "403":
9976             $ref: '#/responses/Forbidden'
9977             "500":
9978             $ref: '#/responses/InternalServerError'
9979             summary: Get the instance
9980             tags:
9981             - instances
9982             /1.0/instances?recursion=1:
9983             get:
9984             description: Returns a list of instances (basic structs).
9985             operationId: instances_get_recursion1
9986             parameters:
9987             - description: Project name
9988             example: default
9989             in: query
9990             name: project
9991             type: string
9992             - description: Collection filter
9993             example: default
9994             in: query
9995             name: filter
9996             type: string
9997             - description: Retrieve instances from all projects
9998             in: query
9999             name: all-projects
10000             type: boolean
10001             produces:
10002             - application/json
10003             responses:
10004             "200":
10005             description: API endpoints
10006             schema:
10007             description: Sync response
10008             properties:
10009             metadata:
10010             description: List of instances
10011             items:
10012             $ref: '#/definitions/Instance'
10013             type: array
10014             status:
10015             description: Status description
10016             example: Success
10017             type: string
10018             status_code:
10019             description: Status code
10020             example: 200
10021             type: integer
10022             type:
10023             description: Response type
10024             example: sync
10025             type: string
10026             type: object
10027             "403":
10028             $ref: '#/responses/Forbidden'
10029             "500":
10030             $ref: '#/responses/InternalServerError'
10031             summary: Get the instances
10032             tags:
10033             - instances
10034             /1.0/instances?recursion=2:
10035             get:
10036             description: |-
10037             Returns a list of instances (full structs).
10038              
10039             The main difference between recursion=1 and recursion=2 is that the
10040             latter also includes state and snapshot information allowing for a
10041             single API call to return everything needed by most clients.
10042             operationId: instances_get_recursion2
10043             parameters:
10044             - description: Project name
10045             example: default
10046             in: query
10047             name: project
10048             type: string
10049             - description: Collection filter
10050             example: default
10051             in: query
10052             name: filter
10053             type: string
10054             - description: Retrieve instances from all projects
10055             in: query
10056             name: all-projects
10057             type: boolean
10058             produces:
10059             - application/json
10060             responses:
10061             "200":
10062             description: API endpoints
10063             schema:
10064             description: Sync response
10065             properties:
10066             metadata:
10067             description: List of instances
10068             items:
10069             $ref: '#/definitions/InstanceFull'
10070             type: array
10071             status:
10072             description: Status description
10073             example: Success
10074             type: string
10075             status_code:
10076             description: Status code
10077             example: 200
10078             type: integer
10079             type:
10080             description: Response type
10081             example: sync
10082             type: string
10083             type: object
10084             "403":
10085             $ref: '#/responses/Forbidden'
10086             "500":
10087             $ref: '#/responses/InternalServerError'
10088             summary: Get the instances
10089             tags:
10090             - instances
10091             /1.0/metrics:
10092             get:
10093             description: Gets metrics of instances.
10094             operationId: metrics_get
10095             parameters:
10096             - description: Project name
10097             example: default
10098             in: query
10099             name: project
10100             type: string
10101             produces:
10102             - text/plain
10103             responses:
10104             "200":
10105             description: Metrics
10106             schema:
10107             description: Instance metrics
10108             type: string
10109             "403":
10110             $ref: '#/responses/Forbidden'
10111             "500":
10112             $ref: '#/responses/InternalServerError'
10113             summary: Get metrics
10114             tags:
10115             - metrics
10116             /1.0/network-acls:
10117             get:
10118             description: Returns a list of network ACLs (URLs).
10119             operationId: network_acls_get
10120             parameters:
10121             - description: Project name
10122             example: default
10123             in: query
10124             name: project
10125             type: string
10126             produces:
10127             - application/json
10128             responses:
10129             "200":
10130             description: API endpoints
10131             schema:
10132             description: Sync response
10133             properties:
10134             metadata:
10135             description: List of endpoints
10136             example: |-
10137             [
10138             "/1.0/network-acls/foo",
10139             "/1.0/network-acls/bar"
10140             ]
10141             items:
10142             type: string
10143             type: array
10144             status:
10145             description: Status description
10146             example: Success
10147             type: string
10148             status_code:
10149             description: Status code
10150             example: 200
10151             type: integer
10152             type:
10153             description: Response type
10154             example: sync
10155             type: string
10156             type: object
10157             "403":
10158             $ref: '#/responses/Forbidden'
10159             "500":
10160             $ref: '#/responses/InternalServerError'
10161             summary: Get the network ACLs
10162             tags:
10163             - network-acls
10164             post:
10165             consumes:
10166             - application/json
10167             description: Creates a new network ACL.
10168             operationId: network_acls_post
10169             parameters:
10170             - description: Project name
10171             example: default
10172             in: query
10173             name: project
10174             type: string
10175             - description: ACL
10176             in: body
10177             name: acl
10178             required: true
10179             schema:
10180             $ref: '#/definitions/NetworkACLsPost'
10181             produces:
10182             - application/json
10183             responses:
10184             "200":
10185             $ref: '#/responses/EmptySyncResponse'
10186             "400":
10187             $ref: '#/responses/BadRequest'
10188             "403":
10189             $ref: '#/responses/Forbidden'
10190             "500":
10191             $ref: '#/responses/InternalServerError'
10192             summary: Add a network ACL
10193             tags:
10194             - network-acls
10195             /1.0/network-acls/{name}:
10196             delete:
10197             description: Removes the network ACL.
10198             operationId: network_acl_delete
10199             parameters:
10200             - description: Project name
10201             example: default
10202             in: query
10203             name: project
10204             type: string
10205             produces:
10206             - application/json
10207             responses:
10208             "200":
10209             $ref: '#/responses/EmptySyncResponse'
10210             "400":
10211             $ref: '#/responses/BadRequest'
10212             "403":
10213             $ref: '#/responses/Forbidden'
10214             "500":
10215             $ref: '#/responses/InternalServerError'
10216             summary: Delete the network ACL
10217             tags:
10218             - network-acls
10219             get:
10220             description: Gets a specific network ACL.
10221             operationId: network_acl_get
10222             parameters:
10223             - description: Project name
10224             example: default
10225             in: query
10226             name: project
10227             type: string
10228             produces:
10229             - application/json
10230             responses:
10231             "200":
10232             description: ACL
10233             schema:
10234             description: Sync response
10235             properties:
10236             metadata:
10237             $ref: '#/definitions/NetworkACL'
10238             status:
10239             description: Status description
10240             example: Success
10241             type: string
10242             status_code:
10243             description: Status code
10244             example: 200
10245             type: integer
10246             type:
10247             description: Response type
10248             example: sync
10249             type: string
10250             type: object
10251             "403":
10252             $ref: '#/responses/Forbidden'
10253             "500":
10254             $ref: '#/responses/InternalServerError'
10255             summary: Get the network ACL
10256             tags:
10257             - network-acls
10258             patch:
10259             consumes:
10260             - application/json
10261             description: Updates a subset of the network ACL configuration.
10262             operationId: network_acl_patch
10263             parameters:
10264             - description: Project name
10265             example: default
10266             in: query
10267             name: project
10268             type: string
10269             - description: ACL configuration
10270             in: body
10271             name: acl
10272             required: true
10273             schema:
10274             $ref: '#/definitions/NetworkACLPut'
10275             produces:
10276             - application/json
10277             responses:
10278             "200":
10279             $ref: '#/responses/EmptySyncResponse'
10280             "400":
10281             $ref: '#/responses/BadRequest'
10282             "403":
10283             $ref: '#/responses/Forbidden'
10284             "412":
10285             $ref: '#/responses/PreconditionFailed'
10286             "500":
10287             $ref: '#/responses/InternalServerError'
10288             summary: Partially update the network ACL
10289             tags:
10290             - network-acls
10291             post:
10292             consumes:
10293             - application/json
10294             description: Renames an existing network ACL.
10295             operationId: network_acl_post
10296             parameters:
10297             - description: Project name
10298             example: default
10299             in: query
10300             name: project
10301             type: string
10302             - description: ACL rename request
10303             in: body
10304             name: acl
10305             required: true
10306             schema:
10307             $ref: '#/definitions/NetworkACLPost'
10308             produces:
10309             - application/json
10310             responses:
10311             "200":
10312             $ref: '#/responses/EmptySyncResponse'
10313             "400":
10314             $ref: '#/responses/BadRequest'
10315             "403":
10316             $ref: '#/responses/Forbidden'
10317             "500":
10318             $ref: '#/responses/InternalServerError'
10319             summary: Rename the network ACL
10320             tags:
10321             - network-acls
10322             put:
10323             consumes:
10324             - application/json
10325             description: Updates the entire network ACL configuration.
10326             operationId: network_acl_put
10327             parameters:
10328             - description: Project name
10329             example: default
10330             in: query
10331             name: project
10332             type: string
10333             - description: ACL configuration
10334             in: body
10335             name: acl
10336             required: true
10337             schema:
10338             $ref: '#/definitions/NetworkACLPut'
10339             produces:
10340             - application/json
10341             responses:
10342             "200":
10343             $ref: '#/responses/EmptySyncResponse'
10344             "400":
10345             $ref: '#/responses/BadRequest'
10346             "403":
10347             $ref: '#/responses/Forbidden'
10348             "412":
10349             $ref: '#/responses/PreconditionFailed'
10350             "500":
10351             $ref: '#/responses/InternalServerError'
10352             summary: Update the network ACL
10353             tags:
10354             - network-acls
10355             /1.0/network-acls/{name}/log:
10356             get:
10357             description: Gets a specific network ACL log entries.
10358             operationId: network_acl_log_get
10359             parameters:
10360             - description: Project name
10361             example: default
10362             in: query
10363             name: project
10364             type: string
10365             produces:
10366             - application/octet-stream
10367             responses:
10368             "200":
10369             description: Raw log file
10370             "403":
10371             $ref: '#/responses/Forbidden'
10372             "500":
10373             $ref: '#/responses/InternalServerError'
10374             summary: Get the network ACL log
10375             tags:
10376             - network-acls
10377             /1.0/network-acls?recursion=1:
10378             get:
10379             description: Returns a list of network ACLs (structs).
10380             operationId: network_acls_get_recursion1
10381             parameters:
10382             - description: Project name
10383             example: default
10384             in: query
10385             name: project
10386             type: string
10387             produces:
10388             - application/json
10389             responses:
10390             "200":
10391             description: API endpoints
10392             schema:
10393             description: Sync response
10394             properties:
10395             metadata:
10396             description: List of network ACLs
10397             items:
10398             $ref: '#/definitions/NetworkACL'
10399             type: array
10400             status:
10401             description: Status description
10402             example: Success
10403             type: string
10404             status_code:
10405             description: Status code
10406             example: 200
10407             type: integer
10408             type:
10409             description: Response type
10410             example: sync
10411             type: string
10412             type: object
10413             "403":
10414             $ref: '#/responses/Forbidden'
10415             "500":
10416             $ref: '#/responses/InternalServerError'
10417             summary: Get the network ACLs
10418             tags:
10419             - network-acls
10420             /1.0/network-zones:
10421             get:
10422             description: Returns a list of network zones (URLs).
10423             operationId: network_zones_get
10424             parameters:
10425             - description: Project name
10426             example: default
10427             in: query
10428             name: project
10429             type: string
10430             produces:
10431             - application/json
10432             responses:
10433             "200":
10434             description: API endpoints
10435             schema:
10436             description: Sync response
10437             properties:
10438             metadata:
10439             description: List of endpoints
10440             example: |-
10441             [
10442             "/1.0/network-zones/example.net",
10443             "/1.0/network-zones/example.com"
10444             ]
10445             items:
10446             type: string
10447             type: array
10448             status:
10449             description: Status description
10450             example: Success
10451             type: string
10452             status_code:
10453             description: Status code
10454             example: 200
10455             type: integer
10456             type:
10457             description: Response type
10458             example: sync
10459             type: string
10460             type: object
10461             "403":
10462             $ref: '#/responses/Forbidden'
10463             "500":
10464             $ref: '#/responses/InternalServerError'
10465             summary: Get the network zones
10466             tags:
10467             - network-zones
10468             post:
10469             consumes:
10470             - application/json
10471             description: Creates a new network zone.
10472             operationId: network_zones_post
10473             parameters:
10474             - description: Project name
10475             example: default
10476             in: query
10477             name: project
10478             type: string
10479             - description: zone
10480             in: body
10481             name: zone
10482             required: true
10483             schema:
10484             $ref: '#/definitions/NetworkZonesPost'
10485             produces:
10486             - application/json
10487             responses:
10488             "200":
10489             $ref: '#/responses/EmptySyncResponse'
10490             "400":
10491             $ref: '#/responses/BadRequest'
10492             "403":
10493             $ref: '#/responses/Forbidden'
10494             "500":
10495             $ref: '#/responses/InternalServerError'
10496             summary: Add a network zone
10497             tags:
10498             - network-zones
10499             /1.0/network-zones/{name}:
10500             delete:
10501             description: Removes the network zone.
10502             operationId: network_zone_delete
10503             parameters:
10504             - description: Project name
10505             example: default
10506             in: query
10507             name: project
10508             type: string
10509             produces:
10510             - application/json
10511             responses:
10512             "200":
10513             $ref: '#/responses/EmptySyncResponse'
10514             "400":
10515             $ref: '#/responses/BadRequest'
10516             "403":
10517             $ref: '#/responses/Forbidden'
10518             "500":
10519             $ref: '#/responses/InternalServerError'
10520             summary: Delete the network zone
10521             tags:
10522             - network-zones
10523             get:
10524             description: Gets a specific network zone.
10525             operationId: network_zone_get
10526             parameters:
10527             - description: Project name
10528             example: default
10529             in: query
10530             name: project
10531             type: string
10532             produces:
10533             - application/json
10534             responses:
10535             "200":
10536             description: zone
10537             schema:
10538             description: Sync response
10539             properties:
10540             metadata:
10541             $ref: '#/definitions/NetworkZone'
10542             status:
10543             description: Status description
10544             example: Success
10545             type: string
10546             status_code:
10547             description: Status code
10548             example: 200
10549             type: integer
10550             type:
10551             description: Response type
10552             example: sync
10553             type: string
10554             type: object
10555             "403":
10556             $ref: '#/responses/Forbidden'
10557             "500":
10558             $ref: '#/responses/InternalServerError'
10559             summary: Get the network zone
10560             tags:
10561             - network-zones
10562             patch:
10563             consumes:
10564             - application/json
10565             description: Updates a subset of the network zone configuration.
10566             operationId: network_zone_patch
10567             parameters:
10568             - description: Project name
10569             example: default
10570             in: query
10571             name: project
10572             type: string
10573             - description: zone configuration
10574             in: body
10575             name: zone
10576             required: true
10577             schema:
10578             $ref: '#/definitions/NetworkZonePut'
10579             produces:
10580             - application/json
10581             responses:
10582             "200":
10583             $ref: '#/responses/EmptySyncResponse'
10584             "400":
10585             $ref: '#/responses/BadRequest'
10586             "403":
10587             $ref: '#/responses/Forbidden'
10588             "412":
10589             $ref: '#/responses/PreconditionFailed'
10590             "500":
10591             $ref: '#/responses/InternalServerError'
10592             summary: Partially update the network zone
10593             tags:
10594             - network-zones
10595             put:
10596             consumes:
10597             - application/json
10598             description: Updates the entire network zone configuration.
10599             operationId: network_zone_put
10600             parameters:
10601             - description: Project name
10602             example: default
10603             in: query
10604             name: project
10605             type: string
10606             - description: zone configuration
10607             in: body
10608             name: zone
10609             required: true
10610             schema:
10611             $ref: '#/definitions/NetworkZonePut'
10612             produces:
10613             - application/json
10614             responses:
10615             "200":
10616             $ref: '#/responses/EmptySyncResponse'
10617             "400":
10618             $ref: '#/responses/BadRequest'
10619             "403":
10620             $ref: '#/responses/Forbidden'
10621             "412":
10622             $ref: '#/responses/PreconditionFailed'
10623             "500":
10624             $ref: '#/responses/InternalServerError'
10625             summary: Update the network zone
10626             tags:
10627             - network-zones
10628             /1.0/network-zones/{zone}/records:
10629             get:
10630             description: Returns a list of network zone records (URLs).
10631             operationId: network_zone_records_get
10632             parameters:
10633             - description: Project name
10634             example: default
10635             in: query
10636             name: project
10637             type: string
10638             produces:
10639             - application/json
10640             responses:
10641             "200":
10642             description: API endpoints
10643             schema:
10644             description: Sync response
10645             properties:
10646             metadata:
10647             description: List of endpoints
10648             example: |-
10649             [
10650             "/1.0/network-zones/example.net/records/foo",
10651             "/1.0/network-zones/example.net/records/bar"
10652             ]
10653             items:
10654             type: string
10655             type: array
10656             status:
10657             description: Status description
10658             example: Success
10659             type: string
10660             status_code:
10661             description: Status code
10662             example: 200
10663             type: integer
10664             type:
10665             description: Response type
10666             example: sync
10667             type: string
10668             type: object
10669             "403":
10670             $ref: '#/responses/Forbidden'
10671             "500":
10672             $ref: '#/responses/InternalServerError'
10673             summary: Get the network zone records
10674             tags:
10675             - network-zones
10676             post:
10677             consumes:
10678             - application/json
10679             description: Creates a new network zone record.
10680             operationId: network_zone_records_post
10681             parameters:
10682             - description: Project name
10683             example: default
10684             in: query
10685             name: project
10686             type: string
10687             - description: zone
10688             in: body
10689             name: zone
10690             required: true
10691             schema:
10692             $ref: '#/definitions/NetworkZoneRecordsPost'
10693             produces:
10694             - application/json
10695             responses:
10696             "200":
10697             $ref: '#/responses/EmptySyncResponse'
10698             "400":
10699             $ref: '#/responses/BadRequest'
10700             "403":
10701             $ref: '#/responses/Forbidden'
10702             "500":
10703             $ref: '#/responses/InternalServerError'
10704             summary: Add a network zone record
10705             tags:
10706             - network-zones
10707             /1.0/network-zones/{zone}/records/{name}:
10708             delete:
10709             description: Removes the network zone record.
10710             operationId: network_zone_record_delete
10711             parameters:
10712             - description: Project name
10713             example: default
10714             in: query
10715             name: project
10716             type: string
10717             produces:
10718             - application/json
10719             responses:
10720             "200":
10721             $ref: '#/responses/EmptySyncResponse'
10722             "400":
10723             $ref: '#/responses/BadRequest'
10724             "403":
10725             $ref: '#/responses/Forbidden'
10726             "500":
10727             $ref: '#/responses/InternalServerError'
10728             summary: Delete the network zone record
10729             tags:
10730             - network-zones
10731             get:
10732             description: Gets a specific network zone record.
10733             operationId: network_zone_record_get
10734             parameters:
10735             - description: Project name
10736             example: default
10737             in: query
10738             name: project
10739             type: string
10740             produces:
10741             - application/json
10742             responses:
10743             "200":
10744             description: zone
10745             schema:
10746             description: Sync response
10747             properties:
10748             metadata:
10749             $ref: '#/definitions/NetworkZoneRecord'
10750             status:
10751             description: Status description
10752             example: Success
10753             type: string
10754             status_code:
10755             description: Status code
10756             example: 200
10757             type: integer
10758             type:
10759             description: Response type
10760             example: sync
10761             type: string
10762             type: object
10763             "403":
10764             $ref: '#/responses/Forbidden'
10765             "500":
10766             $ref: '#/responses/InternalServerError'
10767             summary: Get the network zone record
10768             tags:
10769             - network-zones
10770             patch:
10771             consumes:
10772             - application/json
10773             description: Updates a subset of the network zone record configuration.
10774             operationId: network_zone_record_patch
10775             parameters:
10776             - description: Project name
10777             example: default
10778             in: query
10779             name: project
10780             type: string
10781             - description: zone record configuration
10782             in: body
10783             name: zone
10784             required: true
10785             schema:
10786             $ref: '#/definitions/NetworkZoneRecordPut'
10787             produces:
10788             - application/json
10789             responses:
10790             "200":
10791             $ref: '#/responses/EmptySyncResponse'
10792             "400":
10793             $ref: '#/responses/BadRequest'
10794             "403":
10795             $ref: '#/responses/Forbidden'
10796             "412":
10797             $ref: '#/responses/PreconditionFailed'
10798             "500":
10799             $ref: '#/responses/InternalServerError'
10800             summary: Partially update the network zone record
10801             tags:
10802             - network-zones
10803             put:
10804             consumes:
10805             - application/json
10806             description: Updates the entire network zone record configuration.
10807             operationId: network_zone_record_put
10808             parameters:
10809             - description: Project name
10810             example: default
10811             in: query
10812             name: project
10813             type: string
10814             - description: zone record configuration
10815             in: body
10816             name: zone
10817             required: true
10818             schema:
10819             $ref: '#/definitions/NetworkZoneRecordPut'
10820             produces:
10821             - application/json
10822             responses:
10823             "200":
10824             $ref: '#/responses/EmptySyncResponse'
10825             "400":
10826             $ref: '#/responses/BadRequest'
10827             "403":
10828             $ref: '#/responses/Forbidden'
10829             "412":
10830             $ref: '#/responses/PreconditionFailed'
10831             "500":
10832             $ref: '#/responses/InternalServerError'
10833             summary: Update the network zone record
10834             tags:
10835             - network-zones
10836             /1.0/network-zones/{zone}/records?recursion=1:
10837             get:
10838             description: Returns a list of network zone records (structs).
10839             operationId: network_zone_records_get_recursion1
10840             parameters:
10841             - description: Project name
10842             example: default
10843             in: query
10844             name: project
10845             type: string
10846             produces:
10847             - application/json
10848             responses:
10849             "200":
10850             description: API endpoints
10851             schema:
10852             description: Sync response
10853             properties:
10854             metadata:
10855             description: List of network zone records
10856             items:
10857             $ref: '#/definitions/NetworkZoneRecord'
10858             type: array
10859             status:
10860             description: Status description
10861             example: Success
10862             type: string
10863             status_code:
10864             description: Status code
10865             example: 200
10866             type: integer
10867             type:
10868             description: Response type
10869             example: sync
10870             type: string
10871             type: object
10872             "403":
10873             $ref: '#/responses/Forbidden'
10874             "500":
10875             $ref: '#/responses/InternalServerError'
10876             summary: Get the network zone records
10877             tags:
10878             - network-zones
10879             /1.0/network-zones?recursion=1:
10880             get:
10881             description: Returns a list of network zones (structs).
10882             operationId: network_zones_get_recursion1
10883             parameters:
10884             - description: Project name
10885             example: default
10886             in: query
10887             name: project
10888             type: string
10889             produces:
10890             - application/json
10891             responses:
10892             "200":
10893             description: API endpoints
10894             schema:
10895             description: Sync response
10896             properties:
10897             metadata:
10898             description: List of network zones
10899             items:
10900             $ref: '#/definitions/NetworkZone'
10901             type: array
10902             status:
10903             description: Status description
10904             example: Success
10905             type: string
10906             status_code:
10907             description: Status code
10908             example: 200
10909             type: integer
10910             type:
10911             description: Response type
10912             example: sync
10913             type: string
10914             type: object
10915             "403":
10916             $ref: '#/responses/Forbidden'
10917             "500":
10918             $ref: '#/responses/InternalServerError'
10919             summary: Get the network zones
10920             tags:
10921             - network-zones
10922             /1.0/networks:
10923             get:
10924             description: Returns a list of networks (URLs).
10925             operationId: networks_get
10926             parameters:
10927             - description: Project name
10928             example: default
10929             in: query
10930             name: project
10931             type: string
10932             produces:
10933             - application/json
10934             responses:
10935             "200":
10936             description: API endpoints
10937             schema:
10938             description: Sync response
10939             properties:
10940             metadata:
10941             description: List of endpoints
10942             example: |-
10943             [
10944             "/1.0/networks/lxdbr0",
10945             "/1.0/networks/lxdbr1"
10946             ]
10947             items:
10948             type: string
10949             type: array
10950             status:
10951             description: Status description
10952             example: Success
10953             type: string
10954             status_code:
10955             description: Status code
10956             example: 200
10957             type: integer
10958             type:
10959             description: Response type
10960             example: sync
10961             type: string
10962             type: object
10963             "403":
10964             $ref: '#/responses/Forbidden'
10965             "500":
10966             $ref: '#/responses/InternalServerError'
10967             summary: Get the networks
10968             tags:
10969             - networks
10970             post:
10971             consumes:
10972             - application/json
10973             description: |-
10974             Creates a new network.
10975             When clustered, most network types require individual POST for each cluster member prior to a global POST.
10976             operationId: networks_post
10977             parameters:
10978             - description: Project name
10979             example: default
10980             in: query
10981             name: project
10982             type: string
10983             - description: Cluster member name
10984             example: lxd01
10985             in: query
10986             name: target
10987             type: string
10988             - description: Network
10989             in: body
10990             name: network
10991             required: true
10992             schema:
10993             $ref: '#/definitions/NetworksPost'
10994             produces:
10995             - application/json
10996             responses:
10997             "200":
10998             $ref: '#/responses/EmptySyncResponse'
10999             "400":
11000             $ref: '#/responses/BadRequest'
11001             "403":
11002             $ref: '#/responses/Forbidden'
11003             "500":
11004             $ref: '#/responses/InternalServerError'
11005             summary: Add a network
11006             tags:
11007             - networks
11008             /1.0/networks/{name}:
11009             delete:
11010             description: Removes the network.
11011             operationId: network_delete
11012             parameters:
11013             - description: Project name
11014             example: default
11015             in: query
11016             name: project
11017             type: string
11018             produces:
11019             - application/json
11020             responses:
11021             "200":
11022             $ref: '#/responses/EmptySyncResponse'
11023             "400":
11024             $ref: '#/responses/BadRequest'
11025             "403":
11026             $ref: '#/responses/Forbidden'
11027             "500":
11028             $ref: '#/responses/InternalServerError'
11029             summary: Delete the network
11030             tags:
11031             - networks
11032             get:
11033             description: Gets a specific network.
11034             operationId: network_get
11035             parameters:
11036             - description: Project name
11037             example: default
11038             in: query
11039             name: project
11040             type: string
11041             - description: Cluster member name
11042             example: lxd01
11043             in: query
11044             name: target
11045             type: string
11046             produces:
11047             - application/json
11048             responses:
11049             "200":
11050             description: Network
11051             schema:
11052             description: Sync response
11053             properties:
11054             metadata:
11055             $ref: '#/definitions/Network'
11056             status:
11057             description: Status description
11058             example: Success
11059             type: string
11060             status_code:
11061             description: Status code
11062             example: 200
11063             type: integer
11064             type:
11065             description: Response type
11066             example: sync
11067             type: string
11068             type: object
11069             "403":
11070             $ref: '#/responses/Forbidden'
11071             "500":
11072             $ref: '#/responses/InternalServerError'
11073             summary: Get the network
11074             tags:
11075             - networks
11076             patch:
11077             consumes:
11078             - application/json
11079             description: Updates a subset of the network configuration.
11080             operationId: network_patch
11081             parameters:
11082             - description: Project name
11083             example: default
11084             in: query
11085             name: project
11086             type: string
11087             - description: Cluster member name
11088             example: lxd01
11089             in: query
11090             name: target
11091             type: string
11092             - description: Network configuration
11093             in: body
11094             name: network
11095             required: true
11096             schema:
11097             $ref: '#/definitions/NetworkPut'
11098             produces:
11099             - application/json
11100             responses:
11101             "200":
11102             $ref: '#/responses/EmptySyncResponse'
11103             "400":
11104             $ref: '#/responses/BadRequest'
11105             "403":
11106             $ref: '#/responses/Forbidden'
11107             "412":
11108             $ref: '#/responses/PreconditionFailed'
11109             "500":
11110             $ref: '#/responses/InternalServerError'
11111             summary: Partially update the network
11112             tags:
11113             - networks
11114             post:
11115             consumes:
11116             - application/json
11117             description: Renames an existing network.
11118             operationId: network_post
11119             parameters:
11120             - description: Project name
11121             example: default
11122             in: query
11123             name: project
11124             type: string
11125             - description: Network rename request
11126             in: body
11127             name: network
11128             required: true
11129             schema:
11130             $ref: '#/definitions/NetworkPost'
11131             produces:
11132             - application/json
11133             responses:
11134             "200":
11135             $ref: '#/responses/EmptySyncResponse'
11136             "400":
11137             $ref: '#/responses/BadRequest'
11138             "403":
11139             $ref: '#/responses/Forbidden'
11140             "500":
11141             $ref: '#/responses/InternalServerError'
11142             summary: Rename the network
11143             tags:
11144             - networks
11145             put:
11146             consumes:
11147             - application/json
11148             description: Updates the entire network configuration.
11149             operationId: network_put
11150             parameters:
11151             - description: Project name
11152             example: default
11153             in: query
11154             name: project
11155             type: string
11156             - description: Cluster member name
11157             example: lxd01
11158             in: query
11159             name: target
11160             type: string
11161             - description: Network configuration
11162             in: body
11163             name: network
11164             required: true
11165             schema:
11166             $ref: '#/definitions/NetworkPut'
11167             produces:
11168             - application/json
11169             responses:
11170             "200":
11171             $ref: '#/responses/EmptySyncResponse'
11172             "400":
11173             $ref: '#/responses/BadRequest'
11174             "403":
11175             $ref: '#/responses/Forbidden'
11176             "412":
11177             $ref: '#/responses/PreconditionFailed'
11178             "500":
11179             $ref: '#/responses/InternalServerError'
11180             summary: Update the network
11181             tags:
11182             - networks
11183             /1.0/networks/{name}/leases:
11184             get:
11185             description: Returns a list of DHCP leases for the network.
11186             operationId: networks_leases_get
11187             parameters:
11188             - description: Project name
11189             example: default
11190             in: query
11191             name: project
11192             type: string
11193             - description: Cluster member name
11194             example: lxd01
11195             in: query
11196             name: target
11197             type: string
11198             produces:
11199             - application/json
11200             responses:
11201             "200":
11202             description: API endpoints
11203             schema:
11204             description: Sync response
11205             properties:
11206             metadata:
11207             description: List of DHCP leases
11208             items:
11209             $ref: '#/definitions/NetworkLease'
11210             type: array
11211             status:
11212             description: Status description
11213             example: Success
11214             type: string
11215             status_code:
11216             description: Status code
11217             example: 200
11218             type: integer
11219             type:
11220             description: Response type
11221             example: sync
11222             type: string
11223             type: object
11224             "403":
11225             $ref: '#/responses/Forbidden'
11226             "500":
11227             $ref: '#/responses/InternalServerError'
11228             summary: Get the DHCP leases
11229             tags:
11230             - networks
11231             /1.0/networks/{name}/state:
11232             get:
11233             description: Returns the current network state information.
11234             operationId: networks_state_get
11235             parameters:
11236             - description: Project name
11237             example: default
11238             in: query
11239             name: project
11240             type: string
11241             - description: Cluster member name
11242             example: lxd01
11243             in: query
11244             name: target
11245             type: string
11246             produces:
11247             - application/json
11248             responses:
11249             "200":
11250             description: API endpoints
11251             schema:
11252             description: Sync response
11253             properties:
11254             metadata:
11255             $ref: '#/definitions/NetworkState'
11256             status:
11257             description: Status description
11258             example: Success
11259             type: string
11260             status_code:
11261             description: Status code
11262             example: 200
11263             type: integer
11264             type:
11265             description: Response type
11266             example: sync
11267             type: string
11268             type: object
11269             "403":
11270             $ref: '#/responses/Forbidden'
11271             "500":
11272             $ref: '#/responses/InternalServerError'
11273             summary: Get the network state
11274             tags:
11275             - networks
11276             /1.0/networks/{networkName}/forwards:
11277             get:
11278             description: Returns a list of network address forwards (URLs).
11279             operationId: network_forwards_get
11280             parameters:
11281             - description: Project name
11282             example: default
11283             in: query
11284             name: project
11285             type: string
11286             produces:
11287             - application/json
11288             responses:
11289             "200":
11290             description: API endpoints
11291             schema:
11292             description: Sync response
11293             properties:
11294             metadata:
11295             description: List of endpoints
11296             example: |-
11297             [
11298             "/1.0/networks/lxdbr0/forwards/192.0.2.1",
11299             "/1.0/networks/lxdbr0/forwards/192.0.2.2"
11300             ]
11301             items:
11302             type: string
11303             type: array
11304             status:
11305             description: Status description
11306             example: Success
11307             type: string
11308             status_code:
11309             description: Status code
11310             example: 200
11311             type: integer
11312             type:
11313             description: Response type
11314             example: sync
11315             type: string
11316             type: object
11317             "403":
11318             $ref: '#/responses/Forbidden'
11319             "500":
11320             $ref: '#/responses/InternalServerError'
11321             summary: Get the network address forwards
11322             tags:
11323             - network-forwards
11324             post:
11325             consumes:
11326             - application/json
11327             description: Creates a new network address forward.
11328             operationId: network_forwards_post
11329             parameters:
11330             - description: Project name
11331             example: default
11332             in: query
11333             name: project
11334             type: string
11335             - description: Forward
11336             in: body
11337             name: forward
11338             required: true
11339             schema:
11340             $ref: '#/definitions/NetworkForwardsPost'
11341             produces:
11342             - application/json
11343             responses:
11344             "200":
11345             $ref: '#/responses/EmptySyncResponse'
11346             "400":
11347             $ref: '#/responses/BadRequest'
11348             "403":
11349             $ref: '#/responses/Forbidden'
11350             "500":
11351             $ref: '#/responses/InternalServerError'
11352             summary: Add a network address forward
11353             tags:
11354             - network-forwards
11355             /1.0/networks/{networkName}/forwards/{listenAddress}:
11356             delete:
11357             description: Removes the network address forward.
11358             operationId: network_forward_delete
11359             parameters:
11360             - description: Project name
11361             example: default
11362             in: query
11363             name: project
11364             type: string
11365             produces:
11366             - application/json
11367             responses:
11368             "200":
11369             $ref: '#/responses/EmptySyncResponse'
11370             "400":
11371             $ref: '#/responses/BadRequest'
11372             "403":
11373             $ref: '#/responses/Forbidden'
11374             "500":
11375             $ref: '#/responses/InternalServerError'
11376             summary: Delete the network address forward
11377             tags:
11378             - network-forwards
11379             get:
11380             description: Gets a specific network address forward.
11381             operationId: network_forward_get
11382             parameters:
11383             - description: Project name
11384             example: default
11385             in: query
11386             name: project
11387             type: string
11388             produces:
11389             - application/json
11390             responses:
11391             "200":
11392             description: Address forward
11393             schema:
11394             description: Sync response
11395             properties:
11396             metadata:
11397             $ref: '#/definitions/NetworkForward'
11398             status:
11399             description: Status description
11400             example: Success
11401             type: string
11402             status_code:
11403             description: Status code
11404             example: 200
11405             type: integer
11406             type:
11407             description: Response type
11408             example: sync
11409             type: string
11410             type: object
11411             "403":
11412             $ref: '#/responses/Forbidden'
11413             "500":
11414             $ref: '#/responses/InternalServerError'
11415             summary: Get the network address forward
11416             tags:
11417             - network-forwards
11418             patch:
11419             consumes:
11420             - application/json
11421             description: Updates a subset of the network address forward configuration.
11422             operationId: network_forward_patch
11423             parameters:
11424             - description: Project name
11425             example: default
11426             in: query
11427             name: project
11428             type: string
11429             - description: Address forward configuration
11430             in: body
11431             name: forward
11432             required: true
11433             schema:
11434             $ref: '#/definitions/NetworkForwardPut'
11435             produces:
11436             - application/json
11437             responses:
11438             "200":
11439             $ref: '#/responses/EmptySyncResponse'
11440             "400":
11441             $ref: '#/responses/BadRequest'
11442             "403":
11443             $ref: '#/responses/Forbidden'
11444             "412":
11445             $ref: '#/responses/PreconditionFailed'
11446             "500":
11447             $ref: '#/responses/InternalServerError'
11448             summary: Partially update the network address forward
11449             tags:
11450             - network-forwards
11451             put:
11452             consumes:
11453             - application/json
11454             description: Updates the entire network address forward configuration.
11455             operationId: network_forward_put
11456             parameters:
11457             - description: Project name
11458             example: default
11459             in: query
11460             name: project
11461             type: string
11462             - description: Address forward configuration
11463             in: body
11464             name: forward
11465             required: true
11466             schema:
11467             $ref: '#/definitions/NetworkForwardPut'
11468             produces:
11469             - application/json
11470             responses:
11471             "200":
11472             $ref: '#/responses/EmptySyncResponse'
11473             "400":
11474             $ref: '#/responses/BadRequest'
11475             "403":
11476             $ref: '#/responses/Forbidden'
11477             "412":
11478             $ref: '#/responses/PreconditionFailed'
11479             "500":
11480             $ref: '#/responses/InternalServerError'
11481             summary: Update the network address forward
11482             tags:
11483             - network-forwards
11484             /1.0/networks/{networkName}/forwards?recursion=1:
11485             get:
11486             description: Returns a list of network address forwards (structs).
11487             operationId: network_forward_get_recursion1
11488             parameters:
11489             - description: Project name
11490             example: default
11491             in: query
11492             name: project
11493             type: string
11494             produces:
11495             - application/json
11496             responses:
11497             "200":
11498             description: API endpoints
11499             schema:
11500             description: Sync response
11501             properties:
11502             metadata:
11503             description: List of network address forwards
11504             items:
11505             $ref: '#/definitions/NetworkForward'
11506             type: array
11507             status:
11508             description: Status description
11509             example: Success
11510             type: string
11511             status_code:
11512             description: Status code
11513             example: 200
11514             type: integer
11515             type:
11516             description: Response type
11517             example: sync
11518             type: string
11519             type: object
11520             "403":
11521             $ref: '#/responses/Forbidden'
11522             "500":
11523             $ref: '#/responses/InternalServerError'
11524             summary: Get the network address forwards
11525             tags:
11526             - network-forwards
11527             /1.0/networks/{networkName}/peers:
11528             get:
11529             description: Returns a list of network peers (URLs).
11530             operationId: network_peers_get
11531             parameters:
11532             - description: Project name
11533             example: default
11534             in: query
11535             name: project
11536             type: string
11537             produces:
11538             - application/json
11539             responses:
11540             "200":
11541             description: API endpoints
11542             schema:
11543             description: Sync response
11544             properties:
11545             metadata:
11546             description: List of endpoints
11547             example: |-
11548             [
11549             "/1.0/networks/lxdbr0/peers/my-peer-1",
11550             "/1.0/networks/lxdbr0/peers/my-peer-2"
11551             ]
11552             items:
11553             type: string
11554             type: array
11555             status:
11556             description: Status description
11557             example: Success
11558             type: string
11559             status_code:
11560             description: Status code
11561             example: 200
11562             type: integer
11563             type:
11564             description: Response type
11565             example: sync
11566             type: string
11567             type: object
11568             "403":
11569             $ref: '#/responses/Forbidden'
11570             "500":
11571             $ref: '#/responses/InternalServerError'
11572             summary: Get the network peers
11573             tags:
11574             - network-peers
11575             post:
11576             consumes:
11577             - application/json
11578             description: Initiates/creates a new network peering.
11579             operationId: network_peers_post
11580             parameters:
11581             - description: Project name
11582             example: default
11583             in: query
11584             name: project
11585             type: string
11586             - description: Peer
11587             in: body
11588             name: peer
11589             required: true
11590             schema:
11591             $ref: '#/definitions/NetworkPeersPost'
11592             produces:
11593             - application/json
11594             responses:
11595             "200":
11596             $ref: '#/responses/EmptySyncResponse'
11597             "202":
11598             $ref: '#/responses/EmptySyncResponse'
11599             "400":
11600             $ref: '#/responses/BadRequest'
11601             "403":
11602             $ref: '#/responses/Forbidden'
11603             "500":
11604             $ref: '#/responses/InternalServerError'
11605             summary: Add a network peer
11606             tags:
11607             - network-peers
11608             /1.0/networks/{networkName}/peers/{peerName}:
11609             delete:
11610             description: Removes the network peering.
11611             operationId: network_peer_delete
11612             parameters:
11613             - description: Project name
11614             example: default
11615             in: query
11616             name: project
11617             type: string
11618             produces:
11619             - application/json
11620             responses:
11621             "200":
11622             $ref: '#/responses/EmptySyncResponse'
11623             "400":
11624             $ref: '#/responses/BadRequest'
11625             "403":
11626             $ref: '#/responses/Forbidden'
11627             "500":
11628             $ref: '#/responses/InternalServerError'
11629             summary: Delete the network peer
11630             tags:
11631             - network-peers
11632             get:
11633             description: Gets a specific network peering.
11634             operationId: network_peer_get
11635             parameters:
11636             - description: Project name
11637             example: default
11638             in: query
11639             name: project
11640             type: string
11641             produces:
11642             - application/json
11643             responses:
11644             "200":
11645             description: Peer
11646             schema:
11647             description: Sync response
11648             properties:
11649             metadata:
11650             $ref: '#/definitions/NetworkPeer'
11651             status:
11652             description: Status description
11653             example: Success
11654             type: string
11655             status_code:
11656             description: Status code
11657             example: 200
11658             type: integer
11659             type:
11660             description: Response type
11661             example: sync
11662             type: string
11663             type: object
11664             "403":
11665             $ref: '#/responses/Forbidden'
11666             "500":
11667             $ref: '#/responses/InternalServerError'
11668             summary: Get the network peer
11669             tags:
11670             - network-peers
11671             patch:
11672             consumes:
11673             - application/json
11674             description: Updates a subset of the network peering configuration.
11675             operationId: network_peer_patch
11676             parameters:
11677             - description: Project name
11678             example: default
11679             in: query
11680             name: project
11681             type: string
11682             - description: Peer configuration
11683             in: body
11684             name: Peer
11685             required: true
11686             schema:
11687             $ref: '#/definitions/NetworkPeerPut'
11688             produces:
11689             - application/json
11690             responses:
11691             "200":
11692             $ref: '#/responses/EmptySyncResponse'
11693             "400":
11694             $ref: '#/responses/BadRequest'
11695             "403":
11696             $ref: '#/responses/Forbidden'
11697             "412":
11698             $ref: '#/responses/PreconditionFailed'
11699             "500":
11700             $ref: '#/responses/InternalServerError'
11701             summary: Partially update the network peer
11702             tags:
11703             - network-peers
11704             put:
11705             consumes:
11706             - application/json
11707             description: Updates the entire network peering configuration.
11708             operationId: network_peer_put
11709             parameters:
11710             - description: Project name
11711             example: default
11712             in: query
11713             name: project
11714             type: string
11715             - description: Peer configuration
11716             in: body
11717             name: peer
11718             required: true
11719             schema:
11720             $ref: '#/definitions/NetworkPeerPut'
11721             produces:
11722             - application/json
11723             responses:
11724             "200":
11725             $ref: '#/responses/EmptySyncResponse'
11726             "400":
11727             $ref: '#/responses/BadRequest'
11728             "403":
11729             $ref: '#/responses/Forbidden'
11730             "412":
11731             $ref: '#/responses/PreconditionFailed'
11732             "500":
11733             $ref: '#/responses/InternalServerError'
11734             summary: Update the network peer
11735             tags:
11736             - network-peers
11737             /1.0/networks/{networkName}/peers?recursion=1:
11738             get:
11739             description: Returns a list of network peers (structs).
11740             operationId: network_peer_get_recursion1
11741             parameters:
11742             - description: Project name
11743             example: default
11744             in: query
11745             name: project
11746             type: string
11747             produces:
11748             - application/json
11749             responses:
11750             "200":
11751             description: API endpoints
11752             schema:
11753             description: Sync response
11754             properties:
11755             metadata:
11756             description: List of network peers
11757             items:
11758             $ref: '#/definitions/NetworkPeer'
11759             type: array
11760             status:
11761             description: Status description
11762             example: Success
11763             type: string
11764             status_code:
11765             description: Status code
11766             example: 200
11767             type: integer
11768             type:
11769             description: Response type
11770             example: sync
11771             type: string
11772             type: object
11773             "403":
11774             $ref: '#/responses/Forbidden'
11775             "500":
11776             $ref: '#/responses/InternalServerError'
11777             summary: Get the network peers
11778             tags:
11779             - network-peers
11780             /1.0/networks?recursion=1:
11781             get:
11782             description: Returns a list of networks (structs).
11783             operationId: networks_get_recursion1
11784             parameters:
11785             - description: Project name
11786             example: default
11787             in: query
11788             name: project
11789             type: string
11790             produces:
11791             - application/json
11792             responses:
11793             "200":
11794             description: API endpoints
11795             schema:
11796             description: Sync response
11797             properties:
11798             metadata:
11799             description: List of networks
11800             items:
11801             $ref: '#/definitions/Network'
11802             type: array
11803             status:
11804             description: Status description
11805             example: Success
11806             type: string
11807             status_code:
11808             description: Status code
11809             example: 200
11810             type: integer
11811             type:
11812             description: Response type
11813             example: sync
11814             type: string
11815             type: object
11816             "403":
11817             $ref: '#/responses/Forbidden'
11818             "500":
11819             $ref: '#/responses/InternalServerError'
11820             summary: Get the networks
11821             tags:
11822             - networks
11823             /1.0/operations:
11824             get:
11825             description: Returns a dict of operation type to operation list (URLs).
11826             operationId: operations_get
11827             produces:
11828             - application/json
11829             responses:
11830             "200":
11831             description: API endpoints
11832             schema:
11833             description: Sync response
11834             properties:
11835             metadata:
11836             additionalProperties:
11837             items:
11838             type: string
11839             type: array
11840             description: Dict of operation types to operation URLs
11841             example: |-
11842             {
11843             "running": [
11844             "/1.0/operations/6916c8a6-9b7d-4abd-90b3-aedfec7ec7da"
11845             ]
11846             }
11847             type: object
11848             status:
11849             description: Status description
11850             example: Success
11851             type: string
11852             status_code:
11853             description: Status code
11854             example: 200
11855             type: integer
11856             type:
11857             description: Response type
11858             example: sync
11859             type: string
11860             type: object
11861             "403":
11862             $ref: '#/responses/Forbidden'
11863             "500":
11864             $ref: '#/responses/InternalServerError'
11865             summary: Get the operations
11866             tags:
11867             - operations
11868             /1.0/operations/{id}:
11869             delete:
11870             description: Cancels the operation if supported.
11871             operationId: operation_delete
11872             produces:
11873             - application/json
11874             responses:
11875             "200":
11876             $ref: '#/responses/EmptySyncResponse'
11877             "400":
11878             $ref: '#/responses/BadRequest'
11879             "403":
11880             $ref: '#/responses/Forbidden'
11881             "500":
11882             $ref: '#/responses/InternalServerError'
11883             summary: Cancel the operation
11884             tags:
11885             - operations
11886             get:
11887             description: Gets the operation state.
11888             operationId: operation_get
11889             produces:
11890             - application/json
11891             responses:
11892             "200":
11893             description: Operation
11894             schema:
11895             description: Sync response
11896             properties:
11897             metadata:
11898             $ref: '#/definitions/Operation'
11899             status:
11900             description: Status description
11901             example: Success
11902             type: string
11903             status_code:
11904             description: Status code
11905             example: 200
11906             type: integer
11907             type:
11908             description: Response type
11909             example: sync
11910             type: string
11911             type: object
11912             "403":
11913             $ref: '#/responses/Forbidden'
11914             "500":
11915             $ref: '#/responses/InternalServerError'
11916             summary: Get the operation state
11917             tags:
11918             - operations
11919             /1.0/operations/{id}/wait:
11920             get:
11921             description: Waits for the operation to reach a final state (or timeout) and
11922             retrieve its final state.
11923             operationId: operation_wait_get
11924             parameters:
11925             - description: Timeout in seconds (-1 means never)
11926             example: -1
11927             in: query
11928             name: timeout
11929             type: integer
11930             produces:
11931             - application/json
11932             responses:
11933             "200":
11934             description: Operation
11935             schema:
11936             description: Sync response
11937             properties:
11938             metadata:
11939             $ref: '#/definitions/Operation'
11940             status:
11941             description: Status description
11942             example: Success
11943             type: string
11944             status_code:
11945             description: Status code
11946             example: 200
11947             type: integer
11948             type:
11949             description: Response type
11950             example: sync
11951             type: string
11952             type: object
11953             "403":
11954             $ref: '#/responses/Forbidden'
11955             "500":
11956             $ref: '#/responses/InternalServerError'
11957             summary: Wait for the operation
11958             tags:
11959             - operations
11960             /1.0/operations/{id}/wait?public:
11961             get:
11962             description: |-
11963             Waits for the operation to reach a final state (or timeout) and retrieve its final state.
11964              
11965             When accessed by an untrusted user, the secret token must be provided.
11966             operationId: operation_wait_get_untrusted
11967             parameters:
11968             - description: Authentication token
11969             example: random-string
11970             in: query
11971             name: secret
11972             type: string
11973             - description: Timeout in seconds (-1 means never)
11974             example: -1
11975             in: query
11976             name: timeout
11977             type: integer
11978             produces:
11979             - application/json
11980             responses:
11981             "200":
11982             description: Operation
11983             schema:
11984             description: Sync response
11985             properties:
11986             metadata:
11987             $ref: '#/definitions/Operation'
11988             status:
11989             description: Status description
11990             example: Success
11991             type: string
11992             status_code:
11993             description: Status code
11994             example: 200
11995             type: integer
11996             type:
11997             description: Response type
11998             example: sync
11999             type: string
12000             type: object
12001             "403":
12002             $ref: '#/responses/Forbidden'
12003             "500":
12004             $ref: '#/responses/InternalServerError'
12005             summary: Wait for the operation
12006             tags:
12007             - operations
12008             /1.0/operations/{id}/websocket:
12009             get:
12010             description: |-
12011             Connects to an associated websocket stream for the operation.
12012             This should almost never be done directly by a client, instead it's
12013             meant for LXD to LXD communication with the client only relaying the
12014             connection information to the servers.
12015             operationId: operation_websocket_get
12016             parameters:
12017             - description: Authentication token
12018             example: random-string
12019             in: query
12020             name: secret
12021             type: string
12022             produces:
12023             - application/json
12024             responses:
12025             "200":
12026             description: Websocket operation messages (dependent on operation)
12027             "403":
12028             $ref: '#/responses/Forbidden'
12029             "500":
12030             $ref: '#/responses/InternalServerError'
12031             summary: Get the websocket stream
12032             tags:
12033             - operations
12034             /1.0/operations/{id}/websocket?public:
12035             get:
12036             description: |-
12037             Connects to an associated websocket stream for the operation.
12038             This should almost never be done directly by a client, instead it's
12039             meant for LXD to LXD communication with the client only relaying the
12040             connection information to the servers.
12041              
12042             The untrusted endpoint is used by the target server to connect to the source server.
12043             Authentication is performed through the secret token.
12044             operationId: operation_websocket_get_untrusted
12045             parameters:
12046             - description: Authentication token
12047             example: random-string
12048             in: query
12049             name: secret
12050             type: string
12051             produces:
12052             - application/json
12053             responses:
12054             "200":
12055             description: Websocket operation messages (dependent on operation)
12056             "403":
12057             $ref: '#/responses/Forbidden'
12058             "500":
12059             $ref: '#/responses/InternalServerError'
12060             summary: Get the websocket stream
12061             tags:
12062             - operations
12063             /1.0/operations?recursion=1:
12064             get:
12065             description: Returns a list of operations (structs).
12066             operationId: operations_get_recursion1
12067             produces:
12068             - application/json
12069             parameters:
12070             - description: Project name
12071             example: default
12072             in: query
12073             name: project
12074             type: string
12075             responses:
12076             "200":
12077             description: API endpoints
12078             schema:
12079             description: Sync response
12080             properties:
12081             metadata:
12082             description: List of operations
12083             items:
12084             $ref: '#/definitions/Operation'
12085             type: array
12086             status:
12087             description: Status description
12088             example: Success
12089             type: string
12090             status_code:
12091             description: Status code
12092             example: 200
12093             type: integer
12094             type:
12095             description: Response type
12096             example: sync
12097             type: string
12098             type: object
12099             "403":
12100             $ref: '#/responses/Forbidden'
12101             "500":
12102             $ref: '#/responses/InternalServerError'
12103             summary: Get the operations
12104             tags:
12105             - operations
12106             /1.0/profiles:
12107             get:
12108             description: Returns a list of profiles (URLs).
12109             operationId: profiles_get
12110             parameters:
12111             - description: Project name
12112             example: default
12113             in: query
12114             name: project
12115             type: string
12116             produces:
12117             - application/json
12118             responses:
12119             "200":
12120             description: API endpoints
12121             schema:
12122             description: Sync response
12123             properties:
12124             metadata:
12125             description: List of endpoints
12126             example: |-
12127             [
12128             "/1.0/profiles/default",
12129             "/1.0/profiles/foo"
12130             ]
12131             items:
12132             type: string
12133             type: array
12134             status:
12135             description: Status description
12136             example: Success
12137             type: string
12138             status_code:
12139             description: Status code
12140             example: 200
12141             type: integer
12142             type:
12143             description: Response type
12144             example: sync
12145             type: string
12146             type: object
12147             "403":
12148             $ref: '#/responses/Forbidden'
12149             "500":
12150             $ref: '#/responses/InternalServerError'
12151             summary: Get the profiles
12152             tags:
12153             - profiles
12154             post:
12155             consumes:
12156             - application/json
12157             description: Creates a new profile.
12158             operationId: profiles_post
12159             parameters:
12160             - description: Project name
12161             example: default
12162             in: query
12163             name: project
12164             type: string
12165             - description: Profile
12166             in: body
12167             name: profile
12168             required: true
12169             schema:
12170             $ref: '#/definitions/ProfilesPost'
12171             produces:
12172             - application/json
12173             responses:
12174             "200":
12175             $ref: '#/responses/EmptySyncResponse'
12176             "400":
12177             $ref: '#/responses/BadRequest'
12178             "403":
12179             $ref: '#/responses/Forbidden'
12180             "500":
12181             $ref: '#/responses/InternalServerError'
12182             summary: Add a profile
12183             tags:
12184             - profiles
12185             /1.0/profiles/{name}:
12186             delete:
12187             description: Removes the profile.
12188             operationId: profile_delete
12189             parameters:
12190             - description: Project name
12191             example: default
12192             in: query
12193             name: project
12194             type: string
12195             produces:
12196             - application/json
12197             responses:
12198             "200":
12199             $ref: '#/responses/EmptySyncResponse'
12200             "400":
12201             $ref: '#/responses/BadRequest'
12202             "403":
12203             $ref: '#/responses/Forbidden'
12204             "500":
12205             $ref: '#/responses/InternalServerError'
12206             summary: Delete the profile
12207             tags:
12208             - profiles
12209             get:
12210             description: Gets a specific profile.
12211             operationId: profile_get
12212             parameters:
12213             - description: Project name
12214             example: default
12215             in: query
12216             name: project
12217             type: string
12218             produces:
12219             - application/json
12220             responses:
12221             "200":
12222             description: Profile
12223             schema:
12224             description: Sync response
12225             properties:
12226             metadata:
12227             $ref: '#/definitions/Profile'
12228             status:
12229             description: Status description
12230             example: Success
12231             type: string
12232             status_code:
12233             description: Status code
12234             example: 200
12235             type: integer
12236             type:
12237             description: Response type
12238             example: sync
12239             type: string
12240             type: object
12241             "403":
12242             $ref: '#/responses/Forbidden'
12243             "500":
12244             $ref: '#/responses/InternalServerError'
12245             summary: Get the profile
12246             tags:
12247             - profiles
12248             patch:
12249             consumes:
12250             - application/json
12251             description: Updates a subset of the profile configuration.
12252             operationId: profile_patch
12253             parameters:
12254             - description: Project name
12255             example: default
12256             in: query
12257             name: project
12258             type: string
12259             - description: Profile configuration
12260             in: body
12261             name: profile
12262             required: true
12263             schema:
12264             $ref: '#/definitions/ProfilePut'
12265             produces:
12266             - application/json
12267             responses:
12268             "200":
12269             $ref: '#/responses/EmptySyncResponse'
12270             "400":
12271             $ref: '#/responses/BadRequest'
12272             "403":
12273             $ref: '#/responses/Forbidden'
12274             "412":
12275             $ref: '#/responses/PreconditionFailed'
12276             "500":
12277             $ref: '#/responses/InternalServerError'
12278             summary: Partially update the profile
12279             tags:
12280             - profiles
12281             post:
12282             consumes:
12283             - application/json
12284             description: Renames an existing profile.
12285             operationId: profile_post
12286             parameters:
12287             - description: Project name
12288             example: default
12289             in: query
12290             name: project
12291             type: string
12292             - description: Profile rename request
12293             in: body
12294             name: profile
12295             required: true
12296             schema:
12297             $ref: '#/definitions/ProfilePost'
12298             produces:
12299             - application/json
12300             responses:
12301             "200":
12302             $ref: '#/responses/EmptySyncResponse'
12303             "400":
12304             $ref: '#/responses/BadRequest'
12305             "403":
12306             $ref: '#/responses/Forbidden'
12307             "500":
12308             $ref: '#/responses/InternalServerError'
12309             summary: Rename the profile
12310             tags:
12311             - profiles
12312             put:
12313             consumes:
12314             - application/json
12315             description: Updates the entire profile configuration.
12316             operationId: profile_put
12317             parameters:
12318             - description: Project name
12319             example: default
12320             in: query
12321             name: project
12322             type: string
12323             - description: Profile configuration
12324             in: body
12325             name: profile
12326             required: true
12327             schema:
12328             $ref: '#/definitions/ProfilePut'
12329             produces:
12330             - application/json
12331             responses:
12332             "200":
12333             $ref: '#/responses/EmptySyncResponse'
12334             "400":
12335             $ref: '#/responses/BadRequest'
12336             "403":
12337             $ref: '#/responses/Forbidden'
12338             "412":
12339             $ref: '#/responses/PreconditionFailed'
12340             "500":
12341             $ref: '#/responses/InternalServerError'
12342             summary: Update the profile
12343             tags:
12344             - profiles
12345             /1.0/profiles?recursion=1:
12346             get:
12347             description: Returns a list of profiles (structs).
12348             operationId: profiles_get_recursion1
12349             parameters:
12350             - description: Project name
12351             example: default
12352             in: query
12353             name: project
12354             type: string
12355             produces:
12356             - application/json
12357             responses:
12358             "200":
12359             description: API endpoints
12360             schema:
12361             description: Sync response
12362             properties:
12363             metadata:
12364             description: List of profiles
12365             items:
12366             $ref: '#/definitions/Profile'
12367             type: array
12368             status:
12369             description: Status description
12370             example: Success
12371             type: string
12372             status_code:
12373             description: Status code
12374             example: 200
12375             type: integer
12376             type:
12377             description: Response type
12378             example: sync
12379             type: string
12380             type: object
12381             "403":
12382             $ref: '#/responses/Forbidden'
12383             "500":
12384             $ref: '#/responses/InternalServerError'
12385             summary: Get the profiles
12386             tags:
12387             - profiles
12388             /1.0/projects:
12389             get:
12390             description: Returns a list of projects (URLs).
12391             operationId: projects_get
12392             produces:
12393             - application/json
12394             responses:
12395             "200":
12396             description: API endpoints
12397             schema:
12398             description: Sync response
12399             properties:
12400             metadata:
12401             description: List of endpoints
12402             example: |-
12403             [
12404             "/1.0/projects/default",
12405             "/1.0/projects/foo"
12406             ]
12407             items:
12408             type: string
12409             type: array
12410             status:
12411             description: Status description
12412             example: Success
12413             type: string
12414             status_code:
12415             description: Status code
12416             example: 200
12417             type: integer
12418             type:
12419             description: Response type
12420             example: sync
12421             type: string
12422             type: object
12423             "403":
12424             $ref: '#/responses/Forbidden'
12425             "500":
12426             $ref: '#/responses/InternalServerError'
12427             summary: Get the projects
12428             tags:
12429             - projects
12430             post:
12431             consumes:
12432             - application/json
12433             description: Creates a new project.
12434             operationId: projects_post
12435             parameters:
12436             - description: Project
12437             in: body
12438             name: project
12439             required: true
12440             schema:
12441             $ref: '#/definitions/ProjectsPost'
12442             produces:
12443             - application/json
12444             responses:
12445             "200":
12446             $ref: '#/responses/EmptySyncResponse'
12447             "400":
12448             $ref: '#/responses/BadRequest'
12449             "403":
12450             $ref: '#/responses/Forbidden'
12451             "500":
12452             $ref: '#/responses/InternalServerError'
12453             summary: Add a project
12454             tags:
12455             - projects
12456             /1.0/projects/{name}:
12457             delete:
12458             description: Removes the project.
12459             operationId: project_delete
12460             produces:
12461             - application/json
12462             responses:
12463             "200":
12464             $ref: '#/responses/EmptySyncResponse'
12465             "400":
12466             $ref: '#/responses/BadRequest'
12467             "403":
12468             $ref: '#/responses/Forbidden'
12469             "500":
12470             $ref: '#/responses/InternalServerError'
12471             summary: Delete the project
12472             tags:
12473             - projects
12474             get:
12475             description: Gets a specific project.
12476             operationId: project_get
12477             produces:
12478             - application/json
12479             responses:
12480             "200":
12481             description: Project
12482             schema:
12483             description: Sync response
12484             properties:
12485             metadata:
12486             $ref: '#/definitions/Project'
12487             status:
12488             description: Status description
12489             example: Success
12490             type: string
12491             status_code:
12492             description: Status code
12493             example: 200
12494             type: integer
12495             type:
12496             description: Response type
12497             example: sync
12498             type: string
12499             type: object
12500             "403":
12501             $ref: '#/responses/Forbidden'
12502             "500":
12503             $ref: '#/responses/InternalServerError'
12504             summary: Get the project
12505             tags:
12506             - projects
12507             patch:
12508             consumes:
12509             - application/json
12510             description: Updates a subset of the project configuration.
12511             operationId: project_patch
12512             parameters:
12513             - description: Project configuration
12514             in: body
12515             name: project
12516             required: true
12517             schema:
12518             $ref: '#/definitions/ProjectPut'
12519             produces:
12520             - application/json
12521             responses:
12522             "200":
12523             $ref: '#/responses/EmptySyncResponse'
12524             "400":
12525             $ref: '#/responses/BadRequest'
12526             "403":
12527             $ref: '#/responses/Forbidden'
12528             "412":
12529             $ref: '#/responses/PreconditionFailed'
12530             "500":
12531             $ref: '#/responses/InternalServerError'
12532             summary: Partially update the project
12533             tags:
12534             - projects
12535             post:
12536             consumes:
12537             - application/json
12538             description: Renames an existing project.
12539             operationId: project_post
12540             parameters:
12541             - description: Project rename request
12542             in: body
12543             name: project
12544             required: true
12545             schema:
12546             $ref: '#/definitions/ProjectPost'
12547             produces:
12548             - application/json
12549             responses:
12550             "200":
12551             $ref: '#/responses/EmptySyncResponse'
12552             "400":
12553             $ref: '#/responses/BadRequest'
12554             "403":
12555             $ref: '#/responses/Forbidden'
12556             "500":
12557             $ref: '#/responses/InternalServerError'
12558             summary: Rename the project
12559             tags:
12560             - projects
12561             put:
12562             consumes:
12563             - application/json
12564             description: Updates the entire project configuration.
12565             operationId: project_put
12566             parameters:
12567             - description: Project configuration
12568             in: body
12569             name: project
12570             required: true
12571             schema:
12572             $ref: '#/definitions/ProjectPut'
12573             produces:
12574             - application/json
12575             responses:
12576             "200":
12577             $ref: '#/responses/EmptySyncResponse'
12578             "400":
12579             $ref: '#/responses/BadRequest'
12580             "403":
12581             $ref: '#/responses/Forbidden'
12582             "412":
12583             $ref: '#/responses/PreconditionFailed'
12584             "500":
12585             $ref: '#/responses/InternalServerError'
12586             summary: Update the project
12587             tags:
12588             - projects
12589             /1.0/projects/{name}/state:
12590             get:
12591             description: Gets a specific project resource consumption information.
12592             operationId: project_state_get
12593             produces:
12594             - application/json
12595             responses:
12596             "200":
12597             description: Project state
12598             schema:
12599             description: Sync response
12600             properties:
12601             metadata:
12602             $ref: '#/definitions/ProjectState'
12603             status:
12604             description: Status description
12605             example: Success
12606             type: string
12607             status_code:
12608             description: Status code
12609             example: 200
12610             type: integer
12611             type:
12612             description: Response type
12613             example: sync
12614             type: string
12615             type: object
12616             "403":
12617             $ref: '#/responses/Forbidden'
12618             "500":
12619             $ref: '#/responses/InternalServerError'
12620             summary: Get the project state
12621             tags:
12622             - projects
12623             /1.0/projects?recursion=1:
12624             get:
12625             description: Returns a list of projects (structs).
12626             operationId: projects_get_recursion1
12627             produces:
12628             - application/json
12629             responses:
12630             "200":
12631             description: API endpoints
12632             schema:
12633             description: Sync response
12634             properties:
12635             metadata:
12636             description: List of projects
12637             items:
12638             $ref: '#/definitions/Project'
12639             type: array
12640             status:
12641             description: Status description
12642             example: Success
12643             type: string
12644             status_code:
12645             description: Status code
12646             example: 200
12647             type: integer
12648             type:
12649             description: Response type
12650             example: sync
12651             type: string
12652             type: object
12653             "403":
12654             $ref: '#/responses/Forbidden'
12655             "500":
12656             $ref: '#/responses/InternalServerError'
12657             summary: Get the projects
12658             tags:
12659             - projects
12660             /1.0/resources:
12661             get:
12662             description: Gets the hardware information profile of the LXD server.
12663             operationId: resources_get
12664             parameters:
12665             - description: Cluster member name
12666             example: lxd01
12667             in: query
12668             name: target
12669             type: string
12670             produces:
12671             - application/json
12672             responses:
12673             "200":
12674             description: Hardware resources
12675             schema:
12676             description: Sync response
12677             properties:
12678             metadata:
12679             $ref: '#/definitions/Resources'
12680             status:
12681             description: Status description
12682             example: Success
12683             type: string
12684             status_code:
12685             description: Status code
12686             example: 200
12687             type: integer
12688             type:
12689             description: Response type
12690             example: sync
12691             type: string
12692             type: object
12693             "403":
12694             $ref: '#/responses/Forbidden'
12695             "500":
12696             $ref: '#/responses/InternalServerError'
12697             summary: Get system resources information
12698             tags:
12699             - server
12700             /1.0/storage-pools:
12701             get:
12702             description: Returns a list of storage pools (URLs).
12703             operationId: storage_pools_get
12704             parameters:
12705             - description: Project name
12706             example: default
12707             in: query
12708             name: project
12709             type: string
12710             produces:
12711             - application/json
12712             responses:
12713             "200":
12714             description: API endpoints
12715             schema:
12716             description: Sync response
12717             properties:
12718             metadata:
12719             description: List of endpoints
12720             example: |-
12721             [
12722             "/1.0/storage-pools/local",
12723             "/1.0/storage-pools/remote"
12724             ]
12725             items:
12726             type: string
12727             type: array
12728             status:
12729             description: Status description
12730             example: Success
12731             type: string
12732             status_code:
12733             description: Status code
12734             example: 200
12735             type: integer
12736             type:
12737             description: Response type
12738             example: sync
12739             type: string
12740             type: object
12741             "403":
12742             $ref: '#/responses/Forbidden'
12743             "500":
12744             $ref: '#/responses/InternalServerError'
12745             summary: Get the storage pools
12746             tags:
12747             - storage
12748             post:
12749             consumes:
12750             - application/json
12751             description: |-
12752             Creates a new storage pool.
12753             When clustered, storage pools require individual POST for each cluster member prior to a global POST.
12754             operationId: storage_pools_post
12755             parameters:
12756             - description: Project name
12757             example: default
12758             in: query
12759             name: project
12760             type: string
12761             - description: Cluster member name
12762             example: lxd01
12763             in: query
12764             name: target
12765             type: string
12766             - description: Storage pool
12767             in: body
12768             name: storage
12769             required: true
12770             schema:
12771             $ref: '#/definitions/StoragePoolsPost'
12772             produces:
12773             - application/json
12774             responses:
12775             "200":
12776             $ref: '#/responses/EmptySyncResponse'
12777             "400":
12778             $ref: '#/responses/BadRequest'
12779             "403":
12780             $ref: '#/responses/Forbidden'
12781             "500":
12782             $ref: '#/responses/InternalServerError'
12783             summary: Add a storage pool
12784             tags:
12785             - storage
12786             /1.0/storage-pools/{name}:
12787             delete:
12788             description: Removes the storage pool.
12789             operationId: storage_pools_delete
12790             parameters:
12791             - description: Project name
12792             example: default
12793             in: query
12794             name: project
12795             type: string
12796             produces:
12797             - application/json
12798             responses:
12799             "200":
12800             $ref: '#/responses/EmptySyncResponse'
12801             "400":
12802             $ref: '#/responses/BadRequest'
12803             "403":
12804             $ref: '#/responses/Forbidden'
12805             "500":
12806             $ref: '#/responses/InternalServerError'
12807             summary: Delete the storage pool
12808             tags:
12809             - storage
12810             get:
12811             description: Gets a specific storage pool.
12812             operationId: storage_pool_get
12813             parameters:
12814             - description: Project name
12815             example: default
12816             in: query
12817             name: project
12818             type: string
12819             - description: Cluster member name
12820             example: lxd01
12821             in: query
12822             name: target
12823             type: string
12824             produces:
12825             - application/json
12826             responses:
12827             "200":
12828             description: Storage pool
12829             schema:
12830             description: Sync response
12831             properties:
12832             metadata:
12833             $ref: '#/definitions/StoragePool'
12834             status:
12835             description: Status description
12836             example: Success
12837             type: string
12838             status_code:
12839             description: Status code
12840             example: 200
12841             type: integer
12842             type:
12843             description: Response type
12844             example: sync
12845             type: string
12846             type: object
12847             "403":
12848             $ref: '#/responses/Forbidden'
12849             "500":
12850             $ref: '#/responses/InternalServerError'
12851             summary: Get the storage pool
12852             tags:
12853             - storage
12854             patch:
12855             consumes:
12856             - application/json
12857             description: Updates a subset of the storage pool configuration.
12858             operationId: storage_pool_patch
12859             parameters:
12860             - description: Project name
12861             example: default
12862             in: query
12863             name: project
12864             type: string
12865             - description: Cluster member name
12866             example: lxd01
12867             in: query
12868             name: target
12869             type: string
12870             - description: Storage pool configuration
12871             in: body
12872             name: storage pool
12873             required: true
12874             schema:
12875             $ref: '#/definitions/StoragePoolPut'
12876             produces:
12877             - application/json
12878             responses:
12879             "200":
12880             $ref: '#/responses/EmptySyncResponse'
12881             "400":
12882             $ref: '#/responses/BadRequest'
12883             "403":
12884             $ref: '#/responses/Forbidden'
12885             "412":
12886             $ref: '#/responses/PreconditionFailed'
12887             "500":
12888             $ref: '#/responses/InternalServerError'
12889             summary: Partially update the storage pool
12890             tags:
12891             - storage
12892             put:
12893             consumes:
12894             - application/json
12895             description: Updates the entire storage pool configuration.
12896             operationId: storage_pool_put
12897             parameters:
12898             - description: Project name
12899             example: default
12900             in: query
12901             name: project
12902             type: string
12903             - description: Cluster member name
12904             example: lxd01
12905             in: query
12906             name: target
12907             type: string
12908             - description: Storage pool configuration
12909             in: body
12910             name: storage pool
12911             required: true
12912             schema:
12913             $ref: '#/definitions/StoragePoolPut'
12914             produces:
12915             - application/json
12916             responses:
12917             "200":
12918             $ref: '#/responses/EmptySyncResponse'
12919             "400":
12920             $ref: '#/responses/BadRequest'
12921             "403":
12922             $ref: '#/responses/Forbidden'
12923             "412":
12924             $ref: '#/responses/PreconditionFailed'
12925             "500":
12926             $ref: '#/responses/InternalServerError'
12927             summary: Update the storage pool
12928             tags:
12929             - storage
12930             /1.0/storage-pools/{name}/resources:
12931             get:
12932             description: Gets the usage information for the storage pool.
12933             operationId: storage_pool_resources
12934             parameters:
12935             - description: Cluster member name
12936             example: lxd01
12937             in: query
12938             name: target
12939             type: string
12940             produces:
12941             - application/json
12942             responses:
12943             "200":
12944             description: Hardware resources
12945             schema:
12946             description: Sync response
12947             properties:
12948             metadata:
12949             $ref: '#/definitions/ResourcesStoragePool'
12950             status:
12951             description: Status description
12952             example: Success
12953             type: string
12954             status_code:
12955             description: Status code
12956             example: 200
12957             type: integer
12958             type:
12959             description: Response type
12960             example: sync
12961             type: string
12962             type: object
12963             "403":
12964             $ref: '#/responses/Forbidden'
12965             "500":
12966             $ref: '#/responses/InternalServerError'
12967             summary: Get storage pool resources information
12968             tags:
12969             - storage
12970             /1.0/storage-pools/{name}/volumes:
12971             get:
12972             description: Returns a list of storage volumes (URLs).
12973             operationId: storage_pool_volumes_get
12974             parameters:
12975             - description: Project name
12976             example: default
12977             in: query
12978             name: project
12979             type: string
12980             - description: Cluster member name
12981             example: lxd01
12982             in: query
12983             name: target
12984             type: string
12985             - description: Collection filter
12986             example: default
12987             in: query
12988             name: filter
12989             type: string
12990             produces:
12991             - application/json
12992             responses:
12993             "200":
12994             description: API endpoints
12995             schema:
12996             description: Sync response
12997             properties:
12998             metadata:
12999             description: List of endpoints
13000             example: |-
13001             [
13002             "/1.0/storage-pools/local/volumes/container/a1",
13003             "/1.0/storage-pools/local/volumes/container/a2",
13004             "/1.0/storage-pools/local/volumes/custom/backups",
13005             "/1.0/storage-pools/local/volumes/custom/images"
13006             ]
13007             items:
13008             type: string
13009             type: array
13010             status:
13011             description: Status description
13012             example: Success
13013             type: string
13014             status_code:
13015             description: Status code
13016             example: 200
13017             type: integer
13018             type:
13019             description: Response type
13020             example: sync
13021             type: string
13022             type: object
13023             "403":
13024             $ref: '#/responses/Forbidden'
13025             "500":
13026             $ref: '#/responses/InternalServerError'
13027             summary: Get the storage volumes
13028             tags:
13029             - storage
13030             post:
13031             consumes:
13032             - application/json
13033             description: Creates a new storage volume.
13034             operationId: storage_pool_volumes_post
13035             parameters:
13036             - description: Project name
13037             example: default
13038             in: query
13039             name: project
13040             type: string
13041             - description: Cluster member name
13042             example: lxd01
13043             in: query
13044             name: target
13045             type: string
13046             - description: Storage volume
13047             in: body
13048             name: volume
13049             required: true
13050             schema:
13051             $ref: '#/definitions/StorageVolumesPost'
13052             produces:
13053             - application/json
13054             responses:
13055             "202":
13056             $ref: '#/responses/Operation'
13057             "400":
13058             $ref: '#/responses/BadRequest'
13059             "403":
13060             $ref: '#/responses/Forbidden'
13061             "500":
13062             $ref: '#/responses/InternalServerError'
13063             summary: Add a storage volume
13064             tags:
13065             - storage
13066             /1.0/storage-pools/{name}/volumes/{type}:
13067             get:
13068             description: Returns a list of storage volumes (URLs) (type specific endpoint).
13069             operationId: storage_pool_volumes_type_get
13070             parameters:
13071             - description: Project name
13072             example: default
13073             in: query
13074             name: project
13075             type: string
13076             - description: Cluster member name
13077             example: lxd01
13078             in: query
13079             name: target
13080             type: string
13081             produces:
13082             - application/json
13083             responses:
13084             "200":
13085             description: API endpoints
13086             schema:
13087             description: Sync response
13088             properties:
13089             metadata:
13090             description: List of endpoints
13091             example: |-
13092             [
13093             "/1.0/storage-pools/local/volumes/custom/backups",
13094             "/1.0/storage-pools/local/volumes/custom/images"
13095             ]
13096             items:
13097             type: string
13098             type: array
13099             status:
13100             description: Status description
13101             example: Success
13102             type: string
13103             status_code:
13104             description: Status code
13105             example: 200
13106             type: integer
13107             type:
13108             description: Response type
13109             example: sync
13110             type: string
13111             type: object
13112             "403":
13113             $ref: '#/responses/Forbidden'
13114             "500":
13115             $ref: '#/responses/InternalServerError'
13116             summary: Get the storage volumes
13117             tags:
13118             - storage
13119             post:
13120             consumes:
13121             - application/json
13122             description: Creates a new storage volume (type specific endpoint).
13123             operationId: storage_pool_volumes_type_post
13124             parameters:
13125             - description: Project name
13126             example: default
13127             in: query
13128             name: project
13129             type: string
13130             - description: Cluster member name
13131             example: lxd01
13132             in: query
13133             name: target
13134             type: string
13135             - description: Storage volume
13136             in: body
13137             name: volume
13138             required: true
13139             schema:
13140             $ref: '#/definitions/StorageVolumesPost'
13141             produces:
13142             - application/json
13143             responses:
13144             "202":
13145             $ref: '#/responses/Operation'
13146             "400":
13147             $ref: '#/responses/BadRequest'
13148             "403":
13149             $ref: '#/responses/Forbidden'
13150             "500":
13151             $ref: '#/responses/InternalServerError'
13152             summary: Add a storage volume
13153             tags:
13154             - storage
13155             /1.0/storage-pools/{name}/volumes/{type}/{volume}:
13156             delete:
13157             description: Removes the storage volume.
13158             operationId: storage_pool_volume_type_delete
13159             parameters:
13160             - description: Project name
13161             example: default
13162             in: query
13163             name: project
13164             type: string
13165             - description: Cluster member name
13166             example: lxd01
13167             in: query
13168             name: target
13169             type: string
13170             produces:
13171             - application/json
13172             responses:
13173             "200":
13174             $ref: '#/responses/EmptySyncResponse'
13175             "400":
13176             $ref: '#/responses/BadRequest'
13177             "403":
13178             $ref: '#/responses/Forbidden'
13179             "500":
13180             $ref: '#/responses/InternalServerError'
13181             summary: Delete the storage volume
13182             tags:
13183             - storage
13184             get:
13185             description: Gets a specific storage volume.
13186             operationId: storage_pool_volume_type_get
13187             parameters:
13188             - description: Project name
13189             example: default
13190             in: query
13191             name: project
13192             type: string
13193             - description: Cluster member name
13194             example: lxd01
13195             in: query
13196             name: target
13197             type: string
13198             produces:
13199             - application/json
13200             responses:
13201             "200":
13202             description: Storage volume
13203             schema:
13204             description: Sync response
13205             properties:
13206             metadata:
13207             $ref: '#/definitions/StorageVolume'
13208             status:
13209             description: Status description
13210             example: Success
13211             type: string
13212             status_code:
13213             description: Status code
13214             example: 200
13215             type: integer
13216             type:
13217             description: Response type
13218             example: sync
13219             type: string
13220             type: object
13221             "403":
13222             $ref: '#/responses/Forbidden'
13223             "500":
13224             $ref: '#/responses/InternalServerError'
13225             summary: Get the storage volume
13226             tags:
13227             - storage
13228             patch:
13229             consumes:
13230             - application/json
13231             description: Updates a subset of the storage volume configuration.
13232             operationId: storage_pool_volume_type_patch
13233             parameters:
13234             - description: Project name
13235             example: default
13236             in: query
13237             name: project
13238             type: string
13239             - description: Cluster member name
13240             example: lxd01
13241             in: query
13242             name: target
13243             type: string
13244             - description: Storage volume configuration
13245             in: body
13246             name: storage volume
13247             required: true
13248             schema:
13249             $ref: '#/definitions/StorageVolumePut'
13250             produces:
13251             - application/json
13252             responses:
13253             "200":
13254             $ref: '#/responses/EmptySyncResponse'
13255             "400":
13256             $ref: '#/responses/BadRequest'
13257             "403":
13258             $ref: '#/responses/Forbidden'
13259             "412":
13260             $ref: '#/responses/PreconditionFailed'
13261             "500":
13262             $ref: '#/responses/InternalServerError'
13263             summary: Partially update the storage volume
13264             tags:
13265             - storage
13266             post:
13267             consumes:
13268             - application/json
13269             description: |-
13270             Renames, moves a storage volume between pools or migrates an instance to another server.
13271              
13272             The returned operation metadata will vary based on what's requested.
13273             For rename or move within the same server, this is a simple background operation with progress data.
13274             For migration, in the push case, this will similarly be a background
13275             operation with progress data, for the pull case, it will be a websocket
13276             operation with a number of secrets to be passed to the target server.
13277             operationId: storage_pool_volume_type_post
13278             parameters:
13279             - description: Project name
13280             example: default
13281             in: query
13282             name: project
13283             type: string
13284             - description: Cluster member name
13285             example: lxd01
13286             in: query
13287             name: target
13288             type: string
13289             - description: Migration request
13290             in: body
13291             name: migration
13292             schema:
13293             $ref: '#/definitions/StorageVolumePost'
13294             produces:
13295             - application/json
13296             responses:
13297             "202":
13298             $ref: '#/responses/Operation'
13299             "400":
13300             $ref: '#/responses/BadRequest'
13301             "403":
13302             $ref: '#/responses/Forbidden'
13303             "500":
13304             $ref: '#/responses/InternalServerError'
13305             summary: Rename or move/migrate a storage volume
13306             tags:
13307             - storage
13308             put:
13309             consumes:
13310             - application/json
13311             description: Updates the entire storage volume configuration.
13312             operationId: storage_pool_volume_type_put
13313             parameters:
13314             - description: Project name
13315             example: default
13316             in: query
13317             name: project
13318             type: string
13319             - description: Cluster member name
13320             example: lxd01
13321             in: query
13322             name: target
13323             type: string
13324             - description: Storage volume configuration
13325             in: body
13326             name: storage volume
13327             required: true
13328             schema:
13329             $ref: '#/definitions/StorageVolumePut'
13330             produces:
13331             - application/json
13332             responses:
13333             "200":
13334             $ref: '#/responses/EmptySyncResponse'
13335             "400":
13336             $ref: '#/responses/BadRequest'
13337             "403":
13338             $ref: '#/responses/Forbidden'
13339             "412":
13340             $ref: '#/responses/PreconditionFailed'
13341             "500":
13342             $ref: '#/responses/InternalServerError'
13343             summary: Update the storage volume
13344             tags:
13345             - storage
13346             /1.0/storage-pools/{name}/volumes/{type}/{volume}/backups:
13347             get:
13348             description: Returns a list of storage volume backups (URLs).
13349             operationId: storage_pool_volumes_type_backups_get
13350             parameters:
13351             - description: Project name
13352             example: default
13353             in: query
13354             name: project
13355             type: string
13356             - description: Cluster member name
13357             example: lxd01
13358             in: query
13359             name: target
13360             type: string
13361             produces:
13362             - application/json
13363             responses:
13364             "200":
13365             description: API endpoints
13366             schema:
13367             description: Sync response
13368             properties:
13369             metadata:
13370             description: List of endpoints
13371             example: |-
13372             [
13373             "/1.0/storage-pools/local/volumes/custom/foo/backups/backup0",
13374             "/1.0/storage-pools/local/volumes/custom/foo/backups/backup1"
13375             ]
13376             items:
13377             type: string
13378             type: array
13379             status:
13380             description: Status description
13381             example: Success
13382             type: string
13383             status_code:
13384             description: Status code
13385             example: 200
13386             type: integer
13387             type:
13388             description: Response type
13389             example: sync
13390             type: string
13391             type: object
13392             "403":
13393             $ref: '#/responses/Forbidden'
13394             "500":
13395             $ref: '#/responses/InternalServerError'
13396             summary: Get the storage volume backups
13397             tags:
13398             - storage
13399             post:
13400             consumes:
13401             - application/json
13402             description: Creates a new storage volume backup.
13403             operationId: storage_pool_volumes_type_backups_post
13404             parameters:
13405             - description: Project name
13406             example: default
13407             in: query
13408             name: project
13409             type: string
13410             - description: Cluster member name
13411             example: lxd01
13412             in: query
13413             name: target
13414             type: string
13415             - description: Storage volume backup
13416             in: body
13417             name: volume
13418             required: true
13419             schema:
13420             $ref: '#/definitions/StoragePoolVolumeBackupsPost'
13421             produces:
13422             - application/json
13423             responses:
13424             "202":
13425             $ref: '#/responses/Operation'
13426             "400":
13427             $ref: '#/responses/BadRequest'
13428             "403":
13429             $ref: '#/responses/Forbidden'
13430             "500":
13431             $ref: '#/responses/InternalServerError'
13432             summary: Create a storage volume backup
13433             tags:
13434             - storage
13435             /1.0/storage-pools/{name}/volumes/{type}/{volume}/backups/{backup}:
13436             delete:
13437             consumes:
13438             - application/json
13439             description: Deletes a new storage volume backup.
13440             operationId: storage_pool_volumes_type_backup_delete
13441             parameters:
13442             - description: Project name
13443             example: default
13444             in: query
13445             name: project
13446             type: string
13447             - description: Cluster member name
13448             example: lxd01
13449             in: query
13450             name: target
13451             type: string
13452             produces:
13453             - application/json
13454             responses:
13455             "202":
13456             $ref: '#/responses/Operation'
13457             "400":
13458             $ref: '#/responses/BadRequest'
13459             "403":
13460             $ref: '#/responses/Forbidden'
13461             "500":
13462             $ref: '#/responses/InternalServerError'
13463             summary: Delete a storage volume backup
13464             tags:
13465             - storage
13466             get:
13467             description: Gets a specific storage volume backup.
13468             operationId: storage_pool_volumes_type_backup_get
13469             parameters:
13470             - description: Project name
13471             example: default
13472             in: query
13473             name: project
13474             type: string
13475             - description: Cluster member name
13476             example: lxd01
13477             in: query
13478             name: target
13479             type: string
13480             produces:
13481             - application/json
13482             responses:
13483             "200":
13484             description: Storage volume backup
13485             schema:
13486             description: Sync response
13487             properties:
13488             metadata:
13489             $ref: '#/definitions/StoragePoolVolumeBackup'
13490             status:
13491             description: Status description
13492             example: Success
13493             type: string
13494             status_code:
13495             description: Status code
13496             example: 200
13497             type: integer
13498             type:
13499             description: Response type
13500             example: sync
13501             type: string
13502             type: object
13503             "403":
13504             $ref: '#/responses/Forbidden'
13505             "500":
13506             $ref: '#/responses/InternalServerError'
13507             summary: Get the storage volume backup
13508             tags:
13509             - storage
13510             post:
13511             consumes:
13512             - application/json
13513             description: Renames a storage volume backup.
13514             operationId: storage_pool_volumes_type_backup_post
13515             parameters:
13516             - description: Project name
13517             example: default
13518             in: query
13519             name: project
13520             type: string
13521             - description: Cluster member name
13522             example: lxd01
13523             in: query
13524             name: target
13525             type: string
13526             - description: Storage volume backup
13527             in: body
13528             name: volume rename
13529             required: true
13530             schema:
13531             $ref: '#/definitions/StorageVolumeSnapshotPost'
13532             produces:
13533             - application/json
13534             responses:
13535             "202":
13536             $ref: '#/responses/Operation'
13537             "400":
13538             $ref: '#/responses/BadRequest'
13539             "403":
13540             $ref: '#/responses/Forbidden'
13541             "500":
13542             $ref: '#/responses/InternalServerError'
13543             summary: Rename a storage volume backup
13544             tags:
13545             - storage
13546             /1.0/storage-pools/{name}/volumes/{type}/{volume}/backups/{backup}/export:
13547             get:
13548             description: Download the raw backup file from the server.
13549             operationId: storage_pool_volumes_type_backup_export_get
13550             parameters:
13551             - description: Project name
13552             example: default
13553             in: query
13554             name: project
13555             type: string
13556             - description: Cluster member name
13557             example: lxd01
13558             in: query
13559             name: target
13560             type: string
13561             produces:
13562             - application/octet-stream
13563             responses:
13564             "200":
13565             description: Raw backup data
13566             "403":
13567             $ref: '#/responses/Forbidden'
13568             "500":
13569             $ref: '#/responses/InternalServerError'
13570             summary: Get the raw backup file
13571             tags:
13572             - storage
13573             /1.0/storage-pools/{name}/volumes/{type}/{volume}/backups?recursion=1:
13574             get:
13575             description: Returns a list of storage volume backups (structs).
13576             operationId: storage_pool_volumes_type_backups_get_recursion1
13577             parameters:
13578             - description: Project name
13579             example: default
13580             in: query
13581             name: project
13582             type: string
13583             - description: Cluster member name
13584             example: lxd01
13585             in: query
13586             name: target
13587             type: string
13588             produces:
13589             - application/json
13590             responses:
13591             "200":
13592             description: API endpoints
13593             schema:
13594             description: Sync response
13595             properties:
13596             metadata:
13597             description: List of storage volume backups
13598             items:
13599             $ref: '#/definitions/StoragePoolVolumeBackup'
13600             type: array
13601             status:
13602             description: Status description
13603             example: Success
13604             type: string
13605             status_code:
13606             description: Status code
13607             example: 200
13608             type: integer
13609             type:
13610             description: Response type
13611             example: sync
13612             type: string
13613             type: object
13614             "403":
13615             $ref: '#/responses/Forbidden'
13616             "500":
13617             $ref: '#/responses/InternalServerError'
13618             summary: Get the storage volume backups
13619             tags:
13620             - storage
13621             /1.0/storage-pools/{name}/volumes/{type}/{volume}/snapshots:
13622             get:
13623             description: Returns a list of storage volume snapshots (URLs).
13624             operationId: storage_pool_volumes_type_snapshots_get
13625             parameters:
13626             - description: Project name
13627             example: default
13628             in: query
13629             name: project
13630             type: string
13631             - description: Cluster member name
13632             example: lxd01
13633             in: query
13634             name: target
13635             type: string
13636             produces:
13637             - application/json
13638             responses:
13639             "200":
13640             description: API endpoints
13641             schema:
13642             description: Sync response
13643             properties:
13644             metadata:
13645             description: List of endpoints
13646             example: |-
13647             [
13648             "/1.0/storage-pools/local/volumes/custom/foo/snapshots/snap0",
13649             "/1.0/storage-pools/local/volumes/custom/foo/snapshots/snap1"
13650             ]
13651             items:
13652             type: string
13653             type: array
13654             status:
13655             description: Status description
13656             example: Success
13657             type: string
13658             status_code:
13659             description: Status code
13660             example: 200
13661             type: integer
13662             type:
13663             description: Response type
13664             example: sync
13665             type: string
13666             type: object
13667             "403":
13668             $ref: '#/responses/Forbidden'
13669             "500":
13670             $ref: '#/responses/InternalServerError'
13671             summary: Get the storage volume snapshots
13672             tags:
13673             - storage
13674             post:
13675             consumes:
13676             - application/json
13677             description: Creates a new storage volume snapshot.
13678             operationId: storage_pool_volumes_type_snapshots_post
13679             parameters:
13680             - description: Project name
13681             example: default
13682             in: query
13683             name: project
13684             type: string
13685             - description: Cluster member name
13686             example: lxd01
13687             in: query
13688             name: target
13689             type: string
13690             - description: Storage volume snapshot
13691             in: body
13692             name: volume
13693             required: true
13694             schema:
13695             $ref: '#/definitions/StorageVolumeSnapshotsPost'
13696             produces:
13697             - application/json
13698             responses:
13699             "202":
13700             $ref: '#/responses/Operation'
13701             "400":
13702             $ref: '#/responses/BadRequest'
13703             "403":
13704             $ref: '#/responses/Forbidden'
13705             "500":
13706             $ref: '#/responses/InternalServerError'
13707             summary: Create a storage volume snapshot
13708             tags:
13709             - storage
13710             /1.0/storage-pools/{name}/volumes/{type}/{volume}/snapshots/{snapshot}:
13711             delete:
13712             consumes:
13713             - application/json
13714             description: Deletes a new storage volume snapshot.
13715             operationId: storage_pool_volumes_type_snapshot_delete
13716             parameters:
13717             - description: Project name
13718             example: default
13719             in: query
13720             name: project
13721             type: string
13722             - description: Cluster member name
13723             example: lxd01
13724             in: query
13725             name: target
13726             type: string
13727             produces:
13728             - application/json
13729             responses:
13730             "202":
13731             $ref: '#/responses/Operation'
13732             "400":
13733             $ref: '#/responses/BadRequest'
13734             "403":
13735             $ref: '#/responses/Forbidden'
13736             "500":
13737             $ref: '#/responses/InternalServerError'
13738             summary: Delete a storage volume snapshot
13739             tags:
13740             - storage
13741             get:
13742             description: Gets a specific storage volume snapshot.
13743             operationId: storage_pool_volumes_type_snapshot_get
13744             parameters:
13745             - description: Project name
13746             example: default
13747             in: query
13748             name: project
13749             type: string
13750             - description: Cluster member name
13751             example: lxd01
13752             in: query
13753             name: target
13754             type: string
13755             produces:
13756             - application/json
13757             responses:
13758             "200":
13759             description: Storage volume snapshot
13760             schema:
13761             description: Sync response
13762             properties:
13763             metadata:
13764             $ref: '#/definitions/StorageVolumeSnapshot'
13765             status:
13766             description: Status description
13767             example: Success
13768             type: string
13769             status_code:
13770             description: Status code
13771             example: 200
13772             type: integer
13773             type:
13774             description: Response type
13775             example: sync
13776             type: string
13777             type: object
13778             "403":
13779             $ref: '#/responses/Forbidden'
13780             "500":
13781             $ref: '#/responses/InternalServerError'
13782             summary: Get the storage volume snapshot
13783             tags:
13784             - storage
13785             patch:
13786             consumes:
13787             - application/json
13788             description: Updates a subset of the storage volume snapshot configuration.
13789             operationId: storage_pool_volumes_type_snapshot_patch
13790             parameters:
13791             - description: Project name
13792             example: default
13793             in: query
13794             name: project
13795             type: string
13796             - description: Cluster member name
13797             example: lxd01
13798             in: query
13799             name: target
13800             type: string
13801             - description: Storage volume snapshot configuration
13802             in: body
13803             name: storage volume snapshot
13804             required: true
13805             schema:
13806             $ref: '#/definitions/StorageVolumeSnapshotPut'
13807             produces:
13808             - application/json
13809             responses:
13810             "200":
13811             $ref: '#/responses/EmptySyncResponse'
13812             "400":
13813             $ref: '#/responses/BadRequest'
13814             "403":
13815             $ref: '#/responses/Forbidden'
13816             "412":
13817             $ref: '#/responses/PreconditionFailed'
13818             "500":
13819             $ref: '#/responses/InternalServerError'
13820             summary: Partially update the storage volume snapshot
13821             tags:
13822             - storage
13823             post:
13824             consumes:
13825             - application/json
13826             description: Renames a storage volume snapshot.
13827             operationId: storage_pool_volumes_type_snapshot_post
13828             parameters:
13829             - description: Project name
13830             example: default
13831             in: query
13832             name: project
13833             type: string
13834             - description: Cluster member name
13835             example: lxd01
13836             in: query
13837             name: target
13838             type: string
13839             - description: Storage volume snapshot
13840             in: body
13841             name: volume rename
13842             required: true
13843             schema:
13844             $ref: '#/definitions/StorageVolumeSnapshotPost'
13845             produces:
13846             - application/json
13847             responses:
13848             "202":
13849             $ref: '#/responses/Operation'
13850             "400":
13851             $ref: '#/responses/BadRequest'
13852             "403":
13853             $ref: '#/responses/Forbidden'
13854             "500":
13855             $ref: '#/responses/InternalServerError'
13856             summary: Rename a storage volume snapshot
13857             tags:
13858             - storage
13859             put:
13860             consumes:
13861             - application/json
13862             description: Updates the entire storage volume snapshot configuration.
13863             operationId: storage_pool_volumes_type_snapshot_put
13864             parameters:
13865             - description: Project name
13866             example: default
13867             in: query
13868             name: project
13869             type: string
13870             - description: Cluster member name
13871             example: lxd01
13872             in: query
13873             name: target
13874             type: string
13875             - description: Storage volume snapshot configuration
13876             in: body
13877             name: storage volume snapshot
13878             required: true
13879             schema:
13880             $ref: '#/definitions/StorageVolumeSnapshotPut'
13881             produces:
13882             - application/json
13883             responses:
13884             "200":
13885             $ref: '#/responses/EmptySyncResponse'
13886             "400":
13887             $ref: '#/responses/BadRequest'
13888             "403":
13889             $ref: '#/responses/Forbidden'
13890             "412":
13891             $ref: '#/responses/PreconditionFailed'
13892             "500":
13893             $ref: '#/responses/InternalServerError'
13894             summary: Update the storage volume snapshot
13895             tags:
13896             - storage
13897             /1.0/storage-pools/{name}/volumes/{type}/{volume}/snapshots?recursion=1:
13898             get:
13899             description: Returns a list of storage volume snapshots (structs).
13900             operationId: storage_pool_volumes_type_snapshots_get_recursion1
13901             parameters:
13902             - description: Project name
13903             example: default
13904             in: query
13905             name: project
13906             type: string
13907             - description: Cluster member name
13908             example: lxd01
13909             in: query
13910             name: target
13911             type: string
13912             produces:
13913             - application/json
13914             responses:
13915             "200":
13916             description: API endpoints
13917             schema:
13918             description: Sync response
13919             properties:
13920             metadata:
13921             description: List of storage volume snapshots
13922             items:
13923             $ref: '#/definitions/StorageVolumeSnapshot'
13924             type: array
13925             status:
13926             description: Status description
13927             example: Success
13928             type: string
13929             status_code:
13930             description: Status code
13931             example: 200
13932             type: integer
13933             type:
13934             description: Response type
13935             example: sync
13936             type: string
13937             type: object
13938             "403":
13939             $ref: '#/responses/Forbidden'
13940             "500":
13941             $ref: '#/responses/InternalServerError'
13942             summary: Get the storage volume snapshots
13943             tags:
13944             - storage
13945             /1.0/storage-pools/{name}/volumes/{type}/{volume}/state:
13946             get:
13947             description: Gets a specific storage volume state (usage data).
13948             operationId: storage_pool_volume_type_state_get
13949             parameters:
13950             - description: Project name
13951             example: default
13952             in: query
13953             name: project
13954             type: string
13955             - description: Cluster member name
13956             example: lxd01
13957             in: query
13958             name: target
13959             type: string
13960             produces:
13961             - application/json
13962             responses:
13963             "200":
13964             description: Storage pool
13965             schema:
13966             description: Sync response
13967             properties:
13968             metadata:
13969             $ref: '#/definitions/StorageVolumeState'
13970             status:
13971             description: Status description
13972             example: Success
13973             type: string
13974             status_code:
13975             description: Status code
13976             example: 200
13977             type: integer
13978             type:
13979             description: Response type
13980             example: sync
13981             type: string
13982             type: object
13983             "403":
13984             $ref: '#/responses/Forbidden'
13985             "500":
13986             $ref: '#/responses/InternalServerError'
13987             summary: Get the storage volume state
13988             tags:
13989             - storage
13990             /1.0/storage-pools/{name}/volumes/{type}?recursion=1:
13991             get:
13992             description: Returns a list of storage volumes (structs) (type specific endpoint).
13993             operationId: storage_pool_volumes_type_get_recursion1
13994             parameters:
13995             - description: Project name
13996             example: default
13997             in: query
13998             name: project
13999             type: string
14000             - description: Cluster member name
14001             example: lxd01
14002             in: query
14003             name: target
14004             type: string
14005             produces:
14006             - application/json
14007             responses:
14008             "200":
14009             description: API endpoints
14010             schema:
14011             description: Sync response
14012             properties:
14013             metadata:
14014             description: List of storage volumes
14015             items:
14016             $ref: '#/definitions/StorageVolume'
14017             type: array
14018             status:
14019             description: Status description
14020             example: Success
14021             type: string
14022             status_code:
14023             description: Status code
14024             example: 200
14025             type: integer
14026             type:
14027             description: Response type
14028             example: sync
14029             type: string
14030             type: object
14031             "403":
14032             $ref: '#/responses/Forbidden'
14033             "500":
14034             $ref: '#/responses/InternalServerError'
14035             summary: Get the storage volumes
14036             tags:
14037             - storage
14038             /1.0/storage-pools/{name}/volumes?recursion=1:
14039             get:
14040             description: Returns a list of storage volumes (structs).
14041             operationId: storage_pool_volumes_get_recursion1
14042             parameters:
14043             - description: Project name
14044             example: default
14045             in: query
14046             name: project
14047             type: string
14048             - description: Cluster member name
14049             example: lxd01
14050             in: query
14051             name: target
14052             type: string
14053             - description: Collection filter
14054             example: default
14055             in: query
14056             name: filter
14057             type: string
14058             produces:
14059             - application/json
14060             responses:
14061             "200":
14062             description: API endpoints
14063             schema:
14064             description: Sync response
14065             properties:
14066             metadata:
14067             description: List of storage volumes
14068             items:
14069             $ref: '#/definitions/StorageVolume'
14070             type: array
14071             status:
14072             description: Status description
14073             example: Success
14074             type: string
14075             status_code:
14076             description: Status code
14077             example: 200
14078             type: integer
14079             type:
14080             description: Response type
14081             example: sync
14082             type: string
14083             type: object
14084             "403":
14085             $ref: '#/responses/Forbidden'
14086             "500":
14087             $ref: '#/responses/InternalServerError'
14088             summary: Get the storage volumes
14089             tags:
14090             - storage
14091             /1.0/storage-pools?recursion=1:
14092             get:
14093             description: Returns a list of storage pools (structs).
14094             operationId: storage_pools_get_recursion1
14095             parameters:
14096             - description: Project name
14097             example: default
14098             in: query
14099             name: project
14100             type: string
14101             produces:
14102             - application/json
14103             responses:
14104             "200":
14105             description: API endpoints
14106             schema:
14107             description: Sync response
14108             properties:
14109             metadata:
14110             description: List of storage pools
14111             items:
14112             $ref: '#/definitions/StoragePool'
14113             type: array
14114             status:
14115             description: Status description
14116             example: Success
14117             type: string
14118             status_code:
14119             description: Status code
14120             example: 200
14121             type: integer
14122             type:
14123             description: Response type
14124             example: sync
14125             type: string
14126             type: object
14127             "403":
14128             $ref: '#/responses/Forbidden'
14129             "500":
14130             $ref: '#/responses/InternalServerError'
14131             summary: Get the storage pools
14132             tags:
14133             - storage
14134             /1.0/warnings:
14135             get:
14136             description: Returns a list of warnings.
14137             operationId: warnings_get
14138             parameters:
14139             - description: Project name
14140             example: default
14141             in: query
14142             name: project
14143             type: string
14144             produces:
14145             - application/json
14146             responses:
14147             "200":
14148             description: Sync response
14149             schema:
14150             description: Sync response
14151             properties:
14152             metadata:
14153             description: List of endpoints
14154             example: |-
14155             [
14156             "/1.0/warnings/39c61a48-cc17-40ae-8248-4f7b4cadedf4",
14157             "/1.0/warnings/951779a5-2820-4d96-b01e-88fe820e5310"
14158             ]
14159             items:
14160             type: string
14161             type: array
14162             status:
14163             description: Status description
14164             example: Success
14165             type: string
14166             status_code:
14167             description: Status code
14168             example: 200
14169             type: integer
14170             type:
14171             description: Response type
14172             example: sync
14173             type: string
14174             type: object
14175             "500":
14176             $ref: '#/responses/InternalServerError'
14177             summary: List the warnings
14178             tags:
14179             - warnings
14180             /1.0/warnings/{uuid}:
14181             delete:
14182             description: Removes the warning.
14183             operationId: warning_delete
14184             produces:
14185             - application/json
14186             responses:
14187             "200":
14188             $ref: '#/responses/EmptySyncResponse'
14189             "500":
14190             $ref: '#/responses/InternalServerError'
14191             summary: Delete the warning
14192             tags:
14193             - warnings
14194             get:
14195             description: Gets a specific warning.
14196             operationId: warning_get
14197             produces:
14198             - application/json
14199             responses:
14200             "200":
14201             description: Warning
14202             schema:
14203             description: Sync response
14204             properties:
14205             metadata:
14206             $ref: '#/definitions/Warning'
14207             status:
14208             description: Status description
14209             example: Success
14210             type: string
14211             status_code:
14212             description: Status code
14213             example: 200
14214             type: integer
14215             type:
14216             description: Response type
14217             example: sync
14218             type: string
14219             type: object
14220             "404":
14221             $ref: '#/responses/NotFound'
14222             "500":
14223             $ref: '#/responses/InternalServerError'
14224             summary: Get the warning
14225             tags:
14226             - warnings
14227             patch:
14228             consumes:
14229             - application/json
14230             description: Updates a subset of the warning status.
14231             operationId: warning_patch
14232             parameters:
14233             - description: Warning status
14234             in: body
14235             name: warning
14236             required: true
14237             schema:
14238             $ref: '#/definitions/WarningPut'
14239             produces:
14240             - application/json
14241             responses:
14242             "200":
14243             $ref: '#/responses/EmptySyncResponse'
14244             "400":
14245             $ref: '#/responses/BadRequest'
14246             "403":
14247             $ref: '#/responses/Forbidden'
14248             "500":
14249             $ref: '#/responses/InternalServerError'
14250             summary: Partially update the warning
14251             tags:
14252             - warnings
14253             put:
14254             consumes:
14255             - application/json
14256             description: Updates the warning status.
14257             operationId: warning_put
14258             parameters:
14259             - description: Warning status
14260             in: body
14261             name: warning
14262             required: true
14263             schema:
14264             $ref: '#/definitions/WarningPut'
14265             produces:
14266             - application/json
14267             responses:
14268             "200":
14269             $ref: '#/responses/EmptySyncResponse'
14270             "400":
14271             $ref: '#/responses/BadRequest'
14272             "403":
14273             $ref: '#/responses/Forbidden'
14274             "500":
14275             $ref: '#/responses/InternalServerError'
14276             summary: Update the warning
14277             tags:
14278             - warnings
14279             /1.0/warnings?recursion=1:
14280             get:
14281             description: Returns a list of warnings (structs).
14282             operationId: warnings_get_recursion1
14283             parameters:
14284             - description: Project name
14285             example: default
14286             in: query
14287             name: project
14288             type: string
14289             produces:
14290             - application/json
14291             responses:
14292             "200":
14293             description: API endpoints
14294             schema:
14295             description: Sync response
14296             properties:
14297             metadata:
14298             description: List of warnings
14299             items:
14300             $ref: '#/definitions/Warning'
14301             type: array
14302             status:
14303             description: Status description
14304             example: Success
14305             type: string
14306             status_code:
14307             description: Status code
14308             example: 200
14309             type: integer
14310             type:
14311             description: Response type
14312             example: sync
14313             type: string
14314             type: object
14315             "500":
14316             $ref: '#/responses/InternalServerError'
14317             summary: Get the warnings
14318             tags:
14319             - warnings
14320             /1.0?public:
14321             get:
14322             description: |-
14323             Shows a small subset of the server environment and configuration
14324             which is required by untrusted clients to reach a server.
14325              
14326             The `?public` part of the URL isn't required, it's simply used to
14327             separate the two behaviors of this endpoint.
14328             operationId: server_get_untrusted
14329             produces:
14330             - application/json
14331             responses:
14332             "200":
14333             description: Server environment and configuration
14334             schema:
14335             description: Sync response
14336             properties:
14337             metadata:
14338             $ref: '#/definitions/ServerUntrusted'
14339             status:
14340             description: Status description
14341             example: Success
14342             type: string
14343             status_code:
14344             description: Status code
14345             example: 200
14346             type: integer
14347             type:
14348             description: Response type
14349             example: sync
14350             type: string
14351             type: object
14352             "500":
14353             $ref: '#/responses/InternalServerError'
14354             summary: Get the server environment
14355             tags:
14356             - server
14357             responses:
14358             BadRequest:
14359             description: Bad Request
14360             schema:
14361             properties:
14362             code:
14363             example: 400
14364             format: int64
14365             type: integer
14366             x-go-name: Code
14367             error:
14368             example: bad request
14369             type: string
14370             x-go-name: Error
14371             type:
14372             example: error
14373             type: string
14374             x-go-name: Type
14375             type: object
14376             EmptySyncResponse:
14377             description: Empty sync response
14378             schema:
14379             properties:
14380             status:
14381             example: Success
14382             type: string
14383             x-go-name: Status
14384             status_code:
14385             example: 200
14386             format: int64
14387             type: integer
14388             x-go-name: StatusCode
14389             type:
14390             example: sync
14391             type: string
14392             x-go-name: Type
14393             type: object
14394             Forbidden:
14395             description: Forbidden
14396             schema:
14397             properties:
14398             code:
14399             example: 403
14400             format: int64
14401             type: integer
14402             x-go-name: Code
14403             error:
14404             example: not authorized
14405             type: string
14406             x-go-name: Error
14407             type:
14408             example: error
14409             type: string
14410             x-go-name: Type
14411             type: object
14412             InternalServerError:
14413             description: Internal Server Error
14414             schema:
14415             properties:
14416             code:
14417             example: 500
14418             format: int64
14419             type: integer
14420             x-go-name: Code
14421             error:
14422             example: internal server error
14423             type: string
14424             x-go-name: Error
14425             type:
14426             example: error
14427             type: string
14428             x-go-name: Type
14429             type: object
14430             NotFound:
14431             description: Not found
14432             schema:
14433             properties:
14434             code:
14435             example: 404
14436             format: int64
14437             type: integer
14438             x-go-name: Code
14439             error:
14440             example: not found
14441             type: string
14442             x-go-name: Error
14443             type:
14444             example: error
14445             type: string
14446             x-go-name: Type
14447             type: object
14448             Operation:
14449             description: Operation
14450             schema:
14451             properties:
14452             metadata:
14453             $ref: '#/definitions/Operation'
14454             operation:
14455             example: /1.0/operations/66e83638-9dd7-4a26-aef2-5462814869a1
14456             type: string
14457             x-go-name: Operation
14458             status:
14459             example: Operation created
14460             type: string
14461             x-go-name: Status
14462             status_code:
14463             example: 100
14464             format: int64
14465             type: integer
14466             x-go-name: StatusCode
14467             type:
14468             example: async
14469             type: string
14470             x-go-name: Type
14471             type: object
14472             PreconditionFailed:
14473             description: Precondition Failed
14474             schema:
14475             properties:
14476             code:
14477             example: 412
14478             format: int64
14479             type: integer
14480             x-go-name: Code
14481             error:
14482             example: precondition failed
14483             type: string
14484             x-go-name: Error
14485             type:
14486             example: error
14487             type: string
14488             x-go-name: Type
14489             type: object
14490             swagger: "2.0"