Generate the Java SDK of an API
To generate the Java SDK of an API in API Gateway
Sign in to the API Gateway console at https://console.aws.amazon.com/apigateway
. Choose a REST API.
-
Choose Stages.
-
In the Stages pane, select the name of the stage.
-
Open the Stage actions menu, and then choose Generate SDK.
-
For Platform, choose the Java platform and do the following:
-
For Service Name, specify the name of your SDK. For example,
SimpleCalcSdk
. This becomes the name of your SDK client class. The name corresponds to the<name>
tag under<project>
in the pom.xml file, which is in the SDK's project folder. Do not include hyphens. -
For Java Package Name, specify a package name for your SDK. For example,
examples.aws.apig.simpleCalc.sdk
. This package name is used as the namespace of your SDK library. Do not include hyphens. -
For Java Build System, enter
maven
orgradle
to specify the build system. -
For Java Group Id, enter a group identifier for your SDK project. For example, enter
my-apig-api-examples
. This identifier corresponds to the<groupId>
tag under<project>
in thepom.xml
file, which is in the SDK's project folder. -
For Java Artifact Id, enter an artifact identifier for your SDK project. For example, enter
simple-calc-sdk
. This identifier corresponds to the<artifactId>
tag under<project>
in thepom.xml
file, which is in the SDK's project folder. -
For Java Artifact Version, enter a version identifier string. For example,
1.0.0
. This version identifier corresponds to the<version>
tag under<project>
in thepom.xml
file, which is in the SDK's project folder. -
For Source Code License Text, enter the license text of your source code, if any.
-
-
Choose Generate SDK, and then follow the on-screen directions to download the SDK generated by API Gateway.
Follow the instructions in Use a Java SDK generated by API Gateway for a REST API to use the generated SDK.
Every time you update an API, you must redeploy the API and regenerate the SDK to have the updates included.