Generating new code
Creating a new client operation¶
If you want to create a new operation to a client, you may just generate it and complete the test stubs. Below is an example to generate an operation for DynamoDB.
- Clone the async-aws/aws repository.
- Run
composer install - Run
./generate DynamoDband press "1" for generate a new operation. - Select the operation you want to generate. Don't generate operations that you don't need.
- Use the AWS Api Reference to fill the expected Input/Result.
If you started working on a new operation, please submit a "Draft PR" to show your progress. Don't hesitate asking for help.
Creating a new client¶
If you want to create a new AWS client, there are a few steps to take. Below is an example for DynamoDB.
- Clone the async-aws/aws repository.
- Run
composer install - Copy
./src/Service/.templateto./src/Service/DynamoDb - Replace all occurrences of
FoobartoDynamoDbandfoobartodynamo-db - Rename
FoobarClientintoDynamoDbClient - Add
dynamoDbmethod to the client factorysrc/Core/src/AwsClientFactory.php - Register the service in the
servicessection of the./manifest.jsonfile.- Look at the official SDK for resources in
./src/data. (DynamoDB example) - Add a link to
source, and, if the files exists, links todocumentation,example,pagination,waiteretc. - Leave the
methodskey empty. ("methods": []) - Provide the base URL to the AWS API reference (use AWS or Google)
- Look at the official SDK for resources in
- Configure the autoload section of
./composer.jsonto include the new service ("AsyncAws\\DynamoDb\\": "src/Service/DynamoDb/src") - Do the same thing with the autoload-dev section of
./composer.json. - Run
composer dump-autoload - Add the operations you want following the process previously defined
- Update the packages overview section of the root
README.mdfile - Create a
./docs/clients/dynamodb.mdfile documenting the client - Update the
./docs/clients/index.mdand./couscous.ymlfiles to point to the new client documentation - Add the new client in
./src/Integration/Symfony/Bundle/src/DependencyInjection/AwsPackagesProvider.php - Update the
./CHANGELOG.md
If you started working on a new client, please submit a "Draft PR" to show your progress. Don't hesitate asking for help.