API-Docker
view release on metacpan or search on metacpan
lib/API/Docker/Role/Entity/Config.pm view on Meta::CPAN
the token's meaning: an update built on a stale entity is refused by the
daemon rather than silently overwriting whatever changed in between.
=head2 inspect
my $fresh = $config->inspect;
Get fresh config information. Returns another L<API::Docker::Type::Config> --
the same class, since the daemon describes a config one way.
=head2 update
my %spec = %{ $config->spec->TO_JSON };
delete $spec{Data}; # already base64 -- see below
$spec{Labels} = { app => 'web' };
$config->update(%spec);
Update the config. Passes C<< ->id >> and, by default, L</version_index> to
L<API::Docker::API::Configs/update>; everything else is the spec and becomes
the request body.
The default is only a default. A C<version> key in the arguments is used
verbatim and removed before the spec goes out -- the spec's own fields are all
capitalised (C<Name>, C<Labels>, C<Data>, ...), so a lowercase C<version>
cannot collide with one:
$config->update(version => $index, %spec);
A C<Data> passed here is raw bytes and gets encoded on the way out, so the
C<Data> that C<< $config->spec->TO_JSON >> brings along -- already base64 --
would be encoded a second time. Drop it, or pass L</decoded_data> in its
place.
=head2 remove
$config->remove;
Remove the config. The daemon answers 204 with no body, so this returns
nothing.
=head1 SEE ALSO
=over
=item * L<API::Docker::API::Configs> - the operations these forward to
=item * L<API::Docker::Type::Config> - the fields C<list> and C<inspect>
return
=item * L<API::Docker::Role::Entity::Secret> - the same shape for a value
that cannot be read back
=item * L<API::Docker::Role::Entity> - why the methods live in a role
=back
=head1 SUPPORT
=head2 Issues
Please report bugs and feature requests on GitHub at
L<https://github.com/Getty/p5-api-docker/issues>.
=head1 CONTRIBUTING
Contributions are welcome! Please fork the repository and submit a pull request.
=head1 AUTHOR
Torsten Raudssus <getty@cpan.org>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2026 by Torsten Raudssus <torsten@raudssus.de> L<https://raudssus.de/>.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut
( run in 1.519 second using v1.01-cache-2.11-cpan-364913b4093 )