App-pepper
view release on metacpan or search on metacpan
lib/App/pepper.pm view on Meta::CPAN
pepper (id@host)> create domain example.xyz period 1 registrant sh8013 admin sh8013 tech sh8013 billing sh8013 ns ns0.example.com ns ns1.example.net
=head3 Creating Host Objects
Syntax:
create host HOSTNAME [IP [IP [IP [...]]]]
Create a host object with the specified C<HOSTNAME>. IP address may also be
specified: IPv4 and IPv6 addresses are automatically detected.
=head3 Creating Contact Objects
There are two ways of creating a contact:
clone contact OLD NEW
This command creates the contact C<NEW> using the same data as C<OLD>.
create contact PARAMS
This command creates a contact object according to the parameters specified. C<PARAMS> consists of pairs of name and (optionally quoted) value pairs as follows:
=over
=item * C<id> - contact ID. If not provided, a random 16-charater ID will be generated
=item * C<type> - specify the "type" attribute for the postal address information. Only one type is supported. Possible values are "int" (default) and "loc".
=item * C<name> - contact name
=item * C<org> - contact organisation
=item * C<street> - street address, may be provided multiple times
=item * C<city> - city
=item * C<sp> - state/province
=item * C<pc> - postcode
=item * C<cc> - ISO-3166-alpha2 country code
=item * C<voice> - E164 voice number
=item * C<fax> - E164 fax number
=item * C<email> - email address
=item * C<authinfo> - authInfo code. A random string will be used if not provided.
=back
Example:
pepper (id@host)> create contact id "sh8013" name "John Doe" org "Example Inc." type int street "123 Example Dr." city Dulles sp VA pc 20166-6503 cc US voice +1.7035555555 email jdoe@example.com
=head2 Object Updates
Objects may be updated using the C<update> command.
=head3 Domain Updates
update domain DOMAIN CHANGES
The C<CHANGES> argument consists of groups of three values: an action (ie C<add>, C<rem> or C<chg>), followed by a property name (e.g. C<ns>, a contact type (such as C<admin>, C<tech> or C<billing>) or C<status>), followed by a value.
Example:
update domain example.com add ns ns0.example.com
update domain example.com rem ns ns0.example.com
update domain example.com add status clientUpdateProhibited
update domain example.com rem status clientHold
update domain example.com add admin H12345
update domain example.com rem tech H54321
update domain example.com chg registrant H54321
update domain example.cm chg authinfo foo2bar
Multiple changes can be combined in a single command:
update domain example.com add status clientUpdateProhibited rem ns ns0.example.com chg registrant H54321
=head3 Host Updates
Syntax:
update host HOSTNAME CHANGES
The C<CHANGES> argument consists of groups of three values: an action (ie C<add>, C<rem> or C<chg>), followed by a property name (ie C<addr>, C<status> or C<name>), followed by a value (which may be quoted).
Examples:
update host ns0.example.com add status clientUpdateProhibited
update host ns0.example.com rem addr 10.0.0.1
update host ns0.example.com chg name ns0.example.net
Multiple changes can be combined in a single command:
update host ns0.example.com add status clientUpdateProhibited rem addr 10.0.0.1 add addr 1::1 chg name ns0.example.net
=head3 Contact Updates
update contact ID CHANGES
The C<CHANGES> argument consists of groups of three values: an action (ie C<add>, C<rem> or C<chg>), followed by a property name, followed by a value (which may be quoted, and may be empty). The property name may be one of:
=over
=item * C<status>
=item * C<name>
=item * C<type> (either "C<int>" or "C<loc>", which applies to all subsequent values, and which may appear multiple times)
=item * C<org>
=item * C<street1>, C<street2>, C<street3>
=item * C<city>
=item * C<sp>
=item * C<pc>
=item * C<cc>
=item * C<voice>
=item * C<fax>
=item * C<email>
=item * C<authInfo>
=back
If postal address information is being changed, then any values not specified in the command line will be populated from the existing object information. This is because contact information is updated atomically.
Examples:
pepper (id@host)> create contact id "sh8013" name "John Doe" org "Example Inc." type int street "123 Example Dr." city Dulles sp VA pc 20166-6503 cc US voice email jdoe@example.com
update contact sh8013 chg email example@example.com
update contact sh8013 chg voice +1.7035555555
update contact sh8013 street1 "123 Example Dr." street2 "" street3 ""
update contact city Dulles sp VA pc 20166-6503 cc US
update contact authInfo foo2bar
=head2 Object Transfers
Object transfers may be managed with the C<transfer> command. Usage:
transfer TYPE OBJECT CMD [AUTHINFO [PERIOD]]
where:
=over
=item * C<TYPE> - C<domain> or C<contact>
=item * C<OBJECT> - domain name or contact ID
=item * C<CMD> - one of (C<request>, C<query>, C<approve>, C<reject>, or C<cancel>)
=item * C<AUTHINFO> - authInfo code (used with C<request> only)
=item * C<PERIOD> - additional validity period (used with domain C<request> only)
=back
=head2 Errors
If you prefix a command with a C<!> character, then Pepper will end the session if an EPP command fails (that is, if the result code of the response is 2000 or higher).
This is mostly useful in scripting mode where you may want the script to terminate if an error occurs.
Example usage:
!create domain example.com authinfo foo2bar
update domain example.com add ns ns0.example.com
In the above example, Pepper will end the session if the first command fails, since there is no point in running the second command if the first has failed.
=head1 INSTALLATION
To install, run:
cpanm --sudo App::pepper
If L<Term::ReadLine::Gnu> is available, then Pepper can provide a richer interactive command line, with support for history and rich command editing.
=head1 RUNNING VIA DOCKER
( run in 1.495 second using v1.01-cache-2.11-cpan-75ffa21a3d4 )