Fix DSQL SDK token generation example (#3937)
Motivation and Context
This example doesn’t reflect the token generation API accurately, this PR fixes that.
Description
Fix the example by using the right API.
Testing
Documentation update on an ignored code block, no testing required
Checklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Smithy Rust
Smithy code generators for Rust that generate clients, servers, and the entire AWS SDK. The latest unreleased SDK build can be found in aws-sdk-rust/next.
Design documentation
All internal and external interfaces are considered unstable and subject to change without notice.
Setup
./gradlew
will setup gradle for you. JDK 17 is required.stable-2
, i.e. the currentstable
Rust version and the prior two versions. Older versions may work.Development
For development, pre-commit hooks make it easier to pass automated linting when opening a pull request. Setup:
Project Layout
aws
: AWS specific codegen & Rust code (signing, endpoints, customizations, etc.) Common commands:./gradlew :aws:sdk:assemble
: Generate (but do not test / compile etc.) a fresh SDK intosdk/build/aws-sdk
./gradlew :aws:sdk:sdkTest
: Generate & run all tests for a fresh SDK. (Note that these tests require Go to be installed for FIP support to compile properly)./gradlew :aws:sdk:{cargoCheck, cargoTest, cargoDocs, cargoClippy}
: Generate & run specified cargo command.codegen-core
: Common code generation logic useful for clients and serverscodegen-client
: Whitelabel Smithy client code generationcodegen-client-test
: Smithy protocol test generation & integration tests for Smithy client whitelabel codedesign
: Design documentation. See the design/README.md for details about building / viewing.codegen-server
: Whitelabel Smithy server code generationcodegen-server-test
: Smithy protocol test generation & integration tests for Smithy server whitelabel codeexamples
: A collection of server implementation examplesTesting
Running all of smithy-rs’s tests can take a very long time, so it’s better to know which parts to test based on the changes being made, and allow continuous integration to find other issues when posting a pull request.
In general, the components of smithy-rs affect each other in the following order (with earlier affecting later):
rust-runtime
codegen
andcodegen-server
aws/rust-runtime
aws/sdk-codegen
Some components, such as
codegen-client-test
andcodegen-server-test
, are purely for testing other components.Testing
rust-runtime
andaws/rust-runtime
To test the
rust-runtime
crates:To test the
aws/rust-runtime
crates:Some runtime crates have a
additional-ci
script that can also be run. These scripts often requirecargo-hack
andcargo-udeps
to be installed.Testing Client/Server Codegen
To test the code generation, the following can be used:
Several Kotlin unit tests generate Rust projects and compile them. When these fail, they typically output links to the location of the generated code so that it can be inspected.
To look at generated code when the codegen tests fail, check these paths depending on the test suite that’s failing:
codegen-client-test/build/smithyprojections/codegen-client-test
codegen-server-test/build/smithyprojections/codegen-server-test
Testing SDK Codegen
See the readme in
aws/sdk/
for more information about these targets as they can be configured to generate more or less AWS service clients.The generated SDK will be placed in
aws/sdk/build/aws-sdk
.