{"id":6252,"date":"2019-09-02T19:13:20","date_gmt":"2019-09-02T19:13:20","guid":{"rendered":"http:\/\/www.garysieling.com\/blog\/?p=6252"},"modified":"2020-03-30T02:38:37","modified_gmt":"2020-03-30T02:38:37","slug":"how-to-get-a-list-of-all-cloudformation-types-in-javascript","status":"publish","type":"post","link":"https:\/\/www.garysieling.com\/blog\/how-to-get-a-list-of-all-cloudformation-types-in-javascript\/","title":{"rendered":"How to get a list of all Cloudformation types in Javascript"},"content":{"rendered":"<p>The AWS CDK has a JSON file that describes available AWS types. You can install it like so:<\/p>\n<pre lang=\"bash\">npm install --save @aws-cdk\/cfnspec\n<\/pre>\n<p>Retrieve the types:<\/p>\n<pre lang=\"javascript\">const cdk = require('@aws-cdk\/cfnspec');\n\nconsole.log(_.keys(cdk.specification().ResourceTypes));\n<\/pre>\n<p>Example output:<\/p>\n<pre>[\n  'AWS::AmazonMQ::Broker',\n  'AWS::AmazonMQ::Configuration',\n  'AWS::AmazonMQ::ConfigurationAssociation',\n  'AWS::Amplify::App',\n  'AWS::Amplify::Branch',\n  'AWS::Amplify::Domain',\n  'AWS::ApiGateway::Account',\n  'AWS::ApiGateway::ApiKey',\n  'AWS::ApiGateway::Authorizer',\n  'AWS::ApiGateway::BasePathMapping',\n  'AWS::ApiGateway::ClientCertificate',\n  'AWS::ApiGateway::Deployment',\n  'AWS::ApiGateway::DocumentationPart',\n  'AWS::ApiGateway::DocumentationVersion',\n  'AWS::ApiGateway::DomainName',\n  'AWS::ApiGateway::GatewayResponse',\n  'AWS::ApiGateway::Method',\n  'AWS::ApiGateway::Model',\n  'AWS::ApiGateway::RequestValidator',\n  'AWS::ApiGateway::Resource',\n  'AWS::ApiGateway::RestApi',\n  'AWS::ApiGateway::Stage',\n  'AWS::ApiGateway::UsagePlan',\n  'AWS::ApiGateway::UsagePlanKey',\n  'AWS::ApiGateway::VpcLink',\n  'AWS::ApiGatewayV2::Api',\n  'AWS::ApiGatewayV2::ApiMapping',\n  'AWS::ApiGatewayV2::Authorizer',\n  'AWS::ApiGatewayV2::Deployment',\n  'AWS::ApiGatewayV2::DomainName',\n  'AWS::ApiGatewayV2::Integration',\n  'AWS::ApiGatewayV2::IntegrationResponse',\n  'AWS::ApiGatewayV2::Model',\n  'AWS::ApiGatewayV2::Route',\n  'AWS::ApiGatewayV2::RouteResponse',\n  'AWS::ApiGatewayV2::Stage',\n  'AWS::AppMesh::Mesh',\n  'AWS::AppMesh::Route',\n  'AWS::AppMesh::VirtualNode',\n  'AWS::AppMesh::VirtualRouter',\n  'AWS::AppMesh::VirtualService',\n  'AWS::AppStream::DirectoryConfig',\n  'AWS::AppStream::Fleet',\n  'AWS::AppStream::ImageBuilder',\n  'AWS::AppStream::Stack',\n  'AWS::AppStream::StackFleetAssociation',\n  'AWS::AppStream::StackUserAssociation',\n  'AWS::AppStream::User',\n  'AWS::AppSync::ApiKey',\n  'AWS::AppSync::DataSource',\n  'AWS::AppSync::FunctionConfiguration',\n  'AWS::AppSync::GraphQLApi',\n  'AWS::AppSync::GraphQLSchema',\n  'AWS::AppSync::Resolver',\n  'AWS::ApplicationAutoScaling::ScalableTarget',\n  'AWS::ApplicationAutoScaling::ScalingPolicy',\n  'AWS::Athena::NamedQuery',\n  'AWS::AutoScaling::AutoScalingGroup',\n  'AWS::AutoScaling::LaunchConfiguration',\n  'AWS::AutoScaling::LifecycleHook',\n  'AWS::AutoScaling::ScalingPolicy',\n  'AWS::AutoScaling::ScheduledAction',\n  'AWS::AutoScalingPlans::ScalingPlan',\n  'AWS::Backup::BackupPlan',\n  'AWS::Backup::BackupSelection',\n  'AWS::Backup::BackupVault',\n  'AWS::Batch::ComputeEnvironment',\n  'AWS::Batch::JobDefinition',\n  'AWS::Batch::JobQueue',\n  'AWS::Budgets::Budget',\n  'AWS::CertificateManager::Certificate',\n  'AWS::Cloud9::EnvironmentEC2',\n  'AWS::CloudFormation::CustomResource',\n  'AWS::CloudFormation::Macro',\n  'AWS::CloudFormation::Stack',\n  'AWS::CloudFormation::WaitCondition',\n  'AWS::CloudFormation::WaitConditionHandle',\n  'AWS::CloudFront::CloudFrontOriginAccessIdentity',\n  'AWS::CloudFront::Distribution',\n  'AWS::CloudFront::StreamingDistribution',\n  'AWS::CloudTrail::Trail',\n  'AWS::CloudWatch::Alarm',\n  'AWS::CloudWatch::AnomalyDetector',\n  'AWS::CloudWatch::Dashboard',\n  'AWS::CodeBuild::Project',\n  'AWS::CodeBuild::SourceCredential',\n  'AWS::CodeCommit::Repository',\n  'AWS::CodeDeploy::Application',\n  'AWS::CodeDeploy::DeploymentConfig',\n  'AWS::CodeDeploy::DeploymentGroup',\n  'AWS::CodePipeline::CustomActionType',\n  'AWS::CodePipeline::Pipeline',\n  'AWS::CodePipeline::Webhook',\n  'AWS::CodeStar::GitHubRepository',\n  'AWS::Cognito::IdentityPool',\n  'AWS::Cognito::IdentityPoolRoleAttachment',\n  'AWS::Cognito::UserPool',\n  'AWS::Cognito::UserPoolClient',\n  'AWS::Cognito::UserPoolGroup',\n  'AWS::Cognito::UserPoolUser',\n  ... 351 more items\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Get a list of Cloudformation types from JavaScript<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[4,8],"tags":[71,114,302],"aioseo_notices":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/6252"}],"collection":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/comments?post=6252"}],"version-history":[{"count":1,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/6252\/revisions"}],"predecessor-version":[{"id":6449,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/6252\/revisions\/6449"}],"wp:attachment":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/media?parent=6252"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/categories?post=6252"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/tags?post=6252"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}