Generate the Java SDK of an API in API Gateway (original) (raw)

The following procedure shows how to generate the Java SDK of an API in API Gateway.

To generate the Java SDK of an API in API Gateway
  1. Sign in to the API Gateway console at https://console.aws.amazon.com/apigateway.
  2. Choose a REST API.
  3. Choose Stages.
  4. In the Stages pane, select the name of the stage.
  5. Open the Stage actions menu, and then choose Generate SDK.
  6. ForPlatform, choose the Java platform and do the following:
    1. 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.
    2. 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.
    3. For Java Build System, enter maven or gradle to specify the build system.
    4. 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.
    5. 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 the pom.xml file, which is in the SDK's project folder.
    6. 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.
    7. For Source Code License Text, enter the license text of your source code, if any.
  7. 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.

Simple calculator API OpenAPI definition

Generate the Android SDK of an API in API Gateway

Did this page help you? - Yes

Thanks for letting us know we're doing a good job!

If you've got a moment, please tell us what we did right so we can do more of it.

Did this page help you? - No

Thanks for letting us know this page needs work. We're sorry we let you down.

If you've got a moment, please tell us how we can make the documentation better.