awspec 1.24.3 → 1.25.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +67 -0
- data/.github/workflows/doc.yml +29 -0
- data/.rubocop.yml +76 -27
- data/Gemfile +4 -0
- data/README.md +1 -3
- data/Rakefile +5 -4
- data/awspec.gemspec +5 -5
- data/bin/console +1 -0
- data/bin/toolbox +1 -0
- data/doc/_resource_types/cloudwatch_logs.md +9 -0
- data/doc/_resource_types/eks_nodegroup.md +53 -0
- data/doc/resource_types.md +76 -23
- data/exe/awspec +1 -0
- data/lib/awspec/cli.rb +2 -0
- data/lib/awspec/command/generate.rb +11 -9
- data/lib/awspec/config.rb +2 -0
- data/lib/awspec/error.rb +4 -0
- data/lib/awspec/ext/array.rb +5 -2
- data/lib/awspec/ext/hash.rb +5 -2
- data/lib/awspec/ext/string.rb +2 -0
- data/lib/awspec/ext/struct.rb +2 -0
- data/lib/awspec/ext.rb +2 -0
- data/lib/awspec/generator/doc/type/account.rb +4 -4
- data/lib/awspec/generator/doc/type/account_attribute.rb +4 -4
- data/lib/awspec/generator/doc/type/account_attribute_base.rb +3 -2
- data/lib/awspec/generator/doc/type/acm.rb +4 -2
- data/lib/awspec/generator/doc/type/alb.rb +5 -3
- data/lib/awspec/generator/doc/type/alb_listener.rb +3 -1
- data/lib/awspec/generator/doc/type/alb_target_group.rb +3 -1
- data/lib/awspec/generator/doc/type/ami.rb +4 -2
- data/lib/awspec/generator/doc/type/apigateway.rb +2 -0
- data/lib/awspec/generator/doc/type/autoscaling_group.rb +2 -0
- data/lib/awspec/generator/doc/type/base.rb +11 -8
- data/lib/awspec/generator/doc/type/batch_compute_environment.rb +6 -4
- data/lib/awspec/generator/doc/type/batch_job_definition.rb +2 -0
- data/lib/awspec/generator/doc/type/batch_job_queue.rb +2 -0
- data/lib/awspec/generator/doc/type/cloudformation_stack.rb +2 -0
- data/lib/awspec/generator/doc/type/cloudfront_distribution.rb +4 -2
- data/lib/awspec/generator/doc/type/cloudtrail.rb +2 -0
- data/lib/awspec/generator/doc/type/cloudwatch_alarm.rb +3 -1
- data/lib/awspec/generator/doc/type/cloudwatch_event.rb +2 -0
- data/lib/awspec/generator/doc/type/cloudwatch_logs.rb +2 -0
- data/lib/awspec/generator/doc/type/codebuild.rb +2 -0
- data/lib/awspec/generator/doc/type/codedeploy.rb +2 -0
- data/lib/awspec/generator/doc/type/codedeploy_deployment_group.rb +2 -0
- data/lib/awspec/generator/doc/type/cognito_identity_pool.rb +2 -0
- data/lib/awspec/generator/doc/type/cognito_user_pool.rb +2 -0
- data/lib/awspec/generator/doc/type/customer_gateway.rb +4 -2
- data/lib/awspec/generator/doc/type/directconnect_virtual_interface.rb +4 -2
- data/lib/awspec/generator/doc/type/dynamodb_table.rb +4 -2
- data/lib/awspec/generator/doc/type/ebs.rb +4 -2
- data/lib/awspec/generator/doc/type/ec2.rb +4 -2
- data/lib/awspec/generator/doc/type/ec2_account_attributes.rb +2 -0
- data/lib/awspec/generator/doc/type/ecr_repository.rb +2 -0
- data/lib/awspec/generator/doc/type/ecs_cluster.rb +4 -2
- data/lib/awspec/generator/doc/type/ecs_container_instance.rb +4 -2
- data/lib/awspec/generator/doc/type/ecs_service.rb +4 -2
- data/lib/awspec/generator/doc/type/ecs_task_definition.rb +4 -2
- data/lib/awspec/generator/doc/type/efs.rb +2 -0
- data/lib/awspec/generator/doc/type/eip.rb +2 -0
- data/lib/awspec/generator/doc/type/eks.rb +4 -2
- data/lib/awspec/generator/doc/type/eks_nodegroup.rb +4 -2
- data/lib/awspec/generator/doc/type/elasticache.rb +4 -2
- data/lib/awspec/generator/doc/type/elasticache_cache_parameter_group.rb +2 -0
- data/lib/awspec/generator/doc/type/elasticsearch.rb +2 -0
- data/lib/awspec/generator/doc/type/elastictranscoder_pipeline.rb +4 -2
- data/lib/awspec/generator/doc/type/elb.rb +5 -3
- data/lib/awspec/generator/doc/type/emr.rb +4 -2
- data/lib/awspec/generator/doc/type/firehose.rb +2 -0
- data/lib/awspec/generator/doc/type/iam_group.rb +3 -1
- data/lib/awspec/generator/doc/type/iam_policy.rb +2 -0
- data/lib/awspec/generator/doc/type/iam_role.rb +3 -1
- data/lib/awspec/generator/doc/type/iam_user.rb +3 -1
- data/lib/awspec/generator/doc/type/internet_gateway.rb +2 -0
- data/lib/awspec/generator/doc/type/kinesis.rb +2 -0
- data/lib/awspec/generator/doc/type/kms.rb +2 -0
- data/lib/awspec/generator/doc/type/lambda.rb +3 -1
- data/lib/awspec/generator/doc/type/lambda_account_settings.rb +2 -0
- data/lib/awspec/generator/doc/type/launch_configuration.rb +2 -0
- data/lib/awspec/generator/doc/type/launch_template.rb +2 -0
- data/lib/awspec/generator/doc/type/mq.rb +5 -3
- data/lib/awspec/generator/doc/type/msk.rb +2 -0
- data/lib/awspec/generator/doc/type/nat_gateway.rb +4 -2
- data/lib/awspec/generator/doc/type/network_acl.rb +4 -2
- data/lib/awspec/generator/doc/type/network_interface.rb +4 -2
- data/lib/awspec/generator/doc/type/nlb.rb +4 -2
- data/lib/awspec/generator/doc/type/nlb_listener.rb +3 -1
- data/lib/awspec/generator/doc/type/nlb_target_group.rb +3 -1
- data/lib/awspec/generator/doc/type/rds.rb +5 -3
- data/lib/awspec/generator/doc/type/rds_account_attributes.rb +2 -0
- data/lib/awspec/generator/doc/type/rds_db_cluster_parameter_group.rb +2 -0
- data/lib/awspec/generator/doc/type/rds_db_parameter_group.rb +2 -0
- data/lib/awspec/generator/doc/type/redshift.rb +5 -3
- data/lib/awspec/generator/doc/type/redshift_cluster_parameter_group.rb +2 -0
- data/lib/awspec/generator/doc/type/route53_hosted_zone.rb +2 -0
- data/lib/awspec/generator/doc/type/route_table.rb +2 -0
- data/lib/awspec/generator/doc/type/s3_bucket.rb +3 -1
- data/lib/awspec/generator/doc/type/secretsmanager.rb +2 -0
- data/lib/awspec/generator/doc/type/security_group.rb +4 -2
- data/lib/awspec/generator/doc/type/ses_identity.rb +4 -2
- data/lib/awspec/generator/doc/type/ses_send_quota.rb +2 -0
- data/lib/awspec/generator/doc/type/sns_topic.rb +5 -3
- data/lib/awspec/generator/doc/type/sqs.rb +2 -0
- data/lib/awspec/generator/doc/type/ssm_parameter.rb +2 -0
- data/lib/awspec/generator/doc/type/subnet.rb +4 -2
- data/lib/awspec/generator/doc/type/transit_gateway.rb +2 -0
- data/lib/awspec/generator/doc/type/vpc.rb +4 -2
- data/lib/awspec/generator/doc/type/vpc_endpoints.rb +2 -0
- data/lib/awspec/generator/doc/type/vpn_connection.rb +4 -2
- data/lib/awspec/generator/doc/type/vpn_gateway.rb +4 -2
- data/lib/awspec/generator/doc/type/waf_web_acl.rb +3 -1
- data/lib/awspec/generator/doc/type/wafregional_web_acl.rb +3 -1
- data/lib/awspec/generator/doc/type.rb +5 -3
- data/lib/awspec/generator/spec/acm.rb +4 -2
- data/lib/awspec/generator/spec/alb.rb +6 -4
- data/lib/awspec/generator/spec/alb_listener.rb +6 -4
- data/lib/awspec/generator/spec/autoscaling_group.rb +6 -4
- data/lib/awspec/generator/spec/cloudwatch_alarm.rb +4 -2
- data/lib/awspec/generator/spec/cloudwatch_event.rb +4 -2
- data/lib/awspec/generator/spec/cloudwatch_logs.rb +9 -3
- data/lib/awspec/generator/spec/codebuild.rb +4 -2
- data/lib/awspec/generator/spec/directconnect.rb +4 -2
- data/lib/awspec/generator/spec/ebs.rb +5 -4
- data/lib/awspec/generator/spec/ec2.rb +5 -2
- data/lib/awspec/generator/spec/efs.rb +4 -2
- data/lib/awspec/generator/spec/eip.rb +4 -2
- data/lib/awspec/generator/spec/elasticache.rb +5 -2
- data/lib/awspec/generator/spec/elasticsearch.rb +4 -2
- data/lib/awspec/generator/spec/elb.rb +8 -6
- data/lib/awspec/generator/spec/iam_group.rb +4 -2
- data/lib/awspec/generator/spec/iam_policy.rb +3 -0
- data/lib/awspec/generator/spec/iam_role.rb +4 -2
- data/lib/awspec/generator/spec/iam_user.rb +4 -2
- data/lib/awspec/generator/spec/internet_gateway.rb +6 -4
- data/lib/awspec/generator/spec/kms.rb +4 -2
- data/lib/awspec/generator/spec/lambda.rb +4 -2
- data/lib/awspec/generator/spec/nat_gateway.rb +6 -4
- data/lib/awspec/generator/spec/network_acl.rb +15 -13
- data/lib/awspec/generator/spec/network_interface.rb +13 -10
- data/lib/awspec/generator/spec/nlb.rb +6 -4
- data/lib/awspec/generator/spec/nlb_listener.rb +6 -4
- data/lib/awspec/generator/spec/rds.rb +5 -2
- data/lib/awspec/generator/spec/rds_db_cluster_parameter_group.rb +3 -2
- data/lib/awspec/generator/spec/rds_db_parameter_group.rb +3 -2
- data/lib/awspec/generator/spec/redshift.rb +5 -2
- data/lib/awspec/generator/spec/redshift_cluster_parameter_group.rb +3 -2
- data/lib/awspec/generator/spec/route53_hosted_zone.rb +4 -2
- data/lib/awspec/generator/spec/route_table.rb +12 -14
- data/lib/awspec/generator/spec/s3_bucket.rb +9 -6
- data/lib/awspec/generator/spec/security_group.rb +9 -8
- data/lib/awspec/generator/spec/subnet.rb +6 -4
- data/lib/awspec/generator/spec/vpc.rb +5 -2
- data/lib/awspec/generator/template.rb +17 -15
- data/lib/awspec/generator.rb +4 -2
- data/lib/awspec/helper/client_wrap.rb +5 -1
- data/lib/awspec/helper/color.rb +2 -0
- data/lib/awspec/helper/finder/account_attributes.rb +8 -6
- data/lib/awspec/helper/finder/acm.rb +4 -0
- data/lib/awspec/helper/finder/alb.rb +7 -5
- data/lib/awspec/helper/finder/ami.rb +4 -0
- data/lib/awspec/helper/finder/apigateway.rb +2 -0
- data/lib/awspec/helper/finder/autoscaling.rb +3 -0
- data/lib/awspec/helper/finder/batch.rb +2 -0
- data/lib/awspec/helper/finder/cloudformation.rb +2 -0
- data/lib/awspec/helper/finder/cloudfront.rb +3 -0
- data/lib/awspec/helper/finder/cloudtrail.rb +2 -0
- data/lib/awspec/helper/finder/cloudwatch.rb +3 -0
- data/lib/awspec/helper/finder/cloudwatch_event.rb +2 -0
- data/lib/awspec/helper/finder/cloudwatch_logs.rb +10 -5
- data/lib/awspec/helper/finder/codebuild.rb +3 -0
- data/lib/awspec/helper/finder/codedeploy.rb +2 -0
- data/lib/awspec/helper/finder/cognito_identity_pool.rb +2 -0
- data/lib/awspec/helper/finder/cognito_user_pool.rb +2 -0
- data/lib/awspec/helper/finder/directconnect.rb +2 -0
- data/lib/awspec/helper/finder/dynamodb.rb +2 -0
- data/lib/awspec/helper/finder/ebs.rb +5 -0
- data/lib/awspec/helper/finder/ec2.rb +56 -26
- data/lib/awspec/helper/finder/ecr.rb +2 -0
- data/lib/awspec/helper/finder/ecs.rb +5 -2
- data/lib/awspec/helper/finder/efs.rb +5 -4
- data/lib/awspec/helper/finder/eks.rb +2 -0
- data/lib/awspec/helper/finder/elasticache.rb +3 -1
- data/lib/awspec/helper/finder/elasticsearch.rb +3 -1
- data/lib/awspec/helper/finder/elastictranscoder.rb +3 -0
- data/lib/awspec/helper/finder/elb.rb +6 -4
- data/lib/awspec/helper/finder/emr.rb +2 -0
- data/lib/awspec/helper/finder/firehose.rb +2 -0
- data/lib/awspec/helper/finder/iam.rb +16 -12
- data/lib/awspec/helper/finder/kinesis.rb +2 -0
- data/lib/awspec/helper/finder/kms.rb +3 -1
- data/lib/awspec/helper/finder/lambda.rb +3 -0
- data/lib/awspec/helper/finder/mq.rb +3 -1
- data/lib/awspec/helper/finder/msk.rb +2 -0
- data/lib/awspec/helper/finder/nlb.rb +11 -8
- data/lib/awspec/helper/finder/rds.rb +4 -1
- data/lib/awspec/helper/finder/redshift.rb +4 -1
- data/lib/awspec/helper/finder/route53.rb +4 -1
- data/lib/awspec/helper/finder/s3.rb +4 -2
- data/lib/awspec/helper/finder/secretsmanager.rb +2 -0
- data/lib/awspec/helper/finder/security_group.rb +2 -0
- data/lib/awspec/helper/finder/ses.rb +2 -0
- data/lib/awspec/helper/finder/sns_topic.rb +5 -3
- data/lib/awspec/helper/finder/sqs.rb +2 -0
- data/lib/awspec/helper/finder/ssm_parameter.rb +4 -1
- data/lib/awspec/helper/finder/subnet.rb +126 -20
- data/lib/awspec/helper/finder/vpc.rb +12 -6
- data/lib/awspec/helper/finder/vpc_endpoints.rb +2 -0
- data/lib/awspec/helper/finder/waf.rb +5 -0
- data/lib/awspec/helper/finder/wafregional.rb +5 -0
- data/lib/awspec/helper/finder.rb +3 -1
- data/lib/awspec/helper/states.rb +4 -2
- data/lib/awspec/helper/type.rb +8 -4
- data/lib/awspec/helper.rb +2 -0
- data/lib/awspec/matcher/be_allowed.rb +2 -0
- data/lib/awspec/matcher/be_allowed_action.rb +2 -0
- data/lib/awspec/matcher/be_attached_to.rb +3 -0
- data/lib/awspec/matcher/be_connected_to_vpc.rb +2 -0
- data/lib/awspec/matcher/be_denied.rb +2 -0
- data/lib/awspec/matcher/be_opened.rb +2 -0
- data/lib/awspec/matcher/be_opened_only.rb +2 -0
- data/lib/awspec/matcher/belong_to_alb.rb +4 -0
- data/lib/awspec/matcher/belong_to_cache_subnet_group.rb +2 -0
- data/lib/awspec/matcher/belong_to_cluster_subnet_group.rb +2 -0
- data/lib/awspec/matcher/belong_to_db_subnet_group.rb +2 -0
- data/lib/awspec/matcher/belong_to_domain.rb +2 -0
- data/lib/awspec/matcher/belong_to_iam_group.rb +2 -0
- data/lib/awspec/matcher/belong_to_metric.rb +2 -0
- data/lib/awspec/matcher/belong_to_nlb.rb +4 -0
- data/lib/awspec/matcher/belong_to_replication_group.rb +2 -0
- data/lib/awspec/matcher/belong_to_subnet.rb +5 -0
- data/lib/awspec/matcher/belong_to_subnets.rb +16 -0
- data/lib/awspec/matcher/belong_to_vpc.rb +4 -0
- data/lib/awspec/matcher/have_attribute_definition.rb +2 -0
- data/lib/awspec/matcher/have_cluster_parameter_group.rb +2 -0
- data/lib/awspec/matcher/have_custom_response_error_code.rb +3 -2
- data/lib/awspec/matcher/have_db_parameter_group.rb +2 -0
- data/lib/awspec/matcher/have_env_var.rb +2 -0
- data/lib/awspec/matcher/have_env_var_value.rb +2 -0
- data/lib/awspec/matcher/have_env_vars.rb +2 -0
- data/lib/awspec/matcher/have_inline_policy.rb +2 -0
- data/lib/awspec/matcher/have_key_policy.rb +2 -0
- data/lib/awspec/matcher/have_key_schema.rb +2 -0
- data/lib/awspec/matcher/have_metric_filter.rb +11 -0
- data/lib/awspec/matcher/have_network_interface.rb +2 -0
- data/lib/awspec/matcher/have_option_group.rb +2 -0
- data/lib/awspec/matcher/have_origin.rb +3 -2
- data/lib/awspec/matcher/have_private_ip_address.rb +2 -0
- data/lib/awspec/matcher/have_record_set.rb +3 -1
- data/lib/awspec/matcher/have_route.rb +5 -3
- data/lib/awspec/matcher/have_rule.rb +3 -0
- data/lib/awspec/matcher/have_subscription_attributes.rb +3 -0
- data/lib/awspec/matcher/have_subscription_filter.rb +2 -0
- data/lib/awspec/matcher/have_tag.rb +2 -0
- data/lib/awspec/matcher/have_vpc_peering_connection.rb +2 -0
- data/lib/awspec/matcher/include_subscribed.rb +2 -0
- data/lib/awspec/matcher.rb +6 -0
- data/lib/awspec/resource_reader.rb +3 -0
- data/lib/awspec/setup.rb +7 -5
- data/lib/awspec/shared_context.rb +3 -0
- data/lib/awspec/stub/account.rb +2 -0
- data/lib/awspec/stub/acm.rb +2 -0
- data/lib/awspec/stub/alb.rb +3 -1
- data/lib/awspec/stub/alb_listener.rb +4 -3
- data/lib/awspec/stub/alb_target_group.rb +3 -1
- data/lib/awspec/stub/ami.rb +2 -0
- data/lib/awspec/stub/apigateway.rb +2 -0
- data/lib/awspec/stub/autoscaling_group.rb +6 -4
- data/lib/awspec/stub/batch_compute_environment.rb +2 -0
- data/lib/awspec/stub/batch_job_definition.rb +2 -0
- data/lib/awspec/stub/batch_job_queue.rb +2 -0
- data/lib/awspec/stub/cloudformation_stack.rb +4 -2
- data/lib/awspec/stub/cloudfront_distribution.rb +6 -4
- data/lib/awspec/stub/cloudtrail.rb +2 -0
- data/lib/awspec/stub/cloudwatch_logs.rb +4 -1
- data/lib/awspec/stub/codebuild.rb +5 -3
- data/lib/awspec/stub/codedeploy.rb +2 -0
- data/lib/awspec/stub/codedeploy_deployment_group.rb +2 -0
- data/lib/awspec/stub/cognito_identity_pool.rb +2 -0
- data/lib/awspec/stub/cognito_user_pool.rb +2 -0
- data/lib/awspec/stub/directconnect_virtual_interface.rb +2 -0
- data/lib/awspec/stub/duplicated_resource_type.rb +2 -0
- data/lib/awspec/stub/dynamodb_table.rb +2 -0
- data/lib/awspec/stub/ebs.rb +2 -0
- data/lib/awspec/stub/ec2.rb +2 -0
- data/lib/awspec/stub/ec2_has_multi_security_groups.rb +2 -0
- data/lib/awspec/stub/ec2_non_existing.rb +2 -0
- data/lib/awspec/stub/ecr_repository.rb +2 -0
- data/lib/awspec/stub/ecs.rb +13 -22
- data/lib/awspec/stub/ecs_cluster.rb +4 -4
- data/lib/awspec/stub/ecs_container_instance.rb +3 -2
- data/lib/awspec/stub/ecs_service.rb +4 -4
- data/lib/awspec/stub/ecs_task_definition.rb +9 -14
- data/lib/awspec/stub/efs.rb +2 -0
- data/lib/awspec/stub/eip.rb +2 -0
- data/lib/awspec/stub/eks.rb +5 -3
- data/lib/awspec/stub/eks_nodegroup.rb +63 -1
- data/lib/awspec/stub/elasticache.rb +2 -0
- data/lib/awspec/stub/elasticache_cache_parameter_group.rb +2 -0
- data/lib/awspec/stub/elasticsearch.rb +1 -0
- data/lib/awspec/stub/elastictranscoder_pipeline.rb +2 -0
- data/lib/awspec/stub/elb.rb +2 -0
- data/lib/awspec/stub/emr.rb +2 -0
- data/lib/awspec/stub/firehose.rb +2 -0
- data/lib/awspec/stub/iam_group.rb +3 -2
- data/lib/awspec/stub/iam_policy.rb +2 -0
- data/lib/awspec/stub/iam_role.rb +3 -2
- data/lib/awspec/stub/iam_user.rb +3 -2
- data/lib/awspec/stub/internet_gateway.rb +2 -0
- data/lib/awspec/stub/kinesis.rb +8 -6
- data/lib/awspec/stub/kms.rb +2 -0
- data/lib/awspec/stub/lambda.rb +2 -0
- data/lib/awspec/stub/launch_configuration.rb +2 -0
- data/lib/awspec/stub/launch_template.rb +2 -0
- data/lib/awspec/stub/mq.rb +5 -3
- data/lib/awspec/stub/msk.rb +5 -3
- data/lib/awspec/stub/nat_gateway.rb +2 -0
- data/lib/awspec/stub/network_acl.rb +2 -0
- data/lib/awspec/stub/network_interface.rb +2 -0
- data/lib/awspec/stub/nlb.rb +3 -1
- data/lib/awspec/stub/nlb_listener.rb +4 -3
- data/lib/awspec/stub/nlb_target_group.rb +3 -1
- data/lib/awspec/stub/rds.rb +2 -0
- data/lib/awspec/stub/rds_db_cluster_parameter_group.rb +2 -0
- data/lib/awspec/stub/rds_db_parameter_group.rb +10 -0
- data/lib/awspec/stub/redshift.rb +2 -0
- data/lib/awspec/stub/redshift_cluster_parameter_group.rb +2 -0
- data/lib/awspec/stub/route53_hosted_zone.rb +2 -0
- data/lib/awspec/stub/route_table.rb +2 -0
- data/lib/awspec/stub/s3_bucket.rb +2 -0
- data/lib/awspec/stub/secretsmanager.rb +2 -0
- data/lib/awspec/stub/security_group.rb +2 -0
- data/lib/awspec/stub/ses_identity.rb +2 -0
- data/lib/awspec/stub/sns_topic.rb +18 -9
- data/lib/awspec/stub/sns_topic_error.rb +17 -0
- data/lib/awspec/stub/sqs.rb +2 -0
- data/lib/awspec/stub/ssm_parameter.rb +2 -0
- data/lib/awspec/stub/subnet.rb +2 -0
- data/lib/awspec/stub/transit_gateway.rb +2 -0
- data/lib/awspec/stub/vpc.rb +2 -0
- data/lib/awspec/stub/vpc_endpoints.rb +2 -0
- data/lib/awspec/stub/waf_web_acl.rb +2 -0
- data/lib/awspec/stub/wafregional_web_acl.rb +2 -0
- data/lib/awspec/stub.rb +3 -1
- data/lib/awspec/toolbox.rb +2 -0
- data/lib/awspec/type/account.rb +4 -2
- data/lib/awspec/type/account_attribute.rb +5 -2
- data/lib/awspec/type/account_attribute_base.rb +2 -0
- data/lib/awspec/type/acm.rb +8 -6
- data/lib/awspec/type/alb.rb +8 -3
- data/lib/awspec/type/alb_listener.rb +4 -0
- data/lib/awspec/type/alb_target_group.rb +3 -0
- data/lib/awspec/type/ami.rb +5 -3
- data/lib/awspec/type/apigateway.rb +9 -3
- data/lib/awspec/type/autoscaling_group.rb +3 -0
- data/lib/awspec/type/base.rb +6 -3
- data/lib/awspec/type/batch_compute_environment.rb +6 -4
- data/lib/awspec/type/batch_job_definition.rb +2 -0
- data/lib/awspec/type/batch_job_queue.rb +4 -2
- data/lib/awspec/type/cloudformation_stack.rb +2 -0
- data/lib/awspec/type/cloudfront_distribution.rb +11 -5
- data/lib/awspec/type/cloudtrail.rb +2 -0
- data/lib/awspec/type/cloudwatch_alarm.rb +2 -0
- data/lib/awspec/type/cloudwatch_event.rb +2 -0
- data/lib/awspec/type/cloudwatch_logs.rb +10 -3
- data/lib/awspec/type/codebuild.rb +2 -0
- data/lib/awspec/type/codedeploy.rb +2 -0
- data/lib/awspec/type/codedeploy_deployment_group.rb +4 -0
- data/lib/awspec/type/cognito_identity_pool.rb +2 -0
- data/lib/awspec/type/cognito_user_pool.rb +2 -0
- data/lib/awspec/type/customer_gateway.rb +5 -3
- data/lib/awspec/type/directconnect_virtual_interface.rb +5 -3
- data/lib/awspec/type/dynamodb_table.rb +5 -3
- data/lib/awspec/type/ebs.rb +6 -3
- data/lib/awspec/type/ec2.rb +10 -0
- data/lib/awspec/type/ec2_account_attributes.rb +2 -0
- data/lib/awspec/type/ecr_repository.rb +2 -0
- data/lib/awspec/type/ecs_cluster.rb +5 -2
- data/lib/awspec/type/ecs_container_instance.rb +4 -2
- data/lib/awspec/type/ecs_service.rb +5 -2
- data/lib/awspec/type/ecs_task_definition.rb +4 -2
- data/lib/awspec/type/efs.rb +3 -0
- data/lib/awspec/type/eip.rb +3 -0
- data/lib/awspec/type/eks.rb +4 -2
- data/lib/awspec/type/eks_nodegroup.rb +109 -2
- data/lib/awspec/type/elasticache.rb +7 -3
- data/lib/awspec/type/elasticache_cache_parameter_group.rb +3 -0
- data/lib/awspec/type/elasticsearch.rb +2 -0
- data/lib/awspec/type/elastictranscoder_pipeline.rb +5 -3
- data/lib/awspec/type/elb.rb +11 -3
- data/lib/awspec/type/emr.rb +8 -6
- data/lib/awspec/type/firehose.rb +4 -2
- data/lib/awspec/type/iam_group.rb +4 -0
- data/lib/awspec/type/iam_policy.rb +5 -0
- data/lib/awspec/type/iam_role.rb +3 -0
- data/lib/awspec/type/iam_user.rb +3 -0
- data/lib/awspec/type/internet_gateway.rb +2 -0
- data/lib/awspec/type/kinesis.rb +3 -0
- data/lib/awspec/type/kms.rb +3 -0
- data/lib/awspec/type/lambda.rb +2 -0
- data/lib/awspec/type/lambda_account_settings.rb +2 -0
- data/lib/awspec/type/launch_configuration.rb +3 -0
- data/lib/awspec/type/launch_template.rb +3 -0
- data/lib/awspec/type/mq.rb +7 -3
- data/lib/awspec/type/msk.rb +5 -3
- data/lib/awspec/type/nat_gateway.rb +5 -3
- data/lib/awspec/type/network_acl.rb +9 -2
- data/lib/awspec/type/network_interface.rb +9 -3
- data/lib/awspec/type/nlb.rb +6 -3
- data/lib/awspec/type/nlb_listener.rb +4 -0
- data/lib/awspec/type/nlb_target_group.rb +3 -0
- data/lib/awspec/type/rds.rb +7 -3
- data/lib/awspec/type/rds_account_attributes.rb +2 -0
- data/lib/awspec/type/rds_db_cluster_parameter_group.rb +3 -0
- data/lib/awspec/type/rds_db_parameter_group.rb +58 -0
- data/lib/awspec/type/redshift.rb +7 -3
- data/lib/awspec/type/redshift_cluster_parameter_group.rb +2 -0
- data/lib/awspec/type/resource_base.rb +2 -0
- data/lib/awspec/type/route53_hosted_zone.rb +7 -2
- data/lib/awspec/type/route_table.rb +12 -0
- data/lib/awspec/type/s3_bucket.rb +7 -4
- data/lib/awspec/type/secretsmanager.rb +2 -0
- data/lib/awspec/type/security_group.rb +14 -2
- data/lib/awspec/type/ses_identity.rb +8 -6
- data/lib/awspec/type/ses_send_quota.rb +2 -0
- data/lib/awspec/type/sns_topic.rb +4 -0
- data/lib/awspec/type/sqs.rb +4 -0
- data/lib/awspec/type/ssm_parameter.rb +3 -0
- data/lib/awspec/type/subnet.rb +6 -3
- data/lib/awspec/type/transit_gateway.rb +2 -0
- data/lib/awspec/type/vpc.rb +7 -3
- data/lib/awspec/type/vpc_endpoints.rb +5 -3
- data/lib/awspec/type/vpn_connection.rb +5 -3
- data/lib/awspec/type/vpn_gateway.rb +5 -3
- data/lib/awspec/type/waf_web_acl.rb +3 -0
- data/lib/awspec/type/wafregional_web_acl.rb +3 -0
- data/lib/awspec/version.rb +3 -1
- data/lib/awspec.rb +2 -0
- metadata +31 -28
- data/.tachikoma.yml +0 -1
- data/.travis.yml +0 -27
@@ -1,10 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'awspec/config'
|
2
4
|
|
3
5
|
module Awspec::Helper
|
4
6
|
class ClientWrap
|
5
7
|
attr_reader :client, :backoff, :iteration, :backoff_limit, :symbol1, :symbol2
|
8
|
+
|
6
9
|
def initialize(real_client = nil)
|
7
10
|
raise ArgumentError, 'Client can not be nil' if real_client.nil?
|
11
|
+
|
8
12
|
config = Awspec::Config.instance
|
9
13
|
@client = real_client
|
10
14
|
@backoff = config[:client_backoff]
|
@@ -34,7 +38,7 @@ module Awspec::Helper
|
|
34
38
|
@backoff = backoff + (iteration * iteration * 0.5)
|
35
39
|
@iteration += 1
|
36
40
|
sleep backoff
|
37
|
-
results =
|
41
|
+
results = send(m, *args, &block)
|
38
42
|
end
|
39
43
|
|
40
44
|
reset_backoff
|
data/lib/awspec/helper/color.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Awspec::Helper
|
2
4
|
module Finder
|
3
5
|
module AccountAttributes
|
@@ -12,11 +14,11 @@ module Awspec::Helper
|
|
12
14
|
attributes[attr[:attribute_name].tr('-', '_').to_sym] = values
|
13
15
|
else
|
14
16
|
value = values.first
|
15
|
-
if value =~ /\A\d+\z/
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
17
|
+
attributes[attr[:attribute_name].tr('-', '_').to_sym] = if value =~ /\A\d+\z/
|
18
|
+
value.to_i
|
19
|
+
else
|
20
|
+
value
|
21
|
+
end
|
20
22
|
end
|
21
23
|
end
|
22
24
|
attributes.to_struct
|
@@ -52,7 +54,7 @@ module Awspec::Helper
|
|
52
54
|
|
53
55
|
def find_ses_send_quota
|
54
56
|
ses_client.get_send_quota
|
55
|
-
rescue
|
57
|
+
rescue StandardError
|
56
58
|
# Aws::Errors::NoSuchEndpointError
|
57
59
|
nil
|
58
60
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Awspec::Helper
|
2
4
|
module Finder
|
3
5
|
module Acm
|
@@ -10,6 +12,7 @@ module Awspec::Helper
|
|
10
12
|
c.certificate_arn == id || c.domain_name == id
|
11
13
|
end
|
12
14
|
break if res.next_token.nil?
|
15
|
+
|
13
16
|
req[:next_token] = res.next_token
|
14
17
|
end
|
15
18
|
|
@@ -26,6 +29,7 @@ module Awspec::Helper
|
|
26
29
|
certs << c.certificate_arn
|
27
30
|
end
|
28
31
|
break if res.next_token.nil?
|
32
|
+
|
29
33
|
req[:next_token] = res.next_token
|
30
34
|
end
|
31
35
|
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Awspec::Helper
|
2
4
|
module Finder
|
3
5
|
module Alb
|
@@ -7,7 +9,7 @@ module Awspec::Helper
|
|
7
9
|
lb.type == 'application'
|
8
10
|
end.single_resource(id)
|
9
11
|
rescue Aws::ElasticLoadBalancingV2::Errors::LoadBalancerNotFound
|
10
|
-
|
12
|
+
nil
|
11
13
|
end
|
12
14
|
|
13
15
|
def select_alb_by_vpc_id(vpc_id)
|
@@ -21,7 +23,7 @@ module Awspec::Helper
|
|
21
23
|
res = elbv2_client.describe_listeners({ listener_arns: [arn] })
|
22
24
|
res.listeners.single_resource(arn)
|
23
25
|
rescue StandardError
|
24
|
-
|
26
|
+
nil
|
25
27
|
end
|
26
28
|
|
27
29
|
def select_alb_listener_by_alb_arn(arn)
|
@@ -38,10 +40,10 @@ module Awspec::Helper
|
|
38
40
|
def find_alb_target_group(id)
|
39
41
|
res = elbv2_client.describe_target_groups({ names: [id] })
|
40
42
|
res.target_groups.select do |tg|
|
41
|
-
%w
|
43
|
+
%w[HTTP HTTPS].include?(tg.protocol)
|
42
44
|
end.single_resource(id)
|
43
45
|
rescue StandardError
|
44
|
-
|
46
|
+
nil
|
45
47
|
end
|
46
48
|
|
47
49
|
def select_rule_by_alb_listener_id(id)
|
@@ -61,7 +63,7 @@ module Awspec::Helper
|
|
61
63
|
resource.resource_arn == id
|
62
64
|
end.first.tags
|
63
65
|
rescue StandardError
|
64
|
-
|
66
|
+
nil
|
65
67
|
end
|
66
68
|
end
|
67
69
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Awspec::Helper
|
2
4
|
module Finder
|
3
5
|
module Ami
|
@@ -7,11 +9,13 @@ module Awspec::Helper
|
|
7
9
|
})
|
8
10
|
resource = res.images.single_resource(image_id)
|
9
11
|
return resource if resource
|
12
|
+
|
10
13
|
res = ec2_client.describe_images({
|
11
14
|
filters: [{ name: 'name', values: [image_id] }]
|
12
15
|
})
|
13
16
|
resource = res.images.single_resource(image_id)
|
14
17
|
return resource if resource
|
18
|
+
|
15
19
|
res = ec2_client.describe_images({
|
16
20
|
filters: [{ name: 'tag:Name', values: [image_id] }]
|
17
21
|
})
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Awspec::Helper
|
2
4
|
module Finder
|
3
5
|
module Cloudfront
|
@@ -9,6 +11,7 @@ module Awspec::Helper
|
|
9
11
|
item.id == id || item.domain_name == id
|
10
12
|
end
|
11
13
|
break unless res.distribution_list.is_truncated
|
14
|
+
|
12
15
|
res = cloudfront_client.list_distributions({
|
13
16
|
marker: res.distribution_list.next_marker
|
14
17
|
})
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Awspec::Helper
|
2
4
|
module Finder
|
3
5
|
module Cloudwatch
|
@@ -21,6 +23,7 @@ module Awspec::Helper
|
|
21
23
|
loop do
|
22
24
|
selected += res.metric_alarms
|
23
25
|
break if res.next_token.nil?
|
26
|
+
|
24
27
|
res = cloudwatch_client.describe_alarms({
|
25
28
|
next_token: res.next_token
|
26
29
|
})
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Awspec::Helper
|
2
4
|
module Finder
|
3
5
|
module CloudwatchLogs
|
@@ -29,6 +31,7 @@ module Awspec::Helper
|
|
29
31
|
end
|
30
32
|
break if ret.present?
|
31
33
|
break if res.next_token.nil?
|
34
|
+
|
32
35
|
req[:next_token] = res.next_token
|
33
36
|
end
|
34
37
|
ret
|
@@ -59,6 +62,7 @@ module Awspec::Helper
|
|
59
62
|
res = cloudwatch_logs_client.describe_log_groups(req)
|
60
63
|
log_groups.push(*res.log_groups)
|
61
64
|
break if res.next_token.nil?
|
65
|
+
|
62
66
|
req[:next_token] = res.next_token
|
63
67
|
end
|
64
68
|
log_groups
|
@@ -68,21 +72,22 @@ module Awspec::Helper
|
|
68
72
|
cloudwatch_logs_client.list_tags_log_group(log_group_name: id)[:tags]
|
69
73
|
end
|
70
74
|
|
71
|
-
filter_types = %w
|
75
|
+
filter_types = %w[metric subscription]
|
72
76
|
filter_types.each do |type|
|
73
|
-
define_method
|
77
|
+
define_method "select_all_cloudwatch_logs_#{type}_filter" do |*args|
|
74
78
|
req = { log_group_name: args.first }
|
75
|
-
method_name =
|
79
|
+
method_name = "describe_#{type}_filters"
|
76
80
|
resources = []
|
77
81
|
loop do
|
78
82
|
res = cloudwatch_logs_client.send(method_name, req)
|
79
83
|
case type
|
80
|
-
when 'metric'
|
84
|
+
when 'metric'
|
81
85
|
resources.push(*res.metric_filters)
|
82
|
-
when 'subscription'
|
86
|
+
when 'subscription'
|
83
87
|
resources.push(*res.subscription_filters)
|
84
88
|
end
|
85
89
|
break if res.next_token.nil?
|
90
|
+
|
86
91
|
req[:next_token] = res.next_token
|
87
92
|
end
|
88
93
|
resources
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Awspec::Helper
|
2
4
|
module Finder
|
3
5
|
module Codebuild
|
@@ -15,6 +17,7 @@ module Awspec::Helper
|
|
15
17
|
res = codebuild_client.list_projects(req)
|
16
18
|
projects.push(*res.projects)
|
17
19
|
break if res.next_token.nil?
|
20
|
+
|
18
21
|
req[:next_token] = res.next_token
|
19
22
|
end
|
20
23
|
projects
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Awspec::Helper
|
2
4
|
module Finder
|
3
5
|
module Ebs
|
@@ -7,6 +9,7 @@ module Awspec::Helper
|
|
7
9
|
})
|
8
10
|
resource = res.volumes.single_resource(volume_id)
|
9
11
|
return resource if resource
|
12
|
+
|
10
13
|
res = ec2_client.describe_volumes({
|
11
14
|
filters: [{ name: 'tag:Name', values: [volume_id] }]
|
12
15
|
})
|
@@ -17,6 +20,7 @@ module Awspec::Helper
|
|
17
20
|
res = find_ec2(id)
|
18
21
|
volumes = []
|
19
22
|
return volumes unless res
|
23
|
+
|
20
24
|
res.block_device_mappings.each do |block|
|
21
25
|
volume = find_ebs(block.ebs.volume_id)
|
22
26
|
volumes.push(volume) if volume
|
@@ -31,6 +35,7 @@ module Awspec::Helper
|
|
31
35
|
loop do
|
32
36
|
selected += res.volumes.select { |v| v.attachments.count > 0 }
|
33
37
|
break if res.next_token.nil?
|
38
|
+
|
34
39
|
res = ec2_client.describe_volumes({
|
35
40
|
next_token: res.next_token
|
36
41
|
})
|
@@ -1,26 +1,53 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Awspec::Helper
|
2
4
|
module Finder
|
3
5
|
module Ec2
|
4
6
|
def find_ec2(id)
|
5
7
|
# instance_id or tag:Name
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
end
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
8
|
+
|
9
|
+
# First tries to search by using an educated guess, based on the
|
10
|
+
# references below:
|
11
|
+
# https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/resource-ids.html
|
12
|
+
# https://docs.chef.io/inspec/resources/aws_ec2_instance/
|
13
|
+
# This should be faster then just first trying ID when the parameter is
|
14
|
+
# clearly not one
|
15
|
+
|
16
|
+
# https://medium.com/@Bakku1505/ruby-start-with-end-with-vs-regular-expressions-59728be0859e
|
17
|
+
if id.start_with?('i-') && id.length == 19 && id =~ /^i-[0-9a-f]/
|
18
|
+
begin
|
19
|
+
res = ec2_client.describe_instances({
|
20
|
+
instance_ids: [id]
|
21
|
+
})
|
22
|
+
rescue Aws::EC2::Errors::InvalidInstanceIDNotFound, Aws::EC2::Errors::InvalidInstanceIDMalformed => e
|
23
|
+
res = ec2_client.describe_instances({
|
24
|
+
filters: [{ name: 'tag:Name', values: [id] }]
|
25
|
+
})
|
26
|
+
end
|
27
|
+
else
|
28
|
+
begin
|
29
|
+
res = ec2_client.describe_instances({
|
30
|
+
filters: [{ name: 'tag:Name', values: [id] }]
|
31
|
+
})
|
32
|
+
rescue Aws::EC2::Errors::InvalidInstanceIDNotFound, Aws::EC2::Errors::InvalidInstanceIDMalformed => e
|
33
|
+
res = ec2_client.describe_instances({
|
34
|
+
instance_ids: [id]
|
35
|
+
})
|
36
|
+
if res.reservations.count > 1
|
37
|
+
warn "Warning: '#{id}' unexpectedly identified as a valid instance ID during fallback search"
|
38
|
+
end
|
39
|
+
end
|
23
40
|
end
|
41
|
+
|
42
|
+
return nil if res.reservations.count == 0
|
43
|
+
return res.reservations.first.instances.single_resource(id) if res.reservations.count == 1
|
44
|
+
raise Awspec::DuplicatedResourceTypeError, dup_ec2_instance(id) if res.reservations.count > 1
|
45
|
+
|
46
|
+
raise "Unexpected condition of having reservations = #{res.reservations.count}"
|
47
|
+
end
|
48
|
+
|
49
|
+
def dup_ec2_instance(id)
|
50
|
+
"Duplicate instances matching id or tag #{id}"
|
24
51
|
end
|
25
52
|
|
26
53
|
def find_ec2_attribute(id, attribute)
|
@@ -44,22 +71,23 @@ module Awspec::Helper
|
|
44
71
|
end
|
45
72
|
|
46
73
|
# find_internet_gateway find_vpn_gateway find_customer_gateway
|
47
|
-
gateway_types = %w
|
74
|
+
gateway_types = %w[internet vpn customer transit]
|
48
75
|
gateway_types.each do |type|
|
49
|
-
define_method
|
76
|
+
define_method "find_#{type}_gateway" do |*args|
|
50
77
|
gateway_id = args.first
|
51
|
-
method_name =
|
78
|
+
method_name = "describe_#{type}_gateways"
|
52
79
|
res = ec2_client.send(
|
53
80
|
method_name,
|
54
|
-
{ filters: [{ name: type
|
81
|
+
{ filters: [{ name: "#{type}-gateway-id", values: [gateway_id] }] }
|
55
82
|
)
|
56
|
-
resource = res[type
|
83
|
+
resource = res["#{type}_gateways"].single_resource(gateway_id)
|
57
84
|
return resource if resource
|
85
|
+
|
58
86
|
res = ec2_client.send(
|
59
87
|
method_name,
|
60
88
|
{ filters: [{ name: 'tag:Name', values: [gateway_id] }] }
|
61
89
|
)
|
62
|
-
res[type
|
90
|
+
res["#{type}_gateways"].single_resource(gateway_id)
|
63
91
|
end
|
64
92
|
end
|
65
93
|
|
@@ -74,6 +102,7 @@ module Awspec::Helper
|
|
74
102
|
})
|
75
103
|
resource = res.vpn_connections.single_resource(vpn_connection_id)
|
76
104
|
return resource if resource
|
105
|
+
|
77
106
|
res = ec2_client.describe_vpn_connections({
|
78
107
|
filters: [
|
79
108
|
{
|
@@ -91,7 +120,7 @@ module Awspec::Helper
|
|
91
120
|
res = ec2_client.describe_nat_gateways({
|
92
121
|
nat_gateway_ids: [gateway_id]
|
93
122
|
})
|
94
|
-
rescue
|
123
|
+
rescue StandardError
|
95
124
|
res = ec2_client.describe_nat_gateways({
|
96
125
|
filter: [{ name: 'tag:Name', values: [gateway_id] }]
|
97
126
|
})
|
@@ -114,6 +143,7 @@ module Awspec::Helper
|
|
114
143
|
})
|
115
144
|
resource = res.network_interfaces.single_resource(interface_id)
|
116
145
|
return resource if resource
|
146
|
+
|
117
147
|
res = ec2_client.describe_network_interfaces({
|
118
148
|
filters: [{ name: 'tag:Name', values: [interface_id] }]
|
119
149
|
})
|
@@ -181,7 +211,7 @@ module Awspec::Helper
|
|
181
211
|
res = ec2_client.describe_launch_templates({
|
182
212
|
launch_template_ids: [id]
|
183
213
|
})
|
184
|
-
rescue
|
214
|
+
rescue StandardError
|
185
215
|
res = ec2_client.describe_launch_templates({
|
186
216
|
launch_template_names: [id]
|
187
217
|
})
|
@@ -194,7 +224,7 @@ module Awspec::Helper
|
|
194
224
|
res = ec2_client.describe_launch_template_versions({
|
195
225
|
launch_template_id: id
|
196
226
|
})
|
197
|
-
rescue
|
227
|
+
rescue StandardError
|
198
228
|
res = ec2_client.describe_launch_template_versions({
|
199
229
|
launch_template_name: id
|
200
230
|
})
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Awspec::Helper
|
2
4
|
module Finder
|
3
5
|
module Ecs
|
@@ -28,6 +30,7 @@ module Awspec::Helper
|
|
28
30
|
res = ecs_client.list_container_instances(req)
|
29
31
|
arns.push(*res.container_instance_arns)
|
30
32
|
break if res.next_token.nil?
|
33
|
+
|
31
34
|
req[:next_token] = res.next_token
|
32
35
|
end
|
33
36
|
arns
|
@@ -36,10 +39,10 @@ module Awspec::Helper
|
|
36
39
|
# deprecated method
|
37
40
|
def find_ecs_container_instances(cluster, container_instances)
|
38
41
|
res = ecs_client.describe_container_instances(cluster: cluster, container_instances: container_instances)
|
39
|
-
res.container_instances
|
42
|
+
res.container_instances
|
40
43
|
end
|
41
44
|
|
42
|
-
|
45
|
+
alias list_ecs_container_instances select_ecs_container_instance_arn_by_cluster_name # deprecated method
|
43
46
|
end
|
44
47
|
end
|
45
48
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Awspec::Helper
|
2
4
|
module Finder
|
3
5
|
module Efs
|
@@ -7,7 +9,7 @@ module Awspec::Helper
|
|
7
9
|
file_system_id: id,
|
8
10
|
max_items: 1
|
9
11
|
})
|
10
|
-
rescue
|
12
|
+
rescue StandardError
|
11
13
|
# Aws::EFS::Errors::BadRequest (invalid file system ID: my-efs)
|
12
14
|
file_system_id = get_id_by_name_tag(id)
|
13
15
|
res = efs_client.describe_file_systems({
|
@@ -21,7 +23,7 @@ module Awspec::Helper
|
|
21
23
|
def find_efs_tags(id, tag_key)
|
22
24
|
begin
|
23
25
|
tag_set = efs_client.describe_tags({ file_system_id: id })
|
24
|
-
rescue
|
26
|
+
rescue StandardError
|
25
27
|
# Aws::EFS::Errors::BadRequest (invalid file system ID: my-efs)
|
26
28
|
file_system_id = get_id_by_name_tag(id)
|
27
29
|
tag_set = efs_client.describe_tags({
|
@@ -55,8 +57,7 @@ module Awspec::Helper
|
|
55
57
|
|
56
58
|
def select_all_file_systems
|
57
59
|
file_systems_query = efs_client.describe_file_systems
|
58
|
-
|
59
|
-
file_systems
|
60
|
+
file_systems_query.file_systems
|
60
61
|
end
|
61
62
|
end
|
62
63
|
end
|
@@ -1,10 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Awspec::Helper
|
2
4
|
module Finder
|
3
5
|
module Elasticsearch
|
4
6
|
def find_elasticsearch_domain(id)
|
5
7
|
res = elasticsearch_client.describe_elasticsearch_domain(domain_name: id)
|
6
8
|
res.domain_status
|
7
|
-
rescue
|
9
|
+
rescue StandardError
|
8
10
|
nil
|
9
11
|
end
|
10
12
|
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Awspec::Helper
|
2
4
|
module Finder
|
3
5
|
module Elastictranscoder
|
@@ -9,6 +11,7 @@ module Awspec::Helper
|
|
9
11
|
pipeline.id == id || pipeline.name == id
|
10
12
|
end
|
11
13
|
break if res.next_page_token.nil?
|
14
|
+
|
12
15
|
res = elastictranscoder_client.list_pipelines({
|
13
16
|
page_token: res.next_page_token
|
14
17
|
})
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Awspec::Helper
|
2
4
|
module Finder
|
3
5
|
module Elb
|
@@ -6,8 +8,8 @@ module Awspec::Helper
|
|
6
8
|
load_balancer_names: [id]
|
7
9
|
})
|
8
10
|
res.load_balancer_descriptions.single_resource(id)
|
9
|
-
rescue
|
10
|
-
|
11
|
+
rescue StandardError
|
12
|
+
nil
|
11
13
|
end
|
12
14
|
|
13
15
|
def find_elb_attribute(id)
|
@@ -15,8 +17,8 @@ module Awspec::Helper
|
|
15
17
|
load_balancer_name: id
|
16
18
|
})
|
17
19
|
res.load_balancer_attributes
|
18
|
-
rescue
|
19
|
-
|
20
|
+
rescue StandardError
|
21
|
+
nil
|
20
22
|
end
|
21
23
|
|
22
24
|
def select_elb_by_vpc_id(vpc_id)
|