Convert AWS CloudFormation Resource Specification to OpenAPI 3.0.0
- run
sh download-and-preprocess-defs.sh
- run
python3 get_cc_supported_resources.py > cc_supported_resources.js
(requiresAWS_ACCESS_KEY_ID
andAWS_SECRET_ACCESS_KEY
env vars to be set) - run
npm install
- run
node index.js
output openapi3 specs (components/schemas
) are written to src/aws/v00.00.00000/services
- ensure the
AWS_ACCESS_KEY_ID
andAWS_SECRET_ACCESS_KEY
environment variables are set - download the latest
stackql
binary, for examplecurl -L https://bit.ly/stackql-zip -O && unzip stackql-zip
for Linux systems - run the following:
PROVIDER_REGISTRY_ROOT_DIR="$(pwd)"
REG_STR='{"url": "file://'${PROVIDER_REGISTRY_ROOT_DIR}'", "localDocRoot": "'${PROVIDER_REGISTRY_ROOT_DIR}'", "verifyConfig": {"nopVerify": true}}'
./stackql shell --registry="${REG_STR}"
- run
stackql
commands, for example
select * from aws.s3.buckets WHERE region = 'us-east-1';
select bucket_name, region, bucket_encryption_server_side_encryption_configuration from aws.s3.bucket WHERE region = 'us-east-1' and data__Identifier = 'stackql-trial-bucket-01';
from the stackql-provider-tests
directory:
cd /mnt/c/LocalGitRepos/stackql/core/stackql-provider-tests
# aws
sh test-provider.sh \
aws \
false \
/mnt/c/LocalGitRepos/stackql/openapi-conversion/aws-cfn-schema-to-openapi \
true
cd /mnt/c/LocalGitRepos/stackql/openapi-conversion/aws-cfn-schema-to-openapi
Use the following script to generate user docs with Docusaurus front matter for AWS view resources:
node lib/utils/generate-docs.js
output markdown docs are written to aws-docs
To troubleshoot AWS Cloud Control API requests (mutation requests), use the following queries:
select * from aws.cloud_control.resource_requests
where data__ResourceRequestStatusFilter = '{"OperationStatuses": ["FAILED"], "Operations": ["CREATE"]}'
and region = 'ap-southeast-2';
--or
select * from aws.cloud_control.resource_requests
where data__ResourceRequestStatusFilter = '{"OperationStatuses": ["FAILED"], "Operations": ["DELETE"]}'
and region = 'us-east-1';
--or
select * from aws.cloud_control.resource_requests
where data__ResourceRequestStatusFilter = '{"OperationStatuses": ["SUCCESS"], "Operations": ["UPDATE"]}'
and region = 'ap-southeast-2';
(replace region
accordingly)
select * from aws.cloud_control.resource_request
where data__RequestToken = '54061545-e0a0-4ef0-b213-41fda81d8c24'
and region = 'ap-southeast-2';
(replace region
and data__RequestToken
accordingly)
See here for newly added or updated Cloud Control resources.