Module: Awspec::Generator::Doc::Type
- Defined in:
- lib/awspec/generator/doc/type.rb,
lib/awspec/generator/doc/type/mq.rb,
lib/awspec/generator/doc/type/acm.rb,
lib/awspec/generator/doc/type/alb.rb,
lib/awspec/generator/doc/type/ami.rb,
lib/awspec/generator/doc/type/ebs.rb,
lib/awspec/generator/doc/type/ec2.rb,
lib/awspec/generator/doc/type/efs.rb,
lib/awspec/generator/doc/type/eip.rb,
lib/awspec/generator/doc/type/eks.rb,
lib/awspec/generator/doc/type/elb.rb,
lib/awspec/generator/doc/type/emr.rb,
lib/awspec/generator/doc/type/kms.rb,
lib/awspec/generator/doc/type/msk.rb,
lib/awspec/generator/doc/type/nlb.rb,
lib/awspec/generator/doc/type/rds.rb,
lib/awspec/generator/doc/type/sqs.rb,
lib/awspec/generator/doc/type/vpc.rb,
lib/awspec/generator/doc/type/base.rb,
lib/awspec/generator/doc/type/lambda.rb,
lib/awspec/generator/doc/type/subnet.rb,
lib/awspec/generator/doc/type/account.rb,
lib/awspec/generator/doc/type/kinesis.rb,
lib/awspec/generator/doc/type/firehose.rb,
lib/awspec/generator/doc/type/iam_role.rb,
lib/awspec/generator/doc/type/iam_user.rb,
lib/awspec/generator/doc/type/redshift.rb,
lib/awspec/generator/doc/type/codebuild.rb,
lib/awspec/generator/doc/type/iam_group.rb,
lib/awspec/generator/doc/type/rds_proxy.rb,
lib/awspec/generator/doc/type/s3_bucket.rb,
lib/awspec/generator/doc/type/sns_topic.rb,
lib/awspec/generator/doc/type/apigateway.rb,
lib/awspec/generator/doc/type/cloudtrail.rb,
lib/awspec/generator/doc/type/codedeploy.rb,
lib/awspec/generator/doc/type/iam_policy.rb,
lib/awspec/generator/doc/type/ecs_cluster.rb,
lib/awspec/generator/doc/type/ecs_service.rb,
lib/awspec/generator/doc/type/elasticache.rb,
lib/awspec/generator/doc/type/nat_gateway.rb,
lib/awspec/generator/doc/type/network_acl.rb,
lib/awspec/generator/doc/type/route_table.rb,
lib/awspec/generator/doc/type/vpn_gateway.rb,
lib/awspec/generator/doc/type/waf_web_acl.rb,
lib/awspec/generator/doc/type/alb_listener.rb,
lib/awspec/generator/doc/type/codepipeline.rb,
lib/awspec/generator/doc/type/nlb_listener.rb,
lib/awspec/generator/doc/type/ses_identity.rb,
lib/awspec/generator/doc/type/wafv2_ip_set.rb,
lib/awspec/generator/doc/type/eks_nodegroup.rb,
lib/awspec/generator/doc/type/elasticsearch.rb,
lib/awspec/generator/doc/type/ssm_parameter.rb,
lib/awspec/generator/doc/type/vpc_endpoints.rb,
lib/awspec/generator/doc/type/dynamodb_table.rb,
lib/awspec/generator/doc/type/ecr_repository.rb,
lib/awspec/generator/doc/type/rds_db_cluster.rb,
lib/awspec/generator/doc/type/secretsmanager.rb,
lib/awspec/generator/doc/type/security_group.rb,
lib/awspec/generator/doc/type/ses_send_quota.rb,
lib/awspec/generator/doc/type/vpn_connection.rb,
lib/awspec/generator/doc/type/batch_job_queue.rb,
lib/awspec/generator/doc/type/cloudwatch_logs.rb,
lib/awspec/generator/doc/type/launch_template.rb,
lib/awspec/generator/doc/type/transfer_server.rb,
lib/awspec/generator/doc/type/transit_gateway.rb,
lib/awspec/generator/doc/type/alb_target_group.rb,
lib/awspec/generator/doc/type/cloudwatch_alarm.rb,
lib/awspec/generator/doc/type/cloudwatch_event.rb,
lib/awspec/generator/doc/type/customer_gateway.rb,
lib/awspec/generator/doc/type/internet_gateway.rb,
lib/awspec/generator/doc/type/nlb_target_group.rb,
lib/awspec/generator/doc/type/account_attribute.rb,
lib/awspec/generator/doc/type/autoscaling_group.rb,
lib/awspec/generator/doc/type/cognito_user_pool.rb,
lib/awspec/generator/doc/type/network_interface.rb,
lib/awspec/generator/doc/type/rds_global_cluster.rb,
lib/awspec/generator/doc/type/ecs_task_definition.rb,
lib/awspec/generator/doc/type/managed_prefix_list.rb,
lib/awspec/generator/doc/type/rds_db_subnet_group.rb,
lib/awspec/generator/doc/type/route53_hosted_zone.rb,
lib/awspec/generator/doc/type/wafregional_web_acl.rb,
lib/awspec/generator/doc/type/batch_job_definition.rb,
lib/awspec/generator/doc/type/cloudformation_stack.rb,
lib/awspec/generator/doc/type/launch_configuration.rb,
lib/awspec/generator/doc/type/cognito_identity_pool.rb,
lib/awspec/generator/doc/type/account_attribute_base.rb,
lib/awspec/generator/doc/type/ec2_account_attributes.rb,
lib/awspec/generator/doc/type/ecs_container_instance.rb,
lib/awspec/generator/doc/type/rds_account_attributes.rb,
lib/awspec/generator/doc/type/rds_db_parameter_group.rb,
lib/awspec/generator/doc/type/cloudfront_distribution.rb,
lib/awspec/generator/doc/type/lambda_account_settings.rb,
lib/awspec/generator/doc/type/batch_compute_environment.rb,
lib/awspec/generator/doc/type/elastictranscoder_pipeline.rb,
lib/awspec/generator/doc/type/codedeploy_deployment_group.rb,
lib/awspec/generator/doc/type/rds_db_cluster_parameter_group.rb,
lib/awspec/generator/doc/type/directconnect_virtual_interface.rb,
lib/awspec/generator/doc/type/redshift_cluster_parameter_group.rb,
lib/awspec/generator/doc/type/elasticache_cache_parameter_group.rb
Defined Under Namespace
Classes: Account, AccountAttribute, AccountAttributeBase, Acm, Alb, AlbListener, AlbTargetGroup, Ami, Apigateway, AutoscalingGroup, Base, BatchComputeEnvironment, BatchJobDefinition, BatchJobQueue, CloudformationStack, CloudfrontDistribution, Cloudtrail, CloudwatchAlarm, CloudwatchEvent, CloudwatchLogs, Codebuild, Codedeploy, CodedeployDeploymentGroup, Codepipeline, CognitoIdentityPool, CognitoUserPool, CustomerGateway, DirectconnectVirtualInterface, DynamodbTable, Ebs, Ec2, Ec2AccountAttributes, EcrRepository, EcsCluster, EcsContainerInstance, EcsService, EcsTaskDefinition, Efs, Eip, Eks, EksNodegroup, Elasticache, ElasticacheCacheParameterGroup, Elasticsearch, ElastictranscoderPipeline, Elb, Emr, Firehose, IamGroup, IamPolicy, IamRole, IamUser, InternetGateway, Kinesis, Kms, Lambda, LambdaAccountSettings, LaunchConfiguration, LaunchTemplate, ManagedPrefixList, Mq, Msk, NatGateway, NetworkAcl, NetworkInterface, Nlb, NlbListener, NlbTargetGroup, Rds, RdsAccountAttributes, RdsDBCluster, RdsDBClusterParameterGroup, RdsDBParameterGroup, RdsDBSubnetGroup, RdsGlobalCluster, RdsProxy, Redshift, RedshiftClusterParameterGroup, Route53HostedZone, RouteTable, S3Bucket, Secretsmanager, SecurityGroup, SesIdentity, SesSendQuota, SnsTopic, Sqs, SsmParameter, Subnet, TransferServer, TransitGateway, Vpc, VpcEndpoints, VpnConnection, VpnGateway, WafWebAcl, WafregionalWebAcl, Wafv2IpSet
Class Method Summary collapse
-
.generate_doc ⇒ Object
rubocop:disable Metrics/MethodLength.
Class Method Details
.generate_doc ⇒ Object
rubocop:disable Metrics/MethodLength
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/awspec/generator/doc/type.rb', line 7 def self.generate_doc Aws.config[:stub_responses] = true types = Awspec::Helper::Type::TYPES types.delete('base') links = types.sort.map do |type| "[#{type}](##{type})" end links.push('[account](#account)') # add account header = <<-'EOF' # Resource Types <%= links.join("\n| ") %> EOF doc = ERB.new(header, nil, '-').result(binding) types.sort.map do |type| doc += eval "Awspec::Generator::Doc::Type::#{type.camelize}.new.generate_doc" end # account and attributes attributes = Awspec::Helper::Type::ACCOUNT_ATTRIBUTES doc += <<-'EOF' # Account and Attributes EOF doc += Awspec::Generator::Doc::Type::Account.new.generate_doc doc += <<-'EOF' ## :unlock: Another way: Test with account_attribute type EOF doc += Awspec::Generator::Doc::Type::AccountAttribute.new.generate_doc doc += <<-'EOF' ## :unlock: Another way: Test with separated resource types EOF links = attributes.map do |type| "[#{type}](##{type})" end doc += "#{links.join("\n| ")}\n" attributes.map do |type| doc += eval "Awspec::Generator::Doc::Type::#{type.camelize}.new.generate_doc" end doc.sub(/\n*\z/, '') end |