NAME
amzn-api - create and describe Amazon::API service classes from Botocore
SYNOPSIS
amzn-api [options] command [arguments]
# generate an Amazon::API::S3 stub in the current directory
amzn-api -b /path/to/botocore create-stub s3
# dump a service's normalized Botocore description as JSON
amzn-api describe-service sqs
# list every service, or one field of one service
amzn-api list-services
amzn-api list-services sqs --filter protocol
DESCRIPTION
Amazon::API::CLI is the modulino behind the amzn-api command. It provides the commands used to generate Amazon::API service classes from a Botocore checkout and to inspect the Botocore metadata those classes are built from. It composes Amazon::API::Role::Botocore, Amazon::API::Role::Services, and Amazon::API::Role::ModuleNames.
Most users will only use create-stub (and occasionally describe-service or list-services) to produce and inspect a service class. The create-module-names and create-services commands are maintenance commands used to regenerate the metadata artifacts that Amazon::API ships (botocore-metadata.api and services.api); they are not part of ordinary use.
Commands
- create-stub [service]
-
Generate an
Amazon::API::<Service>stub -- the.pmplus its.api.gzmetadata image -- into--output-path(default: the current directory). The service may be given as an argument or via--service; the module suffix is taken from--module-nameor resolved automatically from the service name. This is the command that produces a usable service class.amzn-api -b /path/to/botocore create-stub s3 - describe-service service|all
-
Print the normalized Botocore description for a service as pretty JSON, or for every service when given
all. - list-services [service]
-
Print the discovered service index as JSON. Given a service name, print just that entry -- or a single field of it when
--filteris supplied. Services are read from--botocore-path, or, when none is given, from thebotocore-metadata.apiregistry shipped withAmazon::API. - get-module-name service
-
Print the
Amazon::APImodule suffix for a service, e.g.stsyieldsSTS. - create-module-names
-
Maintenance command. Rebuild the
botocore-metadata.apiregistry (the service-to-module-name and metadata map) into--output-path. Used to regenerate the metadataAmazon::APIships; not normally run by end users. - create-services
-
Maintenance command. Rebuild the
services.apiregistry (per-service protocol and content-type data) into--output-path-- file name from--file, default services.api, with--limitcapping the number processed. Likecreate-module-names, this produces a shipped artifact and is not part of ordinary use.
Options
- -b, --botocore-path=path
-
Path to the Botocore checkout (the directory containing
botocore/). Defaults to the current directory or$BOTOCORE_PATH. - -o, --output-path=path
-
Directory for generated output. Defaults to the current directory.
- -s, --service=name
-
Service name, as an alternative to passing it as an argument.
- -m, --module-name=name
-
Override the
Amazon::APImodule suffix used bycreate-stub. - --filter=key
-
With
list-services, print only the named field of a service entry rather than the whole entry. - -f, --file=name
-
Output file name for
create-services(default services.api). - -l, --limit=n
-
Cap the number of services processed by
create-services. - --metadata, --nometadata
-
Include decoded service metadata when building a registry. On by default.
- -P, --pager, --nopager
-
Page long output. On by default.
- -h, --help
-
Print usage.
LICENSE AND COPYRIGHT
This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.