awspec 1.28.2 → 1.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b6f1ca2cbd7fc6f8da6c63b21580d6541b0537991e70b4fe6355206b4220d596
4
- data.tar.gz: 6a63cd43a83035df50cde9861b13390807ed23e719e8823c1171b55f62c94491
3
+ metadata.gz: 944ef5e85ed7c358169a9c3b4d9348988650a462d69e23ce65c95d8cfcb9a74f
4
+ data.tar.gz: b241cf2dfeaf0688f07b634b9f091966b5e8521b2eebcbc30515364efab4a092
5
5
  SHA512:
6
- metadata.gz: 241b78c9bd20ad9adba886717e3f95133c632e25b0dcedc2b86ec9c14f98a5a0c1a7f6a2cd1539ab63465e99490081b6e83c19847bb022280523f01231e5dfa0
7
- data.tar.gz: 6b556cf9de7bc9c7ff171fe77ca28b7e21ee9d3ec3ee6428dc20205cea8fb85fde05f3307a8a8fc8a20cfdf47a980920b8fa0890a7736585070bc8fc2e1a6bd2
6
+ metadata.gz: feaa093727b7ce960183ee46dab24a6a14ad1b1a666eedbaece65ecf9e9d196e1186384341e6ab51e0c0d8f77222b61159ed4d52a57248c3dce7c014f1b7e788
7
+ data.tar.gz: 833be40ed306a2c4aa3d213464cb8e4d1f3d05ba79c17f2da2ebfd7127a42749ff95985f73b414c8c6609fa9bbff0d5185e4040583a9ee59bd576cf6ffd44d4f
@@ -35,8 +35,6 @@ jobs:
35
35
  fail-fast: false
36
36
  matrix:
37
37
  ruby-version:
38
- - '2.1'
39
- - '2.2'
40
38
  - '2.3'
41
39
  - '2.4'
42
40
  - '2.5'
@@ -44,6 +42,7 @@ jobs:
44
42
  - '2.7'
45
43
  - '3.0'
46
44
  - '3.1'
45
+ - '3.2'
47
46
  runs-on: ubuntu-latest
48
47
  env:
49
48
  DISABLE_AWS_CLIENT_CHECK: true
@@ -0,0 +1,7 @@
1
+ ### exist
2
+
3
+ ```ruby
4
+ describe ecr_repository('my-ecr-repository') do
5
+ it { should exist }
6
+ end
7
+ ```
@@ -1,7 +1,9 @@
1
1
  ### exist
2
2
 
3
+ You can set `cluster` ( default: `default` ).
4
+
3
5
  ```ruby
4
- describe ecs_service('my-ecs-service') do
6
+ describe ecs_service('my-ecs-service'), cluster: 'my-ecs-cluster' do
5
7
  it { should exist }
6
8
  end
7
9
  ```
@@ -9,7 +11,7 @@ end
9
11
  ### be_active, be_draining, be_inactive
10
12
 
11
13
  ```ruby
12
- describe ecs_service('my-ecs-service') do
14
+ describe ecs_service('my-ecs-service'), cluster: 'my-ecs-cluster' do
13
15
  it { should be_active }
14
16
  end
15
17
  ```
@@ -37,3 +37,30 @@ describe iam_policy('my-iam-user') do
37
37
  it { should be_attached_to_user('my-iam-user') }
38
38
  end
39
39
  ```
40
+
41
+ ### have_policy_document
42
+
43
+ ```ruby
44
+ describe iam_policy('my-iam-user') do
45
+ it do
46
+ should have_policy_document(<<-'DOC')
47
+ {
48
+ "Statement": [
49
+ {
50
+ "Action": [
51
+ "s3:ListAllMyBuckets"
52
+ ],
53
+ "Effect": "Allow",
54
+ "Resource": "arn:aws:s3:::*"
55
+ },
56
+ {
57
+ "Action": "s3:*",
58
+ "Effect": "Allow",
59
+ "Resource": ["arn:aws:s3:::my-bucket", "arn:aws:s3:::my-bucket/*"]
60
+ }
61
+ ]
62
+ }
63
+ DOC
64
+ end
65
+ end
66
+ ```
@@ -19,6 +19,7 @@ end
19
19
  ```ruby
20
20
  describe nat_gateway('nat-7ff7777f') do
21
21
  it { should have_eip('123.0.456.789') }
22
+ it { should have_eip('my-eip') }
22
23
  end
23
24
  ```
24
25
 
@@ -33,7 +34,7 @@ end
33
34
  ### have_tag
34
35
 
35
36
  ```ruby
36
- describe nat_gateway('nat-7ff7777f') do
37
+ describe nat_gateway('my-nat-gateway') do
37
38
  it { should have_tag('Name').value('my-nat-gateway') }
38
39
  end
39
40
  ```
@@ -365,7 +365,7 @@ describe autoscaling_group('my-auto-scaling-group') do
365
365
  end
366
366
  ```
367
367
 
368
- ### its(:auto_scaling_group_name), its(:auto_scaling_group_arn), its(:launch_configuration_name), its(:launch_template), its(:mixed_instances_policy), its(:min_size), its(:max_size), its(:desired_capacity), its(:predicted_capacity), its(:default_cooldown), its(:availability_zones), its(:load_balancer_names), its(:target_group_arns), its(:health_check_type), its(:health_check_grace_period), its(:created_time), its(:placement_group), its(:vpc_zone_identifier), its(:enabled_metrics), its(:status), its(:termination_policies), its(:new_instances_protected_from_scale_in), its(:service_linked_role_arn), its(:max_instance_lifetime), its(:capacity_rebalance), its(:warm_pool_configuration), its(:warm_pool_size), its(:context), its(:desired_capacity_type), its(:default_instance_warmup)
368
+ ### its(:auto_scaling_group_name), its(:auto_scaling_group_arn), its(:launch_configuration_name), its(:launch_template), its(:mixed_instances_policy), its(:min_size), its(:max_size), its(:desired_capacity), its(:predicted_capacity), its(:default_cooldown), its(:availability_zones), its(:load_balancer_names), its(:target_group_arns), its(:health_check_type), its(:health_check_grace_period), its(:created_time), its(:placement_group), its(:vpc_zone_identifier), its(:enabled_metrics), its(:status), its(:termination_policies), its(:new_instances_protected_from_scale_in), its(:service_linked_role_arn), its(:max_instance_lifetime), its(:capacity_rebalance), its(:warm_pool_configuration), its(:warm_pool_size), its(:context), its(:desired_capacity_type), its(:default_instance_warmup), its(:traffic_sources)
369
369
  ## <a name="batch_compute_environment">batch_compute_environment</a>
370
370
 
371
371
  BatchComputeEnvironment resource type.
@@ -404,7 +404,7 @@ end
404
404
 
405
405
  ### be_unmanaged
406
406
 
407
- ### its(:compute_environment_name), its(:compute_environment_arn), its(:unmanagedv_cpus), its(:ecs_cluster_arn), its(:tags), its(:type), its(:state), its(:status), its(:status_reason), its(:service_role), its(:update_policy)
407
+ ### its(:compute_environment_name), its(:compute_environment_arn), its(:unmanagedv_cpus), its(:ecs_cluster_arn), its(:tags), its(:type), its(:state), its(:status), its(:status_reason), its(:service_role), its(:update_policy), its(:eks_configuration), its(:container_orchestration_type), its(:uuid)
408
408
  ## <a name="batch_job_definition">batch_job_definition</a>
409
409
 
410
410
  BatchJobDefinition resource type.
@@ -417,7 +417,7 @@ describe batch_job_definition('my-batch-job-definition') do
417
417
  end
418
418
  ```
419
419
 
420
- ### its(:job_definition_name), its(:job_definition_arn), its(:revision), its(:status), its(:type), its(:scheduling_priority), its(:parameters), its(:retry_strategy), its(:timeout), its(:node_properties), its(:tags), its(:propagate_tags), its(:platform_capabilities)
420
+ ### its(:job_definition_name), its(:job_definition_arn), its(:revision), its(:status), its(:type), its(:scheduling_priority), its(:parameters), its(:retry_strategy), its(:timeout), its(:node_properties), its(:tags), its(:propagate_tags), its(:platform_capabilities), its(:eks_properties), its(:container_orchestration_type)
421
421
  ## <a name="batch_job_queue">batch_job_queue</a>
422
422
 
423
423
  BatchJobQueue resource type.
@@ -544,7 +544,7 @@ describe cloudfront_distribution('123456789zyxw.cloudfront.net') do
544
544
  end
545
545
  ```
546
546
 
547
- ### its(:id), its(:arn), its(:status), its(:last_modified_time), its(:domain_name), its(:origin_groups), its(:comment), its(:price_class), its(:enabled), its(:web_acl_id), its(:http_version), its(:is_ipv6_enabled), its(:alias_icp_recordals)
547
+ ### its(:id), its(:arn), its(:status), its(:last_modified_time), its(:domain_name), its(:origin_groups), its(:comment), its(:price_class), its(:enabled), its(:web_acl_id), its(:http_version), its(:is_ipv6_enabled), its(:alias_icp_recordals), its(:staging)
548
548
  ## <a name="cloudtrail">cloudtrail</a>
549
549
 
550
550
  Cloudtrail resource type.
@@ -651,7 +651,7 @@ describe cloudwatch_alarm('my-cloudwatch-alarm') do
651
651
  end
652
652
  ```
653
653
 
654
- ### its(:alarm_name), its(:alarm_arn), its(:alarm_description), its(:alarm_configuration_updated_timestamp), its(:actions_enabled), its(:ok_actions), its(:alarm_actions), its(:insufficient_data_actions), its(:state_value), its(:state_reason), its(:state_reason_data), its(:state_updated_timestamp), its(:metric_name), its(:namespace), its(:statistic), its(:extended_statistic), its(:period), its(:unit), its(:evaluation_periods), its(:datapoints_to_alarm), its(:threshold), its(:comparison_operator), its(:treat_missing_data), its(:evaluate_low_sample_count_percentile), its(:metrics), its(:threshold_metric_id)
654
+ ### its(:alarm_name), its(:alarm_arn), its(:alarm_description), its(:alarm_configuration_updated_timestamp), its(:actions_enabled), its(:ok_actions), its(:alarm_actions), its(:insufficient_data_actions), its(:state_value), its(:state_reason), its(:state_reason_data), its(:state_updated_timestamp), its(:metric_name), its(:namespace), its(:statistic), its(:extended_statistic), its(:period), its(:unit), its(:evaluation_periods), its(:datapoints_to_alarm), its(:threshold), its(:comparison_operator), its(:treat_missing_data), its(:evaluate_low_sample_count_percentile), its(:metrics), its(:threshold_metric_id), its(:evaluation_state), its(:state_transitioned_timestamp)
655
655
  ## <a name="cloudwatch_event">cloudwatch_event</a>
656
656
 
657
657
  CloudwatchEvent resource type.
@@ -729,7 +729,7 @@ describe cloudwatch_logs('my-cloudwatch-logs-group') do
729
729
  end
730
730
  ```
731
731
 
732
- ### its(:log_group_name), its(:creation_time), its(:retention_in_days), its(:metric_filter_count), its(:arn), its(:stored_bytes), its(:kms_key_id)
732
+ ### its(:log_group_name), its(:creation_time), its(:retention_in_days), its(:metric_filter_count), its(:arn), its(:stored_bytes), its(:kms_key_id), its(:data_protection_status)
733
733
  ## <a name="codebuild">codebuild</a>
734
734
 
735
735
  Codebuild resource type.
@@ -895,7 +895,7 @@ end
895
895
  ```
896
896
 
897
897
 
898
- ### its(:table_name), its(:table_status), its(:creation_date_time), its(:table_size_bytes), its(:item_count), its(:table_arn), its(:table_id), its(:billing_mode_summary), its(:local_secondary_indexes), its(:global_secondary_indexes), its(:stream_specification), its(:latest_stream_label), its(:latest_stream_arn), its(:global_table_version), its(:replicas), its(:restore_summary), its(:sse_description), its(:archival_summary), its(:table_class_summary)
898
+ ### its(:table_name), its(:table_status), its(:creation_date_time), its(:table_size_bytes), its(:item_count), its(:table_arn), its(:table_id), its(:billing_mode_summary), its(:local_secondary_indexes), its(:global_secondary_indexes), its(:stream_specification), its(:latest_stream_label), its(:latest_stream_arn), its(:global_table_version), its(:replicas), its(:restore_summary), its(:sse_description), its(:archival_summary), its(:table_class_summary), its(:deletion_protection_enabled)
899
899
  ### :unlock: Advanced use
900
900
 
901
901
  `dynamodb_table` can use `Aws::DynamoDB::Table` resource (see http://docs.aws.amazon.com/sdkforruby/api/Aws/DynamoDB/Table.html).
@@ -1141,7 +1141,7 @@ end
1141
1141
  ```
1142
1142
 
1143
1143
 
1144
- ### its(:ami_launch_index), its(:image_id), its(:instance_id), its(:instance_type), its(:kernel_id), its(:key_name), its(:launch_time), its(:monitoring), its(:placement), its(:platform), its(:private_dns_name), its(:private_ip_address), its(:product_codes), its(:public_dns_name), its(:public_ip_address), its(:ramdisk_id), its(:state_transition_reason), its(:subnet_id), its(:vpc_id), its(:architecture), its(:client_token), its(:ebs_optimized), its(:ena_support), its(:hypervisor), its(:instance_lifecycle), its(:elastic_gpu_associations), its(:elastic_inference_accelerator_associations), its(:outpost_arn), its(:root_device_name), its(:root_device_type), its(:source_dest_check), its(:spot_instance_request_id), its(:sriov_net_support), its(:state_reason), its(:virtualization_type), its(:cpu_options), its(:capacity_reservation_id), its(:capacity_reservation_specification), its(:hibernation_options), its(:licenses), its(:metadata_options), its(:enclave_options), its(:boot_mode), its(:platform_details), its(:usage_operation), its(:usage_operation_update_time), its(:private_dns_name_options), its(:ipv_6_address), its(:tpm_support), its(:maintenance_options)
1144
+ ### its(:ami_launch_index), its(:image_id), its(:instance_id), its(:instance_type), its(:kernel_id), its(:key_name), its(:launch_time), its(:monitoring), its(:placement), its(:platform), its(:private_dns_name), its(:private_ip_address), its(:product_codes), its(:public_dns_name), its(:public_ip_address), its(:ramdisk_id), its(:state_transition_reason), its(:subnet_id), its(:vpc_id), its(:architecture), its(:client_token), its(:ebs_optimized), its(:ena_support), its(:hypervisor), its(:instance_lifecycle), its(:elastic_gpu_associations), its(:elastic_inference_accelerator_associations), its(:outpost_arn), its(:root_device_name), its(:root_device_type), its(:source_dest_check), its(:spot_instance_request_id), its(:sriov_net_support), its(:state_reason), its(:virtualization_type), its(:cpu_options), its(:capacity_reservation_id), its(:capacity_reservation_specification), its(:hibernation_options), its(:licenses), its(:metadata_options), its(:enclave_options), its(:boot_mode), its(:platform_details), its(:usage_operation), its(:usage_operation_update_time), its(:private_dns_name_options), its(:ipv_6_address), its(:tpm_support), its(:maintenance_options), its(:current_instance_boot_mode)
1145
1145
  ### :unlock: Advanced use
1146
1146
 
1147
1147
  `ec2` can use `Aws::EC2::Instance` resource (see http://docs.aws.amazon.com/sdkforruby/api/Aws/EC2/Instance.html).
@@ -1202,11 +1202,17 @@ end
1202
1202
 
1203
1203
  ## <a name="ecr_repository">ecr_repository</a>
1204
1204
 
1205
- EcrRepository resource type.
1205
+ ECR Repository resource type.
1206
1206
 
1207
1207
  ### exist
1208
1208
 
1209
+ ```ruby
1210
+ describe ecr_repository('my-ecr-repository') do
1211
+ it { should exist }
1212
+ end
1213
+ ```
1209
1214
 
1215
+ ### its(:repository_arn), its(:registry_id), its(:repository_name), its(:repository_uri), its(:created_at), its(:image_tag_mutability), its(:image_scanning_configuration), its(:encryption_configuration)
1210
1216
  ## <a name="ecs_cluster">ecs_cluster</a>
1211
1217
 
1212
1218
  ECS Cluster resource type.
@@ -1237,7 +1243,7 @@ describe ecs_cluster('my-ecs-cluster') do
1237
1243
  end
1238
1244
  ```
1239
1245
 
1240
- ### its(:cluster_arn), its(:cluster_name), its(:configuration), its(:status), its(:registered_container_instances_count), its(:running_tasks_count), its(:pending_tasks_count), its(:active_services_count), its(:statistics), its(:tags), its(:settings), its(:capacity_providers), its(:default_capacity_provider_strategy), its(:attachments), its(:attachments_status)
1246
+ ### its(:cluster_arn), its(:cluster_name), its(:configuration), its(:status), its(:registered_container_instances_count), its(:running_tasks_count), its(:pending_tasks_count), its(:active_services_count), its(:statistics), its(:tags), its(:settings), its(:capacity_providers), its(:default_capacity_provider_strategy), its(:attachments), its(:attachments_status), its(:service_connect_defaults)
1241
1247
  ## <a name="ecs_container_instance">ecs_container_instance</a>
1242
1248
 
1243
1249
  ECS Container Instance resource type.
@@ -1269,8 +1275,10 @@ ECS Service resource type.
1269
1275
 
1270
1276
  ### exist
1271
1277
 
1278
+ You can set `cluster` ( default: `default` ).
1279
+
1272
1280
  ```ruby
1273
- describe ecs_service('my-ecs-service') do
1281
+ describe ecs_service('my-ecs-service'), cluster: 'my-ecs-cluster' do
1274
1282
  it { should exist }
1275
1283
  end
1276
1284
  ```
@@ -1279,7 +1287,7 @@ end
1279
1287
  ### be_active, be_draining, be_inactive
1280
1288
 
1281
1289
  ```ruby
1282
- describe ecs_service('my-ecs-service') do
1290
+ describe ecs_service('my-ecs-service'), cluster: 'my-ecs-cluster' do
1283
1291
  it { should be_active }
1284
1292
  end
1285
1293
  ```
@@ -1508,7 +1516,7 @@ describe elasticache('my-rep-group-001') do
1508
1516
  end
1509
1517
  ```
1510
1518
 
1511
- ### its(:cache_cluster_id), its(:configuration_endpoint), its(:client_download_landing_page), its(:cache_node_type), its(:engine), its(:engine_version), its(:cache_cluster_status), its(:num_cache_nodes), its(:preferred_availability_zone), its(:preferred_outpost_arn), its(:cache_cluster_create_time), its(:preferred_maintenance_window), its(:notification_configuration), its(:cache_security_groups), its(:cache_subnet_group_name), its(:cache_nodes), its(:auto_minor_version_upgrade), its(:replication_group_id), its(:snapshot_retention_limit), its(:snapshot_window), its(:auth_token_enabled), its(:auth_token_last_modified_date), its(:transit_encryption_enabled), its(:at_rest_encryption_enabled), its(:arn), its(:replication_group_log_delivery_enabled), its(:log_delivery_configurations)
1519
+ ### its(:cache_cluster_id), its(:configuration_endpoint), its(:client_download_landing_page), its(:cache_node_type), its(:engine), its(:engine_version), its(:cache_cluster_status), its(:num_cache_nodes), its(:preferred_availability_zone), its(:preferred_outpost_arn), its(:cache_cluster_create_time), its(:preferred_maintenance_window), its(:notification_configuration), its(:cache_security_groups), its(:cache_subnet_group_name), its(:cache_nodes), its(:auto_minor_version_upgrade), its(:replication_group_id), its(:snapshot_retention_limit), its(:snapshot_window), its(:auth_token_enabled), its(:auth_token_last_modified_date), its(:transit_encryption_enabled), its(:at_rest_encryption_enabled), its(:arn), its(:replication_group_log_delivery_enabled), its(:log_delivery_configurations), its(:network_type), its(:ip_discovery), its(:transit_encryption_mode)
1512
1520
  ## <a name="elasticache_cache_parameter_group">elasticache_cache_parameter_group</a>
1513
1521
 
1514
1522
  ElasticacheCacheParameterGroup resource type.
@@ -1930,6 +1938,34 @@ describe iam_policy('my-iam-user') do
1930
1938
  end
1931
1939
  ```
1932
1940
 
1941
+
1942
+ ### have_policy_document
1943
+
1944
+ ```ruby
1945
+ describe iam_policy('my-iam-user') do
1946
+ it do
1947
+ should have_policy_document(<<-'DOC')
1948
+ {
1949
+ "Statement": [
1950
+ {
1951
+ "Action": [
1952
+ "s3:ListAllMyBuckets"
1953
+ ],
1954
+ "Effect": "Allow",
1955
+ "Resource": "arn:aws:s3:::*"
1956
+ },
1957
+ {
1958
+ "Action": "s3:*",
1959
+ "Effect": "Allow",
1960
+ "Resource": ["arn:aws:s3:::my-bucket", "arn:aws:s3:::my-bucket/*"]
1961
+ }
1962
+ ]
1963
+ }
1964
+ DOC
1965
+ end
1966
+ end
1967
+ ```
1968
+
1933
1969
  ### its(:policy_name), its(:policy_id), its(:arn), its(:path), its(:default_version_id), its(:attachment_count), its(:permissions_boundary_usage_count), its(:is_attachable), its(:description), its(:create_date), its(:update_date), its(:tags)
1934
1970
  ## <a name="iam_role">iam_role</a>
1935
1971
 
@@ -2245,7 +2281,7 @@ DOC
2245
2281
  end
2246
2282
  ```
2247
2283
 
2248
- ### its(:aws_account_id), its(:key_id), its(:arn), its(:creation_date), its(:enabled), its(:description), its(:key_usage), its(:key_state), its(:deletion_date), its(:valid_to), its(:origin), its(:custom_key_store_id), its(:cloud_hsm_cluster_id), its(:expiration_model), its(:key_manager), its(:customer_master_key_spec), its(:key_spec), its(:encryption_algorithms), its(:signing_algorithms), its(:multi_region), its(:multi_region_configuration), its(:pending_deletion_window_in_days), its(:mac_algorithms)
2284
+ ### its(:aws_account_id), its(:key_id), its(:arn), its(:creation_date), its(:enabled), its(:description), its(:key_usage), its(:key_state), its(:deletion_date), its(:valid_to), its(:origin), its(:custom_key_store_id), its(:cloud_hsm_cluster_id), its(:expiration_model), its(:key_manager), its(:customer_master_key_spec), its(:key_spec), its(:encryption_algorithms), its(:signing_algorithms), its(:multi_region), its(:multi_region_configuration), its(:pending_deletion_window_in_days), its(:mac_algorithms), its(:xks_key_configuration)
2249
2285
  ## <a name="lambda">lambda</a>
2250
2286
 
2251
2287
  Lambda resource type.
@@ -2294,7 +2330,7 @@ end
2294
2330
 
2295
2331
  This matcher does not support Amazon S3 event sources ([see SDK doc](http://docs.aws.amazon.com/sdkforruby/api/Aws/Lambda/Client.html#list_event_source_mappings-instance_method)).
2296
2332
 
2297
- ### its(:function_name), its(:function_arn), its(:runtime), its(:role), its(:handler), its(:code_size), its(:description), its(:timeout), its(:memory_size), its(:last_modified), its(:code_sha_256), its(:version), its(:vpc_config), its(:dead_letter_config), its(:kms_key_arn), its(:master_arn), its(:revision_id), its(:layers), its(:state), its(:state_reason), its(:state_reason_code), its(:last_update_status), its(:last_update_status_reason), its(:last_update_status_reason_code), its(:file_system_configs), its(:package_type), its(:image_config_response), its(:signing_profile_version_arn), its(:signing_job_arn), its(:architectures), its(:ephemeral_storage)
2333
+ ### its(:function_name), its(:function_arn), its(:runtime), its(:role), its(:handler), its(:code_size), its(:description), its(:timeout), its(:memory_size), its(:last_modified), its(:code_sha_256), its(:version), its(:vpc_config), its(:dead_letter_config), its(:kms_key_arn), its(:master_arn), its(:revision_id), its(:layers), its(:state), its(:state_reason), its(:state_reason_code), its(:last_update_status), its(:last_update_status_reason), its(:last_update_status_reason_code), its(:file_system_configs), its(:package_type), its(:image_config_response), its(:signing_profile_version_arn), its(:signing_job_arn), its(:architectures), its(:ephemeral_storage), its(:snap_start), its(:runtime_version_config)
2298
2334
  ## <a name="launch_configuration">launch_configuration</a>
2299
2335
 
2300
2336
  LaunchConfiguration resource type.
@@ -2440,7 +2476,7 @@ end
2440
2476
 
2441
2477
  ### be_updating
2442
2478
 
2443
- ### its(:active_operation_arn), its(:client_authentication), its(:cluster_arn), its(:cluster_name), its(:creation_time), its(:current_version), its(:enhanced_monitoring), its(:number_of_broker_nodes), its(:state), its(:state_info), its(:zookeeper_connect_string), its(:zookeeper_connect_string_tls)
2479
+ ### its(:active_operation_arn), its(:client_authentication), its(:cluster_arn), its(:cluster_name), its(:creation_time), its(:current_version), its(:enhanced_monitoring), its(:number_of_broker_nodes), its(:state), its(:state_info), its(:zookeeper_connect_string), its(:zookeeper_connect_string_tls), its(:storage_mode)
2444
2480
  ## <a name="nat_gateway">nat_gateway</a>
2445
2481
 
2446
2482
  NatGateway resource type.
@@ -2468,6 +2504,7 @@ end
2468
2504
  ```ruby
2469
2505
  describe nat_gateway('nat-7ff7777f') do
2470
2506
  it { should have_eip('123.0.456.789') }
2507
+ it { should have_eip('my-eip') }
2471
2508
  end
2472
2509
  ```
2473
2510
 
@@ -2475,7 +2512,7 @@ end
2475
2512
  ### have_tag
2476
2513
 
2477
2514
  ```ruby
2478
- describe nat_gateway('nat-7ff7777f') do
2515
+ describe nat_gateway('my-nat-gateway') do
2479
2516
  it { should have_tag('Name').value('my-nat-gateway') }
2480
2517
  end
2481
2518
  ```
@@ -2868,7 +2905,7 @@ end
2868
2905
  ```
2869
2906
 
2870
2907
 
2871
- ### its(:vpc_id), its(:db_instance_identifier), its(:db_instance_class), its(:engine), its(:db_instance_status), its(:automatic_restart_time), its(:master_username), its(:db_name), its(:endpoint), its(:allocated_storage), its(:instance_create_time), its(:preferred_backup_window), its(:backup_retention_period), its(:db_security_groups), its(:availability_zone), its(:preferred_maintenance_window), its(:pending_modified_values), its(:latest_restorable_time), its(:multi_az), its(:engine_version), its(:auto_minor_version_upgrade), its(:read_replica_source_db_instance_identifier), its(:read_replica_db_instance_identifiers), its(:read_replica_db_cluster_identifiers), its(:replica_mode), its(:license_model), its(:iops), its(:character_set_name), its(:nchar_character_set_name), its(:secondary_availability_zone), its(:publicly_accessible), its(:status_infos), its(:storage_type), its(:tde_credential_arn), its(:db_instance_port), its(:db_cluster_identifier), its(:storage_encrypted), its(:kms_key_id), its(:dbi_resource_id), its(:ca_certificate_identifier), its(:domain_memberships), its(:copy_tags_to_snapshot), its(:monitoring_interval), its(:enhanced_monitoring_resource_arn), its(:monitoring_role_arn), its(:promotion_tier), its(:db_instance_arn), its(:timezone), its(:iam_database_authentication_enabled), its(:performance_insights_enabled), its(:performance_insights_kms_key_id), its(:performance_insights_retention_period), its(:enabled_cloudwatch_logs_exports), its(:processor_features), its(:deletion_protection), its(:associated_roles), its(:listener_endpoint), its(:max_allocated_storage), its(:tag_list), its(:db_instance_automated_backups_replications), its(:customer_owned_ip_enabled), its(:aws_backup_recovery_point_arn), its(:activity_stream_status), its(:activity_stream_kms_key_id), its(:activity_stream_kinesis_stream_name), its(:activity_stream_mode), its(:activity_stream_engine_native_audit_fields_included), its(:automation_mode), its(:resume_full_automation_mode_time), its(:custom_iam_instance_profile), its(:backup_target), its(:network_type), its(:activity_stream_policy_status)
2908
+ ### its(:vpc_id), its(:db_instance_identifier), its(:db_instance_class), its(:engine), its(:db_instance_status), its(:automatic_restart_time), its(:master_username), its(:db_name), its(:endpoint), its(:allocated_storage), its(:instance_create_time), its(:preferred_backup_window), its(:backup_retention_period), its(:db_security_groups), its(:availability_zone), its(:preferred_maintenance_window), its(:pending_modified_values), its(:latest_restorable_time), its(:multi_az), its(:engine_version), its(:auto_minor_version_upgrade), its(:read_replica_source_db_instance_identifier), its(:read_replica_db_instance_identifiers), its(:read_replica_db_cluster_identifiers), its(:replica_mode), its(:license_model), its(:iops), its(:character_set_name), its(:nchar_character_set_name), its(:secondary_availability_zone), its(:publicly_accessible), its(:status_infos), its(:storage_type), its(:tde_credential_arn), its(:db_instance_port), its(:db_cluster_identifier), its(:storage_encrypted), its(:kms_key_id), its(:dbi_resource_id), its(:ca_certificate_identifier), its(:domain_memberships), its(:copy_tags_to_snapshot), its(:monitoring_interval), its(:enhanced_monitoring_resource_arn), its(:monitoring_role_arn), its(:promotion_tier), its(:db_instance_arn), its(:timezone), its(:iam_database_authentication_enabled), its(:performance_insights_enabled), its(:performance_insights_kms_key_id), its(:performance_insights_retention_period), its(:enabled_cloudwatch_logs_exports), its(:processor_features), its(:deletion_protection), its(:associated_roles), its(:listener_endpoint), its(:max_allocated_storage), its(:tag_list), its(:db_instance_automated_backups_replications), its(:customer_owned_ip_enabled), its(:aws_backup_recovery_point_arn), its(:activity_stream_status), its(:activity_stream_kms_key_id), its(:activity_stream_kinesis_stream_name), its(:activity_stream_mode), its(:activity_stream_engine_native_audit_fields_included), its(:automation_mode), its(:resume_full_automation_mode_time), its(:custom_iam_instance_profile), its(:backup_target), its(:network_type), its(:activity_stream_policy_status), its(:storage_throughput), its(:db_system_id), its(:master_user_secret), its(:certificate_details)
2872
2909
  ### :unlock: Advanced use
2873
2910
 
2874
2911
  `rds` can use `Aws::RDS::DBInstance` resource (see http://docs.aws.amazon.com/sdkforruby/api/Aws/RDS/DBInstance.html).
@@ -2941,7 +2978,7 @@ describe rds_db_cluster('my-rds-db-cluster') do
2941
2978
  end
2942
2979
  ```
2943
2980
 
2944
- ### its(:allocated_storage), its(:availability_zones), its(:backup_retention_period), its(:character_set_name), its(:database_name), its(:db_cluster_identifier), its(:db_cluster_parameter_group), its(:db_subnet_group), its(:status), its(:automatic_restart_time), its(:percent_progress), its(:earliest_restorable_time), its(:endpoint), its(:reader_endpoint), its(:custom_endpoints), its(:multi_az), its(:engine), its(:engine_version), its(:latest_restorable_time), its(:port), its(:master_username), its(:db_cluster_option_group_memberships), its(:preferred_backup_window), its(:preferred_maintenance_window), its(:replication_source_identifier), its(:read_replica_identifiers), its(:hosted_zone_id), its(:storage_encrypted), its(:kms_key_id), its(:db_cluster_resource_id), its(:db_cluster_arn), its(:associated_roles), its(:iam_database_authentication_enabled), its(:clone_group_id), its(:cluster_create_time), its(:earliest_backtrack_time), its(:backtrack_window), its(:backtrack_consumed_change_records), its(:enabled_cloudwatch_logs_exports), its(:capacity), its(:engine_mode), its(:scaling_configuration_info), its(:deletion_protection), its(:http_endpoint_enabled), its(:activity_stream_mode), its(:activity_stream_status), its(:activity_stream_kms_key_id), its(:activity_stream_kinesis_stream_name), its(:copy_tags_to_snapshot), its(:cross_account_clone), its(:domain_memberships), its(:tag_list), its(:global_write_forwarding_status), its(:global_write_forwarding_requested), its(:pending_modified_values), its(:db_cluster_instance_class), its(:storage_type), its(:iops), its(:publicly_accessible), its(:auto_minor_version_upgrade), its(:monitoring_interval), its(:monitoring_role_arn), its(:performance_insights_enabled), its(:performance_insights_kms_key_id), its(:performance_insights_retention_period), its(:serverless_v2_scaling_configuration), its(:network_type)
2981
+ ### its(:allocated_storage), its(:availability_zones), its(:backup_retention_period), its(:character_set_name), its(:database_name), its(:db_cluster_identifier), its(:db_cluster_parameter_group), its(:db_subnet_group), its(:status), its(:automatic_restart_time), its(:percent_progress), its(:earliest_restorable_time), its(:endpoint), its(:reader_endpoint), its(:custom_endpoints), its(:multi_az), its(:engine), its(:engine_version), its(:latest_restorable_time), its(:port), its(:master_username), its(:db_cluster_option_group_memberships), its(:preferred_backup_window), its(:preferred_maintenance_window), its(:replication_source_identifier), its(:read_replica_identifiers), its(:hosted_zone_id), its(:storage_encrypted), its(:kms_key_id), its(:db_cluster_resource_id), its(:db_cluster_arn), its(:associated_roles), its(:iam_database_authentication_enabled), its(:clone_group_id), its(:cluster_create_time), its(:earliest_backtrack_time), its(:backtrack_window), its(:backtrack_consumed_change_records), its(:enabled_cloudwatch_logs_exports), its(:capacity), its(:engine_mode), its(:scaling_configuration_info), its(:deletion_protection), its(:http_endpoint_enabled), its(:activity_stream_mode), its(:activity_stream_status), its(:activity_stream_kms_key_id), its(:activity_stream_kinesis_stream_name), its(:copy_tags_to_snapshot), its(:cross_account_clone), its(:domain_memberships), its(:tag_list), its(:global_write_forwarding_status), its(:global_write_forwarding_requested), its(:pending_modified_values), its(:db_cluster_instance_class), its(:storage_type), its(:iops), its(:publicly_accessible), its(:auto_minor_version_upgrade), its(:monitoring_interval), its(:monitoring_role_arn), its(:performance_insights_enabled), its(:performance_insights_kms_key_id), its(:performance_insights_retention_period), its(:serverless_v2_scaling_configuration), its(:network_type), its(:db_system_id), its(:master_user_secret)
2945
2982
  ## <a name="rds_db_cluster_parameter_group">rds_db_cluster_parameter_group</a>
2946
2983
 
2947
2984
  RdsDbClusterParameterGroup resource type.
@@ -3509,7 +3546,7 @@ describe secretsmanager('my-secret') do
3509
3546
  end
3510
3547
  ```
3511
3548
 
3512
- ### its(:arn), its(:name), its(:description), its(:kms_key_id), its(:rotation_enabled), its(:rotation_lambda_arn), its(:last_rotated_date), its(:last_changed_date), its(:last_accessed_date), its(:deleted_date), its(:owning_service), its(:created_date), its(:primary_region), its(:replication_status)
3549
+ ### its(:arn), its(:name), its(:description), its(:kms_key_id), its(:rotation_enabled), its(:rotation_lambda_arn), its(:last_rotated_date), its(:last_changed_date), its(:last_accessed_date), its(:deleted_date), its(:next_rotation_date), its(:owning_service), its(:created_date), its(:primary_region), its(:replication_status)
3513
3550
  ## <a name="security_group">security_group</a>
3514
3551
 
3515
3552
  SecurityGroup resource type.
@@ -6,7 +6,9 @@ module Awspec::Generator
6
6
  class EcrRepository < Base
7
7
  def initialize
8
8
  super
9
+ @type_name = 'ECR Repository'
9
10
  @type = Awspec::Type::EcrRepository.new('my-ecr-repository')
11
+ @ret = @type.resource_via_client
10
12
  @matchers = []
11
13
  @ignore_matchers = []
12
14
  @describes = []
@@ -17,6 +17,7 @@ Aws.config[:cloudfront] = {
17
17
  status: 'Deployed',
18
18
  last_modified_time: Time.new(2015, 1, 2, 10, 00, 00, '+00:00'),
19
19
  domain_name: 'abcdefghijklmn.cloudfront.net',
20
+ staging: false,
20
21
  aliases: {
21
22
  quantity: 0,
22
23
  items: []
@@ -107,7 +108,8 @@ Aws.config[:cloudfront] = {
107
108
  },
108
109
  web_acl_id: '',
109
110
  http_version: 'http2',
110
- is_ipv6_enabled: true
111
+ is_ipv6_enabled: true,
112
+ staging: false
111
113
  },
112
114
  {
113
115
  id: 'E2CLOUDFRONTXX',
@@ -115,6 +117,7 @@ Aws.config[:cloudfront] = {
115
117
  status: 'Deployed',
116
118
  last_modified_time: Time.new(2016, 3, 2, 10, 00, 00, '+00:00'),
117
119
  domain_name: '123456789zyxw.cloudfront.net',
120
+ staging: false,
118
121
  aliases: {
119
122
  quantity: 1,
120
123
  items: ['cf-s3-origin-hosting.dev.example.com']
@@ -223,7 +226,8 @@ Aws.config[:cloudfront] = {
223
226
  },
224
227
  web_acl_id: '',
225
228
  http_version: 'http1.1',
226
- is_ipv6_enabled: true
229
+ is_ipv6_enabled: true,
230
+ staging: false
227
231
  }
228
232
  ]
229
233
  }
@@ -34,6 +34,7 @@ Aws.config[:iam] = {
34
34
  {
35
35
  attachment_count: 1,
36
36
  arn: 'arn:aws:iam::aws:policy/my-iam-policy',
37
+ default_version_id: 'v1',
37
38
  is_attachable: true,
38
39
  policy_id: 'PABCDEFGHI123455689',
39
40
  policy_name: 'my-iam-policy',
@@ -42,6 +43,7 @@ Aws.config[:iam] = {
42
43
  {
43
44
  attachment_count: 1,
44
45
  arn: 'arn:aws:iam::aws:policy/AmazonAPIGatewayAdministrator',
46
+ default_version_id: 'v1',
45
47
  is_attachable: true,
46
48
  policy_id: 'PABCDEFGHI123455688',
47
49
  policy_name: 'AmazonAPIGatewayAdministrator',
@@ -50,6 +52,7 @@ Aws.config[:iam] = {
50
52
  {
51
53
  attachment_count: 1,
52
54
  arn: 'arn:aws:iam::aws:policy/service-role/AmazonEC2RoleforDataPipelineRole',
55
+ default_version_id: 'v1',
53
56
  is_attachable: true,
54
57
  policy_id: 'PABCDEFGHI123455687',
55
58
  policy_name: 'AmazonEC2RoleforDataPipelineRole',
@@ -67,6 +70,17 @@ Aws.config[:iam] = {
67
70
  policy_groups: [
68
71
  { group_name: 'my-iam-group' }
69
72
  ]
73
+ },
74
+ get_policy_version: {
75
+ policy_version: {
76
+ document: '{"Statement": [{"Action": ["s3:ListAllMyBuckets"],' \
77
+ '"Effect": "Allow","Resource": "arn:aws:s3:::*"},' \
78
+ '{"Action": "s3:*","Effect": "Allow","Resource":' \
79
+ '["arn:aws:s3:::my-bucket", "arn:aws:s3:::my-bucket/*"]}]}',
80
+ version_id: 'v1',
81
+ is_default_version: true,
82
+ create_date: Time.new(2022, 11, 12, 01, 23, 45, '+00:00')
83
+ }
70
84
  }
71
85
  }
72
86
  }
@@ -45,7 +45,9 @@ module Awspec::Type
45
45
  return true if ret
46
46
 
47
47
  subnet2 = find_subnet(subnet_id)
48
- subnet2.subnet_id = subnet_id
48
+ azs.find do |az|
49
+ az.subnet_id == subnet2.subnet_id
50
+ end
49
51
  end
50
52
 
51
53
  def has_tag?(tag_key, tag_value)
@@ -61,5 +61,14 @@ module Awspec::Type
61
61
  !roles.empty?
62
62
  end
63
63
  end
64
+
65
+ def has_policy_document?(document)
66
+ res = iam_client.get_policy_version({
67
+ policy_arn: resource_via_client.arn,
68
+ version_id: resource_via_client.default_version_id
69
+ })
70
+
71
+ JSON.parse(URI.decode_www_form_component(res.policy_version.document)) == JSON.parse(document)
72
+ end
64
73
  end
65
74
  end
@@ -23,9 +23,16 @@ module Awspec::Type
23
23
  end
24
24
 
25
25
  def has_eip?(ip_address = nil)
26
- resource_via_client.nat_gateway_addresses.find do |address|
27
- return address.public_ip == ip_address
26
+ ret = resource_via_client.nat_gateway_addresses.find do |address|
27
+ address.public_ip == ip_address
28
28
  end
29
+ return true if ret
30
+
31
+ res = select_eip(ip_address)
32
+ ret = resource_via_client.nat_gateway_addresses.find do |address|
33
+ address.public_ip == res.public_ip
34
+ end
35
+ return true if ret
29
36
  end
30
37
  end
31
38
  end
@@ -32,7 +32,9 @@ module Awspec::Type
32
32
  return true if ret
33
33
 
34
34
  subnet2 = find_subnet(subnet_id)
35
- subnet2.subnet_id = subnet_id
35
+ azs.find do |az|
36
+ az.subnet_id == subnet2.subnet_id
37
+ end
36
38
  end
37
39
  end
38
40
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Awspec
4
- VERSION = '1.28.2'
4
+ VERSION = '1.29.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: awspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.28.2
4
+ version: 1.29.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - k1LoW
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-10-24 00:00:00.000000000 Z
11
+ date: 2023-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -273,6 +273,7 @@ files:
273
273
  - doc/_resource_types/ebs.md
274
274
  - doc/_resource_types/ec2.md
275
275
  - doc/_resource_types/ec2_account_attributes.md
276
+ - doc/_resource_types/ecr_repository.md
276
277
  - doc/_resource_types/ecs_cluster.md
277
278
  - doc/_resource_types/ecs_container_instance.md
278
279
  - doc/_resource_types/ecs_service.md