Generate the Java SDK of an API in API Gateway - Amazon API Gateway

Generate the Java SDK of an API in API Gateway

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. For Platform, 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 the pom.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 the pom.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.